Mission for Ppera : Software Joystick Tester

No topic. Everything you want to speak about. Please just stay courteous.

Moderators: Mug UK, Silver Surfer, Moderator Team

Post Reply
User avatar
techie_alison
Administrator
Administrator
Posts: 1547
Joined: Tue Aug 23, 2005 10:06 am
Location: Cambridge, UK
Contact:

Mission for Ppera : Software Joystick Tester

Post by techie_alison »

Heyo Ppera,

We have a little mission for you. :)

What is required (and would be helpful for quite a few people) is a small ST program which shows on screen what the joystick and mouse counters are doing.

UP, DOWN, LEFT, RIGHT, BUTTON1, BUTTON2 etc.

And in the program, the mouse counters would also be displayed. Such that it effectively allows one to test joysticks and mice. It's all very well loading games, but that method can be a bit cumbersome and isn't too analytical.

Methods, source code, and capabilities, are a must. The source code for example, would help someone like me who would like to be able to create small programs like this myself. There just aren't the examples out there to read through.

Please can you write this program Pera? It would be a brilliant contribution. Just a little window that opens up, and tells you what the inputs are doing in real time. That's it! And documented so that people can see something created today and how it's created.

Aly :D
If I don't answer or appear to have forgotton then email again, I'm scatty! :)

http://www.logicsays.com/ = Updated Site
http://www.logicsays.com/index1 = Older Site (with more Atari)
User avatar
Nyh
Atari God
Atari God
Posts: 1533
Joined: Tue Oct 12, 2004 2:25 pm
Location: Netherlands

Re: Mission for Ppera : Software Joystick Tester

Post by Nyh »

techie_alison wrote:What is required (and would be helpful for quite a few people) is a small ST program which shows on screen what the joystick and mouse counters are doing.

UP, DOWN, LEFT, RIGHT, BUTTON1, BUTTON2 etc.

And in the program, the mouse counters would also be displayed. Such that it effectively allows one to test joysticks and mice.
I have just such a program among my C-files. I use it as starting point for programs needing mouse or joystick. Biggest disadvantage is all comments are in Dutch.

Hans Wessels
You do not have the required permissions to view the files attached to this post.
User avatar
techie_alison
Administrator
Administrator
Posts: 1547
Joined: Tue Aug 23, 2005 10:06 am
Location: Cambridge, UK
Contact:

Re: Mission for Ppera : Software Joystick Tester

Post by techie_alison »

Ooooh. :)

Hi Hans,

That's brilliant. Thank you. Dank u.

Ppera!!! Can you document this, and provide the various bits so that people can change it and compile it? What they need etc.
If I don't answer or appear to have forgotton then email again, I'm scatty! :)

http://www.logicsays.com/ = Updated Site
http://www.logicsays.com/index1 = Older Site (with more Atari)
User avatar
techie_alison
Administrator
Administrator
Posts: 1547
Joined: Tue Aug 23, 2005 10:06 am
Location: Cambridge, UK
Contact:

Re: Mission for Ppera : Software Joystick Tester

Post by techie_alison »

What would you compile this with Hans (so I can play with the code) that's readily available on one of the ftp sites?

:D
If I don't answer or appear to have forgotton then email again, I'm scatty! :)

http://www.logicsays.com/ = Updated Site
http://www.logicsays.com/index1 = Older Site (with more Atari)
User avatar
Nyh
Atari God
Atari God
Posts: 1533
Joined: Tue Oct 12, 2004 2:25 pm
Location: Netherlands

Re: Mission for Ppera : Software Joystick Tester

Post by Nyh »

techie_alison wrote:What would you compile this with Hans (so I can play with the code) that's readily available on one of the ftp sites?
Oh, sorry, it is Pure C.

Maybe Ppera can give you an assembly version. You need to recompile it if you want to switch from mouse to joystick at port 0. I am still too busy playing with square root routines to fix this quickly.

Hans Wessels
User avatar
Zorro 2
Administrator
Administrator
Posts: 2305
Joined: Tue May 21, 2002 12:44 pm
Location: Grenoble (38) - France
Contact:

Re: Mission for Ppera : Software Joystick Tester

Post by Zorro 2 »

You can use some informations to release the ASM proggy with the Wiki, here are links to do something :
:mrgreen: http://www.atari-forum.com/wiki/index.p ... utorial_12
:mrgreen: http://www.atari-forum.com/wiki/index.p ... d_Protocol

// 1773
.~^ Member of NoExtra Team :: Member of HMD :: Pouet :: DemoZoo :: GitHub ^~.
ppera

Re: Mission for Ppera : Software Joystick Tester

Post by ppera »

As I remember Sysinfo prints out current mouse position. Don't remember about joystick, tough :D

