snes9xgit / snes9x

Snes9x - Portable Super Nintendo Entertainment System (TM) emulator
http://www.snes9x.com
Other
2.65k stars 457 forks source link

Please support SNES Mouse via Adapter for SNES Classic #850

Closed Akeraiotitasoft closed 5 months ago

Akeraiotitasoft commented 1 year ago

Please support SNES Mouse via Adapter for SNES Classic

Use this repo: https://github.com/Akerasoft/extenmote

There is a sample SNES Mouse implementation.

ReyVGM commented 1 year ago

Hope this gets added.

bearoso commented 1 year ago

Sorry to disappoint, but that's a lot of code that would be added for only one or two people to use a proprietary adapter that could easily be substituted with something else.

Plus, that repository is GPL3, so we legally can't use it.

Akeraiotitasoft commented 1 year ago

You don't need the code from the repository. When I make a physical copy I can give it to you. I mean that I can give you the adapter. Then you are a user of it. Not the maker of it. Then you can use it for testing. You only need to know the data that is being sent by the adapter.

Akeraiotitasoft commented 1 year ago

How do you know only 1 or 2 people will use the adapter? This is based on Raphnet code. If proven to work Raphael Assenat (www.raphnet.comhttp://www.raphnet.com) might make it as well. I opened a pull request for him already. Just he won’t take the code unless there is proof that it works. He sells the adapter or similar existing adapters to many people.

bearoso commented 1 year ago

If it uses a standardized protocol, there's no need to do anything. It'll just work. If it's just bits over the wire, depends how complex it is and the interface.

Akeraiotitasoft commented 1 year ago

Let me know where in the code the change needs to be. I might also try to do it. Also, it can be changed so that Mouse moves left is same as analog stick left. But SNES classic does not normally see analog stick as mouse movement. I was trying to avoid making the real SNES mouse through the adapter look that much like a regular controller, but it can be done if needed. There are extra bits as a trailer after standard classic controller data that could identify the mouse and so the emulator could know that it is a mouse.

Akeraiotitasoft commented 1 year ago

It is the SCL/SDA interface called TWI or I2C. The same one on the NES Classic, SNES Classic, and on the Wii Mote in the extension port.

Akeraiotitasoft commented 1 year ago

This is the type of code change that would only work on an SNES Classic or NES Classic running on the ARM processor. The console would be modded with Hackchi2 and Mario Paint would be added (by ripping the cartridge). So usually running on ARM Custom Linux through RetroArch.

Akeraiotitasoft commented 1 year ago

This change might actually need to be made in RetroArch. It seems that the mouse data is being sent from there. Which repo do they use for libretro to send data from SNES Classic to SNES9x?

bearoso commented 1 year ago

Yes, it would be at the port input layer, so done in the RetroArch frontend. That would be in https://github.com/libretro/retroarch