| 100 | } |
| 101 | |
| 102 | BYTE __stdcall BreakpointCard::IORead(WORD pc, WORD addr, BYTE bWrite, BYTE value, ULONG nExecutedCycles) |
| 103 | { |
| 104 | const UINT slot = ((addr & 0xff) >> 4) - 8; |
| 105 | BreakpointCard* pCard = (BreakpointCard*)MemGetSlotParameters(slot); |
| 106 | |
| 107 | CpuIrqDeassert(IS_BREAKPOINTCARD); |
| 108 | |
| 109 | const BYTE reg = addr & 0xf; |
| 110 | if (reg == 0) |
| 111 | { |
| 112 | uint8_t otherStatus = pCard->m_BP_FIFO.empty() ? kEmpty : 0; |
| 113 | return pCard->m_status | otherStatus; |
| 114 | } |
| 115 | else if (reg == 1) // Cmd: Reset |
| 116 | { |
| 117 | pCard->ResetState(); |
| 118 | } |
| 119 | else if (reg == 2) // Cmd: Intercept BP by card |
| 120 | { |
| 121 | pCard->m_interceptBPByCard = true; |
| 122 | InterceptBreakpoints(slot, BreakpointCard::CbFunction); |
| 123 | } |
| 124 | else if (reg == 3) // Cmd: Intercept BP by debugger |
| 125 | { |
| 126 | pCard->m_interceptBPByCard = false; |
| 127 | InterceptBreakpoints(slot, nullptr); |
| 128 | } |
| 129 | |
| 130 | return addr & 0x0f; // ID bytes [$01-$0F] |
| 131 | } |
| 132 | |
| 133 | BYTE __stdcall BreakpointCard::IOWrite(WORD pc, WORD addr, BYTE bWrite, BYTE value, ULONG nExecutedCycles) |
| 134 | { |
nothing calls this directly
no test coverage detected