LEGEND OF HERO TONMA - native Windows version
=============================================

An unofficial native Windows version of Irem's 1989 arcade game "Legend of Hero Tonma",
made by recompiling the arcade program to native code. It is not affiliated with or endorsed
by Irem. The game itself is NOT included: you need your own copy of the original arcade ROM set.

Version 0.9.0 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 saves "loht_crash.log" next to loht.exe - please
report it at https://github.com/Syncr0ndi/LOHT-Recomp/issues and attach that file.


WHAT YOU NEED
-------------
* Windows 10 or 11 (64-bit).
* The arcade ROM set "loht.zip" in MAME format - the World version, "Legend of Hero Tonma (World)".
  Only use a ROM set you are legally entitled to use.


FIRST START
-----------
1. Keep loht.exe and libtcc.dll together in this folder.
2. Start loht.exe. If Windows shows "Windows protected your PC", click "More info" and then
   "Run anyway" - the game is not code-signed, which is normal for free hobby projects.
3. Click "Browse for loht.zip..." and select your loht.zip.
4. The game checks every file in it, then creates its data in the "assets" folder next to
   loht.exe. Your loht.zip is only read - it is not changed, moved or deleted. You can keep it
   or delete it afterwards.
5. Click "Play".

From then on loht.exe starts straight away. On every start it builds the game code from the
files in "assets" on your own PC; this takes about a tenth of a second.

The screen stays black for about 8 seconds after starting: that is the arcade board's own
start-up check, exactly as on the original hardware.

If the files in "assets" are ever damaged, the game notices and offers to set up again.
To start over completely, delete the "assets" folder.


CONTROLS
--------
  Arrow keys ........ move
  Z ................. jump
  X ................. attack
  C ................. button 3
  5 ................. insert coin            6 ... coin (player 2)
  1 ................. 1 player start         2 ... 2 players start
  F2 ................ service coin
  - / = ............. volume down / up (music and sound effects together)
  M ................. mute
  F11 ............... fullscreen on / off
  Esc ............... quit

Gamepads: d-pad or left stick to move, A / B / X buttons, Start = 1 player start,
Back = insert coin.

Sound effects are levelled so that they all play at the same volume as each other.


SETTINGS (loht.ini)
-------------------
loht.ini is created next to loht.exe on the first start. Edit it with Notepad while the game
is closed:

  lives = 2, 3, 4 or 5
  difficulty = easy, normal, hard or hardest
  demo_sounds = on or off           (sound during the attract mode)
  invulnerability = on or off       (the arcade board's own cheat switch)
  volume = 0 to 200                 (percent; also changed in game with - and =)
  window_scale = 1 to 8             (window size; 3 = 1152 x 768)
  fullscreen = on or off            (F11 also toggles it)

Volume and fullscreen are remembered when you quit.


IF SOMETHING GOES WRONG
-----------------------
* "This file can't be used": the zip is not the right ROM set. The message lists which files
  are missing or different. You need the MAME "loht" set (World version).
* If the game ever closes with an error, it saves "loht_crash.log" next to loht.exe.
  Please send that file to the developer.
* No sound: check the volume (- and =) and that M (mute) is not active.


WHAT IS IN THIS FOLDER
----------------------
  loht.exe          the game (contains no game code or data from the ROM set)
  libtcc.dll        TinyCC, the compiler the game uses to build its code on your PC
  README.txt        this file
  LICENSES\         licences of the open-source components
  assets\           created on the first start from your loht.zip (do not share it)
  loht.ini          your settings (created on the first start)

Do not share the "assets" folder: it contains data from your ROM set.


CREDITS AND LICENCES
--------------------
"Legend of Hero Tonma" (c) 1989 Irem Corp. This is an unofficial, non-commercial project.

This port (loht.exe and its source code) is (c) 2026 Syncr0ndi and released under the MIT licence
(LICENSES\LOHT-port-LICENSE.txt). The licence covers only the port's own code - not the game, its
graphics, sound or program, which belong to their owners and come from your own ROM set.

Open-source components (licence texts in the LICENSES folder):
  * SDL2 2.30.9 - window, input and audio - zlib licence
  * ymfm - YM2151 sound chip emulation, by Aaron Giles - BSD 3-Clause licence
  * Z80 emulator by superzazu - MIT licence
  * TinyCC (libtcc.dll) - LGPL 2.1. libtcc.dll is an unmodified build of TinyCC; you may replace
    it with your own build. Source: https://github.com/TinyCC/tinycc
    (commit 0f004a0883c640528d69a006706f867d56c809e5) - see LICENSES\TinyCC-NOTICE.txt
