Asterix And The Great Rescue


Work in progress...

The hack

slotsize $4000
slot 0 $0000
slot 1 $4000
slot 2 $8000
defaultslot 2

bankstotal 32
banksize $4000
banks 32

.background "Asterix and the Great Rescue.sms"

.define scrollx $c226
.define scrolly $c22c

.bank 0 slot 0
.org $0038
.section "Hack here :)" overwrite
  jp hack

.unbackground $7f00 $7fef

.bank 1 slot 1

.section "hack" free
    ; what I replaced to get here
    push af
    push bc
    push de

    in a,($dd) ; get P2 inputs
    ld de,(scrollx)
    bit 0,a
    jr nz,+
    dec de
  +:bit 1,a
    jr nz,+
    inc de
  +:ld (scrollx),de

    in a,($dc) ; get P1+2 inputs
    ld de,(scrolly)
    bit 7,a
    jr nz,+
    inc de
  +:bit 6,a
    jr nz,+
    dec de
  +:ld (scrolly),de
    ; done
    jp afterhack

.macro patch args addr, len
.define page\@ addr>>14
.bank page\@ slot page\@
.orga addr
.section "patch\@" overwrite
.rept len

; patch out regular movement
 patch $32db 3
 patch $3235 3
 patch $4164 3
 patch $35aa 3
 patch $354a 3
 patch $33ba 3
 patch $345b 3