data/claims/gauntlet-ii.yamlGauntlet II (USA) (the ROM, read in a private disassembly)
Game: Gauntlet II.
Gauntlet II initializes a 55-byte circular random number table by repeatedly adding 21 without clearing the carry flag between iterations and sets two ring indices to 23 and 54. Because carry stays set after every 8-bit wrap and enters from the caller on the first step, wrapped steps advance by 22 rather than a fixed stride of 21; each generator call decrements both indices modulo 55 and stores the byte sum of the two indexed entries back into the table. gauntlet-ii/prng
Value: size 55 · base addend 21 · wrapped addend 22 · init indices 23, 54
CodeGauntlet II (USA) ·0x1F8D0-0x1F8E2 — bank 15 $F8C0-$F8D2: sets $0026 = #$17 (23) and $0027 = #$36 (54), then fills $0634-$066A descending via LF8CA: adc #$15 with no clc before or inside the loop (so wraps past 255 add 22)Gauntlet II (USA) · 0x1F8E3-0x1F90B — bank 15 $F8D3-$F8FB: decrements $0026 and $0027 (wrapping below 0 to #$36), adds $0634,X + $0634,Y into $0634,X, and returns the sumChecked by researcher, 2026-11-25 — read sub_0F_F8C0 and sub_0F_F8D3 in bank 15 of a private disassembly and verified ROM bytesThe 55-byte buffer lives at $0634-$066A with circular indices at $0026 and $0027. Wrapping both indices across 0..54 implements an additive (24, 55) lagged-Fibonacci generator modulo 256, while omitting clc in sub_0F_F8C0 makes seed filling depend on entry carry and overflow carries (+21 or +22).
Starting a run builds a 117-entry maze deck numbered 1 through 117, swaps slots 100 and 103, and shuffles two interior ranges (slots 6 through 102 and slots 105 through 115) using the random number generator while keeping the opening five mazes in fixed order. gauntlet-ii/maze-deck
Value: mazes 117 · fixed opening 5
CodeGauntlet II (USA) ·0x1A4F4-0x1A53D — bank 13 $A4E4-$A52D (mapped at $A000): fills $6403-$6477 with 1..117 (#$75), swaps $6466 with $6469, then calls Fisher-Yates swapper $A508 for ($06,$66) and ($69,$73) using PRNG wrapper $F8FCChecked by researcher, 2026-11-25 — read the maze deck initializer and shuffle loop in bank 13 of a private disassemblyThe shuffled deck sits at $6403-$6477 ($6402 + index for index = 1..117). Slots 1..5, 103..104, and 116..117 lie outside the two shuffled ranges.
Each active maze unpacks into a 1,024-byte grid arranged as 32 rows of 32 tiles. Tile-coordinate lookups explicitly mask both row and column modulo 32, whereas pixel-coordinate lookups align the 2-byte row-pointer index across 32 rows and shift the 8-bit horizontal pixel coordinate right 3 bits with no mask so X wraps modulo 256 pixels across opposite edges. gauntlet-ii/toroidal-grid
Value: width 32 · height 32 · bytes 1024
CodeGauntlet II (USA) ·0x1A5D1-0x1A5E3 — bank 13 $A5C1-$A5D3: zeros pages $6000-$63FF (1,024 bytes) before unpacking maze tilesGauntlet II (USA) · 0x1C8CB-0x1C8FC — bank 14 $C8BB-$C8EC: sub_0E_C8BB masks tile X ($0059) and Y ($005B) with AND #$1F; sub_0E_C8D3 computes (pixel Y $005C >> 2) & #$3E for 2-byte row pointer indexing and shifts 8-bit pixel X ($005A) right by 3 with no AND maskGauntlet II (USA) · 0x1CBFB-0x1CC3A — bank 14 $CBEB-$CC2A: 32 little-endian row pointers stepping by 32 bytes from $6000 to $63E0Checked by researcher, 2026-11-25 — read sub_0E_C8BB, sub_0E_C8D3, row pointers, and maze clear in banks 13 and 14 of a private disassemblyThe 32×32 tile array occupies $6000-$63FF. In sub_0E_C8D3, `AND
Stepping onto warp exit tile $AE bypasses the standard exit's single-level increment, unconditionally writes 5 to the pre-display level counter before the transition routine adds 1, assigns 6 to the player's floor counter, and discards 4 stack bytes to jump directly to Level 6 from whichever level contains the tile. gauntlet-ii/level-1-exit-6-warp
Value: level counter before add 5 · target level 6
CodeGauntlet II (USA) ·0x1E9CA-0x1E9E2 — bank 15 $E9BA-$E9D2: reads tile at player coordinates via $C8D3 and dispatches through LEA23 into jump table LE9D3Gauntlet II (USA) · 0x1E9E3-0x1EA32 — bank 15 $E9D3-$EA22 (LE9D3): jump table whose offset $14 holds $EB88Gauntlet II (USA) · 0x1EA33-0x1EAEC — bank 15 $EA23-$EADC (LEA23): tile attribute table mapping standard exit $AD to offset $12 ($EB7F) and warp exit $AE to offset $14 ($EB88)Gauntlet II (USA) · 0x1EB8F-0x1EBC2 — bank 15 $EB7F-$EBB2: standard exit $EB7F calls single-level increment sub_0F_EBA5 (wrapping 103 to 6), whereas tile $AE handler $EB88 unconditionally sets $0052:$0053 = $0005 and $0072,X = #$06 and pops 4 stack bytes (PLA x 4) to $E5EFGauntlet II (USA) · 0x1C294-0x1C2B2 — bank 14 $C284-$C2A2: increments 16-bit $0052:$0053 by 1 (5 -> 6) during level setupChecked by researcher, 2026-11-25 — read sub_0F_E9BA, LE9D3, LEA23, $EB7F-$EB9F, sub_0F_EBA5, and bank 14 transition code in a private disassemblyMaze tile grids reside in CHR-ROM (loaded through PPU $2007); PRG-ROM verifies that tile $AE invokes $EB88 rather than standard exit $EB7F / sub_0F_EBA5 and forces destination Level 6 ($0052:$0053 = 5 -> 6, $0072,X = 6) from whichever level holds the tile.
Each maze tracks three trap-wall switch groups by resetting their row trackers to 255 and optionally pre-disabling one or two random groups with 254. During room unpacking, trap tiles in pre-disabled groups or when traps are disabled globally are overwritten directly with open floor instead of recording a row, while active groups record their topmost row index and clear matching trap walls and their switch tile to floor on contact. gauntlet-ii/trap-wall-switches
Value: 3
CodeGauntlet II (USA) ·0x1AC54-0x1AC85 — bank 13 $AC44-$AC75: resets $0064-$0066 to #$FF at maze load, may pre-disable 1 or 2 random groups when $4E flags #$20/#$10 are set, and in $AC63 skips already-#$FE slots (CMP #$FE; BEQ $AC63) before writing #$FE to $0064,Y and returning (RTS)Gauntlet II (USA) · 0x1A7DA-0x1A821 — bank 13 $A7CA-$A811: maps trap rows 7..9 and 10..12 mod 3 onto $0064-$0066, deletes tiles to floor (#$00) if $0064+Y == #$FE or ($4E & #$08) != 0, and otherwise stores min(row, $0064+Y)Gauntlet II (USA) · 0x1EE00-0x1EE32 — bank 15 $EDF0-$EE22: switch handlers check bit 7 of $0064, $0065, and $0066 before calling bank 14 clear loopsGauntlet II (USA) · 0x1C96A-0x1C9B4 — bank 14 $C95A-$C9A4: starts at row $0064, marks $0064 = #$FF, and clears group 0 trap tiles ($11-$20) and switch $B3 to floorGauntlet II (USA) · 0x1C9B9-0x1CA1E — bank 14 $C9A9-$CA0E: parallel clear loops for $0065 ($21-$30, switch $B4) and $0066 ($31-$40, switch $B5)Checked by researcher, 2026-11-25 — read trap-wall setup and unpacking in bank 13, switch dispatch in bank 15, and clear loops in bank 14 of a private disassemblyFlags $0064-$0066 correspond to switch tiles $B3, $B4, and $B5. Both #$FF (absent/cleared) and #$FE (pre-disabled) keep bit 7 set (>= 128).