debuggeremu-corefrontend-sdl3help wanted
Repository metrics
- Stars
- (988 stars)
- PR merge metrics
- (PR metrics pending)
Description
The emulator has a handful of debugger views implemented so far, and most of them are interactive, but not very useful.
Below is a raw dump of everything I planned to do for the debugger:
SMPC
- Raw registers view
- Command log/trace, including all parameters and responses
- Pending INTBACK state
- Peripheral (controller) states (and maybe raw reports, but might be too memory-intensive)
- RTC state and settings
CD block
- Raw registers view
- Current status, maybe a status change trace?
- Interrupts
- Command log/trace, including all parameters and responses
- Transfer logs (including pointers to data in disc if possible)
- Filters view
- Buffer partitions view
- Filesystem view
- Include the standard Saturn file format viewers here (stretch goal)
SH-2
- Disassembly view
- Scrollable disassembly view
- Single-step (step in, step over, step out)
- Branch arrows
- Call stack (fix bugs and figure out call/return patterns in the existing tracer)
- Breakpoints
- Watchpoints
- Assemble code
- Load and display symbols from .elf files, maybe other types
- On-chip peripherals
- Power (SBYCR)
- BSC
- SCI
- UBC
- Stack view (memory view focused on stack pointer with annotations like "return address", "stack frame", etc.)
- Highlight cache hits on cached memory region
- Instruction trace
- Memory access trace
- Exception trace
- Combined event view (breakpoints, watchpoints, interrupts, exceptions, anything traced by the CPU)
- Suspend CPU option (disable CPU during emulation; everything else still runs)
M68K
- Disassembly view
- Registers view
- Stack views: memory views focused on each stack pointer, annotated with the contents (e.g. return addresses, allocated frames, etc.)
- Instruction trace
- Memory access trace
- Exception trace
- Interrupts
- Interrupt trace
- Single-step (step in, step over, step out)
- Branch arrows
- Call stack (fix bugs and figure out call/return patterns in the existing tracer)
- Breakpoints
- Watchpoints
- Assemble code
- Load and display symbols from .elf files
- Open memory viewer
- Combined event view (breakpoints, watchpoints, interrupts, exceptions, anything traced by the CPU)
- Suspend CPU option (disable CPU during emulation; everything else still runs)
SCU
- DSP view
- Controls (start, stop, pause, step)
- Branch arrows
- Execution trace
- Breakpoints, watchpoints
- Assemble code
VDPs
- Raw registers view
- Raw VRAM/CRAM/FBRAM views
- Colored VDP2 CRAM view
- VDP1 command list
- Display both VDP1 framebuffers graphically
- Tile view
- Background (NBG/RBG) view with plane > page > charpat > cell > dot breakdown
- Rotation parameter tables
- Line scroll tables
- Line color and back screen views
- Sprite layer view
- Composite layer view with details on how each pixel is drawn
- Windows view
- Frame capture (single-shot, continuous, last N frames snapshot)
- Standard Saturn graphics format viewers - textures, 3D models, etc. (stretch goal)
- Implementation notes
- Refactor VDP to allow capturing the entire state
- Move VDP state into a dedicated object
- Move renderer into a dedicated class
- Make renderer consume a VDP state object to render graphics
- Optionally consume a list of events (memory writes, VCNT increments) for captured states
- Writes stored as XOR values to allow going forward or backward
- Expose renderer on the public interface
- Use the renderer on the frontend to draw the VDP state
- Allow editing command list on the fly in frame capture window and see results in real time
- Optionally consume a list of events (memory writes, VCNT increments) for captured states
- Add note in mainpage.hpp documentation that some VDP tracers will execute from the renderer thread if that option is enabled
- Refactor VDP to allow capturing the entire state
SCSP
- Raw registers view
- General registers
- Master volume
- DAC 18-bit toggle
- 4 Mbit RAM toggle
- Slots/channels view
- "Piano roll" view (shows played notes over time)
- Color notes by slot or by sample start address
- Oscilloscopes, spectrum analyzers, frequency graphs, etc.
- "Piano roll" view (shows played notes over time)
- Sample collector/extractor
- Noise LFSR output
- LFOs
- CDDA output
- Interrupts (SCU, M68K)
- Timers
- Monitor/slot call view, displaying value for all slots
- Highlight currently selected slot
- DMA transfer trace
- DSP view
- All memory blocks
- Program disassembly
- Execution traces
- Memory transfer traces
- FM algorithms graph view
- MIDI events trace/view
- DSP view
- Branch arrows
- Breakpoints, watchpoints
- Assemble code
- Standard Saturn sound drivers/engines - TON, SEQ, etc. (stretch goal)