Nintendont icon indicating copy to clipboard operation
Nintendont copied to clipboard

Memcard emulation patches conflict with microphone

Open NightEule5 opened this issue 2 years ago • 1 comments

The EXI microphone is broken when memcard emulation is enabled. If you get past the freezing in issue #614 by unplugging the microphone until the game boots up, the game doesn't detect a microphone. When memcard emulation is disabled, the microphone works as expected but obviously progress cannot be saved if you don't have a physical memcard.

I traced this to 3 lines in kernel/Patch.c:

// EXI Device 1 Control Register
write32A( (u32)Buffer+i+0x14C, 0x3C60C000, 0x3C60CC00, 1 );
write32A( (u32)Buffer+i+0x150, 0x38630014, 0x38636800, 1 );
write32A( (u32)Buffer+i+0x154, 0x80830000, 0x80830014, 1 );

When these are commented out, the microphone functions as expected but the memcard breaks. These are patch the game to redirect the EXI registers, which causes reads on slot B to run through the emulation code instead of the physical slot, right? Device 1 should correspond to slot B though, I'm not sure why disabling this patch would also break emulation of slot A...

My understanding was that slot B emulation was broken anyway, could this functionality be removed or a setting added?

Edit: I tried reproducing this behavior again today, but the microphone is broken with these lines commented out now. Regardless, it is one of the patches, because if you force DisableEXIPatch to 1 the microphone works. I'll need to do more digging, but I'm at a loss for now

NightEule5 avatar Sep 30 '23 03:09 NightEule5

slot b memory card is not broken, it works perfectly fine if you know how to set them up.

now this has been a thing since the beggining and if i recall fix94 couldnt find the error and didnt want to rewrite the memory card emulation code again so he left it like that.

carnage702 avatar Oct 07 '23 18:10 carnage702