Skip to content

Releases

Beat the Beat: Rhythm Paradise QilinRecomp 0.18.1

Choose a tag to compare

@github-actions github-actions released this 29 Nov 17:45

Controller support in the launcher. Use the D-pad or left stick to move through the menu and A/Cross to select Play, build options, or updates.

To play on Windows: download RhythmHeavenFever--QilinRecomp-0.18.1-windows-x64.zip below, unzip it, open the folder and double-click Play Beat the Beat.exe. Choose your extracted disc's folder (or drag it onto the window); the first start builds the game from it in a few minutes. You need your own copy of the game, Beat the Beat: Rhythm Paradise, the Europe/Australia release (disc SOMP01, revision 0), extracted into a folder with Dolphin (Properties, Filesystem, Extract Entire Disc). Changes: CHANGELOG.md.

On a Mac (macOS 14.5 or newer, Apple silicon or Intel): download RhythmHeavenFever--QilinRecomp-0.18.1-macos.dmg, open it and drag Beat the Beat.app onto Applications, then open it. The app isn't signed by an Apple developer account, so the first time macOS stops it: open System Settings, Privacy & Security, click Open Anyway beside "Beat the Beat was blocked" and confirm; macOS asks only once. The game is compiled with Apple's own compiler: if the Mac doesn't have Apple's command line tools yet, the app offers Apple's installer.

Beat the Beat: Rhythm Paradise QilinRecomp 0.18.0

Choose a tag to compare

@github-actions github-actions released this 28 Nov 15:10

To play on Windows: download RhythmHeavenFever--QilinRecomp-0.18.0-windows-x64.zip below, unzip it, open the folder and double-click Play Beat the Beat.exe. Choose your extracted disc's folder (or drag it onto the window); the first start builds the game from it in a few minutes. You need your own copy of the game, Beat the Beat: Rhythm Paradise, the Europe/Australia release (disc SOMP01, revision 0), extracted into a folder with Dolphin (Properties, Filesystem, Extract Entire Disc). Changes: CHANGELOG.md.

On a Mac (macOS 14.5 or newer, Apple silicon or Intel): download RhythmHeavenFever--QilinRecomp-0.18.0-macos.dmg, open it and drag Beat the Beat.app onto Applications, then open it. The app isn't signed by an Apple developer account, so the first time macOS stops it: open System Settings, Privacy & Security, click Open Anyway beside "Beat the Beat was blocked" and confirm; macOS asks only once. The game is compiled with Apple's own compiler: if the Mac doesn't have Apple's command line tools yet, the app offers Apple's installer.

v0.17.0: less lag and stutter, a new settings menu, the first remix

Choose a tag to compare

@Qilin1066 Qilin1066 released this 21 Nov 01:49

No game is included, and none can be shared: the game is built from your own disc. On Windows, run install.cmd from the repository with your extracted disc (PAL SOMP01); see the README.

Played by the owner through the first four rhythm games into the first remix. Less lag and stutter, the settings menu as the other Qilin recomps', and the first remix's black screen fixed.

Fixed

  • The first remix stayed black and silent (every time). The game's file manager frees a file slot when a disc read completes, but an archive keeps the slot's address until it has been decompressed (a frame or more later), and a completed read marks the first archive with a matching slot. Reads finished in 1 ms, so a read on a reused slot completed while the older archive still held it; the newer archive was never marked read and the remix waited for good. The drive now takes time as the console's does (one request at a time, 10 ms of access plus the bytes at 8 MB/s; APPROX). Very likely the same cause as the rare black screen after the strap screen. QILIN_DVD_TRACE=1 logs the disc's opens, reads and completions.
  • A log file and a report: started without a console, the log goes to qilin_run.log in the data folder; the menu's Game page writes a report (counters and each thread's state) for a game that seems stuck.

