CPCWiki forum

General Category => Amstrad CPC hardware => Topic started by: geebus on 16:19, 05 December 18

Title: New Joystick and/or game pad
Post by: geebus on 16:19, 05 December 18
Hi folks,

I'm thinking of making a prototype of a joystick and/or a game pad, then maybe getting some "mass" produced. Is there any interest in this here? or are you all making your own?
I'm thinking of using machined stainless steel for the base and the shaft of the joystick (to give it a good lifespan and not brake when someone rage quits their game) but all my ideas are in my head at the moment so it'll change a lot once I actually draw it out and make a prototype.

Not sure if I want to make it a 2 or 3 button with auto fire (or even what the options really are!).

I'm really starting from scratch learning these things, so this is a learning project for me that might take me a while to get my first one made. I only just ordered my soldering station yesterday to replace my old crappy on/off soldering iron. I'm starting with the simple things before I try to move on to more complex items.

I'm sure i'll find swathes of information on these forums of people who have done it before. So expect many new posts from me asking random questions.

As for the connectors, I was hoping to find the right connector with a stress relief area on the cable (assuming those can be bought separately anyway). I haven't found any so far, but I've not been looking very long. I could always cut and smooth off the connector tabs if I can't find any without the tabs on them.

Any pointers or advice is always appreciated.
Title: Re: New Joystick and/or game pad
Post by: DanyPPC on 19:44, 05 December 18
For the cables you have to simply buy MegaDrive cable extension for a good price.


If you intend create a gamepad you could start from a snes style gamepad (pc usb model). There are a lot of button and you could wire them in the following manner:


Y = 1st Button
Z = Up direction (for those platform where it need to jump)
B = 2nd Button
A = 1st Button
LEFT Shoulder = Down Direction
RIGHT Shoulder = Up Direction
(these useful for racing games)


Select and Start can be omitted.


It's only a personal idea.

Title: Re: New Joystick and/or game pad
Post by: tjohnson on 20:50, 05 December 18
I made my own by buying a simple plastic enclosure and an off the shelf arcade stick and buttons.
Title: Re: New Joystick and/or game pad
Post by: keith56 on 23:50, 05 December 18
It's worth remembering that the non plus CPC's can support a third undocumented fire button!

I use a 1st generation neogeo controller with a conversion dongle on my CPC (the non-bean shaped one)... they had no electronics in them - all the buttons were just dumb switches, so it makes a good 3 fire arcade stick for the CPC!
Title: Re: New Joystick and/or game pad
Post by: DanyPPC on 10:17, 06 December 18
Anyway no game support 3rd button.


Good idea for the NeoGeo joystick/pad.
Title: Re: New Joystick and/or game pad
Post by: keith56 on 10:46, 06 December 18
Anyway no game support 3rd button.

Good idea for the NeoGeo joystick/pad.
ChibiAkumas and R-type support the third button!... also please note the NeoGeo CD Gamepad does not work with my dongle (unfortunately!) - it may work if you gave it a 5v power line, but I've not tested it.
Title: Re: New Joystick and/or game pad
Post by: DanyPPC on 10:19, 07 December 18
Are you referring to R-Type 128k Enhanched version?
I did not know. And what is the purpose of the third button in this game?
Title: Re: New Joystick and/or game pad
Post by: geebus on 17:58, 24 January 19
Hi all,
it's been a little while since I made this topic and I've been playing about after getting my new soldering station and swathes of buttons etc etc.
I'm waiting on my megadrive extension cable arriving so that I can cut one end off and wire that into my prototype board.


My question for today is, before I start soldering in the wires for the buttons. Is it still best to put in a small capacitor to stop the 'bounce'?
As i understand it these are go low (instead of 5v) connections for the joystick port? but i'm assuming that doesn't make any difference to the effects of bounce... or does it?
Also, I done a bit of reading about this and realised that my 555 timer auto fire wouldn't work due to the lack of 5v coming from the port. So that is that out of the window. I know you can connect a 5v line in, but I don't fancy going down that route.
Title: Re: New Joystick and/or game pad
Post by: ikonsgr on 01:25, 25 January 19
About autofire you might find this useful:
http://www.cpcwiki.eu/forum/amstrad-cpc-hardware/auto-fire-adapter-for-amstrad-cpc/msg58190/#msg58190 (http://www.cpcwiki.eu/forum/amstrad-cpc-hardware/auto-fire-adapter-for-amstrad-cpc/msg58190/#msg58190)
I made it some years ago, and the circuit is rather easy to make too.
Now about joystick port function, all movement and fire buttons are on/off switches ,BUT the two states are NOT 5v-high and ground-low,but rather "not connected" (high impedance state) and "active"-ground .
You see, joystick port is multiplexed with a keyboard line, and every 1/50 sec,, amstrad is polling the port and reads the state of movements+fires which they must be either ground(=active) or not connected. This "interrogation" of the port, is made by the ground or common signal, which actually is not ground at all, but ~99% of time is at high 5volt state, and only every 1/50 sec, and for a very short time ,is pulsed to 0v/ground and that's when amstrad reads the joystick port!

