Steem's emulation of STE analog joy. input

A forum for anything about the Steem Engine STE emulator, comments, problems, bug reports etc. Steven Seagal regularly provides updated versions of the original STEem code.

Moderators: Mug UK, Steem Authors, Moderator Team

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2473
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Steem's emulation of STE analog joy. input

Postby AtariZoll » Tue Jun 13, 2017 8:06 am

I don't see is it emulated at all, or how to set it in joystick settings. Manual says that Steem handles well digital and analog joysticks, and that's true. But as I see, it can be mapped only for digital inputs - regular ST joystick, or STE advanced. You can set sensitivity of analog, and can see how you move paddles, but nothing changes at ports $FF9210-$FF9216 . I know that it was barely used in SW, so may be that it is the reason why is not emulated.
Looked Steem SSE, latest versions, and nothing better.
I'm not against GMO, I'm against that children play with fire.

User avatar
Steven Seagal
Atari God
Atari God
Posts: 1688
Joined: Sun Dec 04, 2005 9:12 am
Location: Undisclosed
Contact:

Re: Steem's emulation of STE analog joy. input

Postby Steven Seagal » Wed Jun 14, 2017 8:10 am

It's currently not emulated. By "digital and analog joysticks", the manual means PC joysticks.
Big problem is that there are no programs to test against AFAIK, which also raises the usefulness question.
In the CIA we learned that ST ruled
Steem SSE: http://ataristeven.exxoshost.co.uk/Steem.htm

WoodlandSpirit
Atariator
Atariator
Posts: 21
Joined: Sun Apr 30, 2017 10:33 am

Re: Steem's emulation of STE analog joy. input

Postby WoodlandSpirit » Wed Jun 14, 2017 8:34 am

Won't be the most complete test case but I seem to remember the game Zero-5 making use of the Jaguar pad if you had it plugged in, might be an avenue to explore/get strated.

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2473
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: Steem's emulation of STE analog joy. input

Postby AtariZoll » Wed Jun 14, 2017 8:53 am

Steven Seagal wrote:It's currently not emulated. By "digital and analog joysticks", the manual means PC joysticks.
Big problem is that there are no programs to test against AFAIK, which also raises the usefulness question.

Moonspeeder is listed as only one supporting analog. Too bad, it's Falcon only. But possible that I can do some tests on Falcon

...
WoodlandSpirit wrote:Won't be the most complete test case but I seem to remember the game Zero-5 making use of the Jaguar pad if you had it plugged in, might be an avenue to explore/get strated.

I tried Zero-5 couple days ago in Steem. There is only Jagpad support, so no analog.
I'm not against GMO, I'm against that children play with fire.

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2473
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: Steem's emulation of STE analog joy. input

Postby AtariZoll » Thu Jun 15, 2017 10:54 am

I did testing on real Falcon with PC analog joystick, connected via simple adapter - need only 3 lines for X-Y analog inputs.
The range of value on ports is ~ $4 - $3E when adjusters are in middle pos. When centered value is about %1F . Variable resistor in that joystick goes up to about 115 KB, what is according to specs of it. So, I'm not sure that low max value ($3E) is result of that Atari designed port for higher value variable resistors, or it is just it ... In any case Moonspeeder steering with PC joystick was fine - there is calibration before start.
I just thought that would be good to try some games with analog control - Flight Sim. 2, OIDS, Vroom - should be much better than with mouse.
That would be usefulness :D
I'm not against GMO, I'm against that children play with fire.

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2473
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: Steem's emulation of STE analog joy. input

Postby AtariZoll » Fri Jun 16, 2017 9:05 am

I did more testings, and can confirm that values in my previous post are real, good working ones. In case of resistor value over 100K it becomes non-linear. So, we have all necessary to add support for it in Steem.
If Steven won't do it, I will put together all my C knowledge and go on it - first for Steem 3.2 Debugger (needed for testings, SW mods) - and then for basic v.
I'm not against GMO, I'm against that children play with fire.