Well, I made couple similar programs - for instance accurate floppy RPM testing - sources are on my site.
This with joystick should be deluxe version with nice Competition Pro on screen, and flashing buttons, 3D animation of movements :mrgreen: OK: 4 arrows for movement, 2 circles for buttons. And 2 numbers for mouse pos, + 2 squares for mouse buttons. Piece of cake with RSC and AES showing/hiding icons/objects.

OK. I will do it in weekend likely. Now making some new 'releases' of Dungeon Master and Chaos Strikes Back for people which don't like to mess with AUTO folder, plus cheat modes.
ppera

Re: Mission for Ppera : Software Joystick Tester

Post by ppera »

Here is it ...

All done with system calls. No direct HW access, no supervisor mode. Source is commented more than I use :D
Tested with TOS 1.02, 1.04, 2.06, 4.02 .

P.S. updated, so displays alternate fire button pressing (right one for joy.) - only when joystick is attached to port 0, as on port 1 pin 9 is not connected.
joymout.png
You do not have the required permissions to view the files attached to this post.
Last edited by ppera on Wed Feb 18, 2009 1:18 pm, edited 2 times in total.
User avatar
techie_alison
Administrator
Administrator
Posts: 1547
Joined: Tue Aug 23, 2005 10:06 am
Location: Cambridge, UK
Contact:

Re: Mission for Ppera : Software Joystick Tester

Post by techie_alison »

Gosh. That's rather good actually. :)

Only issue I can see is if you switch to Joystick 0, it then drops the mouse. And you lose the ability to change or exit. :)
If I don't answer or appear to have forgotton then email again, I'm scatty! :)

http://www.logicsays.com/ = Updated Site
http://www.logicsays.com/index1 = Older Site (with more Atari)
ppera

Re: Mission for Ppera : Software Joystick Tester

Post by ppera »

techie_alison wrote: Only issue I can see is if you switch to Joystick 0, it then drops the mouse. And you lose the ability to change or exit. :)
When joystick is connected to port 0 mouse can't be plugged in :D (port 1 supports not mouse). Not loosing ability to change - in TXT file it is described. Back to mouse mode with key '1', exit with Enter. Just need to press them little longer.
User avatar
MiggyMog
Atari Super Hero
Atari Super Hero
Posts: 989
Joined: Sun Oct 30, 2005 4:43 pm
Location: Scotland

Re: Mission for Ppera : Software Joystick Tester

Post by MiggyMog »

How would this detect if autofire or the like was being used?

I think an addition to record the stream of data with the timing would be useful.

E.G.

1.00s 1.25S
| |
LRUDDDDDDUUUUUUUUUUUUFFFF

Another additon to detect response time may be useful.

E.G

ready! press fire! you took 0.05 seconds etc.

How about a broken cable check?

Push button and shake cable, if goes low then 'Break detected'

What are the specs for response times on the ports?

Ali, could a packet handler type thing be set up in your PSX interface so that button pressing on the PSX contoller could trigger a unique sequence depending on which button is pressed with spaces with no generated in between? I am guessing the ports can handle switching far faster than a person could change them and this could be possible?

E.G.

D-Pad U SUFS
D-Pad D SDFS
D-Pad L SLFS
D-Pad R SRFS
Pressing square SLFFS
Pressing Triangle SRFFS
Pressing Circle SDFFS
Pressing Cross SUFFS
L1shoulder SFLS
R2 shoulder SFRS
L3shoulder SFUS
R4 shoulder SFDS
('< o o o o |''| STM,2xSTFM,2xSTE+HD,C-Lab Falcon MK2+HD,Satandisk,Ultrasatandisk,Ethernat.
ppera

Re: Mission for Ppera : Software Joystick Tester

Post by ppera »

Well, as usual - more requests :D
AES based program is not really suitable for some accurate time measures. It is possible to do some counts in background, so can display fire button hits during some period (10 secs). But reaction time measuring would be likely not accurate - error in range of some 0.2 secs, I guess.

I don't know about port response time specs. As IKBD chip does most of job, it depends of it's microcode. KB ACIA works with some 7800 bauds, what means roughly 1KB/sec, what is far enough. Probably response is not worse than 1/100 sec .
User avatar
samf
Captain Atari
Captain Atari
Posts: 185
Joined: Wed Mar 10, 2004 9:22 pm
Location: Ashburn, Virginia USA

Re: Mission for Ppera : Software Joystick Tester

Post by samf »

ppera wrote:Here is it ...

All done with system calls. No direct HW access, no supervisor mode. Source is commented more than I use :D
Tested with TOS 1.02, 1.04, 2.06, 4.02 .

P.S. updated, so displays alternate fire button pressing (right one for joy.) - only when joystick is attached to port 0, as on port 1 pin 9 is not connected.
joymout.png
Ppera, you are just friggin amazing!! :D
Atari Computer Nut
Virginia U.S.A.
C-Lab/CT060 Falcon,
256mb TT Ram, 14mb ST Ram,
4Gig hdd, IDE DVD Drive
Post Reply

Return to “Chat forum [ENG]”