Act as an expert systems and Android developer specializing in emulation.
Provide a comprehensive architectural guide and implementation roadmap for building a multi-system emulator for Android that supports the following platforms:
- Game Boy (GB)
- Game Boy Advance (GBA)
- Nintendo DS (NDS)
- Nintendo Switch
Please address the following in your response:
1. **Software Architecture & Design Patterns**:
- Recommend key software design patterns (e.g., Factory, Strategy, Component/Modular core architecture) to manage disparate console systems within a single application.
- Detail how to structure the separation between the Android frontend (UI, input, audio, display) and the low-level emulation backend.
2. **Emulation Requirements by System**:
- Break down the technical complexity and core components (CPU, memory, graphics/PPU/GPU, audio/APU) for each generation:
- 8-bit / 32-bit (GB / GBA)
- Dual-screen / dual-core (DS)
- Modern architecture / ARM-to-ARM execution and graphics translation (Switch)
- Explain the trade-offs between interpretation, dynamic recompilation (JIT), and native execution on Android ARM devices.
3. **Android Platform Integration**:
- Best practices for interfacing native C/C++ emulation logic with the Android runtime (JNI, Android NDK).
- High-performance rendering approaches (OpenGL ES, Vulkan).
- Low-latency audio and touch/gamepad input handling.
4. **Development Roadmap**:
- A step-by-step phased approach for tackling development, starting from the simplest console to the most complex.
Write better AI coding prompts and get working code on the first try — free at zoeyprompts.com.