Appearance
ExpansionPortAPI
cpp
#include <VirtualC64.h>cpp
class ExpansionPortAPIDefined in VirtualC64.h:1197
Expansion Port Public API
Public Methods
| Return | Name | Description |
|---|---|---|
CartridgeTraits | getCartridgeTraits const | Returns the traits of the current cartridge. |
const CartridgeInfo & | getInfo const | Returns the state of the current cartridge. |
const CartridgeInfo & | getCachedInfo const | Returns the most recent state snapshot recorded by the emulator thread (see getInfo()). |
CartridgeRomInfo | getRomInfo const | Returns the state of one of the cartridge ROM packets. |
void | attachCartridge | Attaches a cartridge to the expansion port. |
void | attachCartridgeAsync | Asynchronous version of attachCartridge(): queues the request and returns at once. |
void | attachReu | Attaches a RAM Expansion Unit to the expansion port. |
void | attachGeoRam | Attaches a GeoRAM module to the expansion port. |
void | attachIsepicCartridge | Attaches an Isepic module to the expansion port. |
void | detachCartridge | Detaches the currently plugged in cartridge. |
void | exportCRT const | Export cartridge. |
getCartridgeTraits
const
cpp
CartridgeTraits getCartridgeTraits() constDefined in VirtualC64.h:1210
Returns the traits of the current cartridge.
getInfo
const
cpp
const CartridgeInfo & getInfo() constDefined in VirtualC64.h:1221
Returns the state of the current cartridge.
getInfo() reads the live state on the calling thread. The result is only consistent if the emulator is paused or suspended. getCachedInfo() returns the snapshot the emulator thread has recorded most recently, which is the one to use while the emulator runs. Both return references that can be overwritten by a later call or by the emulator thread, so copy the data if you need to keep it.
getCachedInfo
const
cpp
const CartridgeInfo & getCachedInfo() constDefined in VirtualC64.h:1223
Returns the most recent state snapshot recorded by the emulator thread (see getInfo()).
getRomInfo
const
cpp
CartridgeRomInfo getRomInfo(isize nr) constDefined in VirtualC64.h:1228
Returns the state of one of the cartridge ROM packets.
Parameters
| Parameter | Type | Description |
|---|---|---|
nr | isize | Number of the ROM packet. |
attachCartridge
cpp
void attachCartridge(const std::filesystem::path & path, bool reset = true)Defined in VirtualC64.h:1238
Attaches a cartridge to the expansion port.
Exceptions
| Exception | Description |
|---|---|
Error | if the file cannot be read or does not contain valid data. |
attachCartridgeAsync
cpp
void attachCartridgeAsync(const std::filesystem::path & path, bool reset = true)Defined in VirtualC64.h:1245
Asynchronous version of attachCartridge(): queues the request and returns at once.
The file is read on the emulator thread. Success and failure are both reported by the usual message (e.g., CRT_ATTACHED). If the request failed, the message carries the exception.
attachReu
cpp
void attachReu(isize capacity)Defined in VirtualC64.h:1249
Attaches a RAM Expansion Unit to the expansion port.
attachGeoRam
cpp
void attachGeoRam(isize capacity)Defined in VirtualC64.h:1253
Attaches a GeoRAM module to the expansion port.
attachIsepicCartridge
cpp
void attachIsepicCartridge()Defined in VirtualC64.h:1257
Attaches an Isepic module to the expansion port.
detachCartridge
cpp
void detachCartridge()Defined in VirtualC64.h:1261
Detaches the currently plugged in cartridge.
exportCRT
const
cpp
void exportCRT(const std::filesystem::path & path) constDefined in VirtualC64.h:1265
Export cartridge.