- Joined: 23 Sep 2021
- Posts: 100
- Location: Poland
|
SGG - Changing the default SCROLL Y position to be at the top edge of the TimeMap.
Posted: Tue Apr 16, 2024 11:25 am
|
Is it possible to change the default position of the "window" scroll y=00 so that it does not start on line 24 of TileMap? The current position of Scroll Y 00 is lower than the TileMap screen starts, and I would like it to be equal.
The point is that I wanted to scroll within the entire TileMap 256x224, but changing the position of Scroll Y jumps 32 lines lower when I reduce the value below 00 (interestingly, this does not happen when scroll x changes 00 to e.g. FF).
Is it possible to bypass this somehow or, unfortunately, does it have to stay that way and the scroll position y=00 will always be 3 lines of 8x8 tiles lower than the tilemap starts?
Or do I have to make a jump from 00 to 223 when DEC scroll Y for it to work properly?
|
- Joined: 05 Sep 2013
- Posts: 3859
- Location: Stockholm, Sweden
|
Posted: Tue Apr 16, 2024 11:31 am
|
That's because the tilemap is 224 pixels tall, not 256.
Subtract 32 more and you should be good.
|
- Joined: 06 Mar 2022
- Posts: 687
- Location: London, UK
|
Posted: Tue Apr 16, 2024 11:42 am
|
Think there are two things being conflated here - there's the wraparound at 224 pixels in order to accommodate the physical size of the tilemap in VRAM, which applies at the hardware level to the VDP as seen in both SMS and GG. You just have to handle this (edit: as sverx suggests)
The second thing is that the GG masks off the top 3 rows of tiles (24px) from the display. They are still there in the VDP, but they are simply "off screen" as far as the GG is concerned. There's no way to "normalise" the scroll register in hardware to remap the GG's vertical screen edge. You have to make the adjustment in software.
|
- Joined: 23 Sep 2021
- Posts: 100
- Location: Poland
|
Posted: Tue Apr 16, 2024 12:58 pm
|
Done. I guess everything works OK.
|