Adding STE advanced port, jagpad support for games

GFA, ASM, STOS, ...

Moderators: exxos, simonsunnyboy, Mug UK, Zorro 2, Moderator Team

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

Adding STE advanced port, jagpad support for games

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

I start this thread mostly to clarify some things, to see what controllers were/are used by Atari STE, Falcon users. Then some explanations about general support possibilities.

As I see, most spread controller is JagPad:
Atari_jag_pad.jpg

In Steem it is emulated it seems 100%:
steemjp.png


How to read it in SW is explained well in this, for instance:
The Atari Enhanced Joystick Ports
Fequently Asked Questions
Version 0.90 - 24th September 1996

So, adding read of JagPad to some game seems as not big deal, and we can ask, why so few games support it - there is sadly short list of games supporting it in that FAQ.
What is really barely supported is analog imput - there is 2 of them on each port. Usually it is X-Y axe of analog stick. It seems that only one game supports analog paddles - Moonspeeder for Falcon.
And as I see, emulators don't support it. Even FAQ is unclear about it, and asks for help. Most likely because almost nobody of Atari people had such joystick.
Edited:
Now the first question: is it possible to attach some old PC analogue joystick to STE adv. port via adapter ? Connectors are not same, pin number is, and here I mean only analog X-Y lines to connect. According to AnthonyJ reply here: viewtopic.php?f=3&t=31699&start=25 it is.
End of edit.
Some people suggested some kind of wrapper, what would map JagPad input to some keyboard key presses, or regular (9 pin) joystick input.
That would be indeed very handy, and with that expansion lot of games would be playable with JagPad or some other compatible controller.
Unfortunately, that's not so simple. Atari is not PC with WIndows or some other modern OS. There is lot of direct communication with peripherals in SW, especially in games. So, if some game uses own code to read keyboard, joystick - wrapper simply will not work. Just to mention that in modern OS-es, direct access to HW is forbidden. Atari coders used direct access for good reason: speed, + could do some things hardly possible via TOS calls.
Since I dealt with lot of games, I can even give aprox. %-age of games where wrapper would work: ~15% .
In all other cases you need to add advanced port read code in middle of game's code for reading input devices. This is what I do when add options for saving gamestate and exit to Desktop. But that's much simpler than adding some new device input. And I have wrapper for it in TOS 1.04 running in RAM, so for games using TOS functions to read kb. all I need to do is to set which keys to assign for those 2 functions (it's usually * and / on NumPad)
All in all, doing that wrapper is worth only if there is some number of candidates, which read inputs via TOS calls. That needs making some list.

Second question: any people with some different controller than JagPad for their STE, Falcon advanced ports ?
You do not have the required permissions to view the files attached to this post.
Last edited by AtariZoll on Wed Jun 14, 2017 8:44 am, edited 1 time in total.
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.

joska
Hardware Guru
Hardware Guru
Posts: 3692
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Adding STE advanced port, jagpad support for games

Postby joska » Wed Jun 14, 2017 8:29 am

AtariZoll wrote:Now the first question: is it possible to attach some old PC analogue joystick (it has 15 pins too, as I remember) to STE adv. port ? Or needs some adapter ?


The old PC analog gameport is not multiplexed like the jagpad. It supports four analog axes and four digital buttons. I would assume you need some active adapter to make the buttons work with the multiplexed jagpad port.
Jo Even

Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64

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

Re: Adding STE advanced port, jagpad support for games

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

Yes, you are right. I looked about connectors, so adapter is necessary for sure - and I edited my post. But I just want to test analog inputs on Falcon, STE, to see what is value of variable resistor, is 8-bit what can read on ports signed or unsigned. So, I probably can get some of such sticks and give it a try - at least we will know more than now.
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.

joska
Hardware Guru
Hardware Guru
Posts: 3692
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Adding STE advanced port, jagpad support for games

Postby joska » Wed Jun 14, 2017 9:04 am

If you only need this for testing you can just wire up a 100k potmeter.
Jo Even

Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64

penguin
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 109
Joined: Tue Dec 24, 2013 10:43 am

Re: Adding STE advanced port, jagpad support for games

Postby penguin » Wed Jun 14, 2017 11:06 pm

I only use the grey Jagpad on my Falcon. Many people also own Jagpads with rotary controller. Anything else would require an adapter.
AtariUpToDate - Atari ST/TT/Falcon software database and version tracker: http://www.atariuptodate.de
st-computer magazine - http://st-computer.atariuptodate.de/

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

Re: Adding STE advanced port, jagpad support for games

Postby AtariZoll » Thu Jun 15, 2017 9:42 am

I got some old PC analog joystick, what seems being in good shape, and as we will see that's much better for testing than some 100K variable resistor - because it will never go till 0 ohm position, for instance.
Unfortunately, Atari placed connectors so, that is not possible to attach some VGA male, unless you cut off metal holding plastic part. So, for now I only tested it with simple program what reads ports $FFFF9211-$FFFF9217 (low byte is interesting only) . I got values in range $4 - $3E with adjusters in middle positions. Resistance varied in range 8K-120K approx. So, unless Atari designed it for much higher values of variable resistors than it is used by PC analog joysticks, neutral position (middle) value is about 32 ($20) .
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 4871
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Re: Adding STE advanced port, jagpad support for games

Postby simonsunnyboy » Thu Jun 15, 2017 10:20 am

Any proper analogue joystick interface allows calibration of middle and maximum positions. On the PC I never experienced stable analogue joystick positions unless it was a digital pad wired up to act as the analogue axis.

For practical gaming use on Ataris, IMHO support for the digital jagpads is enough. Only flight simulations make true use of analogue controls.
But I acknowledge the need and overall interest in exploring the sofar unused STE/Falcon capabilities on the EJP.

Maybe one or two games for The Falcon mentioned analogue controls, otherwise I haven't seen any over the years.
Simon Sunnyboy/Paradize - http://paradize.atari.org/ - STOT: http://www.npoi.de/stot/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

Jabber: simonsunnyboy@atari-jabber.org

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

Re: Adding STE advanced port, jagpad support for games

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

Finally I did test with Moonspeeder. There is of course simple calibration. And it worked fine with PC analog, old type (15 pin connector) joystick via adapter (just connected 5 lines to proper pins).
But I'm disappointed - it is only for control left-right, while Y axe is unused - accel. is still on buttons. So, we can say that all what is used of analog STE port is 1/2 in only one game :lol:

I bought some 12 years ago analog joystick with USB connector, and played mostly flight sims with it. But it went very bad after not so much use. Indeed, whole concept with variable resistors is bad, and unstable, with low lifetime. I guess that in newer ones it is done with optic.
Still, it is sad to see another example of unused HW port, extended HW in later Atari models.

Some notes about Xav's article:
"These will return values from 0 to 255, where 0,0 represents the
bottom left and 255,255 is the top right [can someone confirm this?]"
Top pos. gives 0 for Y axe . Left for X axe. And of course, 0 and 255 is not reachable in normal usage. - As is usual in analog world.
Xav talks about some DAC used, what will convert input voltage in range 0-5 V to digital value 0-255 . That's certainly not the case. I measure on those pins voltage always under 1V - and as said, it may be that there is larger resistance used by Atari design - what would result in even lower voltage.
Actually, analog inputs work most likely this way: there is capacitor what is charged via analog joystick's variable resistor. Lower resistance - faster charge. Instead DAC counter is used. At start it resets counter, discharges capacitor,then starts counter. When voltage on capacitor reaches certain value it puts counter state in latch - and that is what can read at ports $FFFF9210-16 . This way is good enough for not so precise variable resistors.
And that low preciseness may be explanation why not whole range up to 255 is used.
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.

User avatar
leech
Atari Super Hero
Atari Super Hero
Posts: 900
Joined: Tue Dec 01, 2015 3:26 pm

Re: Adding STE advanced port, jagpad support for games

Postby leech » Thu Jun 15, 2017 11:00 pm

Couldn't we (in theory) get one of the analog 5200 controllers to work? Not sure if we'd want to, since I've only ever heard terrible things about them, but I think that is the only official analog stick Atari ever released, right?
Atari 8Bits: 800xl, 600xl, XEGS, 800, 130xe, 130xe (fully upgraded (soon!))
Atari STs: 1040STf (broken shifter), 1040STe, Mega STe, TT030, Falcon (CT60e, SuperVidel)

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

Re: Adding STE advanced port, jagpad support for games

Postby AtariZoll » Fri Jun 16, 2017 8:53 am

leech wrote:Couldn't we (in theory) get one of the analog 5200 controllers to work? Not sure if we'd want to, since I've only ever heard terrible things about them, but I think that is the only official analog stick Atari ever released, right?

All controllers with variable resistors were poor quality, I think - maybe some very expensive not. There is friction what destroys gradually resistor self.
If that 5200 controller has variable resistors in range about 100K, then could serve. Serve what ? Left-right only in 1 game only, Falcon only .
Surely could mod some games, but first thing for that, if I do it is support in Steem (Debugger).
Anyway, I will now write some HW details about ports on Hardware section.
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.

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

Re: Adding STE advanced port, jagpad support for games

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

I did test with 380 Kohm variable resistor. Min value was 4, max $6E. That means that it is non linear with larger resistor value - and that's normal, since there is 1 Mohm pull up resistor at each line.
Conclusion: STE adv. port analog inputs are designed for variable resistors of ~100K - then will get results in range ~4-$3E. 4 is top or left, $3E is bottom or right end pos. Middle pos. will give about $20 . Confirmed by test with PC analog joystick and single game supporting it.
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.

joska
Hardware Guru
Hardware Guru
Posts: 3692
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Adding STE advanced port, jagpad support for games

Postby joska » Fri Jun 16, 2017 10:26 am

AtariZoll wrote:All controllers with variable resistors were poor quality, I think - maybe some very expensive not. There is friction what destroys gradually resistor self.


The original Playstation Dual Analog and DualShock controllers have variable resistors, so it's perfectly possible to make dependable controllers this way. But I agree, it's not ideal.
Jo Even

Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64

User avatar
lp
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2257
Joined: Wed Nov 12, 2003 11:09 pm
Location: GFA Headquarters
Contact:

Re: Adding STE advanced port, jagpad support for games

Postby lp » Sun Jun 25, 2017 12:35 pm

I found that ejp faq quite interesting. If my tests are successful gfa will have new command for a reading jaguar controller. Unfortunately I sold my gray jag controller and can only test in Hatari which has limited joypad support so I need someone to try test app. ;)

