Skip to content

Overview ​

The whole public API hangs off a single object of class vamiga::VAmiga. It has two kinds of members:

  • Functions that act on the emulator as a whole: querying the version, launching the emulator thread, controlling the execution state, resetting, configuring, and synchronizing with the emulator thread.
  • Sub-APIs, one per hardware component or subsystem. They are public data members, so a call reads like amiga.cpu.getInfo() or amiga.df0.insertBlankDisk(...). Sub-APIs may contain further sub-APIs, for example amiga.cpu.breakpoints or amiga.controlPort1.joystick.

All API classes are derived from vamiga::API, which provides suspend() and resume().

Sub-APIs ​

MemberClassPurpose
amigavamiga::AmigaAPIThe machine as a whole: snapshots, ROMs, media files, auto-inspection.
agnusvamiga::AgnusAPIThe Agnus chip. Its members copper (vamiga::CopperAPI), blitter (vamiga::BlitterAPI), xray (vamiga::XRayAPI), logicAnalyzer (vamiga::LogicAnalyzerAPI) and beamtraps (vamiga::GuardsAPI) give access to the subcomponents.
ciaA, ciaBvamiga::CIAAPIThe two CIA chips.
cpuvamiga::CPUAPICPU state. Its members debugger (vamiga::CPUDebuggerAPI) disassembles code, breakpoints, watchpoints and catchpoints (vamiga::GuardsAPI) manage guards.
denisevamiga::DeniseAPIThe Denise chip.
memvamiga::MemoryAPIMemory configuration and state. Its member debugger (vamiga::MemoryDebuggerAPI) dumps memory.
paulavamiga::PaulaAPIThe Paula chip with its diskController (vamiga::DiskControllerAPI) and uart (vamiga::UARTAPI).
rtcvamiga::RTCAPIThe real-time clock.
audioPort, videoPortvamiga::AudioPortAPI, vamiga::VideoPortAPIAudio and video output.
controlPort1, controlPort2vamiga::ControlPortAPIThe control ports. Their members joystick (vamiga::JoystickAPI) and mouse (vamiga::MouseAPI) control the connected device.
serialPortvamiga::SerialPortAPIThe serial port.
df0 ... df3vamiga::FloppyDriveAPIThe floppy drives and their disks.
hd0 ... hd3vamiga::HardDriveAPIThe hard drives. Their member controller (vamiga::HdControllerAPI) is the drive controller.
keyboardvamiga::KeyboardAPIKey presses.
msgQueuevamiga::MsgQueueAPIThe message queue.
remoteManagervamiga::RemoteManagerAPIRemote servers (RetroShell, RPC, DAP, ...).
retroShellvamiga::RetroShellAPIThe command console.
defaults (static)vamiga::DefaultsAPIPersistent user defaults. Available without an emulator instance.

Conventions ​

PatternMeaning
getConfig(), get(Opt) / set(Opt, ...)Read and change the configuration. Options are identified by the enumeration vamiga::Opt.
getInfo(), getCachedInfo(), getMetrics(), ...Read the state of a component.
foo() / fooAsync()Blocking and asynchronous flavor of a state-changing function.

To be notified about events, read the messages from the message queue (vamiga::MsgQueueAPI). The messages are listed in the enumeration vamiga::Msg.

Errors ​

API functions report failures by throwing exceptions derived from utl::Error. Each function documents what it can throw with @throw.

ExceptionMeaning
vamiga::CoreErrorThe request does not match the state of the emulator, e.g., an invalid option value or a missing ROM.
utl::IOErrorA file or folder could not be accessed.
vamiga::MediaErrorA ROM, snapshot, or disk image is invalid or not supported.