Changed: the settings menu as Punch-Out's

  • Close and Quit the game at the top right of every page (Quit was at the bottom of the Game page).
  • Controls are set by pressing them: each Wii Remote button lists what presses it; Add, then a key, a controller button or a click; clicking one removes it; an input taken from another button moves and says so; "Back to the defaults". Kept in the settings file's [controls] (a = pad:A, pad:RB, key:A, key:Right Shift, key:Right, key:Space; malformed or reserved inputs stop at start with the line). Escape, F1, F3 and F11 are kept for the program. Keys go by SDL's scancode names, so the same place on any layout.
  • F3: frame times in a corner (performance_overlay, kept): the frame rate and average, the 1% and 0.1% lows and the worst frame over the last 20 s, a graph, the display's refresh and how many times each frame is shown, how long before its vblank a frame is presented, and the sound's queue.
  • A CRT television look (look = crt, scanlines, mask; shaders/crt.frag): the console's raster lines as beams with gaps that fade where a line gets too few window rows, and an aperture grille's stripes, in linear light. "Look at the picture" hides the menu until any key or button.
  • Internal resolution "Auto" (internal_scale = 0): from the display's height (3x on a 1440-line screen), with a note on what it costs the GPU.
  • The refresh settings apply at once, and the lock follows full screen: the display mode, the clock's lock and the vblank lock are worked out again whenever full screen is switched, the display's mode changes or the menu's refresh settings do (before, only at start: F11 into a 120 Hz mode left the game unlocked). The menu says what the display does now.
  • About: the version, and where the saves and pipeline cache are.

