Bring A Modern Mouse To An Atari ST

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.

35 thoughts on “Bring A Modern Mouse To An Atari ST

    1. 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.

          1. 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.

      1. LOL haven’t heard that kind of sentences for a LONG time… :-)
        Who still remembers the “Anti Atari Song” and the subsequent replies?


        Bonus: The “Anti PC Song” to unite both sides against a common enemy…

  1. 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.

    1. 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.

  2. 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.

    1. 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…

      1. 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

        1. 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!!!!!

          1. Keyboard (+reset) is possible with new switch board:

            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.

          2. 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 :)

  3. 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)

  4. 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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s