Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;========================
- ; Mario & Wario
- ; Modification to allow mouse in 2nd port
- ; Modification to allow selecting worlds 9, 10, & 11
- ;========================
- ORG $009960
- NOP
- NOP
- JSL check_world
- ; remove special check for W9
- ORG $009976
- db $80 ; BNE -> BRA
- ORG $00DFB6
- NOP
- NOP
- JSL swap_mouse
- PLP
- RTS
- !controller_1 = $72
- !mouse_con = $00AF
- !mouse_x = $00B7
- !mouse_y = $00B5
- !mouse_sw = $00B9
- !mouse_swt = $00BB
- !mouse_sb = $00BD
- ORG $18FF00
- swap_mouse:
- PHP
- REP #$20
- LDA !mouse_con
- XBA
- STA !mouse_con
- LDA !mouse_x
- XBA
- STA !mouse_x
- LDA !mouse_y
- XBA
- STA !mouse_y
- LDA !mouse_sw
- XBA
- STA !mouse_sw
- LDA !mouse_swt
- XBA
- STA !mouse_swt
- LDA !mouse_sb
- XBA
- STA !mouse_sb
- PLP
- RTL
- check_world:
- PHP
- REP #$30
- LDA !controller_1
- AND #$00FF
- CMP #$0010 ; start for W9
- BNE .not_w9
- LDA #$0009
- BRA .return
- .not_w9:
- CMP #$0020 ; select for W10
- BNE .not_w10
- LDA #$000A
- BRA .return
- .not_w10:
- CMP #$0030 ; start + select for W11
- BNE .not_w11
- LDA #$000B
- BRA .return
- .not_w11:
- LDA $39
- .return:
- PLP
- STA $1C1B
- LDA $037F
- RTL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement