Interlace mode (LSMx=3)
Posted: Sun Aug 20, 2017 9:00 pm
So, I can't find any info on how the 8x16 tile interlace mode (LSMx=3) works. I think this is the last major feature I'm missing.
Continually surpised at how difficult it is to just brute force the answers to these things, so ... here goes.
I presume the nametable height is still 32 or 64 based on the IO bit, and works the same way.
When generating a pixel, assumption is that the tile index goes from y>>3 & nametableHeight-1 to y>>4 & nametableHeight-1. Likewise Vflip is y^15 instead of y^7.
Also assume nametableAddress computation is the same: nametableAddress() + ((tileY * nametableWidth() + tileX) & 0xfff);
Then at rendering, use a field value that toggles each output field (60 fields/second.)
Would assume sprites would just work the same as LSMx=1 and just interlace.
This gets me ...
...... sigh. If it were even at least partially right, I could work with that and tweak things to get it running. But this ... sprites don't even show up, and the tiles look to be being pulled from entirely the wrong locations.
So, ... how exactly does one implement LSMx=3 interlace mode? What exactly internally changes their computations when this mode is enabled?
If it helps, this is my current VDP renderer, sans the recent shadow/highlight support:
https://gitlab.com/higan/higan/blob/mas ... ground.cpp
Also, I assume we don't need any of the I/O register read bits (field#, Vcounter.d0 -> d8, etc) hooked up for Sonic 2, do we? I will add them, of course. But if they're required then I guess I'll do that first.
Thanks again! Hopefully this'll be the last question of mine for a good while ^^;
Continually surpised at how difficult it is to just brute force the answers to these things, so ... here goes.
I presume the nametable height is still 32 or 64 based on the IO bit, and works the same way.
When generating a pixel, assumption is that the tile index goes from y>>3 & nametableHeight-1 to y>>4 & nametableHeight-1. Likewise Vflip is y^15 instead of y^7.
Also assume nametableAddress computation is the same: nametableAddress() + ((tileY * nametableWidth() + tileX) & 0xfff);
Then at rendering, use a field value that toggles each output field (60 fields/second.)
Would assume sprites would just work the same as LSMx=1 and just interlace.
This gets me ...
...... sigh. If it were even at least partially right, I could work with that and tweak things to get it running. But this ... sprites don't even show up, and the tiles look to be being pulled from entirely the wrong locations.
So, ... how exactly does one implement LSMx=3 interlace mode? What exactly internally changes their computations when this mode is enabled?
If it helps, this is my current VDP renderer, sans the recent shadow/highlight support:
https://gitlab.com/higan/higan/blob/mas ... ground.cpp
Also, I assume we don't need any of the I/O register read bits (field#, Vcounter.d0 -> d8, etc) hooked up for Sonic 2, do we? I will add them, of course. But if they're required then I guess I'll do that first.
Thanks again! Hopefully this'll be the last question of mine for a good while ^^;