.memorymap defaultslot 0 slotsize $4000 slot 0 $0000 slot 1 $4000 slot 2 $8000 .endme .rombankmap bankstotal 32 banksize $4000 banks 32 .endro .background "Chuck Rock.sms" ; We place the hack here. We are overwriting the credits text so that will be broken. .unbackground $7f64 $7f8b .define Y $c109 .define X $c107 .bank 0 slot 0 .org $38 .section "hack hook" overwrite jp hack .ends .bank 1 slot 1 .orga $7f64 .section "hack" force hack: ; code we replaced to get here push af push hl push de ; the hack in a,($dc) ; get P1 inputs ld hl,(Y) bit 1,a jr nz,+ inc hl +:bit 0,a jr nz,+ dec hl +:ld (Y),hl ld hl,(X) bit 3,a jr nz,+ inc hl +:bit 2,a jr nz,+ dec hl +:ld (X),hl ; resume game jp $38+3 .ends .macro patch args addr, len .define page\@ addr>>14 .bank page\@ slot page\@ .orga addr .section "patch\@" overwrite .dsb len $00 .ends .endm ; patch out y movement patch $28da 3 patch $291a 3 patch $294e 3 ; patch out damage patch $2a5c 3