MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / CbFunction

Method CbFunction

source/Debugger/BreakpointCard.cpp:164–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164void BreakpointCard::CbFunction(uint8_t slot, INTERCEPTBREAKPOINT interceptBreakpoint)
165{
166 BreakpointCard* pCard = (BreakpointCard*)MemGetSlotParameters(slot);
167
168 pCard->m_deferred = interceptBreakpoint;
169
170 // Defer processing the breakpoint by 1 opcode (ie. 1 cycle), otherwise this happens:
171 // . BP occurs at <addr>, but opcode hasn't executed yet
172 // . Breakpoint card aserts IRQ, and IRQ is taken by 6502
173 // . 6502 executes ISR, and returns to <addr>
174 // . BP occurs at <addr>...
175
176 pCard->m_syncEvent.m_cyclesRemaining = 1; // Next opcode
177 g_SynchronousEventMgr.Insert(&pCard->m_syncEvent);
178}
179
180int BreakpointCard::SyncEventCallback(int id, int cycles, ULONG uExecutedCycles)
181{

Callers

nothing calls this directly

Calls 2

MemGetSlotParametersFunction · 0.85
InsertMethod · 0.45

Tested by

no test coverage detected