Expand description
Console stop-panel: what a program was doing when it stopped, on screen.
Built only with the console-diag feature, for diagnostic discs; a
shipping image does not contain any of it. Three things bring the panel up:
- a fault: the exception handler reached its halt (a
BREAKfrompanic=immediate-abort, an instruction-side fault, a fault in a delay slot); - a panic with a message (builds without
panic=immediate-abort); - a stall: the VBlank handler saw no sign of life for
STALL_VBLANKSframes (no GP1 write, no GPU DMA kick, no CD sector or command), which is how a bounded or unbounded wait that never ends looks.
The panel takes over the display (it resets the GPU and shows its own
320x240 screen), then prints the program counter, return address and stack
of the interrupted code, a guess at the call chain, the GPU, DMA and
interrupt registers, the SDK’s wait and CD counters (psx_io::diag) and
any panic message, and keeps refreshing the frame counters so a photo shows
the machine is alive but the program is not.
Resolve the printed addresses against the link map of the same build.
Constants§
- STALL_
VBLANKS - VBlanks without progress before the stall panel appears (15 seconds at 60 Hz).
Functions§
- menu_
countdown - Draw
AUTO START IN nn Son menu rowrow. - menu_
entry - Draw a menu line of 53 columns on row
row:marker, a space,letter, two spaces, thentitle.color0 white, 1 yellow, 2 green, 3 red, 4 cyan. Aletterof 0 drawstitlealone. Polled GP0 fills only, so it works before any driver is set up. - menu_
screen - Boot-menu helper for diagnostic discs: reset the GPU (nothing may be in flight) and show a
clear 320x240 screen for
menu_entryandmenu_countdown. Call it before the first entry, with no DMA running. - set_
stall_ limit - Change how many VBlanks without progress bring the stall panel up. A program with long steps that are legitimately silent (no GP1 write, GPU DMA kick or CD command for tens of seconds) raises it so the panel does not take the screen in the middle of a measurement; faults and panics are unaffected.