libElysianVMU 1.6.0
Full-featured, accurate, cross-platform library emulating the Dreamcast's Visual Memory Unit
Loading...
Searching...
No Matches
EvmuCpu Struct Reference

#include <evmu_cpu.h>

Inheritance diagram for EvmuCpu:
EvmuPeripheral EvmuIBehavior

Data Fields

union { 
 
   EvmuCpuClass *   pClass 
 
   EvmuPeripheral   base 
 
};  
 
uint32_t halted: 1
 
uint32_t haltAfterNext: 1
 
uint32_t pcChanged: 1
 
- Data Fields inherited from EvmuPeripheral
union { 
 
   EvmuPeripheralClass *   pClass 
 
   GblObject   base 
 
};  
 
GblFlags logLevel
 

Related Symbols

(Note that these are not member symbols.)

Program Counter

Methods for reading and writing the PC

EvmuPc EvmuCpu_pc (const EvmuCpu *pSelf)
 
void EvmuCpu_setPc (EvmuCpu *pSelf, EvmuPc address)
 
Instruction Info

Methods for querying current instruction info

double EvmuCpu_secs (const EvmuCpu *pSelf)
 
size_t EvmuCpu_cycles (const EvmuCpu *pSelf)
 
EvmuWord EvmuCpu_opcode (const EvmuCpu *pSelf)
 
int32_t EvmuCpu_operand (const EvmuCpu *pSelf, size_t idx)
 
Instruction Execution

Methods for executing instructions

EVMU_RESULT EvmuCpu_execute (EvmuCpu *pSelf, const EvmuDecodedInstruction *pInstr)
 
EVMU_RESULT EvmuCpu_runNext (EvmuCpu *pSelf)
 

Detailed Description

Sanyo LC86k CPU core.

EvmuCpu is an EvmuPeripheral which implements all of the logic behind and provides an API for the CPU core.

In addition to managing normal program flow, it allows you to feed in individual instructions and then query for their decoded operands and opcode. It also provides a signal for when the PC changes, which can be used to implement breakpoints and instruction tracing.

See also
EvmuCpuClass

Definition at line 91 of file evmu_cpu.h.

Friends And Related Symbol Documentation

◆ EvmuCpu_cycles()

size_t EvmuCpu_cycles ( const EvmuCpu * pSelf)
related

Returns the number of cycles per instruction for the currently executing instruction.

◆ EvmuCpu_execute()

EVMU_RESULT EvmuCpu_execute ( EvmuCpu * pSelf,
const EvmuDecodedInstruction * pInstr )
related

Immediately executes an externally provided decoded instruction rather than fetching one from ROM or flash.

◆ EvmuCpu_opcode()

EvmuWord EvmuCpu_opcode ( const EvmuCpu * pSelf)
related

Returns the opcode of the currently executing instruction.

◆ EvmuCpu_operand()

int32_t EvmuCpu_operand ( const EvmuCpu * pSelf,
size_t idx )
related

Returns the operand of the currently executing instruction at index idx.

◆ EvmuCpu_pc()

EvmuPc EvmuCpu_pc ( const EvmuCpu * pSelf)
related

Returns the address for the program counter, which points to the next instruction.

◆ EvmuCpu_runNext()

EVMU_RESULT EvmuCpu_runNext ( EvmuCpu * pSelf)
related

Fetches and executes the next instruction, which is located at the address pointed to by the program counter.

◆ EvmuCpu_secs()

double EvmuCpu_secs ( const EvmuCpu * pSelf)
related

Returns the number of seconds per instruction for the currently executing instruction.

◆ EvmuCpu_setPc()

void EvmuCpu_setPc ( EvmuCpu * pSelf,
EvmuPc address )
related

Sets the address of the program counter, so that it will be the next executed instruction.

Field Documentation

◆ base

EvmuPeripheral EvmuCpu::base

Inherited base instance structure.

Definition at line 91 of file evmu_cpu.h.

◆ haltAfterNext

uint32_t EvmuCpu::haltAfterNext

Halts the CPU execution after the next instruction.

Definition at line 93 of file evmu_cpu.h.

◆ halted

uint32_t EvmuCpu::halted

Halts CPU execution.

Definition at line 92 of file evmu_cpu.h.

◆ pcChanged

uint32_t EvmuCpu::pcChanged

User toggle (reset to false) which be set upon PC change.

Definition at line 94 of file evmu_cpu.h.

◆ pClass

EvmuCpuClass* EvmuCpu::pClass

Pointer to class/vtable structure.

Definition at line 91 of file evmu_cpu.h.


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