Claim set · data/claims/startropics.yaml

StarTropics (USA) (the ROM, read in a private disassembly)

Game: StarTropics.

Boot selects mapper PRG Mode 1 and enables the 1 KB battery-backed cartridge RAM interface, then locks the split-bank protection register so only the lower 512-byte scratch half is readable and writable by default. Save routines temporarily open the upper 512-byte half for reading or writing and restore the lower-only lock immediately afterward. startropics/mmc6-prg-mode-and-wram-guard

Value: wram bytes 1024 · default prot 48 · read high prot 176 · rw high prot 240

CodeStarTropics (USA) · 0x3E05E-0x3E07A — bank 31 $E04E-$E06A: programs MMC6 banks with ORA #$60 to $8000 (PRG Mode 1 + WRAM enable) and writes #$30 to $A001 (low half RW, high half disabled)StarTropics (USA) · 0x3E5D1-0x3E5F4 — bank 31 $E5C1-$E5E4: bankswitchers write #$66 (R6 -> $C000) and #$67 (R7 -> $A000) to $8000, preserving bits 6 and 5StarTropics (USA) · 0x3E7A0-0x3E7DD — bank 31 $E790-$E7CD: writes #$F0 to $A001 around high-half ($7200-$73FF) save writes, then restores #$30StarTropics (USA) · 0x3ED41-0x3ED80 — bank 31 $ED31-$ED70: writes #$B0 to $A001, copies save data across $7247/$7280 via pointer table LED65 ($ED4B-$ED70)StarTropics (USA) · 0x3E610-0x3E67B — bank 31 $E600-$E66B: calls $ED35 and reads $7227/$7277/$72C7, then writes #$30 back to $A001 ($E667-$E66B)Checked by researcher, 2026-11-25 — read MMC6 boot setup, bankswitchers, save-RAM copy/read guards, and sub_1F_E600 in bank 31 of a private disassembly

MMC6's $8000 bit 5 gates $A001 PRG-RAM protection, while PRG Mode 1 ($8000 bit 6) fixes bank 30 at $8000-$9FFF and swaps R6 at $C000-$DFFF. $A001 bits 7-4 control high-half ($7200-$73FF) and low-half ($7000-$71FF) permissions ($30 = low RW, $B0 = high read + low RW, $F0 = both halves RW).

During normal non-loading frames, NMI frame dispatch bit-scrambles the current controller input and adds it into a state byte modulo 256, then combines scrambled bits of that state with a scrambled decrementing frame counter into the output random byte. Loading frames and lag frames skip the generator call completely, transition states with bit 7 set in the NMI mode byte still invoke the generator via the alternate handler, and holding no buttons adds 0 to leave the state byte unchanged. startropics/nmi-prng-joypad-scrambling

Value: 256

