Adventures of Batman & Robin (glitch during 2nd Boss)
Posted: Wed Aug 17, 2011 4:38 pm
Actually, these bugs happen in every emulators, but I left this here for easier bug references
This will happen after "Two Faces" drops bombs on you:
1) partial corrupted line on the top-right part of the screen: what happens is the game uses 2-cell VSCROLL mode and is modifying VSRAM data for that line during the previous line, which shifts into the HBLANK period for the two or three last values. Most emulators will either render the line or latch VSRAM before those last values got written and the two or three last 16-pixels columns are incorrectly rendered.
--> it means that VSRAM values are not latched in 2-cell VSCROLL mode and most likely read by the VDP before rendering each 16-pixels column. Analyzing game timings shows that it writes VSRAM values on the previous line AFTER the associated 16-pixel column has been rendered, so it will only takes effect on next line. From emulator point of view, it is only necessary to make sure that, in this mode, VSRAM writes during HBLANK are still taken in account for the upcoming line.
2) full corrupted line in the middle of the screen: what happens is the game is writing VDP register #4 during HBLANK to modify Plane B nametable address from that line. Most emulators will render this line at once before this address is changed and got it wrong.
--> it means that planes nametable registers are not latched at the start of the line and can probably be modified anytime during a line. As I see it, VDP regs #2 #3 and #4 are read by VDP before reading each pixel data block from VRAM. Again, from an emulator point of view, it is only necessary to make sure that, nametable changes during HBLANK are still taken in account for the upcoming line. I didn't verify if this is only the case in 2-cell VSCROLL mode but most likely not.
Funny that we are still finding games doing odd tricks like that, after all these years