Wireless joystick

For experts to discuss very technical stuff and newbies to ask why the Spectrum they bought off ebay doesn't work.
Post Reply
User avatar
patters
Manic Miner
Posts: 471
Joined: Thu Apr 11, 2019 1:06 am

Wireless joystick

Post by patters »

I have quite a few retro systems and recently I bought the excellent RetroBit officially licensed Sega Saturn wireless controller. I have tried a few different gamepads with the Spectrum and I find the Sega Megadrive gamepad to be the best (fewest accidental direction inputs, and most consistent diagonals). RetroBit also make a wireless version of the Megadrive pad with a wireless dongle that's powered from the 9 pin controller port.

So the question, before I consider buying one of these specifically for the Speccy, is will a Kempston port provide sufficient power for something like this or would I risk damaging the Spectrum?
User avatar
1024MAK
Bugaboo
Posts: 3125
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Wireless joystick

Post by 1024MAK »

Most joystick interfaces from the 1980s (including Kempston types) don’t provide any power supply output on the 9 way D connector... Worse, some early interfaces used the opposite polarity on their inputs. So none of these will work with anything other than directly connected joysticks that use only direction/fire button switches.

A +5V supply on joystick interfaces only appeared when the manufacturers added support for autofire joysticks.

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
User avatar
patters
Manic Miner
Posts: 471
Joined: Thu Apr 11, 2019 1:06 am

Re: Wireless joystick

Post by patters »

Thanks for the info. I guess that's the end of that idea then :lol:
User avatar
1024MAK
Bugaboo
Posts: 3125
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Wireless joystick

Post by 1024MAK »

Modern Kempston compatible joystick interfaces should be okay, if that helps. E.g. from ByteDelight.

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
User avatar
patters
Manic Miner
Posts: 471
Joined: Thu Apr 11, 2019 1:06 am

Re: Wireless joystick

Post by patters »

Ah, would the DivMMC Future be included in that category? Is there risk of pulling too much with an RF dongle?
User avatar
1024MAK
Bugaboo
Posts: 3125
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Wireless joystick

Post by 1024MAK »

To be sure, it’s best to ask the seller. I don’t have one, so can’t give you an answer.

It’s further complicated by some interfaces using a resistor to limit the current in case a game pad/controller is used and one of the extra buttons is pressed. The amount of power used by an autofire joystick is okay, but the power required for a wireless system may be rather more.

The Atari joystick ports were treated as a standard by most home computer manufacturers, but not by all. And some the console manufacturers, but others changed what pins they used. So it’s a bit of a mess :(

Mark
Last edited by 1024MAK on Tue Oct 06, 2020 2:48 pm, edited 1 time in total.
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
User avatar
Ersh
Manic Miner
Posts: 480
Joined: Mon Nov 13, 2017 1:06 pm

Re: Wireless joystick

Post by Ersh »

While on the topic of Mega Drive controllers. As they deviate a bit from the Atari joystick port standard, I would like to know if they are safe to use with the Spectrum and a Kempston interface? I use a 64JPX with my SEGA pads when connecting to my C64 to avoid blowing the CIA.

Quote from https://www.c64-wiki.com/wiki/64JPX :
While some game controllers, notably the Sega Master System and Sega Genesis, are physically compatible with the C64 at the connector formfactor and pin level they are not fully electrically compatible. Depressing a button on a Sega controller connected to the C64 while also depressing a key on the keyboard exposes the C64's CIA chip to voltages it was not designed to handle making damage or failure likely.

This is because joysticks (which the game ports were intended to support) either pull the lines low (when active) or are an open connection (when inactive). This latter condition allows the lines to be pulled low by other sources (they keyboard for example). Sega gamepads, on the other hand, pull inactive lines HIGH. Now if you press a key on the keyboard with one of these devices plugged in, one source is pulling the line high while another I/O line (cross-connected through the keyboard) is trying to drag it down. This can put an extra strain on the CIA chip, as the circuit wasn't designed to deal with this kind of situation.
User avatar
1024MAK
Bugaboo
Posts: 3125
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Wireless joystick

Post by 1024MAK »

Unfortunately both official Kempston joystick interfaces from the actual Kempston company and various compatible interfaces are not internally all the same. Just like the C64, they were designed for joysticks that only have mechanical switches inside. So the internal circuitry differs widely. Some are fine to use with game pads, but others are not. And a lay person who is not able to work out how the circuitry works can’t easily tell.

The modern Kempston compatible interfaces are often compatible with game pads. And more importantly, there is normally someone to ask if it is not clear in the instructions or advert.

If you have an interface from the 1980s, and are willing to show me some photos of both the outside, and the inside (both sides of the board), that may be enough information for me to work it out.

But I obviously I can’t check every interface in existence (there must be over fifteen variations/types).

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
User avatar
Ersh
Manic Miner
Posts: 480
Joined: Mon Nov 13, 2017 1:06 pm

Re: Wireless joystick

Post by Ersh »

Thanks, good to know! If using a modern interface one could always double check with the manufacturer, like you said.
User avatar
iadvd
Dizzy
Posts: 91
Joined: Wed Apr 24, 2019 9:06 am
Contact:

Re: Wireless joystick

Post by iadvd »

Dear all, I am working since some months ago (now is Nov 2020) on a wireless RF Kempston-compatible pad prototype. :)

