Skip to content

MemoryAPI ​

cpp
#include <VAmiga.h>
cpp
class MemoryAPI

Defined in VAmiga.h:936

API of the memory.

Public Attributes ​

ReturnNameDescription
MemoryDebuggerAPIdebuggerThe memory debugger.

debugger ​

cpp
MemoryDebuggerAPI debugger

Type: MemoryDebuggerAPI

Defined in VAmiga.h:945

The memory debugger.

Public Methods ​

ReturnNameDescription
const MemConfig &getConfig constReturns the component's current configuration.
const MemInfo &getInfo constReturns the component's current state.
const MemInfo &getCachedInfo constReturns the most recent state snapshot recorded by the emulator thread (see getInfo()).
const MemMetrics &getMetrics constReturns statistical information about the components.
const MemMetrics &getCachedMetrics constReturns the most recent metrics snapshot recorded by the emulator thread (see getMetrics()).
retro::vault::RomTraitsgetRomTraits constProvides details about the installed ROM, WOM, or ROM extension.
retro::vault::RomTraitsgetWomTraits constReturns the traits of the installed WOM (see getRomTraits()).
retro::vault::RomTraitsgetExtTraits constReturns the traits of the installed ROM extension (see getRomTraits()).
voidloadRomLoads a ROM from a file The ROM type is determined automatically.
voidloadRomLoads a ROM provided by a memory buffer.
voidloadExtLoads a ROM extension from a file (see loadRom()).
voidloadExtLoads a ROM extension from a memory buffer (see loadRom()).
voidloadRomAsyncAsynchronous version of loadRom() and loadExt(): queues the request and returns at once.
voidloadExtAsyncAsynchronous version of loadExt(): queues the request and returns at once.
voidsaveRomSaves a Rom to disk.
voidsaveWomSaves the WOM to disk (see saveRom()).
voidsaveExtSaves the ROM extension to disk (see saveRom()).
voiddeleteRomRemoves a ROM.
voiddeleteWomRemoves the WOM (see deleteRom()).
voiddeleteExtRemoves the ROM extension (see deleteRom()).

getConfig ​

const

cpp
const MemConfig & getConfig() const

Defined in VAmiga.h:952

Returns the component's current configuration.


getInfo ​

const

cpp
const MemInfo & getInfo() const

Defined in VAmiga.h:963

Returns the component's current state.

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 MemInfo & getCachedInfo() const

Defined in VAmiga.h:965

Returns the most recent state snapshot recorded by the emulator thread (see getInfo()).


getMetrics ​

const

cpp
const MemMetrics & getMetrics() const

Defined in VAmiga.h:976

Returns statistical information about the components.

getMetrics() reads the live state on the calling thread. The result is only consistent if the emulator is paused or suspended. getCachedMetrics() 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.


getCachedMetrics ​

const

cpp
const MemMetrics & getCachedMetrics() const

Defined in VAmiga.h:978

Returns the most recent metrics snapshot recorded by the emulator thread (see getMetrics()).


getRomTraits ​

const

cpp
retro::vault::RomTraits getRomTraits() const

Defined in VAmiga.h:982

Provides details about the installed ROM, WOM, or ROM extension.


getWomTraits ​

const

cpp
retro::vault::RomTraits getWomTraits() const

Defined in VAmiga.h:984

Returns the traits of the installed WOM (see getRomTraits()).


getExtTraits ​

const

cpp
retro::vault::RomTraits getExtTraits() const

Defined in VAmiga.h:986

Returns the traits of the installed ROM extension (see getRomTraits()).


loadRom ​

cpp
void loadRom(const std::filesystem::path & path)

Defined in VAmiga.h:997

Loads a ROM from a file The ROM type is determined automatically.

Exceptions ​

ExceptionDescription
Errorif the file cannot be read or does not contain valid data.

loadRom ​

cpp
void loadRom(const u8 * buf, isize len)

Defined in VAmiga.h:1013

Loads a ROM provided by a memory buffer.

Exceptions ​

ExceptionDescription
Errorif the data is not valid.

loadExt ​

cpp
void loadExt(const std::filesystem::path & path)

Defined in VAmiga.h:999

Loads a ROM extension from a file (see loadRom()).


loadExt ​

cpp
void loadExt(const u8 * buf, isize len)

Defined in VAmiga.h:1015

Loads a ROM extension from a memory buffer (see loadRom()).


loadRomAsync ​

cpp
void loadRomAsync(const std::filesystem::path & path)

Defined in VAmiga.h:1005

Asynchronous version of loadRom() and loadExt(): queues the request and returns at once.

Success and failure are both reported by a ROM_LOADED message. If the request failed, the message carries the exception.


loadExtAsync ​

cpp
void loadExtAsync(const std::filesystem::path & path)

Defined in VAmiga.h:1007

Asynchronous version of loadExt(): queues the request and returns at once.


saveRom ​

cpp
void saveRom(const std::filesystem::path & path)

Defined in VAmiga.h:1021

Saves a Rom to disk.

Exceptions ​

ExceptionDescription
Errorif the file cannot be written.

saveWom ​

cpp
void saveWom(const std::filesystem::path & path)

Defined in VAmiga.h:1023

Saves the WOM to disk (see saveRom()).


saveExt ​

cpp
void saveExt(const std::filesystem::path & path)

Defined in VAmiga.h:1025

Saves the ROM extension to disk (see saveRom()).


deleteRom ​

cpp
void deleteRom()

Defined in VAmiga.h:1029

Removes a ROM.


deleteWom ​

cpp
void deleteWom()

Defined in VAmiga.h:1031

Removes the WOM (see deleteRom()).


deleteExt ​

cpp
void deleteExt()

Defined in VAmiga.h:1033

Removes the ROM extension (see deleteRom()).