CodeStarTropics (USA) · 0x3C012-0x3C046 — bank 30 $8002-$8036: exits via $8019 skipping $88D1 when $0021 == 1 (loading); reads $2002 then executes INX ($800A), overwriting N from PPUSTATUS with bit 7 of restored $0021, so lag frames ($0021 == 2, N = 0) never branch to $801F and fall through to $800F (exiting via $8031 without calling $88D1), while $801F runs only when $0021 has bit 7 set (#$FF during transitions)StarTropics (USA) · 0x3C0B4-0x3C0D1 — bank 30 $80A4-$80C1: normal $0021 == 0 frame-dispatch path calls $88C8 and $88D1 before setting $0021 = 2 at $80BE-$80C1StarTropics (USA) · 0x3C8D8-0x3C9A0 — bank 30 $88C8-$8990: $88C8-$88D0 decrements frame counter $0023 (and $0024 when non-zero); $88D1-$8990 bit-scrambles controller byte $00D0, runs CLC; ADC $001F; STA $001F, then mixes scrambled $001F and $0023 into $001EChecked by researcher, 2026-11-25 — read NMI entry, frame dispatch, and the $88D1 PRNG routine in bank 30 of a private disassembly

Because PRG Mode 1 maps bank 30 at $8000-$9FFF, the routine runs at $88C8-$8990 (0x3C8D8-0x3C9A0). INX at $800A replaces PPUSTATUS bit 7 in N with bit 7 of $0021, so lag frames ($0021 == 2) fall through BMI $801F to $800F and skip $88D1, while $801F runs only when $0021 has bit 7 set (#$FF during transitions). State byte $001F freezes whenever $00D0 == 0 or during loading/lag frames, while $0023 updates $001E on frames that reach $88C8/$88D1.

Straight tile-to-tile movement in dungeons steps through a 16-entry pixel-stride table of 1 pixel on 14 entries and 2 pixels on entries 3 and 11, crossing one 16-pixel tile in 14 movement ticks. startropics/dungeon-walk-14-frame-stride

Value: tile pixels 16 · walk ticks 14

CodeStarTropics (USA) · 0x367C9-0x36840 — bank 27 $A7B9-$A830 (mapped at $A000): indexes stride table $A821,X (1,1,1,2, 1,1,1,1, 1,1,1,2, 1,1,1,1) to advance $0052/$0053 through 16 pixels in 14 ticksStarTropics (USA) · 0x36ABC-0x36ACF — bank 27 $AAAC-$AABF: shifts $0052 twice per step to align with $0053, incrementing $0053 by 2 on entries 3 and 11 (skipping entries 4 and 12)StarTropics (USA) · 0x241A0-0x241AC — bank 18 $C190-$C19C: walk script $08 pairs 1-tick header $11 $0C $00 with 1-tile walk opcode $70Checked by researcher, 2026-11-25 — read the bytecode walker and $AAAC in bank 27 and walk script $08 in bank 18 of a private disassembly

Twelve 1-pixel ticks plus two 2-pixel ticks sum to 16 pixels (1 tile) with exact integer tile alignment.

Changing facing direction while tile-aligned in a dungeon stalls movement for 9 frames from standing or 5 frames from walking (1 yield frame to hand off the turn sequence plus 8 or 4 countdown frames), whereas buffering a turn mid-jump sets a 5-frame delay counter instead. startropics/dungeon-buffered-turn-delay

Value: standing turn delay 9 · walking turn delay 5 · mid jump buffer counter 5

CodeStarTropics (USA) · 0x360A2-0x361D3 — bank 27 $A092-$A1C3: $A0F2 keeps Y=5 only if mid-jump ($0761 bit 7 == 1) to write $0031 = 5 at $A17A; $A0F9 loads Y=#$10 and when tile-aligned ($0751 bit 7 == 0) branches to $A128 without storing $0031, gating movement at $A140 while $0031 != 0 and selecting script $20 (walking) or $24 (standing) via $A1B4-$A1C3 into $0750StarTropics (USA) · 0x36300-0x36307 — bank 27 $A2F0-$A2F7: checks $0750 & #$7C == #$08 to distinguish walking from standingStarTropics (USA) · 0x366DD-0x367B1 — bank 27 $A6CD-$A7A1: dispatches bit-7 scripts ($40 & #$80) on entry and chains $00 separators at $A705 without yieldingStarTropics (USA) · 0x36927-0x36994 — bank 27 $A917-$A984: opcode $F8 writes $0031, $F7 ($A967-$A96F) sets $40 = $38 | #$84 and ends with RTS (yielding 1 frame before script $04 starts draining), $F1 clears $0761 bit 7, and $F9 yields 1 frame per decrement of $0031 until 0StarTropics (USA) · 0x24687-0x24692 — bank 18 $C677-$C682: walking turn script $20 (F8 04 11 00 00 F7) and standing turn script $24 (F8 08 11 00 00 F7)StarTropics (USA) · 0x24197-0x241BF — bank 18 $C187-$C1AF: script $04 starts with 11 00 00 F1 then loops on $F9 until $0031 reaches 0Checked by researcher, 2026-11-25 — disassembled bank 27 $A092-$A1B3, $A2F0, $A917-$A984 and bank 18 scripts $04, $20, and $24

While tile-aligned ($0751 bit 7 == 0), $A0F9's `LDY

Dungeon jumps execute bytecode scripts that occupy 32 frames for a 1-tile left jump, 34 frames for a 1-tile down, up, or right jump, and 35 frames for a 2-tile jump in any direction before walk and attack control return, setting a 5-tick jump timer at landing that locks out consecutive jumps for 4 post-landing frames and permits the next jump on the 5th post-landing frame. startropics/dungeon-jump-timings

Value: one tile left frames 32 · one tile other frames 34 · two tile all frames 35 · post landing jump lockout frames 4 · next jump available post landing frame 5

CodeStarTropics (USA) · 0x361D4-0x362D2 — bank 27 $A1C4-$A2C2: scans 1..2 tiles ahead and selects jump script $10-$13 (0 tiles), $14-$17 (1 tile), or $18-$1B (2 tiles) by facing directionStarTropics (USA) · 0x366DD-0x367B1 — bank 27 $A6CD-$A7A1: $42 hold-frame decrements ($A6D7), bytecode loop ($A6DF-$A70F) chaining past $00 without yielding ($A705), and step handlers $1x-$5x (repeating $2x/$3x and holding $4x/$5x for X frames unless followed by $00)StarTropics (USA) · 0x36841-0x36860 — bank 27 $A831-$A850: wait opcode $80 loads frame count byte directly into timer $0042 and yieldsStarTropics (USA) · 0x368FE-0x36904 — bank 27 $A8EE-$A8F4: opcode $E6 copies $38 into $36 and chains directly to $A6DD without yieldingStarTropics (USA) · 0x369CA-0x369EC — bank 27 $A9BA-$A9DC: opcode $FE writes #$05 to $0768 without yielding, and $FF clears $40 to #$00, sets $56 = #$01, and yields via RTSStarTropics (USA) · 0x3603B-0x3604A — bank 27 $A02B-$A03A: decrements jump lockout timer $0768 (5->4->3->2->1->0) and attack cooldown $0778 before $A057/$A079 input handling each frameStarTropics (USA) · 0x360A2-0x361C3 — bank 27 $A092-$A1B3: attack input checks $0778 ($A092), whereas $0768 at $A0D5 gates only consecutive A-button jumps while still falling through to $A0ED walk handlingStarTropics (USA) · 0x24247-0x243A8 — bank 18 $C237-$C398: 1-tile jump scripts $14-$16 run 33 frames before landing plus 1 final frame executing 11 00 FE 68 07 05 E6 F1 FF (34f total), while left-jump $17 runs 31 + 1 = 32f totalStarTropics (USA) · 0x243A9-0x244F2 — bank 18 $C399-$C4E2: 2-tile jump scripts $18-$1B run 34 frames before landing plus 1 final frame executing 11 00 FE 68 07 05 E6 F1 FF (35f total in all four directions)Checked by researcher, 2026-11-25 — disassembled bank 27 bytecode interpreter and cooldown checks and verified script durations in bank 18

Because $A705 consumes $00 without yielding, 11 08 00 takes 0 frames and final 51/41 commands before $00 drop 1 frame (32/42/52 hold 2 frames, while 33/23 before $00 drop 1 frame from 3 to 2). After 11 00 yields while $0761 bit 7 is still 1 during $A079 input handling, the final frame runs FE 68 07 05 ($0768 = 5), E6, F1 (clearing $0761 bit 7), and FF (RTS), yielding 1 more frame (32/34/35 frames total before walk/attack control returns). Thereafter $A02B decrements $0768 (5->4->3->2->1->0) before $A0D5 checks it each frame, locking out consecutive A-button jumps across post-landing frames 1..4 and permitting the next jump on post-landing frame 5 while $0778-gated attacks and walking resume immediately on post-landing frame 1.