VirtualC64 v5.0 beta
Commodore 64 Emulator
|
C64 API. More...
#include <VirtualC64.h>
Public Member Functions | |
Analyzing the emulator | |
const C64Info & | getInfo () const |
Returns the component's current state. | |
const C64Info & | getCachedInfo () const |
Returns the component's current state. | |
EventSlotInfo | getSlotInfo (isize nr) const |
Returns the current state of an event slot. | |
RomTraits | getRomTraits (RomType type) const |
Returns information about one of the installed Roms. | |
Resetting the C64 | |
void | hardReset () |
Performs a hard reset. | |
void | softReset () |
Performs a hard reset. | |
Setting up auto-inspection | |
InspectionTarget | getInspectionTarget () const |
Returns the current inspection target. | |
void | setInspectionTarget (InspectionTarget target) |
Sets the current inspection target. | |
void | removeInspectionTarget () |
Removes the current inspection target. | |
Handling snapshots | |
MediaFile * | takeSnapshot () |
Takes a snapshot. | |
void | loadSnapshot (const MediaFile &snapshot) |
Loads a snapshot into the emulator. | |
Handling ROMs | |
void | loadRom (const fs::path &path) |
Loads a ROM from a file The ROM type is determined automatically. | |
void | loadRom (const MediaFile &file) |
Loads a ROM, provided by a RomFile object. | |
void | deleteRom (RomType type) |
Removes an installed ROM The ROM contents is overwritten with zeroes. | |
void | saveRom (RomType rom, const std::filesystem::path &path) |
Saves a ROM to disk. | |
Handling media files | |
void | flash (const MediaFile &file) |
Flashes a file into memory. | |
void | flash (const MediaFile &file, isize item) |
Flashes a file from a collection into memory. | |
void | flash (const FileSystem &fs, isize item) |
Flashes a file from a file system into memory. | |
C64 API.
InspectionTarget getInspectionTarget | ( | ) | const |
Returns the current inspection target.
If you open the inspector panel in the Mac app while the emulator is running, you will see continuous updates of the emulator state. The displayed information is recorded via the auto-inspection mechanism. If auto-inspection is active, the emulator schedules an inspect event which calls function cacheInfo() on the inspection target in constant intervals. The recorded information is later picked up by the GUI.
If you change to a different panel in the inspector window, the emulator will change the inspection target to only record the information you're seeing in the currently open panel.
RomTraits getRomTraits | ( | RomType | type | ) | const |
Returns information about one of the installed Roms.
type | The ROM type |
EventSlotInfo getSlotInfo | ( | isize | nr | ) | const |
Returns the current state of an event slot.
nr | Number of the event slot. |
void hardReset | ( | ) |
Performs a hard reset.
A hard reset affects all components. The effect is similar to switching power off and on.
void loadRom | ( | const fs::path & | path | ) |
Loads a ROM from a file The ROM type is determined automatically.
VC64Error | (ERROR_ROM_BASIC_MISSING) VC64Error (ERROR_FILE_TYPE_MISMATCH) |
void loadSnapshot | ( | const MediaFile & | snapshot | ) |
Loads a snapshot into the emulator.
snapshot | Reference to a snapshot. |
void saveRom | ( | RomType | rom, |
const std::filesystem::path & | path ) |
Saves a ROM to disk.
VC64Error | (ERROR_FILE_CANT_WRITE) |
void softReset | ( | ) |
Performs a hard reset.
A soft reset emulates a real reset of the C64 which can be initiated via the reset line on the expansion port.
MediaFile * takeSnapshot | ( | ) |
Takes a snapshot.