ElBarto wrote:Yeah cause the MULTI mode (aka the original Team Player mode) isn't supported. Only the "EXTRA" mode is (aka EA4WAY compatibility)
For the display I look like it's in double interlace mode but it shouldn't be ... weird.
The picture isn't very good. It looks fine on the TV - it was the fact that you showed two pads and two other "things" that I found weird, not the image.
Another odd thing was I only found info on Team Player, not the EA4Play. Here's some code I did (might need some debugging):
Code: Select all
| get current team player pad values
| entry:
| exit: d0 = pad values portA(R L D U S A C B) portB(R L D U S A C B) portC(R L D U S A C B) portD(R L D U S A C B)
get_team:
move.l d3,-(sp)
move.b #0x60,0xA10009
move.b #0x60,0xA10003 /* TH = 1, TR = 1 */
nop
nop
nop
nop
move.b #0x20,0xA10003 /* TH = 0, TR = 1 start transfer */
nop
nop
nop
nop
bsr.b get_byte
cmpi.b #0xFF,d0
bne no_mtap
bsr.b get_byte /* IDA IDB */
lsl.w #8,d0
bsr.b get_byte
move.w d0,d3 /* IDA IDB IDC IDD */
| port A
bsr.b get_byte
lsl.w #8,d0
btst #12,d3
bne.b 1f /* 3 button pad */
bsr.b get_nibble /* 6 button pad - read extra nibble */
1:
| port B
bsr.b get_byte
lsl.l #8,d0
btst #8,d3
bne.b 2f /* 3 button pad */
bsr.b get_nibble /* 6 button pad - read extra nibble */
2:
| port C
bsr.b get_byte
lsl.l #8,d0
btst #4,d3
bne.b 3f /* 3 button pad */
bsr.b get_nibble /* 6 button pad - read extra nibble */
3:
| port D
bsr.b get_byte
lsl.l #8,d0
btst #0,d3
bne.b 4f /* 3 button pad */
bsr.b get_nibble /* 6 button pad - read extra nibble */
4:
move.l (sp)+,d3
move.b #0x60,0xA10009
move.b #0x60,0xA10003 /* TH = 1, TR = 1 */
rts
| get two nibbles from Team Player multi-tap
get_byte:
bsr.b get_nibble
lsl.b #4,d0
| fall into get_nibble for second nibble
get_nibble:
move.w #99,d2 /* retries - 1 */
btst #5,0xA10003 /* check current state of TR */
bne.b 2f
| TR currently 0
move.b #0x20,0xA10003 /* set TR = 1 */
1:
move.b 0xA10003,d1
btst #4,d1 /* check current state of TL */
dbne d2,1b /* wait for TL = 1 or timeout */
andi.b #0x0F,d1 /* mask off nibble */
or.b d1,d0
rts
2:
| TR currently 1
move.b #0x00,0xA10003 /* set TR = 0 */
3:
move.b 0xA10003,d1
btst #4,d1 /* check current state of TL */
dbeq d2,3b /* wait for TL = 0 or timeout */
andi.b #0x0F,d1 /* mask off nibble */
or.b d1,d0
rts
no_mtap:
move.l (sp)+,d3
moveq #-1,d0
move.b #0x40,0xA10009
move.b #0x40,0xA10003
rts
You'll notice I toss the extra nibble for 6 button mode. I didn't need it for the app, and I wanted to fit all four ports in a long. It can easily be modified to return 6 button results.