r/Bittboy • u/Own-Brick-1145 • 1d ago
I wrote an AOT compiler that turns J2ME 3D games into native ARM binaries for 32 MB RAM handhelds (PocketGo v1 / F1C100s) — S.T.A.L.K.E.R. Mobile HD at 31–33 FPS, Rally Master Pro 3D at 49–56 FPS
Hey everyone! Sharing a hobby compiler project I've been building called jar2pocketgo (search for jar2pocketgo on GitHub — I'll drop the link in the comments if the automod allows it; no game files/JARs included).
It compiles J2ME MIDlets ahead-of-time into standalone native ARMv5TE ELF binaries via C99, skipping the JVM completely so 3D mobile games actually run smoothly on ultra-low-end Allwinner F1C100s handhelds (32 MB RAM, 320×240, no FPU, no 3D GPU) running MiyooCFW 2.0.0-beta (PocketGo v1, BittBoy v3/v3.5, PowKiddy Q90/V90/Q20 mini).
How it works:
- Bytecode pre-patching & asset packing (
PAK0) - AOT compilation from Java bytecode to C99 via TeaVM 0.14.1
- Custom fixed-point (
Q16.16) software 3D rasterizer (libmidp_3d.a) supporting JSR-184 (M3G) and Mascot Capsule v3 skeletal animation, plusRMSsaves and an 8-voice integer MIDI synth, compiled withzig ccand SDL 1.2
Real hardware benchmarks on PocketGo v1 (MiyooCFW):
- S.T.A.L.K.E.R. Mobile HD (fan-made HD texture mod — 512×512 textures): 31–33 FPS avg (
~6.7 MBRSS at 720 MHz, 18–19 FPS in heavy campfire scenes) - Rally Master Pro 3D: 49–56 FPS (702 MHz)
Also verified on Windows x86_64 host builds with ARM .elf outputs built for Galaxy on Fire 2, Deep 3D: Submarine Odyssey, Devil May Cry 3D (123-bone skeletal skinning), Fly & Destroy 3D, Tomb Raider: Underworld, Driver: L.A. Undercover, Asphalt 4, and FIFA 11.
Released under PolyForm Noncommercial 1.0.0 for personal/noncommercial use. Happy to answer technical questions about squeezing M3G/Mascot Capsule 3D onto 32 MB RAM without an FPU!