Horrible hack part #2 - finding the optimum value for the Apple IIGS and Stellar 7 on fast cpu mode.

I added the m_x_calibration and m_y_calibration to the save item list in the apple2gs.cpp driver.

So I located the joystick read routine for Stellar 7 by putting a watchpoint on C064 (analog paddle 0 read)

[Linked Image from i.imgur.com]

then I put some breakpoints on every RTS from the read joystick subroutine that would print out the joystick return values:

wp c064,1,r

bp 7ca1,1,{printf "x=%02x y=%02x",x,y;g}
bp 7cb2,1,{printf "x=%02x y=%02x",x,y;g}
bp 7cc3,1,{printf "x=%02x y=%02x",x,y;g}

wpdis 1

[Linked Image from i.imgur.com]

then I could fine-tune my joystick calibration values with some lua commands in real time:

print(emu.item(manager:machine().devices[":maincpu"].allitems["0/m_x_calibration"]):writeasdouble(0,2500e-9)) -- maximum is 3E

print(emu.item(manager:machine().devices[":maincpu"].allitems["0/m_x_calibration"]):writeasdouble(0,4800e-9)) -- maximum is 7e, half 3c

print(emu.item(manager:machine().devices[":maincpu"].allitems["0/m_x_calibration"]):writeasdouble(0,5150e-9)) -- maximum is 7F, half is 40

So it looks like the "perfect" calibration for Stellar 7 running in fast mode is 5150 nsec.

Last edited by Golden Child; 02/17/19 04:12 AM.