I have made so far 2 prototypes, the second one (bigger box) is able to send correctly any combination of directions + fire button. As it has been mentioned in the former posts it requires +5V at pin7 (for instance ByteDelight's Kempston interface has a jumper to do so). It goes very smooth without delays, very accurate. The materials are very basic but highly efficient.

My intention is preparing a third prototype this year, this one independent of the Kempston +5V signal (the purpose as it was said is the autofire option). I am going to add a battery circuit to my solution, so it is standalone. That would be the third version of the prototype. My target is a total cost of around 20 euros (material+manufacturing time). I will post here my next steps... :)

Image

Image
Furillo Productions' games can be downloaded here:
https://furilloproductions.itch.io/
User avatar
Turtle_Quality
Manic Miner
Posts: 506
Joined: Fri Dec 07, 2018 10:19 pm

Re: Wireless joystick

Post by Turtle_Quality »

Hmmm... there's something fishy about that Spectrum.

Those controllers look nice though ! I'm only using emulators these days, but I might take 1 or 2 when these reach production as many bluetooth controllers have too many buttons / options and these should be just plug & play
Definition of loop : see loop
User avatar
iadvd
Dizzy
Posts: 91
Joined: Wed Apr 24, 2019 9:06 am
Contact:

Re: Wireless joystick

Post by iadvd »

Very fishy indeed!! :D

The joystick pad works like a charm, but right now is dependent on those +5V... I would like to get rid of it.
I will be back with the third prototype... if it works I wonder if it might be possible to make a Verkami-esque project, but still is too soon to know.
Turtle_Quality wrote: Fri Nov 13, 2020 8:17 am Hmmm... there's something fishy about that Spectrum.

Those controllers look nice though ! I'm only using emulators these days, but I might take 1 or 2 when these reach production as many bluetooth controllers have too many buttons / options and these should be just plug & play
Furillo Productions' games can be downloaded here:
https://furilloproductions.itch.io/
User avatar
iadvd
Dizzy
Posts: 91
Joined: Wed Apr 24, 2019 9:06 am
Contact:

Re: Wireless joystick

Post by iadvd »

[mention]Turtle_Quality[/mention] here is prototype 3, I managed to make it independent of having +5v at the pin 7 (autofire) of the Kempston compatible interface. :)

So now, it's (except rarities) expected to work with any joystick interface following the Kempston/Atari standard. Basically I was able to add a battery to the circuit and the solution is still around 20 euros. And solder-less. The case is not the final one, will be smaller and compact.

There are two possible colors (there is also a nice blue pad but is quite expensive). The case is not the final one, will be smaller. Next steps:

1) Beautify
2) Stress test
3) Reduce costs
4) Calculate costs of doing this from Spain/Europe (now I calculate from Japan).
5) Beta testers
6) Finally, a Verkami project if people is interested.

The main positive points of the joystick/pad are
1) Speed (there is no delay at all)
2) Sends two fire button to the Kempston interface
3) Cost effective
4) Compact, light and small

I'll be back when I receive the final case. That one will be smaller and compact. :)

Image

Image

Image
Furillo Productions' games can be downloaded here:
https://furilloproductions.itch.io/
User avatar
flatduckrecords
Manic Miner
Posts: 792
Joined: Thu May 07, 2020 11:47 am
Location: Oban, Scotland
Contact:

Re: Wireless joystick

Post by flatduckrecords »

Nice work, [mention]iadvd[/mention] !
iadvd wrote: Thu Dec 03, 2020 5:01 amI managed to make it independent of having +5v at the pin 7 (autofire) of the Kempston compatible interface. :)
I did some experimenting with a RetroBit MegaDrive Bluetooth receiver and a DivMMC Future. I was worried about stressing the interface (or the Spectrum itself) as mentioned above, so I used the +5v from a Raspberry Pi (since it was handy anyway) rather than pulling it from Pin 7 (though the DivMMC does seem to provide it) and redirecting it to Pin 5 on the dongle.

This worked, but it left me wondering whether it's electronically safe to connect the two systems' GND references in that way? (I.e. GND on the dongle is connected to Pin 8 of the Kempston interface (to be able to bring the control pins low) and also connected to the GPIO GND pin on the Raspberry Pi (or indeed a simple battery) to complete the +5v circuit).

Does it matter if the "+5v" reference of the control pins is different to the actual +5v that's powering the Bluetooth? (I don't understand the fundamentals enough to know if it's an issue, or whether the dongle's circuity is designed to handle it!) Could it lead to excess current-draw on the control pins, for example?

Anyway, this soon lead me to realising how few Spectrum games can be controlled purely from the joystick. It's all very well getting settled on the sofa enjoying some wireless blasting only to have to get up to press the spacebar to load the next level… so don't get too comfy!

Image

Image
User avatar
1024MAK
Bugaboo
Posts: 3125
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Wireless joystick

Post by 1024MAK »

The joystick interface pin out is:
Pin 1 - Up
Pin 2 - Down
Pin 3 - Left
Pin 4 - Right
Pin 5 - N/C or extra Fire
Pin 6 - Fire
Pin 7 - +5 volts power
Pin 8 - 0V/GND/Ground
Pin 9 - N/C or extra Fire

On later Kempston compatible interfaces, the signals on the pins is as above. Not all provide a +5V supply on pin 7.
However some of the earlier Kempston compatible interfaces don’t have pin 8 (which is the common for the direction and fire button switches) as 0V/GND/Ground. Instead although they still use pin 8 as a common, it is a +5V voltage pin (but not a supply pin) and there is no 0V/GND/Ground connection to the interface. For simple mechanical switched joysticks, this is not a problem. But it is a problem if you want to connect any electronic circuitry to such an interface.

If you have a multimeter, it is a very easy test. Connect the positive/red lead to pin 1 and the negative/black lead to pin 8 and check that you get a positive voltage. This then confirms that pin 8 is indeed 0V/GND/Ground.

If pin 8 is 0V/GND/Ground then there is no problem connecting another electronic device to the interface, even if it uses another power supply. I do however strongly recommend that such a PSU is double insulated and that it’s output is not connected to mains earth/ground.

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
User avatar
flatduckrecords
Manic Miner
Posts: 792
Joined: Thu May 07, 2020 11:47 am
Location: Oban, Scotland
Contact:

Re: Wireless joystick

Post by flatduckrecords »

1024MAK wrote: Thu Dec 03, 2020 12:02 pmIf pin 8 is 0V/GND/Ground then there is no problem connecting another electronic device to the interface, even if it uses another power supply. I do however strongly recommend that such a PSU is double insulated and that it’s output is not connected to mains earth/ground.
Thanks [mention]1024MAK[/mention], that’s really helpful. I believe that is the case with the DivMMC future but I’d assumed it was true of all Kempston “standard” interfaces. I also have a PowerPlay interface from the 80s but now I’ll be sure to probe it with a multimeter before trying it!

I do really like the recreated Saturn pad mentioned by [mention]patters[/mention] in the original post, but for the moment I’ve gone back to a good old clicky microswitched joystick.
User avatar
iadvd
Dizzy
Posts: 91
Joined: Wed Apr 24, 2019 9:06 am
Contact:

Re: Wireless joystick

Post by iadvd »

[mention]flatduckrecords[/mention] Sorry I did not have time to answer properly yesterday. I have read all your answers. You test is also very interesting. Regarding the GND, I was lucky to find a question at the Electrical Engineering Stack Exchange https://electronics.stackexchange.com/q ... d-togheter explaining the pros and cons of using a common GND for both circuits. Initially looked safe for my specific case, so I went ahead and it worked like a charm.

I am going to reply also to @1024MAK for his very valuable comment. That information is gold.
Cheers! :)
flatduckrecords wrote: Thu Dec 03, 2020 7:14 pm
1024MAK wrote: Thu Dec 03, 2020 12:02 pmIf pin 8 is 0V/GND/Ground then there is no problem connecting another electronic device to the interface, even if it uses another power supply. I do however strongly recommend that such a PSU is double insulated and that it’s output is not connected to mains earth/ground.
Thanks @1024MAK, that’s really helpful. I believe that is the case with the DivMMC future but I’d assumed it was true of all Kempston “standard” interfaces. I also have a PowerPlay interface from the 80s but now I’ll be sure to probe it with a multimeter before trying it!

I do really like the recreated Saturn pad mentioned by @patters in the original post, but for the moment I’ve gone back to a good old clicky microswitched joystick.
Furillo Productions' games can be downloaded here:
https://furilloproductions.itch.io/
User avatar
iadvd
Dizzy
Posts: 91
Joined: Wed Apr 24, 2019 9:06 am
Contact:

Re: Wireless joystick

Post by iadvd »

[mention]1024MAK[/mention] Hi, thank you very much for your answer, it is really mind-blowing! :) So initially there were versions of the Kempston interface without the pin 8 GND? It is the first time I hear about it! (I was looking any information about the interface at Internet, but I did not found nothing about this initial setup). So those are the "rarities" I mentioned in my comment, but I was not aware of. Then my solution is almost 100% compatible except for those old versions of the interface that do not comply totally with the Atari pin out (but I assume it as an expected consequence, because they are not 100% Atari compatible indeed).

Cheers and again thank you for this information. :)
1024MAK wrote: Thu Dec 03, 2020 12:02 pm However some of the earlier Kempston compatible interfaces don’t have pin 8 (which is the common for the direction and fire button switches) as 0V/GND/Ground. Instead although they still use pin 7 as a common, it is a +5V voltage pin (but not a supply pin) and there is no 0V/GND/Ground connection to the interface. For simple mechanical switched joysticks, this is not a problem. But it is a problem if you want to connect any electronic circuitry to such an interface.

If you have a multimeter, it is a very easy test. Connect the positive/red lead to pin 1 and the negative/black lead to pin 8 and check that you get a positive voltage. This then confirms that pin 8 is indeed 0V/GND/Ground.

If pin 8 is 0V/GND/Ground then there is no problem connecting another electronic device to the interface, even if it uses another power supply. I do however strongly recommend that such a PSU is double insulated and that it’s output is not connected to mains earth/ground.

Mark
Furillo Productions' games can be downloaded here:
https://furilloproductions.itch.io/
User avatar
1024MAK
Bugaboo
Posts: 3125
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Wireless joystick

Post by 1024MAK »

No, pin 8 is still used. So any digital switched Atari joystick will work.

Let me explain. If you read the appropriate Z80 input/output (I/O) port [IN 31 or 0x1F) for a Kempston joystick interface or a compatible joystick interface, the joystick should return these values on screen:
0 with no input
1 when held right
2 when held left
4 when held down (pulled back)
8 when held up (pushed forward)
16 when the fire button is pressed

Now with a modern interface, the input lines on pins 1, 2, 3, 4 and 6 are normally held at a logic high (one) state by the use of resistors to pull the line up (to the +5V supply voltage). The resistors limit the current flow. When the joystick is pushed in one direction or the fire button is pressed, the relevant switch contacts connect the input line to pin 8. With the modern designs, pin 8 is the 0V/GND connection. Hence the input line is now pulled to logic low (zero). Between the joystick wiring and the Z80 microprocessor, there is a buffer chip (buffer as in a chip with three state outputs, nothing to do with storing data). In the modern interfaces, this buffer chip also inverts each input, so that when the output is enabled, it’s at the opposite logic signal. Hence with no user input to the joystick, all the inputs to the buffer chip are logic high, but when the Z80 microprocessor reads the I/O port, the chip sends a logic low on each of it’s output pins. So the Z80 reads a zero data byte.

However, as with a lot of things in life, there is often more than one way of designing a system. In electronic systems, non-inverting buffer chips are more common than inverting buffer chips. So the why has been lost to history and may be due to what the designer had to hand, or it may have been a cost factor. But I can tell you the how. To use a non-inverting buffer chip, all that is needed is to arrange for its inputs to be normally low when there is no user input to the joystick. So resistors are used to pull the buffer chip inputs towards 0V. If you now feed +5V to the joystick common pin, that is pin 8, when the user operates the joystick or pushes the fire button, the switch contacts will connect the +5V (on pin 8) to the relevant buffer chip input. The Z80 microprocessor will then read a logic high/one on that data line. Hence to software, it works exactly the same. And in the 1980s the only digital joysticks that were available were the switch type (regardless of the actual mechanism or switch technology/type), there were no problems. As a user, you could not tell the difference.

This was until a new feature appeared on the market, joysticks with autofire. These used some electronics to provide this function. But transistors and integrated circuits (chips) only work with the correct polarity. Hence they needed pin 8 to be a 0V/GND connection in order to work... Hence the interface manufacturers quietly dropped the type that used non-inverting buffers.

But of course, many joystick interfaces of the earlier type were made, so lots still exist. And without model numbers, the only way to tell is to either do the simple test, or to open the case and check the part numbers of the chip(s).

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
User avatar
patters
Manic Miner
Posts: 471
Joined: Thu Apr 11, 2019 1:06 am

Re: Wireless joystick

Post by patters »

So am I right in thinking the consensus is that the RetroBit dongle for an RF Saturn joypad should work with a DivMMC Future?
User avatar
iadvd
Dizzy
Posts: 91
Joined: Wed Apr 24, 2019 9:06 am
Contact:

Re: Wireless joystick

Post by iadvd »

[mention]1024MAK[/mention] thanks for your explanation. Finally I decided to focus on well known interfaces, so instead of making a generic wireless toypad I am focusing on a [wireless Kempston + compatible Kempston interface] solution. I named it "Wireless Kempston toypad". I was able to prepare two successful versions. The one I am showing today is the internal one. Is a ZX Spectrum refurbished, so I am using the internal space freed near the I/O port to add the RC receiver. It works perfectly.

Image

External soft case and two internal small soft bags for both the Speccy and the wireless toypad and video cable.

