Toy Commander QilinRecomp for Windows (64-bit)
==========================================

Toy Commander (No Cliché / Sega, Dreamcast, 1999), recompiled to run natively: the game's own program
translated into C++ and compiled for your PC, drawn with Vulkan.

No game data is included. You need your own copy of the game: the USA release, MK-57020, version 1.022,
dumped from the GD-ROM as a .cue file with its .bin tracks (a Redump-style
dump, music tracks included), a .gdi with its tracks, or a .chd.


Playing
-------
1. Unzip the download anywhere. Building the game needs about 2 GB free.
2. Open the folder and double-click "Play Toy Commander.exe".
3. Click "Choose your disc" and pick your disc's .cue, .gdi or .chd file,
   or drag the file onto the window. It tells you straight away if the disc
   is the wrong game or another version.
4. Wait for the first build: a few minutes (up to 15 on a slower PC). Your
   game files never leave your PC.
5. Click Play. The window hides while the game runs. "Add a desktop
   shortcut" puts Play Toy Commander on your desktop.

After that, Play Toy Commander.exe remembers your disc (even in a new download
folder), and Play starts the game straight away. After an update it builds
the game again first, recompiling only what changed.

The game's output is in work\run.log and work\run-errors.log, and the
build's in work\build.log. Send them when reporting a problem.

If Windows says "Windows protected your PC": More info, then Run anyway.
(The download isn't signed.) Or before unpacking, right-click the zip,
Properties, tick Unblock, OK.

Needs: Windows 10 or 11, 64-bit, and a graphics driver with Vulkan 1.3
(any recent NVIDIA, AMD or Intel driver).


Controls
--------
A Dreamcast controller. Up to four players: the first controller (or the
keyboard) is port A, the others ports B to D.

  Controller           Keyboard        Dreamcast
  left stick           arrows          the analogue stick
  D-pad                I J K L         the D-pad
  A, B, X, Y           Z, X, A, S      A, B, X, Y
  LB, RB, triggers     Q, W            L, R
  Start                Enter           Start

Back + Start together, or F1 or Esc: the settings menu (the game pauses):
controls (set by pressing them), the window, the picture, the refresh
rate, enhancements and the Dreamcast's own settings (language, sound).
Alt+Enter or F11: full screen. A controller that rumbles plays the Jump Pack.

Settings and memory-card saves are kept in %LOCALAPPDATA%\qilin\toycommander, with
the disc you chose and the build's cache of compiled files (build-cache).


What's in here
--------------
Play Toy Commander.exe    chooses your disc, builds the game (once) and starts it
kit\qilin.exe       the recompiler: turns the disc's 1GUTH.BIN into C++
kit\lib, include    the prebuilt rest of the game: its runtime, the renderer,
                    sound, the window and controls (SDL3), the menu (Dear ImGui)
kit\toolchain       LLVM-MinGW, a C++ compiler for Windows (Clang)
kit\files.txt       every file this release holds (see below)
work\               made when building: the game (ToyCommander.exe), built from your
                    disc, the recompiled code, the build's files and the logs
LICENSES\           the licences of everything included

Source, changes and issues: https://github.com/Qilin1066/ToyCommander--QilinRecomp

Updates and recovery
--------------------
"Check for updates" in Play Toy Commander.exe asks GitHub for a newer release of
Toy Commander (it sends nothing about you or your PC). If there is one, it
downloads it, unpacks it beside this folder and swaps in the new kit and
launcher, then starts again and builds the game for the new version. If
anything fails on the way, the old version is left as it was. You can also
unzip a new download anywhere, even over this folder: it finds your disc
and the cache by itself, and at its first start it removes what an older
version left behind (the .bat of the first downloads, files the new kit no
longer has: anything in kit\ or LICENSES\ that kit\files.txt doesn't name).
Your saves and settings are never in this folder, so nothing of yours is
touched.

The game is compiled for this PC's processor; moved to another PC, it is
built again. Compiled files come from the cache when nothing they're made
from has changed. A failed build leaves the working executable as it was;
the one before a new build is kept as work\ToyCommander.exe.previous until the new one
has run and closed normally. "Build again from
scratch" compiles everything anew.

Before a save burst, the memory card is copied into its five-entry history;
flash updates keep their own history too. Use the settings menu's Game page
to restore a copy and restart. VMU packets are checked small writes; the
history supports recovery after an interrupted save, rather than making a
whole game save transactional. Existing unreadable or malformed card/flash
files stop the game and are left unchanged. Keep a separate copy before
manual recovery.

Sound and controller recovery
-----------------------------
If the sound output is unavailable, the game keeps running and retries it
once a second. Playback resumes with the selected volume and mute setting;
sound from the outage is discarded rather than played late. Recovery and
errors are recorded in run-errors.log.

A controller that pressed while all four ports were full can take a port
when another controller disconnects. Existing players keep their ports.
Vibration expires quickly if the game stops updating it.
