Rocket 68
A Motorola 68000 CPU emulator in C
Loading...
Searching...
No Matches
M68kCpu Struct Reference

Full CPU context for one emulated 68000 instance. More...

#include <m68k.h>

Public Member Functions

 _Alignas (64) M68kRegister d_regs[8]

Public Attributes

M68kRegister a_regs [8]
u32 pc
u32 ppc
u16 sr
u16 ir
u8 * memory
u32 memory_size
int irq_level
bool nmi_pending
u32 usp
u32 ssp
bool stopped
bool trace_pending
int exception_thrown
int exception_depth
bool in_address_error
u8 memory_callback_state
bool in_bus_error
u32 fault_address
u32 fault_pc
u16 fault_ir
u16 fault_ssw
bool fault_program_access
bool fault_valid
bool fault_pc_valid
u16 fault_bus_word
bool fault_bus_word_valid
bool operand_program_space
bool group0_fault
bool fault_trap_active
jmp_buf fault_trap
M68kModel model
u32 vbr
u32 sfc
u32 dfc
int target_cycles
int cycles_remaining
M68kWaitBusCallback wait_bus
M68kIntAckCallback int_ack
M68kFcCallback fc_cb
M68kInstrHookCallback instr_hook_cb
M68kPcChangedCallback pc_changed_cb
M68kResetCallback reset_cb
M68kTasCallback tas_cb
M68kIllgCallback illg_cb
M68kRead8Callback read8_cb
M68kRead16Callback read16_cb
M68kRead32Callback read32_cb
M68kWrite8Callback write8_cb
M68kWrite16Callback write16_cb
M68kWrite32Callback write32_cb

Detailed Description

Full CPU context for one emulated 68000 instance.

Member Function Documentation

◆ _Alignas()

M68kCpu::_Alignas ( 64 )

Data registers D0-D7.

Member Data Documentation

◆ a_regs

M68kRegister M68kCpu::a_regs[8]

Address registers A0-A7.

◆ cycles_remaining

int M68kCpu::cycles_remaining

Remaining cycles in current timeslice.

◆ dfc

u32 M68kCpu::dfc

Destination function code register (model extension path).

◆ exception_depth

int M68kCpu::exception_depth

Nesting depth of active exception processing.

◆ exception_thrown

int M68kCpu::exception_thrown

Exception state marker.

◆ fault_address

u32 M68kCpu::fault_address

Fault address latched for exception frames.

◆ fault_bus_word

u16 M68kCpu::fault_bus_word

Internal bus word for frame IR/SSW when valid.

◆ fault_bus_word_valid

bool M68kCpu::fault_bus_word_valid

Fault bus word validity flag.

◆ fault_ir

u16 M68kCpu::fault_ir

Fault IR latched for exception frames.

◆ fault_pc

u32 M68kCpu::fault_pc

PC value pushed in group-0 frames when valid.

◆ fault_pc_valid

bool M68kCpu::fault_pc_valid

Fault PC validity flag.

◆ fault_program_access

bool M68kCpu::fault_program_access

Fault access type marker.

◆ fault_ssw

u16 M68kCpu::fault_ssw

Fault status word for exception frames.

◆ fault_trap

jmp_buf M68kCpu::fault_trap

Non-local escape target for group-0 fault aborts.

◆ fault_trap_active

bool M68kCpu::fault_trap_active

Group-0 fault trap active for the current step.

◆ fault_valid

bool M68kCpu::fault_valid

Fault information validity flag.

◆ fc_cb

M68kFcCallback M68kCpu::fc_cb

Function code callback.

◆ group0_fault

bool M68kCpu::group0_fault

Group-0 fault latched for the current step.

◆ illg_cb

M68kIllgCallback M68kCpu::illg_cb

Illegal opcode callback.

◆ in_address_error

bool M68kCpu::in_address_error

Address error re-entry guard.

◆ in_bus_error

bool M68kCpu::in_bus_error

Bus error re-entry guard.

◆ instr_hook_cb

M68kInstrHookCallback M68kCpu::instr_hook_cb

Instruction hook callback.

◆ int_ack

M68kIntAckCallback M68kCpu::int_ack

Interrupt acknowledge callback.

◆ ir

u16 M68kCpu::ir

Current instruction register.

◆ irq_level

int M68kCpu::irq_level

Asserted interrupt level (0-7).

◆ memory

u8* M68kCpu::memory

Bound flat memory pointer.

◆ memory_callback_state

u8 M68kCpu::memory_callback_state

Internal callback state: idle, active, or fault reported.

◆ memory_size

u32 M68kCpu::memory_size

Size of bound memory in bytes.

◆ model

M68kModel M68kCpu::model

CPU model profile; gates later-family instructions.

◆ nmi_pending

bool M68kCpu::nmi_pending

Level 7 edge latched and not yet serviced.

◆ operand_program_space

bool M68kCpu::operand_program_space

PC-relative operand access marker.

◆ pc

u32 M68kCpu::pc

Program counter.

◆ pc_changed_cb

M68kPcChangedCallback M68kCpu::pc_changed_cb

PC changed callback.

◆ ppc

u32 M68kCpu::ppc

Previous program counter.

◆ read16_cb

M68kRead16Callback M68kCpu::read16_cb

Host memory read callback (16-bit).

◆ read32_cb

M68kRead32Callback M68kCpu::read32_cb

Host memory read callback (32-bit).

◆ read8_cb

M68kRead8Callback M68kCpu::read8_cb

Host memory read callback (8-bit).

◆ reset_cb

M68kResetCallback M68kCpu::reset_cb

Reset callback.

◆ sfc

u32 M68kCpu::sfc

Source function code register (model extension path).

◆ sr

u16 M68kCpu::sr

Status register.

◆ ssp

u32 M68kCpu::ssp

Supervisor stack pointer shadow.

◆ stopped

bool M68kCpu::stopped

STOP state latch.

◆ target_cycles

int M68kCpu::target_cycles

Timeslice target cycles accumulator.

◆ tas_cb

M68kTasCallback M68kCpu::tas_cb

TAS callback.

◆ trace_pending

bool M68kCpu::trace_pending

Trace pending latch.

◆ usp

u32 M68kCpu::usp

User stack pointer.

◆ vbr

u32 M68kCpu::vbr

Vector base register (model extension path).

◆ wait_bus

M68kWaitBusCallback M68kCpu::wait_bus

Wait/bus callback.

◆ write16_cb

M68kWrite16Callback M68kCpu::write16_cb

Host memory write callback (16-bit).

◆ write32_cb

M68kWrite32Callback M68kCpu::write32_cb

Host memory write callback (32-bit).

◆ write8_cb

M68kWrite8Callback M68kCpu::write8_cb

Host memory write callback (8-bit).


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