Welcome, Guest. Please login or register.

Author Topic: PC-Amiga joystick – Re-linearalisation in software  (Read 1784 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline HodgkinsonTopic starter

  • Hero Member
  • *****
  • Join Date: Apr 2006
  • Posts: 1080
    • Show only replies by Hodgkinson
    • http://www.myspace.com/em_radiation *****and ***** www.booni.info
PC-Amiga joystick – Re-linearalisation in software
« on: March 05, 2008, 11:46:18 AM »
Hi there,
I’m just in the process of making up two PC-Amiga joystick converters, and I’ve got a bit of a problem. PC Joystick potentiometers are wired as variable resistors fed from +5v, and if I feed their signal into a fixed resistor to ground, I will end up with a non-linear response (With the signal taken from between the pot and fixed resistor) against joystick position, as opposed to standard Amiga joysticks that have their potentiometers wired as potentiometers - And thus produce a linear response with joystick position.

One way around this would be to re-wire the joystick or add a selector switch, but its a real PITA to go round sawing big holes in all your best joysticks.
Other methods include a ADC -> [Maths] -> DAC -> Joystick port (No chance...); or finding a uA constant current sink device as opposed to the fixed resistor as this will produce a linear output (Also more complex than what I was hoping for...)

With all the simple-looking commercially available adaptors, is there any software out there to re-linearalise the joystick signal before it is received by a game, for example?

I've seen one or two files on Aminet that look promising and I'd like your recommendations.

Regards and TIA,
Hodgkinson.
Main A1200D: WB3.0, 3.1 ROMs, 2GB HDD, Blizzard 1230IV (64MB RAM + FPU) and a whole load of custom heatsinks... :flame:
 

Offline Heinz

  • Full Member
  • ***
  • Join Date: Nov 2005
  • Posts: 154
    • Show only replies by Heinz
    • http://amidevcpp.amiga-world.de
Re: PC-Amiga joystick – Re-linearalisation in software
« Reply #1 on: March 05, 2008, 01:32:34 PM »
Quote

 as opposed to standard Amiga joysticks that have their potentiometers wired as potentiometers


The Amiga Joysticks I opened didnt have any Potentiometers, just four switches for up, down, left and right.
So using a PC Joystick on an Amiga (If that is what you want to do) would require a circuit to take an analog value that represent a full turn in one of the directions and switch a certain voltage (5V/TTL probably) when this value is reached.


 

Offline HodgkinsonTopic starter

  • Hero Member
  • *****
  • Join Date: Apr 2006
  • Posts: 1080
    • Show only replies by Hodgkinson
    • http://www.myspace.com/em_radiation *****and ***** www.booni.info
Re: PC-Amiga joystick – Re-linearalisation in software
« Reply #2 on: March 05, 2008, 01:42:09 PM »
Have a look at the port pinout – There’s PotX and PotY lines on the ports specially for analogue joysticks. I’m trying to get the X and Y axes of a conventional analogue PC joystick to work on the Amiga – Linearly – Without any nasty hacks to the joystick itself.

Having said that, thanks for the post ;-)

FYI: As for on-off joysticks, these units that I've bought are rather interesting: Link

EDIT: The pinouts seem to suggest that the fire button is on a different signal line when in a analogue joystick as compared to a digital joystick. Is this so? All the games I've tried so far use the centre button on a SEGA pad to fire, and im wondering if I should connect the fire button to the same line as in the SEGA pad, or wether it needs to move to a different rail for a analogue joystick.

Thanks,
Hodgkinson.
Main A1200D: WB3.0, 3.1 ROMs, 2GB HDD, Blizzard 1230IV (64MB RAM + FPU) and a whole load of custom heatsinks... :flame:
 

Offline Heinz

  • Full Member
  • ***
  • Join Date: Nov 2005
  • Posts: 154
    • Show only replies by Heinz
    • http://amidevcpp.amiga-world.de
Re: PC-Amiga joystick – Re-linearalisation in software
« Reply #3 on: March 05, 2008, 02:12:54 PM »
I did not know that the Amiga supports analog Joysticks at all...

I am not so skilled so my Idea is probably crap, but what about using an opto-coupler ?
 

Offline HodgkinsonTopic starter

  • Hero Member
  • *****
  • Join Date: Apr 2006
  • Posts: 1080
    • Show only replies by Hodgkinson
    • http://www.myspace.com/em_radiation *****and ***** www.booni.info
Re: PC-Amiga joystick – Re-linearalisation in software
« Reply #4 on: March 05, 2008, 02:31:22 PM »
Hmmm. Opto-couplers are usually designed for digital signals, but I suppose one could be used as an analogue device. The trick is that you’d have to find one with the exact correct response curve of LED current to detector resistance to correct that of the joystick output - By no means a simple task.

Thanks for the comment though ;-)
Main A1200D: WB3.0, 3.1 ROMs, 2GB HDD, Blizzard 1230IV (64MB RAM + FPU) and a whole load of custom heatsinks... :flame:
 

Offline motorollin

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: PC-Amiga joystick – Re-linearalisation in software
« Reply #5 on: March 05, 2008, 04:22:53 PM »
Try a flux capacitor.

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10