In the emulator

The listing and every number on this site come from the binary and are reproducible with make. Nothing here was measured by eye. The emulator is for checking that what the listing says is what the cartridge does.

Running it

openmsx -machine Philips_VG_8020 -cart hypersports2.rom

An MSX1 machine is enough: the cartridge maps into page 1 and drives everything from the frame interrupt.

What to watch

addresswhat it holds
0xE000the state; 0xE001 the sub-state
0xE005the latch that keeps the interrupt from re-entering
0xE036non-zero while any of the three channels is playing
0xE080the event: 0 skeet, 1 archery, 2 weight lifting, 3 records
0xE1A1the step inside the event
0xE1A3in the weight lifting, the lift given as good
0xE063the points, three bytes of BCD

To confirm a timing, put a breakpoint at a routine's entry and another at its ret, and take the difference of machine_info time — times 3579545 for Z80 cycles.

A session that checks the events

tools/omsx_capturas.tcl boots the cartridge, presses keys through the key matrix and takes screenshots. Its log writes the time, the PC and the state next to each shot, so a capture can be tied to the listing:

t=   21.91  foto tiro_03.png  PC=0x58F3  estado=2
t=   44.92  foto tiro_05.png  PC=0x445A  estado=2

The first PC falls inside MIRA_LOS_IMPACTOS (0x58E3), the skeet's; the second inside the VDP write helper, with the archery on screen. That is what settles the order of 0xE080: skeet first, archery second — and the ANGLE 0.00 and WIND readouts confirm which event is which without having to reason about it.

Traps already paid for