Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; md5 d67e58bf5f39d5fb073fed85c3d9bede
- .INCLUDE "includes/init.s"
- .ROMBANKS 8
- .BACKGROUND "Adventure Island (U) [!].gb"
- .INCLUDE "includes/header.s"
- ;**********
- ;* config *
- ;**********
- .DEFINE joypad $FF8C
- .DEFINE joypad_2 $FF8D
- .DEFINE current_rom_bank $02ec
- ;*************************
- ;* relocated joypad read *
- ;*************************
- .BANK $00 SLOT 0
- .ORG $0080
- .SECTION "relocated read from joypad" SIZE $70 OVERWRITE
- .INCLUDE "includes/relocated_read_from_joypad.s"
- ;.INCLUDE "includes/reset_ram.s"
- halt_fix:
- ei ; enable interrupts to avoid halt bug
- halt_fix_loop:
- halt
- ld a, ($ff00+$94)
- and a
- jr nz, halt_fix_loop
- ret
- .ENDS
- .ORG $02DA
- .SECTION "halt fix jump" SIZE $3 OVERWRITE
- jp halt_fix
- .ENDS
- ;*************
- ;* reset ram *
- ;*************
- ;.DEFINE RESET_RAM_DONE $0150
- ;.BANK $00 SLOT 0
- ;.ORG $0101
- ;.SECTION "reset ram jump" SIZE 3 OVERWRITE
- ; jp RESET_RAM
- ;.ENDS
- ;***************
- ;* joypad read *
- ;***************
- .BANK $05 SLOT 0
- .ORG $3E32
- .SECTION "joypad read" SIZE 4 OVERWRITE
- call relocated_read_from_joypad
- nop
- .ENDS
- ;*******************
- ;* save/load state *
- ;*******************
- .BANK $07 SLOT 1
- .ORG $28E0
- .SECTION "save/load state" SIZE $0220 OVERWRITE
- .DB "--- XXXXX Save Patch ---"
- .INCLUDE "includes/save_state_includes.s"
- .ENDS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement