Asterix And The Great Rescue

Introduction

Work in progress...

The hack

.memorymap
slotsize $4000
slot 0 $0000
slot 1 $4000
slot 2 $8000
defaultslot 2
.endme

.rombankmap
bankstotal 32
banksize $4000
banks 32
.endro

.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
afterhack:
.ends

.unbackground $7f00 $7fef

.bank 1 slot 1

.section "hack" free
hack:
    ; 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
.ends

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

; 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