SNES Mouse acting weird

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderators: B00daW, Moderators

User avatar
Fisher
Posts: 1091
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

SNES Mouse acting weird

Post by Fisher » Thu Jun 04, 2020 6:55 pm

Hi, I've got an SNES mouse that when plugged the controller stops working.
The only button that does something is B and it works as if all the buttons were pressed at the same time (including the directionals).

I tested the cable, the diodes, the transistors and used diode test on the connections from the console and find everything OK.
If I unplug the "latch" pin from the cable the joystick works fine, but obviously the mouse doesn't.

Any ideas if that's "fixable" and what I can do to try to fix it?
Thanks in advance.

tepples
Posts: 22017
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: SNES Mouse acting weird

Post by tepples » Fri Jun 05, 2020 2:19 pm

Super NES controller port pinout (source)

Code: Select all

[ o o o o | o o o )
  1 2 3 4   5 6 7
  | | | |   | | +-- Ground
  | | | |   | +---- IOBit
  | | | |   +------ Main in sub out D1
  | | | +---------- Main in sub out D0
  | | +------------ Main out sub in (latch)
  | +-------------- Clock
  +---------------- +5V
"B does everything" means something is blocking the clock signal from getting from the CPU to the controller. Loss of clock means the controller doesn't know to change the level on its "main in sub out" signal between one read and the next. If the mouse is causing clock loss, there may be a short between clock and another pin. If you have a multimeter, check continuity on the mouse between clock and each other pin.

User avatar
Fisher
Posts: 1091
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: SNES Mouse acting weird

Post by Fisher » Fri Jun 05, 2020 6:47 pm

Well, guess I'm busted!

The pin that connects to the clock is acting very weird!!
When measured with the multmeter with the positive probe on the GND it starts reading with with 1K, then goes up slowly up to 20K.
The same happens when tested with the negative probe on Vcc.
I tried to remove the capacitor on the clock line to see if that was the problem with no luck.
That was when I noticed that the mouse's IC gets very hot, so I think it's dead. :-(

Does any kind of clone exists?
I don't think it would be easy to mimmic it with discrete logic...
Has anyone made something with a microcontroler?

Thanks for the help.

lidnariq
Posts: 9500
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: SNES Mouse acting weird

Post by lidnariq » Fri Jun 05, 2020 7:05 pm

Fisher wrote:
Fri Jun 05, 2020 6:47 pm
Has anyone made something with a microcontroler?
Mouse firmware isn't exactly complicated. There's four breakbeams sensors and two buttons inside there... I bet I could write a replacement.

Are there microcontrollers you can get easier access to? You'll need at least 12 pins (six from the mouse, three for SNES SPI, two for power)

tepples
Posts: 22017
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: SNES Mouse acting weird

Post by tepples » Fri Jun 05, 2020 7:57 pm

Hyperkin's Hyper Click mouse is a modern clone using an optical sensor. But it's like the original "Duke" controller for the Xbox in that it's made for much larger hands than the authentic Super NES Mouse.

Pokun
Posts: 1490
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: SNES Mouse acting weird

Post by Pokun » Fri Jun 05, 2020 11:54 pm

And it doesn't support all the modes that the SNES mouse has.

Why does a mouse need 4 breakbeams sensors BTW? I thought there where only one per axis for the mouse ball like on an analogue joystick.

lidnariq
Posts: 9500
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: SNES Mouse acting weird

Post by lidnariq » Sat Jun 06, 2020 12:10 am


Pokun
Posts: 1490
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: SNES Mouse acting weird

Post by Pokun » Sat Jun 06, 2020 1:51 am

Oh I see, there is only one encoding disc per axis, but each disc needs two breakbeam sensors to be able to tell in what direction it spins at. Analogue joysticks would also need this I guess.

lidnariq
Posts: 9500
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: SNES Mouse acting weird

Post by lidnariq » Sat Jun 06, 2020 10:17 am

Potentiometers have limited travel or else a dead zone; as such it's harder to use them in a device that reports arbitrary position. But they're fine in a device that reports absolute position. Most joysticks are just a potentiometer per axis and an ADC of some sort.

My understanding is that the N64 joystick was unique in that it included 18 breakbeam sensors and a 9-bit-per-axis gray code rotary encoder, effectively putting the ADC inside the joystick housing itself, but that everything else both before and since then has been a conventional potentiometer.

Vaguely bringing this back to the original topic: I learned yesterday that there was an N64 mouse, and its protocol is almost identical to the N64 controller, except that the X/Y reports are relative motion, instead of absolute angle.

User avatar
Fisher
Posts: 1091
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: SNES Mouse acting weird

Post by Fisher » Sat Jun 06, 2020 11:50 am

lidnariq wrote:
Fri Jun 05, 2020 7:05 pm
I bet I could write a replacement.
That would be awesome!
Unfortunately the only 2 candidates I've found are an Atmel AT89C51 and 2 Intel 80C31.
Not sure if they're suitable specially because they're 40 pin Dip ones.
What would you recommend?
Maybe I can try to "harvest" one or try to exchange with someone around...
tepples wrote:
Fri Jun 05, 2020 7:57 pm
Hyperkin's Hyper Click mouse is a modern clone using an optical sensor. But it's like the original "Duke" controller for the Xbox in that it's made for much larger hands than the authentic Super NES Mouse.
That would be a nice acquisition, but unfortunately not suitable for my pocket, specially in this complicated moment.

lidnariq
Posts: 9500
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: SNES Mouse acting weird

Post by lidnariq » Sat Jun 06, 2020 11:52 am

8031s don't have internal storage space for code; instead you'd have to add an external ROM. The 8951 probably will work, but can you fit a 40-pin DIP inside the mouse shell?

As far as recommendations, I'm most fluent with PICs, but honestly anything can be made to work. Just make sure you can find or make a programmer for it.

User avatar
Fisher
Posts: 1091
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: SNES Mouse acting weird

Post by Fisher » Sat Jun 06, 2020 1:59 pm

I'm really not sure if a DIP-40 would fit inside the mouse.
I found a PIC16C54-RC/P on a pretty bad PS1 motherboard.
Not sure if it works fine.
About the write process, I recently got a Genius G540, wich has this PIC on it's supported device list.
Is this one fine?

lidnariq
Posts: 9500
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: SNES Mouse acting weird

Post by lidnariq » Sat Jun 06, 2020 2:45 pm

16C54 (and all the "C" PICs) are OTP, unless there's a window. Won't be able to use that one.

User avatar
Fisher
Posts: 1091
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: SNES Mouse acting weird

Post by Fisher » Sat Jun 06, 2020 6:42 pm

Ooops!
So that's useless. :-(

I'll try to find something else or a way to put a 40 pin DIP inside the mouse.
Maybe cutting its pins it will fit, not sure.

I've found an 80C51 that looks like an original MMC3.
Not sure if I need to connect all the pins on the programmer to write to it, even less if it serves the purpose.

lidnariq
Posts: 9500
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: SNES Mouse acting weird

Post by lidnariq » Sat Jun 06, 2020 6:59 pm

I think the 8051 itself, exactly, is mask ROM only? Or maybe it's OTP? I think it could be configured to act like a 8031, which would use an external ROM for program instead. It probably depends on the specific manufacturer and exact part number.

For example, intel made both 80C51BH (with internal ROM) and 80C51GB (without ROM), but the reference I'm using is old enough that it only mentioned UVEPROM, "ROM", and ROMLESS variants.

Post Reply