Skip to content

ReplicantGaiden 0.0.9

Choose a tag to compare

@github-actions github-actions released this 29 Nov 00:53
· 7 commits to main since this release

ReplicantGaiden 0.0.9 — louder audio

Audio

  • The sound was very quiet on every device. The Taito EN board mix peaks around -21 dBFS (RMS ~-41 dBFS in play). The host output now gets a +18 dB boost by default, with a soft limiter above 85 % of full scale so loud moments bend instead of clipping (in the reference play-through: peaks -3.2 dBFS, RMS -23.7 dBFS, limiter never reached).
  • New menu item Audio boost (0 to +24 dB in 3 dB steps), saved as boost_db in settings.ini. Volume still scales on top of it.
  • Emulation is unchanged: --wav captures stay raw and bit-identical.
  • Checked by ear on the Anbernic RG34XX (Knulli), Powkiddy RGB30 (ArkOS) and TrimUI Smart Pro (spruce).

ReplicantGaiden 0.0.8 — more handhelds: ArkOS (RGB30) and spruce (TrimUI Smart Pro)

Handhelds

  • The PortMaster binary now runs on old firmwares. It is built in an Ubuntu 18.04 container (GCC 11, static libstdc++), so it needs only glibc 2.17 and the firmware's SDL2 >= 2.0.12. Until 0.0.7 it needed glibc 2.38 and failed to start on ArkOS (glibc 2.30). SDL_RenderSetVSync (SDL 2.0.18+) is resolved at run time; with older SDL the renderer is created with vsync on.
  • Launcher works on busybox shells (spruce's /bin/bash is busybox: BASH_SOURCE was a syntax error) and finds spruce's PortMaster folder.
  • Tested at full speed, 0 audio underruns in play: Powkiddy RGB30 / ArkOS, TrimUI Smart Pro / spruce, and again the Anbernic RG34XX / Knulli with the new binary.

Fixes

  • Opening the menu or pausing no longer underruns the audio: the device is paused and the queued sound kept.

ReplicantGaiden 0.0.7 — Windows build fix

Fixes

  • The Windows .exe did not start in 0.0.6 and earlier: it needed MinGW's libstdc++-6.dll, libgcc_s_seh-1.dll and libwinpthread-1.dll, which were not in the zip (loader error c0000135). The runtime is now linked statically, so the .exe only imports DLLs that ship with Windows, and CI fails if that changes. Checked under Wine 11.22 (headless output bit-identical to Linux, windowed gameplay) and Proton Experimental (windowed gameplay).

Docs

  • README: gameplay + menu GIF, Wine / Proton results.

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 kmsdrm cannot start). Same sources through src/host/sdl_compat.h; it uses the firmware's own libSDL2 (mali + opengles2, ALSA audio). The arm64 archive ships it as replicantgaiden-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 to log.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=0 runs 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-a53 for 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.bmp saves 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.txt adds shown fps and per-phase times (emulation, render, upload, present) every 10 s. RG_VIDEO_THREADS=N overrides 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=0 restores the old behaviour).
  • log.txt now 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-verify differential mode (native vs interpreter: registers, RAM, hardware writes), embedded verification profile, --interpreter reference mode.
  • Renderer selection (--renderer vulkan,opengles2,software, settings.ini renderer=, --list-renderers) and a --handheld profile; 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.