Skip to content

bt-emulation

[module] bt-emulation

[procedure] (make-emulator PROGRAM PROGRAM-ARGS #!optional (PC-NAME "PC") (LOADER-TYPE 'ram) DEFAULT-RUN-ADDRESS)

Create an emulator interface for the emulator PROGRAM. PROGRAM-ARGS shall be a list of command line argument strings that are passed to program on startup. Optionally PC-NAME provides the name of the target's main program counter register (defaults to "PC"). You can check for the appropriate name with the info command as detailed below.

The returned emulator is not yet running. To run it, call (EMULATOR 'start).

The following other commands may be available, depending on the features of the emulator application:

  • 'exec CMD - Execute raw command on the emulator's interpreter. The details of CMD depend on the receiving emulator. For MAME commands, see mame-bridge/mame-startup.lua.
  • 'info - Display information about the emulated machine.
  • 'run ADDRESS CODE - Load and run the list of bytes CODE at ADDRESS.
  • 'pause - Pause emulation.
  • 'unpause - Unpause emulation.
  • 'start - Launch emulator program in new thread.
  • 'quit - Exit the Emulator.

[procedure] (platform->emulator PLATFORM)

Generate an emulator object suitable for the target system with the MDAL platform id PLATFORM. This relies on the system.scm and emulators.scm lists in the Bintracker config directory. An exception is raised if no entry is found for either the target system, or the emulator program that the target system requests.