pub trait HleHandler {
// Provided methods
fn handle_aline(
&mut self,
_cpu: &mut CpuCore,
_bus: &mut dyn AddressBus,
_opcode: u16,
) -> bool { ... }
fn handle_fline(
&mut self,
_cpu: &mut CpuCore,
_bus: &mut dyn AddressBus,
_opcode: u16,
) -> bool { ... }
fn handle_trap(
&mut self,
_cpu: &mut CpuCore,
_bus: &mut dyn AddressBus,
_trap_num: u8,
) -> bool { ... }
fn handle_breakpoint(
&mut self,
_cpu: &mut CpuCore,
_bus: &mut dyn AddressBus,
_bp_num: u8,
) -> bool { ... }
fn handle_illegal(
&mut self,
_cpu: &mut CpuCore,
_bus: &mut dyn AddressBus,
_opcode: u16,
) -> bool { ... }
}Expand description
Trap handler with CPU and bus access for HLE.
This is the recommended trait for high-level emulation: handlers get
direct access to CPU state and the memory bus while a trap is being
serviced. Return true to mark the trap as handled, or false to
fall back to the real hardware exception.
Provided Methods§
Sourcefn handle_aline(
&mut self,
_cpu: &mut CpuCore,
_bus: &mut dyn AddressBus,
_opcode: u16,
) -> bool
fn handle_aline( &mut self, _cpu: &mut CpuCore, _bus: &mut dyn AddressBus, _opcode: u16, ) -> bool
Handle an A-line trap (0xAxxx opcode).
Sourcefn handle_fline(
&mut self,
_cpu: &mut CpuCore,
_bus: &mut dyn AddressBus,
_opcode: u16,
) -> bool
fn handle_fline( &mut self, _cpu: &mut CpuCore, _bus: &mut dyn AddressBus, _opcode: u16, ) -> bool
Handle an F-line trap (0xFxxx opcode).
Sourcefn handle_trap(
&mut self,
_cpu: &mut CpuCore,
_bus: &mut dyn AddressBus,
_trap_num: u8,
) -> bool
fn handle_trap( &mut self, _cpu: &mut CpuCore, _bus: &mut dyn AddressBus, _trap_num: u8, ) -> bool
Handle a TRAP #n instruction.
Sourcefn handle_breakpoint(
&mut self,
_cpu: &mut CpuCore,
_bus: &mut dyn AddressBus,
_bp_num: u8,
) -> bool
fn handle_breakpoint( &mut self, _cpu: &mut CpuCore, _bus: &mut dyn AddressBus, _bp_num: u8, ) -> bool
Handle a BKPT #n instruction.
Sourcefn handle_illegal(
&mut self,
_cpu: &mut CpuCore,
_bus: &mut dyn AddressBus,
_opcode: u16,
) -> bool
fn handle_illegal( &mut self, _cpu: &mut CpuCore, _bus: &mut dyn AddressBus, _opcode: u16, ) -> bool
Handle an illegal instruction.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".