VirtualC64 v5.0 beta
Commodore 64 Emulator
Loading...
Searching...
No Matches
CPUAPI Struct Reference

CPU API. More...

#include <VirtualC64.h>

Public Member Functions

const CPUInfo & getInfo () const
 Returns the component's current state.
 
isize loggedInstructions () const
 Returns the number of instructions in the record buffer.
 
void clearLog ()
 Empties the record buffer.
 
void setNumberFormat (peddle::DasmNumberFormat instrFormat, peddle::DasmNumberFormat dataFormat)
 Determines how the disassembler displays numbers.
 
isize disassemble (char *dst, const char *fmt, u16 addr) const
 Disassembles an instruction.
 
isize disassembleRecorded (char *dst, const char *fmt, isize nr) const
 Disassembles an instruction from the record buffer.
 
peddle::Guard * breakpointNr (long nr) const
 Returns a breakpoint from the breakpoint list.
 
Guard * breakpointAt (u32 addr) const
 Returns the breakpoint set on a specific address.
 
Guard * watchpointNr (long nr) const
 Returns a breakpoint from the breakpoint list.
 
Guard * watchpointAt (u32 addr) const
 Returns the breakpoint set on a specific address.
 

Detailed Description

CPU API.

Member Function Documentation

◆ breakpointAt()

Guard * breakpointAt ( u32 addr) const

Returns the breakpoint set on a specific address.

Parameters
addrMemory address.
Returns
A pointer to the breakpoint or nullptr if it is not guarded.

◆ breakpointNr()

Guard * breakpointNr ( long nr) const

Returns a breakpoint from the breakpoint list.

Parameters
nrNumber of the breakpoint.
Returns
A pointer to the breakpoint or nullptr if it does not exist.

◆ disassemble()

isize disassemble ( char * dst,
const char * fmt,
u16 addr ) const

Disassembles an instruction.

Parameters
dstDestination buffer
fmtString definining the output format
addrAddress of the instruction to disassemble
Returns
Length of the disassembled instruction in bytes.

◆ disassembleRecorded()

isize disassembleRecorded ( char * dst,
const char * fmt,
isize nr ) const

Disassembles an instruction from the record buffer.

Parameters
dstDestination buffer
fmtString definining the output format
nrIndex of the instruction in the record buffer
Returns
Length of the disassembled instruction in bytes.

◆ loggedInstructions()

isize loggedInstructions ( ) const

Returns the number of instructions in the record buffer.

Note
The record buffer is only filled in track mode. To save computation time, the GUI enables track mode when the CPU inspector is opened and disables track mode when it is closed.

◆ setNumberFormat()

void setNumberFormat ( peddle::DasmNumberFormat instrFormat,
peddle::DasmNumberFormat dataFormat )

Determines how the disassembler displays numbers.

Parameters
instrFormatFormat for numbers inside instructions
dataFormatFormat for printed data values

◆ watchpointAt()

Guard * watchpointAt ( u32 addr) const

Returns the breakpoint set on a specific address.

Parameters
addrMemory address.
Returns
A pointer to the breakpoint or nullptr if it is not guarded.

◆ watchpointNr()

Guard * watchpointNr ( long nr) const

Returns a breakpoint from the breakpoint list.

Parameters
nrNumber of the breakpoint.
Returns
A pointer to the breakpoint or nullptr if it does not exist.

The documentation for this struct was generated from the following files: