Human input devices are a consumable on our computers today. They are so cheap and standardised, that when a mouse or a keyboard expires we don’t think twice, just throw it away and buy another one. It’ll work for sure with whatever computer we have, and we can keep on without pause.
On earlier machines though, we might not be so lucky. The first generation of computers with mice didn’t have USB or even PS/2 or serial, instead they had a wide variety of proprietary mouse interfaces that usually carried the quadrature signals direct from the peripheral’s rotary sensors. If you have a quadrature mouse that dies then you’re in trouble, because you won’t easily find a new one.
Fortunately there is a solution. In the intervening decades the price of computing power has fallen to the extent that you can buy a single board computer with far more than enough power to interface with a standard USB mouse and emulate a quadrature mouse all at the same time. This was exactly the solution [Andrew Armstrong] took to provide a replacement mouse for his Atari ST, he used a Raspberry Pi as both USB host and quadrature mouse emulator (YouTube link) through its GPIOs.
He’s put together a comprehensive description of his work in the video we’ve placed below the break, meanwhile if you’d like to have a go yourself you’ll find all you need to know in his GitHub repository.
This isn’t the first USB-to-quadrature emulator we’ve seen here, last year we featured another project doing the same thing for an Acorn Archimedes using an Atmel microcontroller.
Could’ve been done with an NE555.
Signetics part number, nice retro callback!
No, it couldn’t. But seriously – it COULD be done with a $5 AVR (Arduino knock-off) board. This would consume far less power, which could be an issue with powering an R-Pi from a mouse port. The mouse port would have been designed to power two LEDs and four phototransistors, not the 5 Watts that an R-Pi uses.
Note that you DON’T have to implement the USB stack because all USB mice also fall back to PS/2 mode.
I’ve got a bucket load of them here that suggest not all of them do.
There is the MAX3421ee usb host controller then have a AVR or ATtiny etc do the translation to the ST’s protocols.
It could be made to fit inside a double ended DSUB case like what’s used for null modems or 9 to 15 pin monitor adapters.
But it also should be possible to do USB low speed mode in software only since that is all you need for a mouse which would eliminate the need for the MAX3421ee.
Of course I was exeggerating. But yes, that is what tried to say. You might be even able to use an Attiny85 and fit it inside a DSUB housing
It definitely should be possible to fit it inside a small housing with a D sub on one end and a USB A on the other.
But is the Pi powerful enough to run UAE and skip the actual Amiga?
The Amiga is already skipped! For something far better. It’s an Atari!
LOL haven’t heard that kind of sentences for a LONG time… :-)
Who still remembers the “Anti Atari Song” and the subsequent replies?
https://www.youtube.com/watch?v=efn8Hz6JSIQ
https://www.youtube.com/watch?v=-5ks5ms3z4w
Bonus: The “Anti PC Song” to unite both sides against a common enemy…
https://www.youtube.com/watch?v=yIV1q0sGOQw
There are some <3$ STM32 arm china boards that could do this with less they support OTG Host and have a HID library on ST.
Really? Why the **** dont all you guys saying “u could do it with X” actually DO IT THEN and show us how clever you are? Rather than moan like a bunch of old ladies
I have a hammer so every problem looks like a nail to me. A crazy solution IMHO, the mouse doesn’t work on my computer, I know I’ll use another computer with a mouse to control my computer.
It works though. And if he spends $5 on a Ras Pi Zero, it saves him figuring out how to do Host Mode on an AVR or whatever. Why not? There’s no shortage of CPU power in the world any more. The amount of MIPS around the place is growing at some ridiculous rate. Human time and brain power is only growing slowly. So it makes sense to use supercomputer-like CPUs to run an egg timer.
It’s the “could’ve done it with a 555” logic. Yes you could but it’d have been a pain in the arse, cost the same, and taken more time. So that’s the stupid option. I suppose we could all learn the low-level stuff to do this with less, but like I say, clock cycles are abundant, time and brain power are limited.
It’s a new world for those of us who grew up with 8-bit processors, where figuring out how to squeeze an extra few bytes out made you a hero. Now it’s like being a trebuchet repairman, nobody needs them.
A – f***ing – men!
Yep, I was wrong, you guys were right. I wasn’t thinking about the fact that you needed HOST USB. This really was a good hack.
“I’ll use another computer with a mouse to control my computer” LOL
+1
It turns out that if you open a lot of older optical mice they have a chip that can even OUTPUT quadrature encoding on the pins. It needs some modification of the board and wiring but then no adapter is even needed. Also, not all the optical chips did this and they are getting rare now as the older mice are binned.
Yeah I was wondering that… Why not just take the encoder-signals of the new mouse and send them to the Atari?
You might need some sort of logic though if ticks/round are different…
I couldn’t remember what the Atari mouse port needed. I was assuming thy had some odd serial format, just as Macs for some time had ADB.
I had a Mac Plus, and it predated ADB. So the interface was raw quadrature. The Mac mouse took the signals from the optoisolators, and put them through buffers, and then to the computer. I took an orphan mouse that output RS-232 serial, opened it, and wired it to the cable, taking the outputs of the optoisolator. It worked fine, the lack of buffers didn’t affect it. It gave me a three-button mouse for the Mac, except the two extra buttons had nowhere t o connect to.
Michael
Looks like this could be used on C64 to replace a 1350 mouse?
I have made Amiga receiver for Logitech mouse/pad/keyboard. It could probably be reprogrammed to Atari.
https://www.youtube.com/watch?v=55D9hoI4nBs&list=PLbiryfyA62EBHy08fiOVNZzIhAH5l6dYc
Details, please. This is big for old Amigas and I need several desperately.
Logitech Unifying (mouse/pad/keyboard) support, nrf24l01 + ARM microcontroller, optional AutoSwitch.
CD32 pad emulation witch Logitech F710 gamepad.
http://obrazki.elektroda.pl/8656085400_1394733281.jpg
Topic on Elektroda:
http://www.elektroda.pl/rtvforum/topic2712833.html
with, no C :)
I need this too!!! That is frickin’ awesome!!! You know what would make that perfect? If keyboard translation would also be implemented AND some button on the pad could be programmed to the WHDLoad quit key. Please, please, with some extra pleases sprinkled on top. Make this available. Either to buy or build, I don’t care which, I just want it!!!!!
Keyboard (+reset) is possible with new switch board:
http://obrazki.elektroda.pl/9639376700_1485286320.jpg
Amiga standard scancodes. But KB pairing is unfinished and it’s manual for now.
WHDLoad quit key is possible with some small FW modification.
Receiver should be available to buy in a couple months.
Sweet :) I’ll keep a look out then! Please consider that ‘small FW modification’. Using a keyboard would be fine also, but to be able to start a game (using the controller as a mouse), play (as a joystick) and also quit (with the controller acting as a keyboard key) would be so cool :)
Throw…….Away…..
What is this concept when attached to electronic devices? I just don’t get it.
I can prove it, just ask my wife and look at my storage sheds.
What a waste…
There are Tom and Jerry adapters which achieve that with a pic (google tom atari st), They can be found on ebay. You can also go completely overkill and use a COSMOSEX and tap in the full power of the raspi (google ComsoSEX Jookie)
I’ve got a Jerry+, it’s great, but it only does mice that are PS/2 compatible (and I don’t think most wireless are…)
Recently did something similar for DEC mouse ports. They speak a RS232 protocol that enables both relative (mouse/trackball) and absolute (pen tablet) positioning. Using a Teensy (equally possible on an atmega arduino, maybe even attiny) I was able to emulate the DEC protocol and convert it to a normal PS/2 mouse port. Coming soon to Hackaday.io
Here it is infact: https://hackaday.io/project/19576 sourcecode hosted on bitbucket. my prototype is hacked together from a Teensy and a HP serial port voltage shifter module (common in HP desktop workstations dcXXXX for the COM2 port)