Changed: less lag and stutter

  • The renderer records on its own thread (toward the Raspberry Pi 4, where the game's single thread is the limit): the game's thread still does everything that reads guest memory or decides (vertex transforms, texture checks and decoding, pipelines, batching, the frame's buffers, images' creation); a render thread, fed an in-order queue, records and submits (descriptor sets, draws, upload copies, clears, EFB copies, acquire, submit, present, the vblank lock), at the game's threads' scheduling class. The game's thread waits for it only to reuse a frame slot, for the lockstep bot, and before the menu parks the game; a Vulkan failure there stops the game with it. Measured over 40 s at the title: the game's thread 9.8% of a core where it was 11.6% (the process 20.6% against 19.3%); frames identical, pixel for pixel; the vblank lock as before (spread 0.16 ms, sound held at 7.6 ms, nothing dropped). At normal priority its presents spread by 2 ms and missed vblanks.
  • A sampling profiler (QILIN_SAMPLE=1, Windows; names from a build with -DQILIN_DEBUG_SYMBOLS=ON, which keeps the optimisation): every millisecond each thread is paused, its place read and recorded, and the report lists the hottest functions, with time waiting in the OS apart. Its first findings, fixed: reading the clock at every native call was 7% of the game's CPU (now every 16th call, or at once when an interrupt is queued); MSVC's std::isnan and std::isinf called into the C runtime, 3% (now bit tests, exact: the differential test still finds 0 mismatches). The game's threads went from 0.195 to 0.18 of a core busy at the title. MSVC's std::fma is the runtime's call, but that uses the FMA instruction itself (1.08 against 1.00 ns): left.
  • Draws are batched (toward the Raspberry Pi 4): consecutive draws with the same pipeline, textures, uniform block and dynamic state, their vertices next to each other, become one vkCmdDraw; state the rendering pass already has isn't set again, and a draw allocates nothing. Measured over 45 s from the title on: 1.28 million draws in 0.72 million batches (43% fewer draw calls), 1.0 µs a draw where it was 1.7; 18 dumped frames identical to the unbatched build's, pixel for pixel.
  • Exclusive-mode sound on Windows (wasapi.*, [audio] exclusive, on by default): the device for the game alone through WASAPI's exclusive mode, at its shortest period (3 ms on a USB interface where sharing gives 10), with SDL still converting and resampling (an audio stream with no device that the output's thread takes from). Windows' volume and mute are applied in the game where the device doesn't do them itself (exclusive mode bypasses them). If the device can't be had exclusively, the shared mode as before; if it goes away, the output opens again. Measured: held at 7 ms (7.3 on average over 60 s), no underruns, where shared mode held 14.
  • Frames are locked to the display's vblanks (Windows: the compositor's vblank times): with the display lock on, each present is steered to land 3 ms before a vblank by nudging the game's clock (a PI loop, within 0.2%): a frame is shown as soon after it is drawn as the display allows, every frame alike, and the slow drift between the two clocks no longer brings spells of uneven frames. Measured at 120 Hz: 3.08 ms before the vblank on average, a spread of 0.17 ms, no vblank missed in 60 s; the clock steered by 0.004%. Before, a frame waited anywhere from 0 to a whole refresh.
  • Variable refresh ([display] variable_refresh, off by default; the menu's Timing section): for a G-Sync, FreeSync or VRR display with it on in the driver. The game keeps the console's 59.94 Hz (or 50 Hz), presents with FIFO (which variable refresh follows; mailbox can keep a driver at the fixed rate), and neither locks to the display nor switches its mode: any refresh rate shows the game evenly, a 144 Hz desktop as it is, windowed too where the driver allows. Measured on a 144 Hz desktop: every frame presented with no wait (0.1 ms each), sound held at 7.1 ms. It can't be detected from the program (the driver's setting), so it is a switch.
  • The display lock reaches 480 Hz in the 60 Hz setting (each frame shown up to 8 times); in the PAL 50 Hz setting it locks only to a 50 Hz display, and the game's clock can now be steered while it runs (set_time_base_speed from any thread; the clock never goes back).
  • A burst of sound beyond the target is cut back at once (beyond the target plus 10 ms, or twice the target): a skip once rather than seconds of extra lag.
  • The sound's lag is held at a set depth ([audio] latency_ms, 10 ms by default, 5–200, raised to what the device can keep up: a period plus 4 ms; the menu's Display page). Before, nothing kept the game's 32 kHz in step with the sound card's clock: the queue between them sat anywhere from 0 to 100 ms, different each session, and clicked when it overflowed or ran dry. Now playing starts once the queue reaches the target, SDL resamples by a ratio that follows the queue's average depth (at most 0.5% off), a dry queue is refilled to the target with silence at once, and a burst after a stall beyond the target plus 40 ms is dropped. The device buffer is asked to be small (128 samples, through WASAPI's low-latency shared mode where the driver allows it). Measured on Windows with a 10 ms device period: held at 14 ms (14.2 on average, 4.7–23.0), no underruns. Measured on Windows (44.1 kHz output, 10 ms device buffer): 30.5 ms queued on average (19.6–39.0), no underruns, ratio 1.00011. The run report shows these numbers.
  • The game locks to the display's refresh ([display] lock_to_display, on with vsync): when the display runs within 0.5% of the game's 59.94 Hz (50 Hz) or a whole multiple of it, the game's clock runs at the display's rate, so no frame is shown twice (at 60 Hz one was, every 16.7 s). The sound follows the same clock. Fullscreen switches to a refresh that suits (match_refresh) when the desktop's can't show frames evenly: a 75 Hz desktop (every fourth frame held for an extra refresh, a constant judder) goes to the same resolution at 120 Hz where the display has it. Both are set at start and named in the log.
  • Pipelines are made before they're needed: the configurations met before are kept (pipelines.keys beside pipelines.bin) and a background thread makes them all at start (20 in 2 ms on a GTX 1080 Ti), so play doesn't compile any. A configuration never met before still compiles when first drawn.
  • FIFO presenting (no mailbox: common on Linux, macOS and the Pi) uses two images, not three: each extra image was a refresh of lag. The log names the present mode.
  • Windows: the idle wait sleeps on a high-resolution waitable ...
Read more

v0.16.0

Choose a tag to compare

