I have been trying to get this to work all weekend - with no luck :-<.
This is the code that sends packets to the maple bus:
static void play_puru(struct dc_purupuru *puru)
{
/* Play the selected effect */
struct mapleq *play = &(puru->data->mq);
play->command = 14;
play->length = 2;
((unsigned long *) (play->recvbuf))[0] =
cpu_to_be32(MAPLE_FUNC_PURUPURU);
((unsigned long *) (play->recvbuf))[1] = "A VALUE";
play->sendbuf = play->recvbuf;
if (maple_add_packet(play) != 0)
DEBGM("Could not add packet\n");
}
Here are the different results for different "A VALUE"s
/*
Works
0x11 - no output
0x10 - no ouput
0x12 - tho appears to generate disconnect/connect messages
0x14 - as for 0x12
0x18 - no output
0x1f - no output
0x8010 - though no output
0x8018 - as above
0x801f - as above
0x0810 - as above
0x081f - as above
0x10108010 - as above
0xffff8010 - as above
Fails
0x00
0x20
0x30
0x40
0x80
0x100
0x110
0x210
0x410 - generates a small jolt on NAKI
0x800
0xf10 - though generates a small jolt on NAKI
0x1010
0x2010 - though produces tiny jolt on NAKI
0x4010 - though produces tiny jolt on NAKI
0x8000
0x80ff
0x8110 - though runs gentle spin on NAKI
0x8210
0x8030
0x8410 - though spins on NAKI
0x8810
0x8f10 - though spins on NAKI
0xffff - though does work on NAKI
0xff10 - though does work on NAKI
0xff20
0xff30 - though does work on NAKI
0xf010 - though does work on NAKI
0xf000
0xff00
0xff
0x40
*/
Works means that the maple bus returns a command acknowlegement (7), fails
means the bus returns a -4 (resend command). The NAKI PPP always seems to
return a 7.
Nothing I've done actually makes the SEGA one vibrate (this is what no output
means above).
Can anyone see a pattern? Given that the NAKI pack vibrates normally with
games then it must be the case that there is a condition where it's behaviour
and the SEGA behaviour are the same.
The only thing I can see is that bit 4 needs to be on as a minimum condition
for the SEGA pack.
Adrian
|