Skip to content
/ theodore Public

Libretro core for Thomson MO/TO emulation / Core Libretro pour l'émulation des ordinateurs Thomson MO/TO.

License

Notifications You must be signed in to change notification settings

Zlika/theodore

Repository files navigation

🇬🇧 🇫🇷

Theodore - Thomson MO/TO emulator

Build status Libretro Build Status Coverity Scan Build Status GitHub tag

This is a libretro core for emulation of Thomson computers. It is based on Daniel Coulom's DCTO8D, DCTO9P and DCMO5 emulators, and supports the following models: TO7, TO7/70, TO8, TO8D, TO9, TO9+, MO5, MO6 and also the Olivetti Prodest PC128 (a rebranded MO6 for the Italian market).

How to install

This emulator is available on the following platforms:

It should be compatible with all the platforms supported by RetroArch (Android, Linux, MacOS, Raspberry Pi, Windows, Nintendo...).

How to compile

On Linux (and most other platforms):

make

You can then run the core with a libretro frontend like RetroArch:

retroarch -L theodore_libretro.so

To compile the Android version, you need the Android NDK:

cd jni
ndk-build

🎮 Gamepad: mapping of the buttons

B => "Fire" button

Start => "Start Program". Simulates one or several keystrokes on the keyboard to start a game. This feature allows to start most games without the need for a keyboard. The key depends on the loaded media and of the current computer emulated. On MO5/MO6/TO7/TO7-70, the command used depends on the format detected for the first file of the tape (BAS => RUN", BIN => LOADM"",,R).

Media loaded Thomson computer Key
Floppy disk TO8/TO8D/TO9+ 'B' key (BASIC 512)
TO9 'D' key (BASIC 128)
MO5 RUN" + Enter
Tape TO8/TO8D/TO9+ 'C' key (BASIC 1.0)
TO9 'E' key (BASIC 1.0)
MO5/MO6/TO7 RUN" or LOADM"",,R + Enter
Cartridge All but MO5/TO7 '0' key
TO7/TO7-70 '1' key
MO5 Nothing (cartridges are already autostarted on MO5)

If the game does not start, then maybe another BASIC must be used.

TO7 and TO7/70: When a cartridge is not loaded, the BASIC cartridge is automatically loaded (BASIC 1 for TO7, BASIC 128 for TO7/70).

Starting from version 3.2, Theodore includes an internal database of games with specific start sequences. If the core's option "Use game hash for autostart" is enabled and the game is present in the internal database, its specific start sequence will be used.

Virtual keyboard feature: Use Select button to show/hide the virtual keyboard. The transparency level of the virtual keyboard can be set in the core's options. When the virtual keyboard is displayed, the following buttons on the gamepad can be used:

  • Right/Left/Up/Down: Change focused key on the keyboard.
  • B: Press the focused key.
  • B (long press): Make the key "sticky" (or release it if it was already sticky). Up to 3 keys can be made sticky. All sticky keys are released when the virtual keyboard is hidden.
  • Start: Shortcut to press the "Enter" key.
  • Y: Move the keyboard in the upper or lower part of the screen.

Keyboard: mapping of special keys

Thomson keyboard PC keyboard
STOP TAB
CNT CTRL
CAPSLOCK CAPSLOCK
ACC BACKSPACE
HOME HOME
Arrows Arrows
INS INSERT
EFF DEL
RAZ ALT
F1-F5 F1-F5
F6-F10 SHIFT+F1-F5
Yellow key (MO5) Left SHIFT
BASIC (MO5/MO6) Right SHIFT

RetroArch already uses lots of keyboard shortcuts for its own need that interfere with the core's keyboard emulation. To avoid this problem, configure RetroArch with a "Hotkey", as indicated in Introduction to Hotkeys, and/or use the "Game Focus" mode (toggle with "Scroll Lock" key).

💾 File formats

The emulator can read the following file formats: *.fd and *.sap (floppy disks), *.k7 (tapes), .m7/.m5 and *.rom (cartridges).

💻 Thomson models

By default, the core tries to guess the required Thomson model based on the name of the file loaded (e.g. saphir_to8.fd will switch to TO8, pulsar_mo5.k7 will switch to MO5 and so on). The fallback is to emulate a TO8 computer. Using the "Thomson model" option you can force the emulation of a particular model, or use "Auto" for the default "best guess" behavior.

⏪ Save states & Rewind

The emulator supports libretro's "save state" feature. Under RetroArch, use the following keys: F2 (save state), F4 (load state), F6/F7 (change state slot). Under Recalbox, use the following buttons: Hotkey + Y (save state), Hotkey + X (load state), Hotkey + "Up/Down Arrow" (change state slot). The emulator also supports libretro's "rewind" feature. Under RetroArch, press and hold the "R" key. Under Recalbox, press and hold the HotKey button and the "Left Arrow".

😇 Cheat codes

The emulator is compatible with RetroArch's cheat codes feature (cf. Cheat code searching creation interface).

The libretro-database-thomson repository includes cheat codes for some Thomson games.

🪲 Disassembler / Debugger

A simple disassembler / debugger is available. It requires the use of the command-line, and then is not available on platforms where the standard input & output are not (easily) available. The core must be compiled with the "DASM=1" option to enable this feature (binaries produced by the libretro buildbot does not enable this feature, so you have to compile the core by yourself).

make DASM=1

RetroArch must then be launched from the command-line:

retroarch -L theodore_libretro.so /path/to/game

Then open the RetroArch menu and enable the core's option "Interactive disassembler". From the command-line, the following commands are then available:

  • Press Enter key: step-by-step debugging. The following data is printed at each step: current address (value of the Program Counter register), executed instruction, current value of the CPU's registers.
  • trace or t: switch to "trace" mode. The core will print each instruction executed without any stop (except if a breakpoint is met).
  • run or r: switch to "run" mode. The core will run the instructions without printing them and without any stop (except if a breakpoint is met).
  • exit or quit or q: exit the disassembler/debugger.
  • bp clear: clear all the breakpoints.
  • bp list: print the list of the currently defined breakpoints.
  • bp pc xxxx (with xxxx an hexadecimal number): add a breakpoint at for the given Program Counter value.
  • bp read xxxx (with xxxx an hexadecimal number): add a breakpoint when the emulator reads memory at the given address.
  • bp write xxxx (with xxxx an hexadecimal number): add a breakpoint when the emulator writes memory at the given address.
  • read xxxx (with xxxx an hexadecimal number): read the value at the given memory address.
  • write xxxx yy (with xxxx and yy hexadecimal numbers): write the value yy at memory address xxxx.

Another core's option, "Break on illegal opcode", allows to break and enter step-by-step debugging when an illegal opcode is met.

About

Libretro core for Thomson MO/TO emulation / Core Libretro pour l'émulation des ordinateurs Thomson MO/TO.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages