Page 1 of 1

Atari ST/AMIGA mouse on SEGA?

Posted: Sat Jun 17, 2017 11:45 am
by Matej
Sega Mouse is rare. So what about using Atari ST or AMIGA mouse instead of SEGA?
Simply by using simple driver in game / software?
There are also som reductions for AMIGA/ST:
For using standard PC PS/2 or USB mouse...

I can imagine Arkanoid game or shooter game or paint program...

Re: Atari ST/AMIGA mouse on SEGA?

Posted: Sat Jun 17, 2017 12:37 pm
by TmEE co.(TM)
Pinouts differ (VCC is in a totally different place), with a small modification those things could be used. No idea how hostile the protocol is, it might be better idea to just make your own adaptor and have existing Sega mice compatibility there, far more useful for most people I imagine.

Re: Atari ST/AMIGA mouse on SEGA?

Posted: Sat Jun 17, 2017 5:54 pm
by Matej
Here are some open source adapters:
USB-ps2 -> amiga mouse ... miga-maus/
SERIAL -> amiga mouse

I am no HW coder. Can someone adapt it to SEGA MOUSE protocol???

Charles MacDonalds doc on the Genesis IO, where you find this:

Sega Mega Mouse

This is a three button mouse (left, middle, right) with an extra button (Start) located near the thumb position. It uses a PIC16C54
microcontroller which manages the buttons and position tracking.
The Sega Mega Mouse that is distributed in North America is incompatible with the European version of Populous 2. The mouse
functions normally but has Y axis inverted so up is down and vice-versa. It may have been designed for the Japanese Mega Drive
mouse, which is a different product with 2 buttons and unique physical appearance.
The protocol works as follows: TH and TR are outputs which tell the microcontroller to stop or start a data transfer, and to
acknowledge received data. TL is an input which returns a busy flag for the microcontroller. D3-D0 are inputs that return the data.

Here's a table showing the communication process:
Write TH TR TL D3 D2 D1 D0 Description
$60 1 1 1 0 0 0 0 Request data
$20 0 1 1 0 0 0 0 ID #0 ($0)
$00 0 0 1 1 0 1 1 ID #1 ($B)
$20 0 1 0 1 1 1 1 ID #2 ($F)
$00 0 0 1 1 1 1 1 ID #3 ($F)
$20 0 1 0 Y Over X Over Y Sign X Sign Axis sign and overflow
$00 0 0 1 Start Middle Right Left Button state
$20 0 1 0 X7 X6 X5 X4 X axis MSN
$00 0 0 1 X3 X2 X1 X0 X axis LSN
$20 0 1 0 Y7 Y6 Y5 Y4 Y axis MSN
$00 0 0 1 Y3 Y2 Y1 Y0 Y axis LSN

Write #$60 when you are done polling to stop the data transfer. If you continue to poll the mouse after collecting all the data by
writing $20 / $00, the Y axis LSN will always be returned. Sega advises polling beyond this point will make the mouse behave
abnormally. It's possible that the PIC code in some versions of the Mega Mouse may have problems if the poll sequence is too
The X/Y overflow flags are supposed to be set if the mouse is moved over a distance greater than can be measured. I can't get
them to become set, maybe the mouse supports a fairly wide range of movement.
You need a considerable delay between writing new values to TH/TR. I think the intention is to poll TL until the microcontroller
returns 'not busy', but I can't get this to work reliably. Sega's mouse reading code also has a timeout when checking TL which
would indicate it may get stuck in a certain state.
All buttons (start, left, middle, right) are active-high logic, so they return '1' when pressed and '0' when released.

Re: Atari ST/AMIGA mouse on SEGA?

Posted: Tue Jun 20, 2017 5:04 am
by Mask of Destiny
The Amiga mouse interface is very low level and depends on there being some hardware to do pulse counting. The Amiga counters can count pulses in a range of -128 to 127 and the hardware reference manual warns that "Fast-action games may need to read the mouse register twice per frame to prevent counter overrun". Even if we take 128 as a hard max, since the pulses are quadrature encoded, you would need to poll the port a minimum of 512 times per frame and possibly a good more times than that for truly consistent results.

An adapter could be made with a microcontroller, but if you're going to go that route I think you're better off going from PS/2 or even USB. That said, the US version of the Sega mouse seems to be relatively plentiful on ebay and doesn't seem to be terribly expensive (20 USD for "Buy It Now").

Re: Atari ST/AMIGA mouse on SEGA?

Posted: Tue Jun 20, 2017 10:50 am
by KanedaFr
I remember I was looking for something similar, when I realized (not US) mouse price was just pure nightmare.

I planned to adapt this : ... msx?page=0
which is clearly something not that hard to do...I just lacked of time (as usual) and was waiting for a real reason to do it.
My only problem is the correctly handle the ID part (so the genny knows it's a mouse connector on port X)

If someone wants to try.... ;)

Re: Atari ST/AMIGA mouse on SEGA?

Posted: Wed Jun 21, 2017 10:23 am
by Sik
Yikes that Amiga protocol.

And yeah, and that point, if you aren't going with the original thing then let's just make an adapter for an USB mouse. Do you really want to deal with cleaning the ball from an old non-optical mouse? =P (especially once it gets so dirty that the dirt is deep inside the mouse mechanism and nearly impossible to clean short of disassembling the whole thing)

The biggest problem is that most modern mouses have three buttons but the Mega Mouse has four. No idea if there's anything making any real use of the fourth button (or even the third, since the Sega Mouse has two buttons so why would you bother programming the third button?).

Re: Atari ST/AMIGA mouse on SEGA?

Posted: Wed Jun 21, 2017 11:00 am
by TmEE co.(TM)
You got 3 buttons and a scroll wheel on vast majority of modern mice. The scroll wheel can be the 4th button.

Re: Atari ST/AMIGA mouse on SEGA?

Posted: Wed Jun 21, 2017 7:24 pm
by Natsumi
Also gaming mice with way more than 4 buttons are actually fairly cheap nowadays. Sure, you are getting a shit mouse, but its not like you can use it to its full potential on a system thats almost 30 years old... :P