I code Atari SW only in assembler. And will publish source for this - then may see the concept - I already commented it well .
It will be short program what updates STOS executable's input handling code with such, what is not TOS version depending.
It is normal that STOS games work not with EmuTOS, right because input code. They work not even with TOS 2.06 - some older work only with TOS 1.00-1.02 .
I think that this my fix may not work with EmuTOS (better said fixed executables) . But we can achieve it.
I just tested with program for input test (mjtest by Exxos) . As expected mouse is OK. Keyboard is OK. Joystick not OK.
That means that Emutos has no proper code for writing joystick state - and TOS writes both joystick's state if mouse is disabled.
It looks like: there must be vector for joystick read, and it's address is readable with XBIOS 34 function. Output is address of Kbdvbase. At offset 24 , so 7th long there is joystick read vector. It points to rts in ROM. If you put there own code address, TOS will call it every time when some joystick action happens (pressing, releasing something).
Then simple code may write joystick states whereever you want:
Code: Select all
lea joy_Pos+1(pc),a1 * odd for joystick 1
move.b 1(a0),-1(a1) * Joystick 0 - only if mouse off !
As may see, a0 points to joystick state base in RAM, and at +1 is joy 0 state, at +2 is joy 1 state (bytes). Support for above is present in all TOS versions.
Negative feedback has usually positive effect.