Gamepad fire button depends on mouse

Problems with your machine in general.
Post Reply
russellnash
Posts: 114
Joined: Fri Mar 26, 2021 2:46 pm

Gamepad fire button depends on mouse

Post by russellnash »

Hello, I have converted a Nintendo NES controller using this guide.

https://raskulous.com/2020/02/convert-a ... ny-others/

I was always a joystick fan but I thought a gamepad would be a little easier on my less than perfect left hand. So it worked fine and it is very responsive, pleasant to use. Anyway after a while the fire button didn't work anymore. I couldn't think why. After some time deliberating I realised that I had changed the mouse from an Atari mouse to wireless USB adapter, this one to be exact:

https://gossuin.be/index.php/smallymouse-2-atari

When I plug in the Atari mouse it works again. I assume that means the USB adapter is messing with a contact or maybe drawing too much current or something like that. Anyone know more about the cause , perhaps?
User avatar
stephen_usher
Posts: 5656
Joined: Mon Nov 13, 2017 7:19 pm
Location: Oxford, UK.
Contact:

Re: Gamepad fire button depends on mouse

Post by stephen_usher »

If it's anything like the Tom adapter then it has a hard pull-up on the right-button line. This is the same as the joystick button and will put so much current onto the line that it never gets low enough to trigger the ST's detection for the button being pressed. It's a major design flaw. They should have used some sort of open collector chip.

How I solved this for the Tom adapter was to put a cable between the ST and the adapter and a diode on the right-button wire so that the adapter could never supply current to the ST on that line, only sink it.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
russellnash
Posts: 114
Joined: Fri Mar 26, 2021 2:46 pm

Re: Gamepad fire button depends on mouse

Post by russellnash »

Thanks, I knew someone probably had a similar thing happen. Interestingly, when I try a joystick it does fire and only has the problem intermittently, which made me think that the switches are maybe faulty, but I guess not. Good to know.
User avatar
Badwolf
Posts: 2242
Joined: Tue Nov 19, 2019 12:09 pm

Re: Gamepad fire button depends on mouse

Post by Badwolf »

You're lucky it doesn't hard reset the machine (or worse) as you're shorting 5V to GND when you press fire.

The latest firmware from Simon Inns has removed this bug after it was reported.

https://github.com/simoninns/SmallyMous ... -583753980

But I wouldn't know if the original firmware would be compatible with Olivier's board design. The same goes for my firmware. I doubt it would work with Olivier's board.

Unfortuntely, with a board that small, there's little scope for a hardware fix (putting a diode on the RMB line).

BW
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
DSTB1 Open source 16Mhz 68k and AltRAM accelerator for the ST
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
User avatar
stephen_usher
Posts: 5656
Joined: Mon Nov 13, 2017 7:19 pm
Location: Oxford, UK.
Contact:

Re: Gamepad fire button depends on mouse

Post by stephen_usher »

It's designed to be shorted. There's a 10K pull-up on it, so there's actually 10K ohm resistance to Vcc.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
User avatar
Badwolf
Posts: 2242
Joined: Tue Nov 19, 2019 12:09 pm

Re: Gamepad fire button depends on mouse

Post by Badwolf »

The problem is when the Smallymouse drives it at VCC on one port and you then short it with the fire button on the second port.

You've basically put the 1287 in parallel with the 10k pull-up (rendering it irrelevant) and the chip is trying to source enough current to raise GND to VCC.

If the chip is able to supply enough current to lower VCC, the machine cuts out. I've tested it with the original firmware and it happens for me.

One of the first changes I made with Smalliermouse was to switch the ports to input when not emulating a mouse click (ie. simulating an open drain).

BW
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
DSTB1 Open source 16Mhz 68k and AltRAM accelerator for the ST
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
russellnash
Posts: 114
Joined: Fri Mar 26, 2021 2:46 pm

Re: Gamepad fire button depends on mouse

Post by russellnash »

It is all useful information, thank you. I will live with it first of all until perhaps at some point in the future I get annoyed by it and then we will see. :)
Post Reply

Return to “HARDWARE ISSUES”