You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When no plugins subscribe to a hook type (such as memory read/write traps or cycle ticks), bypass dispatch completely without branching overhead in the critical CPU loop.
Ensure hook callbacks preserve CPU state and handle re-entrant safety during reset.
Testing & Verification
Register multiple mock plugin hooks and dispatch frame, cycle, memory, and reset events, verifying callbacks fire with correct arguments in registration order.
Register sparse hook structures containing null pointers for unhandled events and verify dispatches safely skip unhandled hooks without crashing.
Unregister hooks and verify subsequent event dispatches no longer invoke unregistered callbacks.
Verify event dispatch when the hook list is completely empty is a fast no-op.
Benchmark the CPU execution loop with zero registered cycle or memory hooks to confirm zero performance penalty.
Verify reset callbacks execute cleanly during both warm and cold emulator reset sequences.
Test re-entrancy safety when a hook callback invokes a core state inspection function.
Acceptance Criteria
Subscribed plugins receive callbacks on frame generation, memory access, and reset events.
Unregistering or shutting down a plugin removes it from active dispatch lists.
Emulation execution speed remains unaffected when no plugins subscribe to cycle-level hooks.
Activity
[-]Task 06: Implement Event Hook Dispatch Pipeline[/-][+]Implement Event Hook Dispatch Pipeline[/+]