User:WF: Difference between revisions

From F256 Foenix
Jump to navigationJump to search
No edit summary
Line 24: Line 24:
+ Break on 24-bit PC (post-MMU resolved address) <code>machine.cpu.breakpoints24[]</code>
+ Break on 24-bit PC (post-MMU resolved address) <code>machine.cpu.breakpoints24[]</code>


+ Break on 24-bit address read <code>machine.mmu.breakOnRead[]</code>
- Break on 24-bit address read <code>machine.mmu.breakOnRead[]</code>


+ Break on 24-bit address write <code>machine.mmu.breakOnWrite[]</code>
+ Break on 24-bit address write (I/O only for now) <code>machine.mmu.breakOnWrite[]</code>


+ Break on BRK <code>machine.cpu.breakOptions.breakOnBRK</code>
+ Break on BRK <code>machine.cpu.breakOptions.breakOnBRK</code>

Revision as of 16:40, 10 January 2025

Scratchpad for working on Foenijs. Feature requests are welcome

Debugger Features

+ = implemented, - = unimplemented

Stepping

+ Step 1 cycle

- Step N cycles (easy, just not exposed now)

+ Step to next raster line

+ Step to next frame

+ Step to IRQ

+ Step to RTI

+ Step Out (run until stack shrinks from the starting point)

Breakpoints

+ Break on 16-bit PC (raw CPU PC) machine.cpu.breakpoints16[]

+ Break on 24-bit PC (post-MMU resolved address) machine.cpu.breakpoints24[]

- Break on 24-bit address read machine.mmu.breakOnRead[]

+ Break on 24-bit address write (I/O only for now) machine.mmu.breakOnWrite[]

+ Break on BRK machine.cpu.breakOptions.breakOnBRK

+ Break on IRQ/NMI machine.cpu.breakOptions.breakOnIRQ .breakOnNMI

+ Break on undocumented NOP (eg unexpected bytes) machine.cpu.breakOptions.breakOnBadNOP

+ Break on RTI machine.cpu.breakOptions.breakOnRTI

+ Break on single-instruction infinite loop machine.cpu.breakOptions.breakOnInfiniteLoop

Printing/Logging/Viewing

+ Log IRQ machine.cpu.breakOptions.logIRQ

+ Log BRK (always on for now)

- Log SOF

+ Capture CPU execution log, machine.cpu.debug to enable, machine.cpu.log(n) to print, n is optional number of instructions

+ Live updated memory view (lame, scroll through full memory)

- Create any number of live memory views of different sizes & locations

Intelligent stack capture (TODO)

Every push should have an annotation as to what pushed it, display in a custom stack viewer:

  • PC of push or JSR instruction. JSRs and IRQs should display as 16-bit values
  • Last JSR/IRQ entry, shows which function/handler we're in. Support loading labels.
  • Support bank switching, so each page used as stack retains its state.