penguin
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 109
Joined: Tue Dec 24, 2013 10:43 am

Re: Adding STE advanced port, jagpad support for games

Postby penguin » Sun Jun 25, 2017 7:35 pm

lp wrote:I found that ejp faq quite interesting. If my tests are successful gfa will have new command for a reading jaguar controller. Unfortunately I sold my gray jag controller and can only test in Hatari which has limited joypad support so I need someone to try test app. ;)


I can test it on my Falcon with the gray and black controller. Just contact me on Facebook.
AtariUpToDate - Atari ST/TT/Falcon software database and version tracker: http://www.atariuptodate.de
st-computer magazine - http://st-computer.atariuptodate.de/

User avatar
leech
Atari Super Hero
Atari Super Hero
Posts: 900
Joined: Tue Dec 01, 2015 3:26 pm

Re: Adding STE advanced port, jagpad support for games

Postby leech » Mon Sep 18, 2017 1:46 am

I can test both as well, also Falcon or 1040STe.
Atari 8Bits: 800xl, 600xl, XEGS, 800, 130xe, 130xe (fully upgraded (soon!))
Atari STs: 1040STf (broken shifter), 1040STe, Mega STe, TT030, Falcon (CT60e, SuperVidel)


Social Media

     

Return to “Coding”

Who is online

Users browsing this forum: No registered users and 2 guests