And i suppose this was the reason they omit the 5v supply on joyport,it would be useless since the "Ground" (=voltage reference) is no ground at all, but rather a pulsed signal with ~99% duty cycle!  :)
Note also that you can't use pull up resistors on the joystick signals either, because the "inactive" switches@ 5volt will interfere with keyboard!
And if you want to add autofire function too, i'm afraid the only way to do it right is this:
http://retroworkbench.blogspot.com/p/5v-power-supply-for-joystick-port-to.html (http://retroworkbench.blogspot.com/p/5v-power-supply-for-joystick-port-to.html)

Title: Re: New Joystick and/or game pad
Post by: Bryce on 09:30, 25 January 19
Most games pole the joystick port at a rate that bounce isn't an issue, but add the capacitors if you intend using the joystick on faster machines.

Bryce.
Title: Re: New Joystick and/or game pad
Post by: geebus on 13:00, 25 January 19
Thanks both.
After having a look into it a bit and thinking about how the lines are pulled low (ikonsgr you say they're actually pulled high every 1/50th of a second?) then a capacitor wouldn't do anything as there's no charge to fill it up. Would that be right?


I'll add some small capacitors in, just in case as it shouldn't cause any issues if I do add them, whereas it could cause issues if I don't.


Thanks for the input!
I'll keep you all updated.
Title: Re: New Joystick and/or game pad
Post by: Bryce on 13:48, 25 January 19
Yup, the /COM signal pulls low, but all 8-bit joysticks use a pull to ground to actuate a signal.


Bryce.
Title: Re: New Joystick and/or game pad
Post by: TotO on 13:50, 25 January 19
Exatly. The CPC joysticks are no more than a result of connecting two matrix lines as the keyboards keys.
Title: Re: New Joystick and/or game pad
Post by: ikonsgr on 15:09, 25 January 19

 (ikonsgr you say they're actually pulled high every 1/50th of a second?)


Well, actually it's the opposite, Com signal stays high=5v, and every 0.02seconds is pulled low (for a very short period of time, i think it's less than 1msec, i've test it with a salae logic analyzer in the past) Only then the joy port is readed by amstrad.
This actually means that com signal is almost always at 5V high state, but unfortunately current it's too weak to do anyhting at all with it. I'm saying this, in case you thought of using com signal as alternative power supply for an autofire circuit (using a small signal diode and a capacitor), i've already tried that and i ti didnt work... ::)
Title: Re: New Joystick and/or game pad
Post by: Bryce on 15:48, 25 January 19
The 5V signal on COM is max 250µA. It would take ages to charge any decent sized capacitor with that and any load would discharge it almost instantly.

Bryce.
 
Title: Re: New Joystick and/or game pad
Post by: geebus on 18:29, 25 January 19
The 5V signal on COM is max 250µA. It would take ages to charge any decent sized capacitor with that and any load would discharge it almost instantly.

Bryce.


Ok, so no capacitors if it's an amstrad only controller? or i WILL end up with some issues?
i'm so confused  :-\
Title: Re: New Joystick and/or game pad
Post by: Bryce on 15:06, 26 January 19
Not quite. To clear things up:

Adding the capacitors won't help reduce bounce, but they also shouldn't cause any problems either.

But I have to ask. What computer have you ever had switch bounce problems with? Or are you just transferring wisedoms from Arduino people? There should be no reason why an 8-bit computer would ever have switch bounce issues.


Bryce.
Title: Re: New Joystick and/or game pad
Post by: geebus on 16:36, 26 January 19
But I have to ask. What computer have you ever had switch bounce problems with? Or are you just transferring wisedoms from Arduino people? There should be no reason why an 8-bit computer would ever have switch bounce issues.
It was more something that I learned from watching Ben Eater making his 8 bit breadboard computer.
Title: Re: New Joystick and/or game pad
Post by: Bryce on 16:47, 26 January 19
I don't know that project, but his particular design may require debouncing depending how the inputs are being handled.

Bryce.
Title: Re: New Joystick and/or game pad
Post by: geebus on 18:58, 26 January 19
Just soldered the wires in and my controller works great. Just got an amazing score on 1943!
Thanks for the help everyone!
I'm gonna make another blog post about this on my website soon and i'll share it so others can see whats gone on if they want to make their own controller.
I'll then make some changes when people look at it and notice things that I didn't.
Title: New Joystick and/or game pad
Post by: KANDYMAN-IAC on 19:21, 26 January 19
I did this exact thing over the Christmas period.

Started with a crummy plastic fake db9 controller. Getting inside revealed only 4 wires used. I turfed the pcb. Got out some breadboard and tact switches and made this.


I wired it as 3 button but don’t seem to be getting 3rd button response in basic.

(https://uploads.tapatalk-cdn.com/20190126/9939a7db871e66823a67e96b791d996d.jpg)(https://uploads.tapatalk-cdn.com/20190126/01f3ca0bf37fba8383b2d6f814d63223.jpg)(https://uploads.tapatalk-cdn.com/20190126/cbf72ad86e41753d58223143e132acd1.jpg)


Sent from my iPhone using Tapatalk
Title: Re: New Joystick and/or game pad
Post by: KANDYMAN-IAC on 19:24, 26 January 19
Rough and ready prototype, but works a treat.

(https://uploads.tapatalk-cdn.com/20190126/4e96750667a79137a16f2e42f787ad25.jpg)(https://uploads.tapatalk-cdn.com/20190126/4dff8a78ae18fac28bc88a0ff0454466.jpg)


Sent from my iPhone using Tapatalk
Title: Re: New Joystick and/or game pad
Post by: geebus on 19:30, 26 January 19
If anyone wants to read up on what i've made so far, Here's a link to a blog i'm making (making the entire CMS).http://gee-k.net/subpage.php?id=2&Subnav=36 (http://gee-k.net/subpage.php?id=2&Subnav=36)
Title: Re: New Joystick and/or game pad
Post by: Tolkin on 23:21, 28 January 19
Hy, nice Project,
how is the feeling of the Switches? I wonder if these "miniSwitches" feel good at Playing.


I made a few Gamepads using "Sega Saturn" Style Gamepads which are very cheap here in Germany at Amazon: Saturn Style PC Pad (https://www.amazon.de/Classic-Gamepad-Controller-Verdrahtete-William-Lee/dp/B07LCP77ZX/ref=sr_1_6?ie=UTF8&qid=1548709436&sr=8-6&keywords=saturn+gamepad) (Black for the Old Gen CPC, and grey for the Plus :)
I take the 9Pin Cables from old cheap faulty Joysticks or very cheap Mega Drive Gamepads or extension Cables (About 5€ p.P.)
I always connected 3 Firebuttons, and the Up Button (for Jump) on the Buttons of the Gamepad.
These are working very well, and feel nearly like a normal Saturn Pad. :)


For a Joystick i take a more expensive Hori Fighting Stick mini  (https://www.amazon.de/PS4-Fighting-Stick-Mini-PlayStation-Schwarz/dp/B019MMN94A/ref=sr_1_1?ie=UTF8&qid=1548710310&sr=8-1&keywords=hori+fighting+stick+mini)and pull out the USB Cable and solder a 9Pin Cable on it. The Buttons are good like on the old Dreamcast ArcadeBoards. Same as the Stick.
They where on Amazon under 30€ last November.
Same here one Jump (UP) and three FireButtons. But the Board have a Switch (used orginal for ps3/ps4 switching), so i used ist for deactivating Fire 2, to use the stick on normal Atari 9Pin Style Computers.


Bye
Tolkin



Title: Re: New Joystick and/or game pad
Post by: geebus on 01:54, 29 January 19
The buttons feel surprisingly good. A good click to them, which I like. It has made playing games so much better.Once I have a proper one finished I'll get some pcb's made by a local company and possibly 3d print some cases for them. Not sure what to do for the buttons quite yet. I might just machine them from plastic.
Title: Re: New Joystick and/or game pad
Post by: TotO on 12:56, 29 January 19
Here a setting made exactly 3 years ago (01/29/2016) to build custom controllers using SNES based layout for the CPC with two embedded ICs for the MultiPlay expansion board:
Note: If used on PLUS/GX, this design allow to continue to have a logical layout without the "C" input (SPARE/FIRE3 pin 5).

Code: [Select]
DIRECTIONS ENCODING

  LUDR
0 ---- = -
1 ---R = RIGHT        = 00001000 = &08
2 --D- = DOWN         = 00000010 = &02
3 --DR = -
4 -U-- = UP           = 00000001 = &01
5 -U-R = -
6 -UD- = START        = 00000011 = &03
7 -UDR = -
8 L--- = LEFT         = 00000100 = &04
9 L--R = SELECT       = 00001100 = &0B

BUTTONS ENCODING

  321
0 --- = -
1 --1 = A             = 00010000 = &10
2 -2- = B             = 00100000 = &20
3 -21 = -
4 3-- = X  (C)        = 01000000 = &40
5 3-1 = RT (A+C)      = 01010000 = &50
6 32- = LT (B+C)      = 01100000 = &60
7 321 = Y  (A+B+C)    = 01110000 = &70

May be it can help for your design. (you should add a lithium battery to power the ICs... if used on the joystick port)
Some 5$ controllers shells on eBay will do the job with a new PCB... Just require to replace the USB cable by the good one! ;) 

(http://totoonthemoon.free.fr/images/cpc/CPCPAD.jpg)


Now... The 6 buttons MD/SAT controllers are nice for using A, B, C as standard fire and X, Y, Z as auto-fire!  ;D


(http://totoonthemoon.free.fr/images/cpc/AUTOPAD.jpg)
Title: Re: New Joystick and/or game pad
Post by: geebus on 19:19, 04 February 19
Thanks for the help so far folks. I've made up a schematic and drawn up my PCB to get a couple ordered.
Before I do however, On my prototype board I linked the two com ports so that if a y splitter was used the controller would work as player 1 or player 2. Is this the usual way of doing things? I don't think the joystick that I have does this. As, If you plug it in without a y splitter, it fires out the signals for both player 1 and player 2. Doesn't seem to cause any trouble when playing games though. But I've never played a simultaneous 2 player CPC game before.. Do they exist?
Title: Re: New Joystick and/or game pad
Post by: geebus on 23:41, 04 February 19
Nevermind, I looked at how the splitters work. I'll rectify my schematic etc.
Title: Re: New Joystick and/or game pad
Post by: geebus on 21:59, 23 February 19
Hi all, After my prototype worked fine I thought i'd make some PCB's. I got 10 of them through the post today and I soldered the switches and wires in on one of them. I will change the wires from being soldered directly to the board to some pins with connectors on the wires I think.
Next thing I need to do is make a case for these babies!
Not sure what way to go. I was thinking of 3d printing them, but I'm not sure how the quality would be with that.I need to put some cable relief in the case somehow so the wires don't accidentally get pulled out.

If you want to read more about it I made another post on my blog:https://gee-k.net/article.php?id=44 (https://gee-k.net/article.php?id=44)
Sorry for the shameless self promotion.
Title: Re: New Joystick and/or game pad
Post by: geebus on 14:46, 29 March 19
Hi folks.Almost completed a fully functioning joypad.I'm gonna upload all the .stl files and schematics etc at some point (To my own website and possibly the wiki pages in the DIY?)
I want to make the fire buttons a bit bigger. 10mm instead of the current 8mm. Not sure why I went with 8mm! They just don't feel so good at that size.
Title: Re: New Joystick and/or game pad
Post by: geebus on 11:51, 17 April 19

Made another controller in blue, with slightly larger buttons then had a little play the other day and thought it could be better. More ergonomic! So I made a wee surround that makes it a little better to hold.
I'm printing out another one as I write. Thought you all might like a peek!
(http://www.gee-k.net/uploads/Gee/2019-04-14-22.41.49.jpg)

It works pretty good. So when the second controller is completed (should have the last part printed by the time I get home), I'd like to have a play of 1943 with another.

Yesterday I toke delivery of my splitter PCB's and soldered one up. I tried it out last night with some really odd results.
The two controllers that I currently have both work fine when plugged straight into the 464 (as controller 1). If I use the splitter, the fire 1 (Z) works but none of the rest work correctly. If I hold the Z button down, then left works and then down and right are reversed. I'm getting nothing from either up or X. This is the same for port 2 but with the relevant port two outputs.
I'm wondering if the cheap diodes I bought from China have the cathode side marked wrong and they should in fact be the opposite way around? Or if (more likely!) I've no understanding of the way the diode should go haha!
Title: Re: New Joystick and/or game pad
Post by: geebus on 12:13, 17 April 19
I thought i'd add an image of the splitter PCB's to see if anyone can see just by looking at it what is going on..
(http://www.gee-k.net/uploads/Gee/IMG_20190416_184339572.jpg)
Title: Re: New Joystick and/or game pad
Post by: geebus on 15:59, 19 April 19
Got my splitters working fine now. Found the issue. Was just me being a pillock!
Need to design a case for it and print them out now.