BetterJoy icon indicating copy to clipboard operation
BetterJoy copied to clipboard

[ENHANCEMENT] Make the Famicom Mic Work

Open ConnorS-P opened this issue 7 months ago • 7 comments

Is your feature request related to a problem? Please describe. The Mic on the Famicom II controller currently does nothing. On real hardware, it is not purely decorative so it should be possible to utilize it in some capacity.

Describe the solution you'd like I don't currently know what the Mic is capable of, it might just be a true/false bit, but if it is more than that it would be nice to have a full implementation as an audio input.

(Mostly just opening this to collect thoughts and research.)

ConnorS-P avatar May 30 '25 15:05 ConnorS-P

https://www.reddit.com/r/Famicom/comments/1d5o03t/question_about_the_nso_famicom_controllers/#:~:text=It%20is%20possible%2C%20yes,game (Seems like there are audio packets being sent SOMEHOW, they're just not great quality.)

Also found this which references the mic and something about how to get the data: https://switchbrew.org/wiki/HID_services#ExternalDevices

These might have something useful, but need to actually read through them more. https://switchbrew.github.io/libnx/hid_8h.html https://switchbrew.org/wiki/HID_services

I'll take another look after work.

ConnorS-P avatar May 30 '25 16:05 ConnorS-P

Here is a sample of the sound quality. 😅

d3xMachina avatar May 30 '25 17:05 d3xMachina

That is in fact one of the microphones of all time...

ConnorS-P avatar May 30 '25 19:05 ConnorS-P

https://switchbrew.org/wiki/HID_services#EnableJoyPollingReceiveMode

->

https://github.com/switchbrew/libnx/blob/de7cfeb3d95990abfd7595d49ab8d89a11099178/nx/source/services/hidbus.c#L119

So would this imply we need to send 0x0B or something to start the data flow?

ConnorS-P avatar May 31 '25 06:05 ConnorS-P

So would this imply we need to send 0x0B or something to start the data flow?

Where did you get that 0x0B value from ? The function you linked probably does something similar to SetReportMode (subcommand 0x03). The library you linked seems to communicate with some services from the Switch OS, so it's hard to get any information that translate to a direct communication with the controller. I haven't seen anything related to the microphone datas either in this repo by searching "lark" (the name they use for some reason for the famicom controller).

d3xMachina avatar May 31 '25 12:05 d3xMachina

I saw the 11 passed into "serviceDispatchIn" and thought it might be a subcommand. Honestly I have no clue either. Just saw that the function EnableJoyPollingReceiveMode was used to star the mic spitting out data.

ConnorS-P avatar May 31 '25 21:05 ConnorS-P

The LarcMic is mentioned in this link along with the fact you need to use the above function to set the mode to "2". https://switchbrew.org/wiki/HID_services#ExternalDevices

ConnorS-P avatar May 31 '25 21:05 ConnorS-P