Famiclone mouse ? PS/2 to db9 ? On educational computer

Started by komrad2236, March 21, 2021, 04:02:24 pm

Previous topic - Next topic

komrad2236

Hi guys
I have this famiclone keyboard console > https://www.youtube.com/watch?v=ZpJlhHATPJo
But mine did not arrive with a mouse.
So I was thinking of "making" one.

First I want to ask, did anyone ever try something like this and is it possible ?

Now my idea is, what if I can take a PS/2 mouse and with the right adapter or pinout I turn it into a mouse that will work with my keyboard console ?

emerson

Chances are if that mouse plugs into the controller port then a passive adapter will not work. Opening the console and comparing the the two controller ports will tell you pretty quick if there is extra circuitry for the mouse. Most ps/2 devices provide their own clock signals while nes/famicom controllers require a clock from the console. An snes mouse would be much easier to work with.

I suggest you dump the rom and load it in a development emulator to determine the communication protocol. I would assume a three byte report from the mouse. Change in x, change in y, and button status. Directional flags could either be reported in the MSb of the change bytes or in the button status byte. Again, that is just an assumption. This will help determine the hardware needed for the adapter you design.

What happens when you have a controller connected when the cartridge expects a mouse? Use any behavior here to help reverse engineer the protocol.

P

If it uses the Subor Mouse, it's on the wiki. It's clocked like a normal Famicom controller with the $4016 output port.

fcgamer

Quote from: P on March 22, 2021, 01:11:13 pmIf it uses the Subor Mouse, it's on the wiki. It's clocked like a normal Famicom controller with the $4016 output port.

I actually had some questions about the Famiclone mice as well.

Would there be a way to get them to function as the say way as a regular controller, i.e. in a game like shadow gate to be able to manipulate the pointer using a mouse instead of the control pad.
Family Bits - Check Progress Below!

https://famicomfamilybits.wordpress.com

emerson

Quote from: undefinedI actually had some questions about the Famiclone mice as well.

Would there be a way to get them to function as the say way as a regular controller, i.e. in a game like shadow gate to be able to manipulate the pointer using a mouse instead of the control pad.

It's possible I guess. The converter circuit would need to convert the mouse report into the controller report format and transmit at the next NMI. It would need to know when to send one latch or three. It seems like it would be clunky because any movement no matter how long or short would be converted to a single button press for one NMI period. Any hesitation in movement might be considered a release, likely causing lots of jitter. Some type of damping buffer in firmware would fix that.

It would be easier to hack the rom for mouse support in my opinion.

P

Yeah hack the game to support the SFC mouse and/or Famiclone mice would be the way to go. The cursor in Shadow Gate is programmed for a digital d-pad and always moves at the same speed. If you build a device that translates mouse movement to d-pad presses, the cursor would probably feel very sluggish as it doesn't move with variable speed like a mouse cursor does.

It might make more sense to build a device that translates mouse movement to another analogue device, such as a paddle with a switch to change between X- and Y-axis (for Breakout and Pong respectively).

emerson

It should be easy enough to have variable cursor speed. The mouse reports the change from the previous read so use the relative movement values for the cursor sprite X/Y position. Depending on how sensitive the mouse is you may want to LSR the values once or twice to smooth out the cursor motion. Keep the constant speed until you know the mouse works then move on to variable speed.

The vaus controller emulator device would be interesting. At that rate you may as well include joypad emulation just because.

P

And that of course requires hacking each game you want to have mouse support, to insert the mouse driver.