My game supports four players and I just added a really basic menu so that I can have players join and leave instead of me having to reassemble the game to change the number of players.
Right now, I just read $4016 8 times for player 1, then another 8 times for player 3. I read $4017 8 times for player 2, then another 8 times for player 4.
I don't check for the four score signature or anything like that. This works on a real NES with both official standard controllers and the NES advantage whether the four score is attached or not, whether all controllers are attached or none are or anything in between.
Lots of emulators seem to not like this, and behave as if player 3 and 4 are holding all the buttons down when the four score isn't set as attached.
So, reading the wiki, I'm gathering that certain controllers return 1 rather than 0 past the first 8 reads. So basically, I need to read $4016/$4017 8 more times, than zero player 3/player 4's controller is the result is $FF? Would I need to specifically check for $10 and $20 (four score signature), or is the $FF itself a big enough hint?
Could I get away with zeroing any controller who ends up with a value of $FF for its 8 reads instead of doing an additional 8 reads for the $FF/signature, or would that break some hypothetical behavior in some controllers/emulators?
Is there anything else I need to be aware of when supporting four players? (I'm not using DMC!) I'm asking all this because I'm bummed I have to do more stuff to make emulators happy, and for all I know some actual controllers people might be using might have behavior different than the ones I own and I can't test that and don't want to hope I'm understanding the wiki correctly.
Right now, I just read $4016 8 times for player 1, then another 8 times for player 3. I read $4017 8 times for player 2, then another 8 times for player 4.
I don't check for the four score signature or anything like that. This works on a real NES with both official standard controllers and the NES advantage whether the four score is attached or not, whether all controllers are attached or none are or anything in between.
Lots of emulators seem to not like this, and behave as if player 3 and 4 are holding all the buttons down when the four score isn't set as attached.
So, reading the wiki, I'm gathering that certain controllers return 1 rather than 0 past the first 8 reads. So basically, I need to read $4016/$4017 8 more times, than zero player 3/player 4's controller is the result is $FF? Would I need to specifically check for $10 and $20 (four score signature), or is the $FF itself a big enough hint?
Could I get away with zeroing any controller who ends up with a value of $FF for its 8 reads instead of doing an additional 8 reads for the $FF/signature, or would that break some hypothetical behavior in some controllers/emulators?
Is there anything else I need to be aware of when supporting four players? (I'm not using DMC!) I'm asking all this because I'm bummed I have to do more stuff to make emulators happy, and for all I know some actual controllers people might be using might have behavior different than the ones I own and I can't test that and don't want to hope I'm understanding the wiki correctly.