Open ghost opened 4 years ago
Thanks for the report!
Looks like this is partially normal. This recording which seems like it's running on actual hardware has a very similar issue: https://www.youtube.com/watch?v=X4mGd_1euKs (It looks like the game is running on one of these: https://www.amazon.co.jp/SF%E3%83%A1%E3%83%A2%E3%83%AA%E3%82%AB%E3%82%BB%E3%83%83%E3%83%88/dp/B002BTY85Q)
The main difference being that the glitch starts a little later in the video (and never stretches for more than 8 pixels.) I can fix it to only cause a glitch over 8 pixels, but can't quite come up with a reason why it wouldn't show up until a little later in the video.
Basically, the game is in mode 7 at the start of the scanline, and switches to mode 1 within the first ~40 master clocks on the scanline. There's currently some unknown timings with regard to the timing of the fetches done by the CPU - it's possible to delay them by 24 master clocks at the beginning of the scanline and still have everything make sense timing-wise. Delaying them by 24 clocks fixes the 16-pixel width bugs seen in Mesen-S, but doesn't make it match that video perfectly, still.
@Max833 Did you notice if this game had the glitch shown in the video when you tested it? If you did, any chance you have a recording of it somewhere? It seems like the glitch's color in the video changes from one frame to another but that video is pretty blurry and I can't really tell. I have a fairly decent guess on what might be causing the color to change, but having a clearer recording might help a bit.
@SourMesen Yeah, this is a real hardware glitch. And yes, it changes color from time to time. Is this video good enough? https://streamable.com/ijx8x
That's perfect, thanks! Looks like the 8-pixel glitch's color varies to some extent (and it looks like not all pixels are all the same color at the same time, either)
The PPU might be using the mode 7 data and trying to display it as mode 1 data, but it might also just be drawing garbage for the first 8px tile because it didn't fetch the data as mode 1 data. Hard to say for sure (and it's probably not really worth the effort required to try to figure out the exact details here.)
I'll at least try to figure out how to get the glitch to show up with the same timing as what is seen on the recording, though that might depend on a ton of other things that might not be quite perfect yet, too.
There's a black line on the left hand side of the title screen in Heracles no Eikō III: Kamigami no Chinmoku.