User avatar
Steven Seagal
Atari God
Atari God
Posts: 1688
Joined: Sun Dec 04, 2005 9:12 am
Location: Undisclosed
Contact:

Re: Steem's emulation of STE analog joy. input

Postby Steven Seagal » Fri Jun 16, 2017 6:32 pm

AtariZoll wrote:I did more testings, and can confirm that values in my previous post are real, good working ones. In case of resistor value over 100K it becomes non-linear. So, we have all necessary to add support for it in Steem.
If Steven won't do it, I will put together all my C knowledge and go on it - first for Steem 3.2 Debugger (needed for testings, SW mods) - and then for basic v.


There's also the GUI aspect of course.
It's not that I don't want to do it, but I can't jump on this.
The priority now is bugfixes for next release, planned for end of this month.
And then we would need a test case for STE (not Falcon).
In the CIA we learned that ST ruled
Steem SSE: http://ataristeven.exxoshost.co.uk/Steem.htm

czietz
Captain Atari
Captain Atari
Posts: 360
Joined: Tue May 24, 2016 6:47 pm

Re: Steem's emulation of STE analog joy. input

Postby czietz » Fri Jun 16, 2017 7:54 pm

AtariZoll wrote:I did more testings, and can confirm that values in my previous post are real, good working ones. In case of resistor value over 100K it becomes non-linear. So, we have all necessary to add support for it in Steem.


Since we have the STE schematic and inner workings of the GSTMCU, we can fully-reverse engineer the circuit for the analog joysticks:

The analog part of the circuit consists of LM556 timers working in monostable mode. From the datasheet we can see that in this configuration the output of the LM556 will be high for T = 1.1 * Ra * C, and from the STE schematic we get C = 680 pF and Ra = (Rjoy || 1 Mohm) + 470 Ohms. Rjoy is the resistance of the joystick -- assuming the other end is connected to 5V.
The digital part of the circuit consists of an 8-bit counter inside the GSTMCU. It is clocked by a 500 kHz clock. When it overflows, i.e. every 256 clock cycles or every 512 µs, both the counter and the LM556 are reset. When the output of the LM556 goes low, the counter value is latched into the respective register that can be read out at addresses $FF9210-$FF9216.

Hence, one can derive the formula for the register value N as:
N = floor((176 + 374 * (Rjoy/1kOhm)) / (1000 + (Rjoy/1kOhm))).

For Rjoy bigger than a few kiloohms this can be be approximated by:
N = floor(374 / (1 + 1000/(Rjoy/1kOhm)))

Now the question is: How big is the range of Rjoy supposed to be? Does anyone have specs for the analog joysticks that were meant to be connected to the STE?

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2473
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: Steem's emulation of STE analog joy. input

Postby AtariZoll » Fri Jun 16, 2017 9:35 pm

Here are more details:
viewtopic.php?f=15&t=31806
I'm not against GMO, I'm against that children play with fire.

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2473
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: Steem's emulation of STE analog joy. input

Postby AtariZoll » Sun Jun 25, 2017 9:30 am

Here is what to change in Steem, to get emulation of 1 X-Y paddle on port A, using some gamepad with paddles as joystick 0 of PC.
In file stjoy.cpp :

Code: Select all

    case 0xff9210: return 255;  / no change
    case 0xff9211: return 4+(HIBYTE(GetAxisPosition(0,&JoyPos[0]))/4);
    case 0xff9212: return 255;  / no change
    case 0xff9213: return 4+(HIBYTE(GetAxisPosition(1,&JoyPos[0]))/4);
   

Only 2 lines to change. This will give input range very close to what I got on Falcon with 100K variable resistors in analog joystick, adjusters in middle pos. (and that is most likely what is target value for some Atari paddle, if such was ever made).
That's what I could to do. Adding some calibration/adjust in Joystick menu is on you Steven :D
Works fine with so far only one game - modded OIDS :D Vroom is next candidate :idea:
I'm not against GMO, I'm against that children play with fire.


Social Media

     

Return to “Steem”

Who is online

Users browsing this forum: No registered users and 2 guests