.memorymap slotsize $4000 slot 0 $0000 slot 1 $4000 slot 2 $8000 defaultslot 2 .endme .rombankmap bankstotal 32 banksize $4000 banks 32 .endro .background "mm2.gg" .define scrollx $c137 .define scrolly $c139 .unbackground $69 $ff .bank 2 slot 2 .orga $bc0f .section "Hack redirection" overwrite jp hack .ends .bank 0 slot 0 .section "hack" free hack: ; get inputs in a,($dc) ld b,a ; Y ld hl,(scrolly) ld a,h or l jr z,+ bit 0,b jr nz,+ dec hl dec hl dec hl dec hl +:bit 1,b jr nz,+ inc hl inc hl inc hl inc hl +:ld (scrolly),hl ; X ld hl,(scrollx) ld a,h or l jr z,+ bit 2,b jr nz,+ dec hl dec hl dec hl dec hl +:bit 3,b jr nz,+ inc hl inc hl inc hl inc hl +:ld (scrollx),hl bit 4,b ret nz ; return to game ; what should happen but we overwrote it... ld a,($c126) ; where we came from jp $bc13 .ends