Skip to content

Repository files navigation

DingooEmu — A Dingoo A320 and Gemei A330 emulator written in Rust

DingooEmu

Website CI Gitlab Pipeline Status Release Downloads Quality Gate Status License: BSD 3-Clause Discord QQ Group

DingooEmu runs native software for the Dingoo A320 and Gemei A330 handhelds. It selects an isolated MIPS32 or ARM32/Thumb runtime after validating the content container, then provides the matching device memory and SDK services.

Device generation Native content Guest CPU
Dingoo A320 .app MIPS32
Gemei A330 firmware 1.0 .cc ARM32/Thumb
Later Gemei A330 firmware, 2D software .c2s ARM32/Thumb
Later Gemei A330 firmware, 3D software .c3s ARM32/Thumb

The extension identifies a content category; it does not directly choose a CPU or runtime. DingooEmu validates the CCDL package, derives the device and ABI profile from RAWD metadata, checks that the category can carry that target, and only then selects the A320 or A330 runtime.

The tested A330 DOOM-A330.cc and DOOM2-A330.cc ports support first-level play, movement, firing, automap, sound effects, guest save/load, and normal quit. Music is disabled by these ports; full-game completion remains unverified. See A330 DOOM compatibility for build identifiers, limitations, and reproducible checks.

Features

  • Two guest architectures — Cached MIPS32 and ARM32/Thumb interpretation with ARMv5TE fixed-point multiply support for A330 software
  • Optional native JIT — Native translation of proven hot integer blocks for A320 and A330 software on 64-bit x86_64 and arm64 hosts (Windows, macOS, Linux, Android), with safe interpreter fallback on Apple mobile platforms (iOS, tvOS, watchOS) and 32-bit builds
  • Real-time scheduling — Guest timing stays at 60 Hz without requiring one host-side dispatch per hardware clock cycle
  • HLE (High-Level Emulation) — Architecture-specific SDK bridges for graphics, input, audio, timing, random-access files and directory enumeration, resources, tasks, and synchronization
  • Auditable compatibility diagnostics — Aggregate unknown SDK calls and emit per-game JSON reports for review
  • Visible A330 exit diagnostics — Replace an otherwise solid final frame with a readable guest-exit panel and the last semihosting message
  • Multi-format loading — Validated .app, .cc, .c2s, and .c3s CCDL packages with automatic runtime selection
  • Frame rendering — Native RGB565 output with 320×240 landscape and counterclockwise-rotated 240×320 portrait modes, plus source-aware RGB565 and XRGB8888 guest framebuffer handling
  • PCM audio output — Dingoo waveout playback with format conversion, volume, and resampling
  • Screenshot mode — Headless frame capture for automated testing and preview generation
  • Batch screenshot — Process multiple .app files with scripts/batch-screenshots.ps1
  • RetroArch integration — libretro core with live screen-orientation and volume options, asynchronous audio delivery, 60 Hz game pacing on high-refresh-rate displays, RetroPad input, reset, persistent files, save states, cheats, and memory access
  • Cross-platform — Windows, Linux, macOS

Usage

Standalone Mode

Download the latest binary from the Releases page and run:

dingoo-emu path/to/game.app
# or: dingoo-emu path/to/game.c2s

See the Standalone Emulator guide for installation, keyboard controls, screenshot mode, and all command-line options.

RetroArch Mode

Install Dingoo A320 / Gemei A330 (DingooEmu) from RetroArch's Core Downloader, or install the release files manually, then load an .app, .cc, .c2s, or .c3s file through Load Content.

See the RetroArch Core guide for installation, supported platforms and features, RetroPad mapping, core options, and cheats.

Building

Requires Rust (stable).

Standalone Mode (Default)

cargo build -p dingooemu --release
cargo run -p dingooemu --release -- path/to/game.app
cargo run -p dingooemu --release -- --fullscreen path/to/game.c3s

The binary is produced at target/release/dingoo-emu (dingoo-emu.exe on Windows).

Libretro Core (for RetroArch)

cargo build -p dingooemu-libretro --release

