The overlay shows the state of the controller when the input was polled by the emulator (on scanline 241) - it will update itself regardless of whether or not you read $4016, though.unregistered wrote:p.s. Sour, is controller 1's input displayed on screen directly affected by values read from $4016? I doubt it is, but if it is that would make sense and provide less $4016 checking for me in the future. :)
And your issue is caused by the fact you're (I'm assuming) using a DirectInput gamepad. When the game is reset, Mesen tries to find new gamepads, and since the DirectInput API is pretty horrible (or because I don't know it in depth, either of these!), it has to "guess" what the default state for the gamepad is, and since you're holding down a button, it assumes that that's the default state for that button. Just tested on a 8bitdo SNES controller and I have the same issue. I can probably fix it, though. But for the record, this shouldn't happen with the keyboard or XInput devices (e.g xbox controllers)
The nametable RAM should be somewhat random on power on, but it will keep those values between resets. Were you testing from a power on each time? Either case, though, it's likely to just be a coincidence.. there's no reason parts of $2000 would be automatically copied to $2400 (unless the mirroring isn't wired up properly, for example)Skadiet wrote:However, the NES appears to have used the attributes from $23C0 when it displayed the nametable data in $2400.
Like gauauu said, keeping on all the options for randomized state/ram/oam decay should help you avoid initialization-related issues on hardware, though.