feat: arm the switch-edge logger — add switch sites, values and buttons to the KK LE port

The v3 runtime's edge logger could never arm: the port had no switch_edge /
switch_drain sites, no switch_records/switch_count data and no switch_*
record-layout values, and switches_arm() skips a port without switch lines.

Located in the King Kong LE 0.97 ELF with the decryptor's
portswitch.switch_source() (generation-B framework): switch_edge 0x0055fa04,
switch_drain 0x005606e4, switch_records 0x008ecc78, switch_count 0x0093437c;
record layout 384/32/24/8/26/28 as on the other generation-B builds. Added
LOCKDOWN/START/flipper button switch lines on bits the game's shot dispatch
never sends, so the logger arms and the buttons become named shots.

Deployed to the machine and verified in play: the boot log arms the drain
(switch_edge 0x0055fa04, drain 0x005606e4..0x00560864) and /dump/switch.log
logged ~6000 in-game edges, both edges of all four flipper buttons, named.

Also fixes the runtime's mangled GAMELOG comment (broke the build) and the
switch_names.inc entry count in the README.

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
2026-10-12 17:10:05 -04:00
co-authored by Claude Code
parent abc881f913
commit 18ab285e22
3 changed files with 34 additions and 12 deletions
+2 -2
View File
@@ -7915,12 +7915,12 @@ static void stock_tick(void); /* item 160 */
static void magnet_tick(void); /* PAD-381 */
static void scoop_tick(void); /* PAD-381 */
/* ---- GAMELOG: passive stock-mode and award watching*/
#ifndef O_WRONLY
#define O_WRONLY 1
#define O_CREAT 0100
#define O_APPEND 02000
#endif for the gameplay logger.
#endif
/* ---- GAMELOG: passive stock-mode and award watching for the gameplay logger.
* Added on top of the stock runtime (2026-10-12): logs the game's own modes
* (Island Scenes and the rest of the port's block_* set) starting and ending -
* with the player's score at each edge, so the mode's score total is the