I think the issue is in joy_build_mask() function in joystick.c
If you uncomment the sprintf() call in joy_filter_event() function, you can see the joystick state changing in the title bar of the window.
In the joy_build_mask():
- the joystick state mask is only build when joyinterface is set to 'ijk', 'pase' or 'altai' in oricutron.cfg not depending of the machine type.
- the joysitck's state is sent to the port A of the VIA 1 which is not correct in case of Telestrat
If I change
Code: Select all
if( gimme_port_a )
{
oric->via.write_port_a( &oric->via, 0xff, mkmask );
oric->porta_is_ay = SDL_FALSE;
} else {
if( !oric->porta_is_ay )
{
oric->via.write_port_a( &oric->via, 0xff, oric->porta_ay );
oric->porta_is_ay = SDL_TRUE;
}
}
by
Code: Select all
// caution weird hack
if( gimme_port_a )
{
oric->via.write_port_b( &oric->tele_via, 0xff, mkmask );
oric->porta_is_ay = SDL_FALSE;
} else {
if( !oric->porta_is_ay )
{
oric->via.write_port_b( &oric->tele_via, 0xff, oric->porta_ay );
oric->porta_is_ay = SDL_TRUE;
}
}
and set joyinterface to 'pase' or 'altai', I can get the joystick's state
I think the joy_buildmask() function should test the oric machine type and set the right port of the right VIA