aboutsummaryrefslogtreecommitdiffstats
path: root/src/cpu.c (unfollow)
Commit message (Collapse)AuthorFilesLines
4 dayscpu: log the $ED poweroff opcode with pc/registersgbc dev1-1/+6
The clean-exit opcode used to print nothing, so any guest crash that walked into a stray $ED byte was indistinguishable from a silent socket death (one of the kill vectors in the link-drop investigation). Now it identifies itself on stderr with pc/af/bc/de/hl/sp.
6 daysheadless: $ED opcode = clean power-off (exit + battery save)gbc dev1-0/+2
The unused SM83 opcode $ED now sets gb->poweroff, which breaks the headless loop so the normal cart_free()->cart_save() path runs. Lets a guest OS shut the emulator down cleanly (and flush its .sav) instead of relying on an external timeout/SIGTERM, which could SIGKILL before the save. run_frame() also stops on poweroff so exit is immediate.
2026-07-04core emulator: SM83 CPU, MMU, timer, PPU, CGB supportgbc dev1-0/+446
Passes blargg cpu_instrs (all 11), instr_timing, mem_timing.