Appearance
MemoryAPI
cpp
#include <VirtualC64.h>cpp
class MemoryAPIDefined in VirtualC64.h:174
Memory API
Public Attributes
| Return | Name | Description |
|---|---|---|
MemoryDebuggerAPI | debugger | Memory debugger. |
debugger
cpp
MemoryDebuggerAPI debuggerType: MemoryDebuggerAPI
Defined in VirtualC64.h:184
Memory debugger.
Public Methods
| Return | Name | Description |
|---|---|---|
const MemConfig & | getConfig const | Returns the component's current configuration. |
const MemInfo & | getInfo const | Returns the component's current state. |
const MemInfo & | getCachedInfo const | Returns the most recent state snapshot recorded by the emulator thread (see getInfo()). |
void | drawHeatmap const | Draws a heatmap of the recent memory accesses. |
getConfig
const
cpp
const MemConfig & getConfig() constDefined in VirtualC64.h:188
Returns the component's current configuration.
getInfo
const
cpp
const MemInfo & getInfo() constDefined in VirtualC64.h:199
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() constDefined in VirtualC64.h:201
Returns the most recent state snapshot recorded by the emulator thread (see getInfo()).
drawHeatmap
const
cpp
void drawHeatmap(u32 * buffer, isize width, isize height) constDefined in VirtualC64.h:219
Draws a heatmap of the recent memory accesses.
The 64 KB address space is shown as a grid of 256 x 256 cells. Neighboring addresses are mapped to neighboring cells by interleaving the address bits, so that address ranges form compact blocks. A cell lights up when its address is accessed and fades out over time. The map is updated at the end of each frame, and only while the option Opt::MEM_HEATMAP is enabled.
Parameters
| Parameter | Type | Description |
|---|---|---|
buffer | u32 * | Texture buffer for 256 x 256 pixels (RGBA) |
width | isize | Width of the texture, must be 256 |
height | isize | Height of the texture, must be 256 |
Exceptions
| Exception | Description |
|---|---|
CoreError | (CoreError::OPT_INV_ARG) if the size is not 256 x 256. |