Then the video I watched was probably from a bad emulator recording. But well, sprite fetching or not, that's background tile data in the middle of the screen, so it's unclear why there'd be four full black lines.Pretty sure there should be a thick line of background color at the split (about four scanlines or so (forgot the exact amount), since that's how long it takes to reload the whole sprite table with forced blanking). Seems to match the area that is broken.
The actual start of the black line's a little off in higan, which is most likely because I have a pixel-based renderer, but start rendering the scanline too early (literally at Hcounter=0) ... that part should be addressed if I ever get FIFO and scanline-timing in properly.
Oh, okay then. For whatever reason, having a mostly working implementation using halving of Vscroll/Y-coords made it way easier for me to adapt the code to doubling Y/height instead. So, that issue's resolved, thanks!It will work, but the resolution of sprite positioning will be half of what it should be. For instance, you won't be able to position a sprite's first line on a line that's in the bottom field (short of modifying the SAT between fields anyway).
Boy, that's super weird for LSMx=1 mode.This code is not correct in two ways. First, the weird bit swapping thing happens in both interlace mode (i.e. whenever LSM0=1). Second, double resolution mode (LSMx=3) actually does introduce a new bit 0 to the vcounter and pushes the other bits up one.
So then, how's this?
Code: Select all
//counter
case 0xc00008: case 0xc0000a: case 0xc0000c: case 0xc0000e: {
auto vcounter = state.vcounter;
if(io.interlaceMode.bit(0)) {
if(io.interlaceMode.bit(1)) vcounter <<= 1;
vcounter.bit(0) = vcounter.bit(8);
}
return vcounter << 8 | (state.hdot >> 1) << 0;
}
Maybe I'm doing the d0<>d8 swap late, and it should be before vcounter<<=1 in LSMx=3 mode?
... I guessed an emulator behavior correctly? On my first try ...??This bit is forced to zero whenever LSM0=0.
Quick, someone check the ground to see if hell just froze over