Repository navigation
0.4.5
This release makes the special stage run much faster and adds touch control options.
-
Special stage speed (Issue #31): the special stage ran almost entirely in the slow interpreter: the master SH-2 was 3% recompiled and the 68K 7%, against 100% in a level. That was enough to lag a slow PC. It now runs as recompiled code: 100% for the 68K and the slave SH-2, 99% for the master SH-2. In widescreen, a special stage frame costs 1.24 ms on the development PC instead of 2.10 ms, and the slowest frame 1.9 ms instead of 4.7 ms. There were four causes:
- No recorded coverage reached the special stages, so their code was never recompiled. The coverage sessions now include all seven special stages (plus one entered from a level), the bonus stage, the hub and every level.
- The widescreen patches change immediates in the stage's busiest routines, which made the recompiled versions fail their validation. The recompiled code now reads those immediates as it runs. This also applies to the HUD routine in levels with WIDE HUD on.
- The stage keeps variables in the words after its code. The recompiler had treated them as constants, so once the stage changed them, native code read stale values. They are now read as the code runs.
- The stage also rewrites its own code. Direct native calls now check that the callee's code is unchanged, and RAM code hands over to the interpreter when its own code changes.
The last two would have made the game behave differently from the original hardware, so they were fixed before turning on the new coverage. All 29 CTest cases and 33 additional lockstep runs with random input (every special stage, levels, the bonus stage and the hub) are bit-identical between the interpreter and the recompiled code. Two new tests keep it that way.
-
Sonic CD touch layout (Issue #34): OPTIONS > INPUT > TOUCH LAYOUT can be CLASSIC (every pad button) or SONIC CD, the layout of Sonic CD's 2013 mobile version.
- The directions sit on the left and one large jump button on the right.
- HOLD (B) and CALL (A) are small buttons above it. These are the only buttons Chaotix uses.
- Touching anywhere else on the lower right also jumps.
- Custom skins keep working.
-
Touch control opacity (Issue #33): OPTIONS > INPUT > TOUCH OPACITY and PRESSED OPACITY set how opaque the touch controls are at rest and while held, custom images included. The defaults are 65% and 100%.
Thanks to @Heartic12 for the detailed report and measurements, and to @blueeeLove and @datadrivezz for the requests.
Validation:
- Windows: all 29 CTest cases pass.
- Linux: all 26 Linux CTest cases pass.
- Packages: the packaged Windows and Linux builds pass the startup tests.
- Android: the APKs have not been tested on a device for this release.
Downloads: the Windows x64 zip, the Linux x64 tar.gz, and two Android APKs: arm64-v8a/x86_64 (the usual one) and armeabi-v7a (32-bit ARM). Both APKs use version code 18 and the same signing certificate as 0.4.4, so they update in place.
You must supply your own Knuckles' Chaotix (Japan, USA) ROM. No ROM image or game assets are included.