Notes:The Flintstones: King Rock Treasure Island

The following code was added to the original game in order to recreate the debug menu. Because the ROM was full, another ROM bank has been added at the end of the retail ROM. A custom bank jump routine has been inserted at. The original code at was moved to  and the routine below is at. Absolute addresses are prefixed with $, labels are prefixed with @.

As a side note, Flintstones uses cooperative multi-threading with a maximum of three threads. That's why there's a call to yield every so often (with argument b := how many vblanks before thread resumes). The routines located in RB 3 are the original routines that weren't touched for this recreation patch.

ld hl,$FFCB res 7,[hl] ld a, $03 ld [$FF00 + $9E], a ld b, $01 rst $10 call $11C2 xor a, a ld [$C211], a ld [$C4E4], a ld [$C4E5], a ld hl,$C000 ld a,$30 ldi [hl],a ld a,$20 ldi [hl],a ld a,$C7 ldi [hl],a xor a,a ld [hl],a call $1244 dw $7F5A db $03 ld a, $83 ld [$FF00 + $9E], a @404D: ld b, $01 rst $10 call $1244 dw $7E06 db $03 call $1244 dw $7E2E db $03 ld a,[$C4E5] ld b,a ld a,[$C4E4] cp a,b jr z,@2 ld [$C4E5],a call $20D @2: ld hl,$C000 ld a,[$C211] inc a ld b,a ld a,$20 @3 add a,$10 dec b jr nz,@3 ld [hl],a ld a, [$FF00 + $A7] bit 3, a jr z, @404D ld a, [$C211] cp a, $05 jr nz, @4072 pop de pop de pop hl pop af pop de ld de, $1558 push de @4072: ret
 * Disable Cheat Entry
 * Turn screen off
 * yield
 * Clear BG
 * Init
 * Prepare Selector Sprite
 * Call Menu Init 3:7F5A
 * Turn screen on; 8x8 sprites
 * yield
 * Call Menu Cursor Move 3:7E06
 * Call Menu Cursor Action 3:7E06
 * Play Sound Change
 * Update Cursor Sprite
 * Check for Start Button
 * Menu Cursor over "EXIT"?
 * Dirty hack to restart title screen