Messages in AVI with New PPU
When dumping AVI with New PPU, messages such as "AVI recording started." and "Power On" appear in the AVI file. This occurs even if "Disable messages recording" is checked in File -> AVI/Wav. The message about movie playback ending does not appear in the AVI, however.
The message appears briefly after the encoder logo in this encode. Here's a screenshot from that encode that shows the problem.
I can't seem to duplicate this. With enable HUD I get the AVI recording message on the AVI. With any other setting (disable messages, or HUD not enabled) I get no message on the AVI. I believe that's the intended behaviour.
Can't see any code path differences for New PPU vs Old PPU for this. Both seem to work identically for me.
Ah okay, I seem to be able to duplicate the problem.
- Record a movie from start.
- Pause the emulator and begin playback of the movie.
- Start recording the AVI.
- Unpause the emulator.
The first two frames of the movie will have the message on them.
Not sure what the cause is. Somehow these two frames are getting past the FCEUI_EmulationPaused() test in snapAVI()? Like they seem to just be leftovers...
My guess is just that movie playback from start is pushing through 2 dead frames, and the New PPU hasn't cleared the buffer to grey at that point but Old PPU has? (It seems like in both cases there are two extra frames that shouldn't be there, however?)
Edit: not movie playback specifically, but just the power on event not clearing the buffer for New PPU and always having 2 "extra" frames in it. Probably don't want to mess with whatever these extra frames are about, but just the new PPU needs an equivalent clear?
This line is why the problem doesn't show up in Old PPU:
https://github.com/TASVideos/fceux/blob/18165938d45cda62fb0d551a780a3e1299ade899/src/ppu.cpp#L1755
It feels like the minimum impact solution would be to do something equivalent in New PPU. Would it be appropriate to add a similar memset here?
https://github.com/TASVideos/fceux/blob/18165938d45cda62fb0d551a780a3e1299ade899/src/ppu.cpp#L2065