LOHT-Recomp
LOHT-Recomp is a native Windows port of Legend of Hero Tonma that recompiles the game from your ROM files.
- Type: PC port
- Game: Legend of Hero Tonma
- Runs on Windows
- By Syncr0ndi
- Latest release v0.9.0-beta, 2026-11-19
- Source: https://github.com/Syncr0ndi/LOHT-Recomp
README
Irem's 1989 arcade classic Legend of Hero Tonma, recompiled to run natively on Windows.
No emulator, no game files included — bring your own ROM set, and the game builds itself on your PC.
Important
This project contains no game data. You need your own copy of the original arcade ROM set
loht.zip (MAME format, Legend of Hero Tonma (World)). Please only use a ROM set you are
legally entitled to use. Don't ask for ROMs here.
Note
Beta: the game boots, plays and sounds right, but has not yet been played through to the end.
If it ever closes with an error, it writes loht_crash.log next to the game — please open an
issue and attach it.
✨ Highlights
- 🎮 The real arcade game, natively — Irem's original program is translated into C and compiled to native x86-64 code. No MAME, no emulator front end.
- 🔒 Ships nothing copyrighted — the download contains only this project's own code. On the
first start you pick your
loht.zip; the game checks it and builds everything it needs from it. - ⚡ Builds itself in a tenth of a second — every start, the game code is regenerated from your ROM files and compiled in memory by an embedded compiler (TinyCC).
- 🎯 Arcade-accurate where it matters — the original protection chip (i8751) and sound CPU (Z80) run their real code; the YM2151 FM chip is emulated with ymfm; graphics are drawn line by line like the original board, so mid-screen effects work.
- 🔊 Comfortable audio — master volume on
-/=, and the digitised sound effects are levelled so none of them makes you jump. - 🕹️ Keyboard and gamepad, resizable window, fullscreen, and all arcade DIP switches in a simple settings file.
🚀 Getting started
- Download the latest release from the Releases page and unzip it anywhere.
- Start
loht.exe. - Click Browse for loht.zip… and select your ROM set.
- The game verifies every file, creates its data in an
assetsfolder next toloht.exe, and you're ready to play. Your zip is only read — never changed, moved or deleted.
From then on the game starts straight away. (The screen stays black for about 8 seconds at boot: that's the arcade board's own self-test, exactly like the real machine.)
Tip
Windows may show "Windows protected your PC" for a newly downloaded program. Click More info → Run anyway. The game isn't code-signed, which is normal for free hobby projects.
🎮 Controls
| Action | Keyboard | Gamepad |
|---|---|---|
| Move | Arrow keys | D-pad / left stick |
| Jump | Z | B |
| Attack | X | A |
| Button 3 | C | X |
| Insert coin | 5 (player 2: 6) | Back |
| Start | 1 (2 players: 2) | Start |
| Volume down / up | - / = | |
| Mute | M | |
| Fullscreen | F11 | |
| Quit | Esc |
⚙️ Settings
loht.ini is created next to loht.exe on the first start. Edit it with Notepad while the game is closed:
| Setting | Values |
|---|---|
lives | 2, 3, 4 or 5 |
difficulty | easy, normal, hard or hardest |
demo_sounds | on / off — sound in attract mode |
invulnerability | on / off — the arcade board's own cheat switch |
volume | 0 – 200 (percent) |
window_scale | 1 – 8 (3 = 1152 × 768) |
fullscreen | on / off |
🛠️ How it works
flowchart LR
A["Your loht.zip"] -->|"first start: verify<br>every ROM checksum"| B["assets\loht\<br>(on your PC)"]
B --> C["Code generator<br>(built into loht.exe)"]
C -->|"~74k lines of C"| D["TinyCC<br>(libtcc.dll)"]
D -->|"native x86-64,<br>in memory"| E["🎮 Game"]
B --> F["i8751 protection MCU<br>Z80 sound CPU · YM2151"]
F --> E
The arcade board runs a NEC V30 CPU. This project mapped all of its 1,262 functions and turned each instruction into equivalent C. The download contains only the map (instruction addresses and structure — no game bytes) plus the generator; your own ROM supplies the actual instructions, so the finished game code only ever exists on your PC.
More detail: hardware notes · program map · recompiler design · release design
🧱 Building from source
You need Windows, Python 3, CMake, Ninja and LLVM-MinGW (clang). CMake downloads the libraries itself. See the development guide for the full steps, tools and tests.
❓ FAQ
Where do I get loht.zip?
This project can't help with that. Use a ROM set you're legally entitled to use, for example one
dumped from an arcade board you own.
It says "This file can't be used".
Your zip isn't the MAME loht set (World version) — the message lists exactly which files are
missing or different.
Is this an emulator? Not of the main CPU: the game's program is recompiled to native code. The small helper chips (protection MCU, sound CPU and sound chip) are emulated, because their exact timing is what makes the music and protection work.
Can I share my assets folder?
No — it contains data from your ROM set. Share only the release zip.
🙏 Credits & licence
- Legend of Hero Tonma © 1989 Irem Corp. This is an unofficial, non-commercial fan project, not affiliated with or endorsed by Irem.
- Hardware details were cross-checked against the MAME M72 driver.
- SDL2 (zlib) · ymfm by Aaron Giles (BSD-3) ·
Z80 core by superzazu (MIT) · TinyCC (LGPL-2.1, shipped as a replaceable
libtcc.dll) - Developed with assistance from Claude by Anthropic.
This project's own code is released under the MIT licence © 2026 Syncr0ndi. The licence covers only this project's code — not the game itself.