kevcal said:
Okay, I'll have a tidy up after my hols

and update it.
Thanks so much for this.
Would it be possible to make a few small changes to gp2x_joy.c before compiling and posting? I have written a quick hack that adds faked analogue support using the eight-way switch layout of the joypad:
CODE
/*** to go in joy_init() ***/
//joy[0].flags = JOYFLAG_DIGITAL;
joy[0].flags = JOYFLAG_ANALOGUE | JOYFLAG_DIGITAL; // el_pango 2007 03 09
joy[0].num_sticks = 1;
//joy[0].stick[0].flags = JOYFLAG_DIGITAL;
joy[0].stick[0].flags = JOYFLAG_ANALOGUE | JOYFLAG_DIGITAL; // el_pango 2007 03 09
/*** to go in joy_poll() ***/
// el_pango 2007 03 09 - fake analogue directions based
// on which switches are closed to yield all 16 possible
// directions
switch(gpio_m)
{
// straight up
case 0xFE: joy[0].stick[0].axis[0].pos = 0;
joy[0].stick[0].axis[1].pos = -128;
break;
// up and slightly left
case 0xFC: joy[0].stick[0].axis[0].pos = -48;
joy[0].stick[0].axis[1].pos = -96;
break;
// up and left
case 0xFD: joy[0].stick[0].axis[0].pos = -96;
joy[0].stick[0].axis[1].pos = -96;
break;
// left and slightly up
case 0xF9: joy[0].stick[0].axis[0].pos = -96;
joy[0].stick[0].axis[1].pos = -48;
break;
// left
case 0xFB: joy[0].stick[0].axis[0].pos = -128;
joy[0].stick[0].axis[1].pos = 0;
break;
// slightly down and left
case 0xF3: joy[0].stick[0].axis[0].pos = -96;
joy[0].stick[0].axis[1].pos = 48;
break;
// down and left
case 0xF7: joy[0].stick[0].axis[0].pos = -96;
joy[0].stick[0].axis[1].pos = 96;
break;
// down and slightly left
case 0xE7: joy[0].stick[0].axis[0].pos = -48;
joy[0].stick[0].axis[1].pos = 96;
break;
// down
case 0xEF: joy[0].stick[0].axis[0].pos = 0;
joy[0].stick[0].axis[1].pos = 128;
break;
// up and slightly right
case 0x7E: joy[0].stick[0].axis[0].pos = 48;
joy[0].stick[0].axis[1].pos = -96;
break;
// up and right
case 0x7F: joy[0].stick[0].axis[0].pos = 96;
joy[0].stick[0].axis[1].pos = -96;
break;
// right and slightly up
case 0x3F: joy[0].stick[0].axis[0].pos = 96;
joy[0].stick[0].axis[1].pos = -48;
break;
// right
case 0xBF: joy[0].stick[0].axis[0].pos = 128;
joy[0].stick[0].axis[1].pos = 0;
break;
// slightly down and right
case 0x9F: joy[0].stick[0].axis[0].pos = 96;
joy[0].stick[0].axis[1].pos = 48;
break;
// down and right
case 0

F: joy[0].stick[0].axis[0].pos = 96;
joy[0].stick[0].axis[1].pos = 96;
break;
// down and slightly right
case 0xCF: joy[0].stick[0].axis[0].pos = 48;
joy[0].stick[0].axis[1].pos = 96;
break;
// user not doing anything with the stick
default: joy[0].stick[0].axis[0].pos = 0;
joy[0].stick[0].axis[1].pos = 0;
}
This yields sixteen distinct directions, which might be handy for some kinds of game that need slightly finer-grained control.
Thanks again!
PS: this was already tested at least once and verified to work (Simon Parzer included it in Alex 4). I just can't get it to build on my machine XD