Image

I have selected a bluish color for both the Speccy case and the wireless toypad. The receiver of the toypad is inside the case.

Image

The Kempston interface can be anyone as far as it gives +5v through the interface. In my case I am using a Kempston small and nice interface made by ByteDelight.

Image

The cable comes from the toypad wireless receiver. It is connected to the Kempston interface. The Speccy is refurbished (9v to 5v converter is new, the metallic plate cooler is not required) and there is enough internal space.

Image

Here a view without the Kempston interface. There is enough space to remove and put any I/O peripheral in the socket.

Image

I added this same info at my Twitter account plus a small video using it. Here is the link just in case:

https://twitter.com/FurilloProduct1/sta ... 4190840837

I have also prepared the external solution, I finally found a good small case that fits perfectly. I will post here as soon as I have some time to make the pics. Cheers! :)
1024MAK wrote: Fri Dec 04, 2020 8:37 am No, pin 8 is still used. So any digital switched Atari joystick will work.

...
But of course, many joystick interfaces of the earlier type were made, so lots still exist. And without model numbers, the only way to tell is to either do the simple test, or to open the case and check the part numbers of the chip(s).

Mark
Furillo Productions' games can be downloaded here:
https://furilloproductions.itch.io/
User avatar
patters
Manic Miner
Posts: 471
Joined: Thu Apr 11, 2019 1:06 am

Re: Wireless joystick

Post by patters »

patters wrote: Mon Dec 07, 2020 1:08 am So am I right in thinking the consensus is that the RetroBit dongle for an RF Saturn joypad should work with a DivMMC Future?
I went ahead with a frivolous purchase... and I can confirm that this does indeed work! 8-)

Image

These controllers are great because Retro-Bit licenced the actual Sega designs - they're not clones, they're proper reproductions. I use the Sega Saturn pad because:
  • it has a superior directional pad than the Megadrive one with a loose rocking action that remains accurate
  • I had one already for my actual Saturn console
There are two versions of each Retro-Bit reproduction pad available:
  • RF - lowest latency apparently, which come with a receiver dongle for the target system, and a USB receiver dongle for use on a computer
  • Bluetooth - can be paired with laptops and current generation consoles without needing a dongle. These are cheaper but the dongles for target systems are sold separately
The most cost-effective way to try this would be to go with the Bluetooth option. Either buy the Bluetooth Megadrive controller, or the Bluetooth Saturn controller (both £18.49 from 365games.co.uk), and pair with the 9-pin Bluetooth receiver dongle (£13.49 from 365games.co.uk). I expect it's possible to buy the dongle on its own and use any old Bluetooth HID-compliant gamepad - e.g. a DualShock 4 pad as demonstrated by [mention]Flatduckrecords[/mention] earlier in this thread. I have only validated that the RF dongle works though, not the Bluetooth one.

Since I already owned a Retro-Bit RF Saturn pad I only needed the 9-pin RF receiver dongle. Unfortunately the only way to buy this in Europe is to buy the RF version of the Megadrive controller (£27.99 from 365games.co.uk). I'll re-sell the controller itself and its USB receiver dongle on eBay to recoup some of this cost - it would still be of value for someone that plays Megadrive titles via emulation.

If you live in the USA you are able to buy the 9-pin RF dongle separately ($12.99 at Castlemania Games). Sadly shipping costs to the UK/Europe are ridiculous, and I checked with Retro-Bit - they don't sell the RF dongles separately outside the USA, and Castlemania Games is the only stockist of them in the US.


The result of all this is pretty astounding though: to be able to pair what is widely regarded as the pinnacle of digital gamepad design, rebuilt with RF connectivity, with a home computer from 1982!

Now if only someone could hack two-button support into R-Type, to control the shield without needing a toe on the SPACE key. I know it's technically possible because Aliens Neoplasma has two-button Kemptson support.
Post Reply