Repository navigation
ReplicantGaiden 0.0.6
ReplicantGaiden 0.0.6 — handhelds: SDL2 build, Anbernic RG34XX at full speed
New
- SDL2 handheld build for firmwares whose SDL3 has no video driver (Knulli / Allwinner H700 has no DRM, so
kmsdrmcannot start). Same sources throughsrc/host/sdl_compat.h; it uses the firmware's ownlibSDL2(mali+opengles2, ALSA audio). The arm64 archive ships it asreplicantgaiden-sdl2, and the PortMaster zip is built from it. - PortMaster launcher: controller preset taken from ProjectDural (PortMaster's mapping when set, built-in Anbernic RG34XX mapping otherwise, plus
gamecontrollerdb.txt); detected gamepads are written tolog.txt. - Quit ReplicantGaiden menu item (handhelds have no window close button).
- Tested on an Anbernic RG34XX with Knulli, launched from EmulationStation: full speed in gameplay, 58.9–59 frames/s shown, 0 audio underruns. See README, "Tested devices".
Speed
- Emulation runs on its own paced thread; the main thread only presents new frames, so vsync can no longer stall the game. A video snapshot is handed over after every emulated frame.
- The ES5510 reverb DSP runs on its own worker thread. The emulation thread queues every sample and host write in order and waits only when the sound CPU reads a DSP latch or the frame's audio is collected, so the output is bit-identical. On the RG34XX's 1.5 GHz Cortex-A53: 3000 frames 42.2 s -> 27.4 s; gameplay emulation 33–70 ms -> 10–17 ms per frame.
RG_AUDIO_THREAD=0runs it inline. - Default render threads at x1: cores-1 on 2–4 core CPUs (7 ms per frame on the RG34XX instead of 18 ms).
- Smaller bit-identical gains: ES5510 register fast paths, the per-instruction register save skipped in Musashi, sound-CPU instructions no longer looked up by the native hook,
-mtune=cortex-a53for the handheld build.
Dev aids
RG_PROF=1(per-component timing in headless runs),RG_PRESS=5:100-110,1:300-310,...(scripted input in the windowed build),RG_PRESENT_BENCH=1,RG_NICE=0(leave thread priorities alone).
ReplicantGaiden 0.0.5 — full-screen menu
UI
- The menu is now full screen, with text scaled to the real output resolution (it was a fixed 380x200 box of 8 px text, tiny on large or high-DPI screens). Rows show their value with
< >, and the help line lists pad and keyboard controls. The FPS overlay and the "original copy" notice scale too. Dev aid:RG_MENU_SHOT=file.bmpsaves a capture of the menu and exits.
ReplicantGaiden 0.0.4 — x3/x4 render speed fix
Fixes
- x3/x4 internal resolution dropped to ~10-20 fps. The video renderer was single-threaded and ran inside the emulation loop; at x4 it costs 26 ms per frame on a fast desktop (the frame budget is 17 ms) and far more on a laptop in power-save. Now (1) scanlines are rendered in bands across up to 8 cores with dynamic scheduling (output bit-identical to the serial renderer at every scale; x4: 26.5 ms -> 5.6 ms here), and (2) video runs on its own thread with a copy of the video state, so a slow render lowers only the displayed fps and never the game speed or audio. Measured on a Core Ultra 5 135H at x4 in a window: emulation 59 fps, 58.9 frames/s shown, audio queue steady (before: emulation 48 fps, queue draining to 0).
- Without vsync the loop now sleeps until the next frame is due instead of spinning a core.
log.txtadds shown fps and per-phase times (emulation, render, upload, present) every 10 s.RG_VIDEO_THREADS=Noverrides the render thread count.
ReplicantGaiden 0.0.3 — audio sync fix, gamepad menu
Fixes
- Audio drifted out of sync after a minute or so. The sound board was being run for 275 236 main-CPU cycles per frame, which is 1.4 % more than a real 1/58.94 s frame, so it produced ~12 stereo frames per frame more than the host consumed. Its 65 536-frame ring filled after ~90 s and the sound then lagged by 1.4 s and dropped samples. Sound and EEPROM now run on real time (one frame = 1/58.94 s), and per-frame cycle overshoot is carried into the next frame. Ring fill is now constant (~1 frame) over 10 minutes in both native and interpreter modes; frames 300/700/1100/1500 still match MAME exactly.
- Host audio queue: adaptive playback-rate control (±1 %) keeps the latency near 80 ms instead of dropping blocks (
RG_AUDIO_CTRL=0restores the old behaviour). log.txtnow records, every 10 s: fps, audio queue min/avg/max, rate ratio, drops/underruns, sound-ring fill, native call/bail-out counts.
Controls
- Select + Start (Back + Start) opens and closes the menu on gamepads (Steam captures Guide). The menu can now be navigated with the D-pad / A / B. Back inserts its coin on release and only if it was not part of the combo.
ReplicantGaiden 0.0.2 — recompiled code runs
You must own an original copy of Darius Gaiden. No ROM or game data is included; bring your own dariusg.zip. The recompiled routines are derived from the game's program: do not redistribute them or the ROM.
New
- Recompiled game code is now the default. 2583 routines from Taitof3Decomp run as native C inside a rollback journal; ~80 % of emulated CPU cycles (~44 % excluding idle) execute natively. Anything not recompiled, or that bails out, runs in the Musashi interpreter. Frames 300/700/1100/1500 remain pixel-identical to MAME 0.289.
--native-verifydifferential mode (native vs interpreter: registers, RAM, hardware writes), embedded verification profile,--interpreterreference mode.- Renderer selection (
--renderer vulkan,opengles2,software,settings.ini renderer=,--list-renderers) and a--handheldprofile; SDL 3.4.0 (Vulkan / SDL_GPU renderers). - PortMaster package for aarch64 handhelds (Mali / Panfrost / libmali):
ReplicantGaiden-<version>-portmaster.zip. Untested on real devices.
Not yet
- 28 verified-problem or hardware-port routines still run interpreted; no "original slowdown" option; RmlUi menus, key rebinding, save states, CRT/xBRZ filters, Windows arm64.
Downloads: Linux x86_64 / arm64 (tar.gz), Windows x64 and macOS universal (zip), PortMaster (zip). Binaries are unsigned; macOS may require xattr -cr / right-click → Open.