Previous Thread
Next Thread
Print Thread
Page 26 of 26 1 2 24 25 26
Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: rfka01] #114684
02/15/19 08:22 PM
02/15/19 08:22 PM
Joined: Feb 2014
Posts: 169
G
Golden Child Offline
Senior Member
Golden Child  Offline
Senior Member
G
Joined: Feb 2014
Posts: 169
Stupid fun with the Joystick Calibration value:

I was reading the apple2.cpp source and noticed that the calibration for the x and y axes is different.
The x has 12 msec and the y has 13 msec.

/src/mame/drivers/apple2.cpp:316: m_x_calibration = attotime::from_usec(12).as_double();
/src/mame/drivers/apple2.cpp:317: m_y_calibration = attotime::from_usec(13).as_double();


[Linked Image]

According to the Apple II reference manual, 3060 ms is how long it should take to read the joystick which sounds right: 12ms * 256 = 3072 ms.

If you divide 3060 ms/256 you get 11.953 ms.


My calibration "program" is just a little applesoft one-liner:

100 PRINT PDL(0),PDL(1): GOTO 100

This would report 142 at rest for the PDL(0) and 154 at rest for PDL(1).

[Linked Image]


What if I set both to 12 msec? Then I got 142 at rest for both axes.

I got to thinking, what's the minimum values that would give the "full range" and 128 at rest.


It appears to be around 10800 nsec (or 10.8 msec)

// precalculate joystick time constants
m_x_calibration = attotime::from_nsec(10800).as_double();
m_y_calibration = attotime::from_nsec(10700).as_double();


[Linked Image]

With 10800 nsec, I can get 0 to 255. With 10700 nsec, the range reported is from 0 to 253.

A value too small won't give you a wide enough range.


Just for fun, I thought I'd see how Stellar 7 plays under the IIgs, but I noticed that it doesn't read the joystick properly with the faster CPU speed. Stellar 7 doesn't have any kind of pre-game joystick calibration.

So if I set the calibration down to 6 msec in the IIGS driver, the joystick reads properly and it's playable at the faster IIgs speed. Now Stellar 7 is a fast action game! Whee!

Interestingly, Stellar 7 loads very slowly (or it feels very slow to load) under the IIgs. I wonder why? I thought it'd be faster all around or at least the same speed.

Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: rfka01] #114685
02/15/19 09:40 PM
02/15/19 09:40 PM
Joined: Mar 2001
Posts: 16,105
USA
R
R. Belmont Offline
Very Senior Member
R. Belmont  Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,105
USA
Thanks, I'll adjust the values in the source to 10800 nsec so we get better joystick reading.

Page 26 of 26 1 2 24 25 26

Who's Online Now
4 registered members (Drucifer, Vas Crabb, ICEknight, Justin), 149 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,624
Posts112,761
Members4,839
Most Online324
Dec 20th, 2018
Powered by UBB.threads™ PHP Forum Software 7.6.1.1
(Release build 20180111)
Page Time: 0.067s Queries: 16 (0.030s) Memory: 5.6514 MB (Peak: 5.8103 MB) Zlib enabled. Server Time: 2019-02-15 23:33:32 UTC