Skip to main content

EventBpKind

Enum EventBpKind 

Source
#[repr(u8)]
pub enum EventBpKind { Nmi = 0, Irq = 1, Sprite0Hit = 2, OamDma = 3, DmcDma = 4, PpuRead = 5, PpuWrite = 6, ApuRead = 7, ApuWrite = 8, MapperRead = 9, MapperWrite = 10, }
Expand description

v1.4.0 Workstream D (D2) — the class of hardware event an event-driven breakpoint can trigger on.

These are tapped at the SAME observational commit points the event-viewer / interrupt-service / bus-access logs already use (Bus::cpu_read, Bus::cpu_write, Bus::notify_irq_service, the DMC-DMA GET, the $4014 write). A hit only RECORDS the event (kind + PPU position); it never mutates emulator-visible state, so the determinism contract holds and the feature-off build is byte-identical.

The 16 categories are packed into a u16 arm mask (see SystemBus::set_event_breakpoints); the bit index is the discriminant.

Variants§

§

Nmi = 0

An NMI service entry ($FFFA), observed at the interrupt-service commit.

§

Irq = 1

An IRQ / BRK service entry ($FFFE), observed at the same commit.

§

Sprite0Hit = 2

A sprite-0 hit, observed when the CPU reads $2002 with bit 6 set (the point games actually detect the hit; purely observational).

§

OamDma = 3

An OAM DMA, observed at the $4014 write that starts it.

§

DmcDma = 4

A DMC DMA sample fetch (the GET cycle).

§

PpuRead = 5

A PPU-register read ($2000-$3FFF).

§

PpuWrite = 6

A PPU-register write ($2000-$3FFF).

§

ApuRead = 7

An APU / I/O-register read ($4000-$4017).

§

ApuWrite = 8

An APU / I/O-register write ($4000-$4017).

§

MapperRead = 9

A mapper-register read ($4020-$FFFF).

§

MapperWrite = 10

A mapper-register write ($4020-$FFFF).

Implementations§

Source§

impl EventBpKind

Source

pub const fn bit(self) -> u16

The arm-mask bit for this kind.

Source

pub const fn label(self) -> &'static str

A human-readable label (used by the debugger UI + tests).

Source

pub const fn all() -> [Self; 11]

All categories, in discriminant order (for the UI checkbox list).

Trait Implementations§

Source§

impl Clone for EventBpKind

Source§

fn clone(&self) -> EventBpKind

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for EventBpKind

Source§

impl Debug for EventBpKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for EventBpKind

Source§

impl PartialEq for EventBpKind

Source§

fn eq(&self, other: &EventBpKind) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for EventBpKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.