@Qilin1066 Qilin1066 released this 21 Nov 01:55

No game data is included, and none ever will be: you need your own copy of the game (see the README).

The game is seen, heard and controlled: qilin_run opens a window, draws with Vulkan 1.3, mixes the game's sound and plays it, and takes the keyboard (or a script) as a Wii Remote. It boots to the title and past the first A. Not yet checked by eye, and not playable end to end.

Added

  • A scripted Wii Remote (QILIN_INPUT, recomp/runtime/input.*): a virtual remote on channel 0 presses buttons on a schedule for headless, repeatable runs. WPAD drives KPAD as KPAD's code expects (connect callback, then sampling callbacks at the report rate, WPADRead's status), with the data format, pointer control and the remote speaker's control protocol; no motion or pointer data is made up. With it, A at the title takes the game to its first sound.
  • The DSP mixer (recomp/runtime/audio.cpp): AX's command list carried out in full, read from AX's and NW4R's code. Exact where game logic looks (play positions, loops and ends, DSP-ADPCM with its loop context, envelope and mix ramps, aux round trips, the write-back AX reads); approximations marked in the code (the polyphase resampler, the compressor); unsupported features stop. QILIN_AUDIO_DUMP=<file.wav> records what AI plays.
  • Approximate estimates in the game's build (QILIN_APPROX_ESTIMATES, the owner's decision): where Broadway's frsqrte/fres table is needed, the exact result rounded to 12 fraction bits (IBM's stated accuracy), marked APPROX. The differential test's build still stops there. The game now runs past the title.
  • A window, the Vulkan renderer, sound and the keyboard (host.cpp, gx_vulkan.cpp, gx_texture.cpp, shaders/): qilin_run opens a window and draws GX with Vulkan 1.3 (GX's transform and lighting on the CPU, the TEV in one fragment shader, GX's texture formats decoded and cached), plays AI's output on the default audio device and takes the keyboard as a Wii Remote. SDL3, Khronos' Vulkan headers and glslang are fetched at configure time, pinned by hash, never committed. QILIN_HEADLESS=1 (or -DQILIN_HEADLESS_ONLY=ON) runs as before. Unsupported GX features stop with a message.
  • More of GX on Vulkan: copies from the EFB to textures (with the copy formats' conversions), mipmaps with the texture object's filters, LOD range and bias (layout read from the SDK's GXInitTexObjLOD), lines and points, fog, manual texture-coordinate scaling; Z textures now stop instead of being ignored.
  • The runtime's to-do list from its own lift: of the 260 replaced functions the game's code can call, 40 had no native code; NAND's asynchronous calls, NANDPrivateOpen, NANDDelete, OSPanic, the OS's exits, __DVDTestAlarm, GXGetPixelFmt, __write_file and WPADGetInfoAsync now do, and OSAlloc.c is lifted. What's left (display-list recording, the ROM font, the balance board, MotionPlus, pairing) stops when reached.
  • QILIN_FRAME_STATS=N: numbers about every Nth frame (coverage, mean colour), to tell drawn frames from empty ones without looking.
  • Tests: GX's texture formats on synthetic tiles (I4, I8, IA8, RGB565, both RGB5A3 forms, RGBA8's split halves, C8 through a TLUT, CMPR's two modes, padded sizes, an unknown format stopping) and the input script's parser (presses, combinations, durations, every malformed form).

Changed

  • One dependency fewer: the shaders' SPIR-V is committed beside their GLSL with a hash stamp the configure checks; glslang is fetched only with -DQILIN_BUILD_SHADERS=ON. A default build needs SDL3 and the Vulkan headers.
  • The input script is parsed apart from the environment (parse_input_script, tested), and its times count from the runtime's start, as documented, instead of from the first WPADInit.

Fixed

  • The renderer stops on a vertex's matrix index past GX's matrix memory, and on an indexed vertex attribute outside MEM1 and MEM2, instead of reading beyond them.
  • Copies to textures compare the guest bytes they cover by the copy's own size, so a copy read in a format of another size isn't dropped.

The differential test: 8,108 functions, 64,864 trials, 0 unexplained mismatches.

v0.15.0

Choose a tag to compare

@Qilin1066 Qilin1066 released this 21 Nov 01:55

No game data is included, and none ever will be: you need your own copy of the game (see the README).

The game runs: it initialises completely, saves on first boot, reaches its title scene and keeps running, a frame copied out on every retrace, with the audio clock at the console's rate. Nothing is shown or heard yet (headless GX; the DSP stops at the first voice), and with no remote connected the game waits at its title.

Added

  • Audio (recomp/runtime/audio.cpp): AX lifted whole (eight units: CPU code with no hardware access, whose voice structures NW4R writes directly); AI's DMA interrupt every 3 ms (96 stereo samples at 32 kHz); the DSP takes AX's mail (0xBABE0080, the command list), decodes the list's set-up and the voice chain, outputs silence while no voice plays and stops when one does. The protocol is AX's own, read from its code.
  • NAND (recomp/runtime/nand.*): saves in a per-user host folder laid out as the flash (QILIN_NAND to choose it); create, open, read, write, seek, length, close, move, type, status, check, the home directory, and the asynchronous safe open for reading. Results as the game's backup manager reads them. The first boot writes Riq.dat and its banner.
  • Safe points in lifted code: at every call into native code, and on every backward branch (the lifter emits a poll with the loop's stack pointer: 2,594 in the runtime's lift). A loop waiting for an interrupt gets it, as on the console.
  • The estimate instructions: frsqrte and fres lift, exact where the architecture defines them (zeros, infinities, NaNs, negative square roots) and stopping where Broadway's table would be needed. The last five functions that weren't lifted (PSMTXInverse, PSMTXInvXpose, PSVECNormalize, PSVECMag, NW4R's FrSqrt) now lift: 8,108 functions in the differential test, all 6,202 in the runtime's lift.
  • More lifted out of replaced libraries: OSReport, OSVReport, OSCrc.c, NANDInitBanner, NANDSetUserData/NANDGetUserData, and the debugger stub's console write (__TRK_write_console, GetUseSerialIO), which MSL calls on every console.
  • Natives: the console type (retail), the debug UART (the game's reports to stderr, [game]), power and reset callbacks, GameCube pads (none plugged in), WPADProbe and WPADDisconnect (no remote), DCFlushRangeNoSync.
  • Diagnostics: a guest call stack with every stop; QILIN_RUN_SECONDS (ends a run with the counters, every thread's state and stack, and the scheduler's state; exit status 3); counters for audio frames, dropped periodic interrupts and where deliveries happen.
  • Tests: the estimates, a callee-saved register keeping its constant across a call, a loop's poll.

Changed

  • Periodic interrupts catch up when delivered late (each missed audio frame or retrace runs; only a stall beyond 32 periods drops, counted), and qilin_run asks Windows for 1 ms timers. Before, four of five audio frames were lost.
  • I/O completions take 1 ms (queued interrupts have a due time): an instant completion overtook the game's own bookkeeping (it sets its "loading" flag after issuing a read) and left it waiting forever.
  • MEM1's arena ends below the disc's file table, as a console's apploader puts it (from sys/fst.bin's size), and the runtime's guest scratch lives in the table's place: the game's heap is the console's size (it was 480 KB short, and the game said so).
  • hwaccess keeps callee-saved registers across calls (r1, r2, r13, r14-r31, as the EABI does): 27 more FIFO stores found in lifted code (349 in the runtime's lift), among them the game's sprite drawing (CCellAnim::draw).
  • The time base has its own file (recomp/runtime/timebase.cpp).

v0.14.0

Choose a tag to compare

@Qilin1066 Qilin1066 released this 21 Nov 01:54

No game data is included, and none ever will be: you need your own copy of the game (see the README).

GX's CPU side: the state the game's GX calls set up, the vertex stream lifted code writes to the FIFO, and VI's retrace. The game initialises its graphics (with the SDK's own GX defaults), controllers and Home Button Menu, loads files from the disc through asynchronous reads, sleeps on alarms, and stops where the Home Button Menu starts its sound. The thread, interrupt, alarm and DVD code from v0.13.0 has now run.

Added

  • The GX FIFO in lifted code: the lifter turns the stores hwaccess finds on the write-gather pipe (322 in 12 functions in the runtime's lift; stw, sth, stfs; and psq_st in the GX library itself) into rt::fifo_st8/16/32 and rt::fifo_psq_st. Other stores stay plain. In the differential test they stop as the original does under Unicorn: 64,824 trials, 0 mismatches, as before.
  • Native GX (recomp/runtime/gx.*, gx_fifo.cpp): about 110 setters, loaders and copies keeping GX's state as the API describes it; GXBegin and the FIFO stores make draws, GXCallDisplayList walks a list's draws, anything else stops. A headless sink counts draws and copies until the Vulkan renderer exists.
  • The SDK's own GX defaults and numbers: native GXInit calls the lifted __GXInitGX; GXSetTevOp takes its presets from the SDK's tables in the game's data (found through its code); GXSetDispCopyYScale ports the SDK's line arithmetic. Lifted out of GX: the texture, TLUT and light object functions, GXGetTexBufferSize, GXGetYScaleFactor, GXAdjustForOverscan, GXSetTevDirect, __GXInitGX; the natives decode those objects in the SDK's layout, read from its getters.
  • VI: VIConfigure, frame buffers, flush, black, retrace callbacks, and the retrace as a periodic interrupt at the field rate (59.94 or 50 Hz) that wakes VIWaitForRetrace (which sleeps through the lifted OSSleepThread). Periodic interrupts in interrupts.cpp.
  • Input: WPAD's start-up as KPAD and the controller manager use it, with no remote connected until there is a host input backend; WPADGetWorkMemorySize lifted (the console's heap size); GameCube pads: none. Console settings for the pointer and the sound mode.
  • SC start-up (SCInit, SCCheckStatus, SCGetSoundMode), the locked cache (no lifted code addresses it), and guest scratch for the runtime's own guest objects.
  • qilin_run also reports draws, vertices, frames copied out, copies to textures and retraces.
  • Tests: the lifter hands exactly the FIFO stores to the runtime.

v0.13.0

Choose a tag to compare

@Qilin1066 Qilin1066 released this 21 Nov 01:54

No game data is included, and none ever will be: you need your own copy of the game (see the README).

The OS and the disc under the game: the OS's threads, mutexes, messages, time and alarms are lifted over a native thread switch and interrupt delivery, and the game's files come from an extracted disc. qilin_run gets through the static constructors and main's start-up (video mode, file manager) to its graphics manager's GXInit. The new thread, interrupt, alarm and DVD read code is wired in but not yet exercised: the game reaches GXInit before it uses any of it.

Added

  • The OS's software lifted, by translation unit (docs/runtime.md): OSThread.c, OSMutex.c, OSMessage.c, OSTime.c and OSAlarm.c are lifted out of the replaced OS (kLiftUnits in libraries.cpp), with exceptions by name (kNativeAnyway: SelectThread). Names, not addresses. qilin lift --runtime fails if a unit or function the plan names isn't in the symbol list, which now carries each function's unit.
  • The thread switch (recomp/runtime/threads.cpp): SelectThread ported step by step from the build's own code, each guest thread on its own host thread with a run token handed between them; its globals are read from its instructions and checked at start-up. A new thread starts with the registers OSCreateThread left; an exited one ends its host thread. OSSetCurrentContext, OSInitContext (retires a host thread whose context is reused) and OSLoadContext native.
  • Interrupts at safe points (recomp/runtime/interrupts.*): delivered when the game enables interrupts and while the scheduler is idle; queued handlers run as the SDK's dispatcher runs them (scheduler off, handler, scheduler on, reschedule); the decrementer runs the OS's installed handler, whose closing OSLoadContext unwinds back to the delivery. PPCMtdec sets the deadline; the exception table is native. Idle with nothing that could ever wake a thread stops (Stop::Idle).
  • DVD over an extracted disc (recomp/runtime/dvd.*): qilin_run takes the folder Dolphin's Extract Entire Disc writes. The disc's own fst.bin gives entry numbers and directories; lookup as the SDK's (from the root, ./.., no case); files found again by the disc offset in the file info, as the SDK does; asynchronous completions arrive as interrupts after the call returns. Eleven DVD functions.
  • Natives that check the code they replace (QILIN_NATIVE_CODE): qilin_run refuses to start if the function of that name doesn't begin with the stated instructions (PPCMtdec, PPCHalt). Natives are bound after the DOL is loaded.
  • VI and SC basics (recomp/runtime/vi.cpp, console.hpp): VIInit, the TV format and cable, and the console settings the game picks its video mode and language from (60 Hz, progressive, 16:9, English by default; runtime settings until the settings file exists).
  • What a run exercised: with a stop, qilin_run prints its thread switches, threads started, interrupts, files opened and bytes read. Stops are reported from any host thread with function names (rt::report_stop); native code calls lifted functions with rt::call_guest; rt::time_base() is the one 64-bit time base for mftb and the decrementer.
  • OSInit writes the bus and CPU clocks to low memory (243 and 729 MHz), which the SDK's tick conversions read, and runs __OSInitAlarm and __OSThreadInit in its own order.
  • tools/analysis/lowmem.py: reads a Dolphin MEM1 dump taken at the entry point and prints the low-memory words OSInit and __start read, next to the runtime's values, flagging those that differ. For confirming the boot values in docs/runtime.md.

Changed

  • Low memory is open to lifted code under checked memory: the lifted OS keeps its globals there.
  • port_symbols.py checks names against code: the base library's register accessors must read or write their register (SIGNATURES); a name the size alignment put elsewhere moves to the matching function nearby, or the port stops. Eight names moved.
  • The game/base boundary (code-analysis.md, libraries.cpp) moves from 0x800DA6A4 to 0x800DA6C0: the three functions before it are the game's (they return constants and game code calls them), so they are lifted.

Fixed

  • Eight wrong names in the base library. A run of equal-size functions had put PPCMfmsr … PPCSync three functions early, PPCMtdec on the function that writes HID0. Natives bound by those names would have replaced the wrong functions; none was yet.
  • guest.hpp on zig's macOS target: with <chrono> included before <cfloat>, zig's bundled macOS headers lose DBL_MIN and FLT_MIN, so dispatch.cpp didn't compile. The smallest normal values now come from std::numeric_limits: same values, no macros. Found by cross-compiling the runtime for Linux and macOS on x86-64 and ARM64 with zig, which now all pass (the first check of machine.cpp's non-Windows memory mapping).

v0.12.0

Choose a tag to compare

@Qilin1066 Qilin1066 released this 21 Nov 01:54

No game data is included, and none ever will be: you need your own copy of the game (see the README).

The runtime skeleton: qilin_run starts the game. It runs OSInit natively and the static constructors as lifted code, and stops at the first replaced function it has no native code for, naming it and its caller.

Added

  • qilin lift --runtime --symbols <list>: the runtime's own lift. Functions of replaced and dropped libraries become calls to native code (rt::native), listed in a generated natives.cpp; symbols.cpp names every function for reports. The differential test's lift is unchanged and still lifts every library.
  • The library plan in code (recomp/src/libraries.*): the lifted, replaced and dropped ranges of docs/code-analysis.md, and the functions lifted out of replaced libraries by name: __init_user, __init_cpp, exit, and GX's light-object functions, which only fill in a structure.
  • The registry of native functions (recomp/runtime/native.*): native code registers by the function's name with QILIN_NATIVE(name), so the repository holds no list of PAL addresses. Start-up refuses a registration that matches no replaced function, several, or is repeated. A replaced function without native code stops the game when called (Stop::Unregistered).
  • qilin_run (recomp/runtime/run.cpp, machine.*; CMake QILIN_RUNTIME_GEN_DIR): maps MEM1 and MEM2 in a reserved 4 GB guest space, loads the DOL, sets up what __start sets up, then calls OSInit, __init_user, main and exit. Every stop is reported with function names. Bring-up runs with checked memory: low memory, the uncached mirrors and hardware registers stop lifted code.
  • The first native OS functions (recomp/runtime/os.cpp, 22): OSInit, the interrupt enable, the arenas, the cache range functions, OSRegisterVersion, PPCHalt.
  • docs/runtime.md: how the runtime is built and reached, the boot values still to confirm in Dolphin, and a proposal for the next step: lift the OS's thread, mutex and alarm bookkeeping and replace only the context switch, interrupts and timers under it.
  • Tests for the library plan, the symbol list reader and the registry.

v0.11.0

Choose a tag to compare

@Qilin1066 Qilin1066 released this 21 Nov 01:54

No game data is included, and none ever will be: you need your own copy of the game (see the README).

The runtime's to-do list: what lifted code needs from the libraries and hardware the runtime replaces.

Added

  • qilin hwaccess (recomp/src/hwaccess.*): the loads and stores in each function whose address is a constant outside cached MEM1, found by constant propagation over the GPRs through the control flow, classified by region (hardware block, GX FIFO, uncached mirrors, MEM2, EFB, locked cache).
  • tools/analysis/runtime_todo.py: joins the call graph, qilin hwaccess and the library plan into the to-do list. Lifted code calls 309 replaced functions directly, and its only direct hardware access is the GX FIFO: 322 stores in 12 functions, from inlined GX calls in NW4R, the Home Button Menu, the Mii library and the game. 5 lift-side functions need the estimate tables. The report is derived from the game and stays out of git.
  • Tests for the address map and the constant propagation (GX FIFO and VI addresses found, cached MEM1 ignored, registers unknown after a call).

v0.10.0

Choose a tag to compare

@Qilin1066 Qilin1066 released this 21 Nov 01:54

No game data is included, and none ever will be: you need your own copy of the game (see the README).

The differential test under UBSan, finding no undefined behaviour in lifted code or the runtime across all 64,824 trials. The difftest is now deterministic and isolates its trials.

Added

  • QILIN_UBSAN (CMake): builds lifted code and qilin_difftest with -fsanitize=undefined -fno-sanitize-recover=all, for GCC and Clang. CMake refuses it under MSVC, which has no UBSan.
  • tools/difftest/build_ubsan.py: builds the UBSan harness with zig's Clang (pip install ziglang) on any host, Windows included, with the project's warnings as errors.
  • A deterministic time base in the difftest (QILIN_DETERMINISTIC_TIME): the k-th time-base read of a trial gives the same value on both sides, so trials that read it are compared (they were known differences) and every trial replays exactly.
  • Trial isolation checks: Unicorn's whole CPU state is restored before each trial; every 16th trial checks on both sides that MEM1 is the image again; a failure lists the functions the worker ran, for --only to replay; a memory mismatch shows which side changed the block, and to what.

Changed

  • Found: the rare non-reproducible stops these checks caught were bit flips in the development machine's overclocked non-ECC RAM, not the code. A stress test without any project code reproduced them.
  • The roadmap drops "CR bits only where read". cr is a local, so the host compiler already removes CR updates nothing reads: Clang folds a record-form update followed by a compare to the compare alone. CR that reaches a call or return is observable, so it has to be computed anyway.