[][src]Struct intel_8080_emu::proc_state::InterceptableProc8080

pub struct InterceptableProc8080<Bus: DataBus, Intercept: Fn(&Proc8080<Bus>, &OpCode) -> bool> { /* fields omitted */ }

A simple wrapper around Proc8080 which allows to intercept opcodes.

This structure is useful for debugging, fixing some missing components like a call to code which does not exist in the rom etc. It has the same interface as Proc8080.

Methods

impl<Bus, Intercept> InterceptableProc8080<Bus, Intercept> where
    Bus: DataBus,
    Intercept: Fn(&Proc8080<Bus>, &OpCode) -> bool
[src]

Builds an InterceptableProc8080 by taking ownership of an exiting Proc8080

interceptor is a closure which allows to run arbitrary code before the actual emulator apply an opcode, and after the program counter is increased (i.e. proc.registers().pc will point to the next instruction after the current one). The interceptor can then do wathever it needs to and must then returns :

  • true if the processor should go on and apply the opcode normally
  • false if it should ignore it and skip to the next instruction

Takes ownership of the wrapped Proc8080.

Cycles elapsed since the cpu was created

Auto Trait Implementations

impl<Bus, Intercept> Send for InterceptableProc8080<Bus, Intercept> where
    Bus: Send,
    Intercept: Send

impl<Bus, Intercept> Sync for InterceptableProc8080<Bus, Intercept> where
    Bus: Sync,
    Intercept: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Mutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more