Hi,
How can we make Battletoads read input from the Famicom expansion port, for player 1 and player 2? Neither P1 or P2 work, only the hard-wired controllers.
Surprisingly battletoads Japan doesn't work with the exp port either.
I can test hacks on my Everdrive using my Famicom Hori arcade stick that can switch between Player 1/Player 2.
Player 2 mode works on Mario Bros 1 and Mario Bros 3, but did not work on Battletoads or Mario Bros 2 (player 1 does not work for either of these as well).
Here is all I could pull from the USA game. This is the routine that handles reading the controls I think? I got this when setting a breakpoint for #$40 (B Button) on $0029. When I was monitoring the RAM, with each button press I was seeing $0029 get changed.
I didn't really understand much. Before this routine there is an AND #$40 which seems to impact the controls if changed to #$80 or #$10, etc.
How can we make Battletoads read input from the Famicom expansion port, for player 1 and player 2? Neither P1 or P2 work, only the hard-wired controllers.
Surprisingly battletoads Japan doesn't work with the exp port either.
I can test hacks on my Everdrive using my Famicom Hori arcade stick that can switch between Player 1/Player 2.
Player 2 mode works on Mario Bros 1 and Mario Bros 3, but did not work on Battletoads or Mario Bros 2 (player 1 does not work for either of these as well).
Here is all I could pull from the USA game. This is the routine that handles reading the controls I think? I got this when setting a breakpoint for #$40 (B Button) on $0029. When I was monitoring the RAM, with each button press I was seeing $0029 get changed.
I didn't really understand much. Before this routine there is an AND #$40 which seems to impact the controls if changed to #$80 or #$10, etc.
Code:
00:8D78:A2 01 LDX #$01
00:8D7A:8E 16 40 STX $4016 = #$FF
00:8D7D:CA DEX
00:8D7E:8E 16 40 STX $4016 = #$FF
00:8D81:A2 08 LDX #$08
00:8D83:AD 16 40 LDA $4016 = #$FF
00:8D86:6A ROR
00:8D87:26 15 ROL $0015 = #$00
00:8D89:AD 17 40 LDA $4017 = #$FF
00:8D8C:6A ROR
00:8D8D:26 16 ROL $0016 = #$00
00:8D8F:CA DEX
00:8D90:D0 F1 BNE $8D83
00:8D92:A5 15 LDA $0015 = #$00
00:8D94:AA TAX
00:8D95:45 29 EOR $0029 = #$40
>00:8D97:86 29 STX $0029 = #$40
00:8D99:25 15 AND $0015 = #$00
00:8D9B:85 2B STA $002B = #$40
00:8D9D:A5 16 LDA $0016 = #$00
00:8D9F:AA TAX
00:8DA0:45 2A EOR $002A = #$00
00:8DA2:86 2A STX $002A = #$00
00:8DA4:25 16 AND $0016 = #$00
00:8DA6:85 2C STA $002C = #$00
00:8DA8:60 RTS -----------------------------------------
00:8D7A:8E 16 40 STX $4016 = #$FF
00:8D7D:CA DEX
00:8D7E:8E 16 40 STX $4016 = #$FF
00:8D81:A2 08 LDX #$08
00:8D83:AD 16 40 LDA $4016 = #$FF
00:8D86:6A ROR
00:8D87:26 15 ROL $0015 = #$00
00:8D89:AD 17 40 LDA $4017 = #$FF
00:8D8C:6A ROR
00:8D8D:26 16 ROL $0016 = #$00
00:8D8F:CA DEX
00:8D90:D0 F1 BNE $8D83
00:8D92:A5 15 LDA $0015 = #$00
00:8D94:AA TAX
00:8D95:45 29 EOR $0029 = #$40
>00:8D97:86 29 STX $0029 = #$40
00:8D99:25 15 AND $0015 = #$00
00:8D9B:85 2B STA $002B = #$40
00:8D9D:A5 16 LDA $0016 = #$00
00:8D9F:AA TAX
00:8DA0:45 2A EOR $002A = #$00
00:8DA2:86 2A STX $002A = #$00
00:8DA4:25 16 AND $0016 = #$00
00:8DA6:85 2C STA $002C = #$00
00:8DA8:60 RTS -----------------------------------------