Open feraligatr opened 3 years ago
edit 2022-01-10: tl;dr for future humans: P1 and P2 are swapped in hardware (oversimplifying, see details below) but NesHawk doesn't handle that correctly at the moment, so they're not swapped, thereby appearing swapped. Got it? Good.
Original comment w/ workaround:
The (virtual) gamepads are swapped. I'm not sure if that's an emulation bug or if the game was programmed that way, but for now just add P2 in NES
> Controller Settings...
and set its keybinds.
This is a core bug; P1 and P2 are swapped from what they're supposed to be in VS mode.
That should be correct. I assumed the swapping wasn't being done.
I know different models of VS System screwed with certain regs in certain ways (piracy protection?), is it possible that some VS Systems actually had not-swapped controller regs? Maybe we can check in fceu
Here is nesdev's current documentation: http://wiki.nesdev.com/w/index.php/Vs._System#cite_note-2
For controller reading specifically they link to here: https://forums.nesdev.com/viewtopic.php?p=220654#p220654
Mesen implements basically the same as that comment: https://github.com/SourMesen/Mesen/blob/master/Core/VsControlManager.cpp
Great, so some games swap P1 and P2, and some don't, and some even swap particular buttons. Good old VS.
From an architectural standpoint, it would nice to see this stuff handled in the controller deck abstraction layer instead of hardcodes inside the core.
Are we in agreement to copy Mesen?
handled in the controller deck abstraction layer instead of [hardcoded] inside the core
Those controller decks are part of their respective cores.
I mean in here https://github.com/TASEmulators/BizHawk/blob/c0b6bf61b1a06db2ce5287bfc74a7ab2fffbf4ef/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NESControllers.cs instead of in here https://github.com/TASEmulators/BizHawk/blob/c0b6bf61b1a06db2ce5287bfc74a7ab2fffbf4ef/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.Core.cs#L763-L771
I don't really care one way or another, it's pretty messy and tedious no matter what.
BizHawk 2.5.2, Win7 x64, NesHawk Core, Vs Super Mario Bros. [!] rom from GoodSet
In FCEUX, "select" button works.