With help of
Dr. MefistO, figured out that SGDK code is working on hardware.
Also, it works fine in Retroarch with libgenplus-gx.
What is interesting, that Fusion works if add following line, which does not make any sense.
Code: Select all
/* get ID port 1 */
pb = (vu8 *)0xa10003;
*pb = 0x70; /* Fusion support */
a = *pb;
*pb = 0x00;
id = (a & 8) | (a & 4) ? 8 : 0;
id |= (a & 2) | (a & 1) ? 4 : 0;
a = *pb;
*pb = 0x40;
id |= (a & 8) | (a & 4) ? 2 : 0;
id |= (a & 2) | (a & 1) ? 1 : 0;
portType[PORT_1] = id;
0x70 - works, 0x40 - don't. Looks like there is some hardcode. Does someone have clues why?
I'll look into code of reading joypads in games that have teamplayer support later.