Cargo names the cdylib after its lib target, so this produces dingooemu.dll on Windows, libdingooemu.so on Linux, or libdingooemu.dylib on macOS under target/release/. Rename it to dingooemu_libretro.<ext> before copying it into RetroArch's cores/ directory.

For Android cross-compilation, see Android Libretro Core. For iOS, see iOS Libretro Core.

Testing

Run the unit tests:

cargo test --workspace

Architecture

crates/
├── dingooemu-core/              # Platform-independent emulator engine (library)
│   └── src/
│       ├── lib.rs               # Crate root (module declarations)
│       ├── emulator.rs          # Device-neutral lifecycle facade and dispatch
│       ├── content.rs           # Content format and architecture detection
│       ├── package.rs           # Shared CCDL package parser
│       ├── common/              # Cross-device services and policies
│       │   ├── audio.rs         # Shared PCM audio engine
│       │   ├── video.rs         # Shared framebuffer conversion and dimensions
│       │   ├── input.rs         # Shared logical input state
│       │   ├── cheats.rs        # Shared cheat syntax and slot storage
│       │   └── save_state.rs    # Shared versioned state codec
│       ├── a320/
│       │   ├── runtime.rs       # Dingoo A320 APP runtime
│       │   ├── cpu.rs           # Cached-block MIPS32 interpreter
│       │   ├── jit.rs           # Optional native translator for hot MIPS32 blocks
│       │   ├── memory.rs        # A320 memory bus
│       │   ├── cheats.rs        # A320 cheat validation and application
│       │   └── runtime/sdk_hle/ # A320 SDK dispatch and implementations
│       ├── a330/
│       │   ├── runtime.rs       # Gemei A330 lifecycle and scheduler
│       │   ├── cpu.rs           # ARM32/Thumb interpreter
│       │   ├── jit.rs           # Optional native translator for hot ARM32 blocks
│       │   ├── memory.rs        # A330 memory map and package loader
│       │   ├── cheats.rs        # A330 cheat validation and application
│       │   ├── firmware_archive.rs # Adjacent A330 firmware reader
│       │   └── runtime/sdk_hle/ # A330 SDK dispatch by service responsibility
│       └── error.rs             # Error types
├── dingooemu/                   # Standalone binary (-> dingoo-emu)
│   └── src/
│       └── main.rs              # Window loop and CLI front-end
└── dingooemu-libretro/          # libretro cdylib (-> dingooemu_libretro.{dll,so,dylib})
    ├── dingooemu_libretro.info  # RetroArch core metadata
    └── src/
        ├── lib.rs               # cdylib crate root
        ├── api.rs               # Exported libretro functions
        ├── callbacks.rs         # Callback management
        └── types.rs             # libretro type definitions

See Emulator Architecture for the runtime-selection flow, module boundaries, and extension rules.

Game Compatibility

Compatibility results are experimental and cover startup and initial rendering only. The published matrix currently covers A320 APP software; A330 support is new and should not be interpreted as universal game compatibility. See Game Compatibility for the current results and screenshots.

Keyboard Controls

Key Dingoo Button
Arrow keys D-pad
X A
Z B
S X
A Y
Enter START
Right Shift SELECT
Q L shoulder
W R shoulder
Esc Exit

The standalone defaults match RetroArch's standard keyboard bindings for the equivalent RetroPad buttons.

Physical gamepads are also supported in the standalone emulator. The first connected pad is polled each frame; D-pad and sticks map to the D-pad, and face buttons follow the RetroPad layout (South→B, East→A, West→Y, North→X). Pass --no-gamepad to disable physical controllers. See Standalone-Emulator.md for the full mapping.

Contribute

Contributions are welcome! Whether you're interested in fixing bugs, adding features, improving documentation, or testing game compatibility, we'd love your help. See CONTRIBUTING.md for details.

License

This project is licensed under the BSD 3-Clause License. JIT-enabled binaries also contain compatible third-party components; their complete terms are included in THIRD_PARTY_LICENSES.md.

Releases

Packages

Contributors

Languages