Commodore 128 Alive!

Commodore 64 => Programming => Topic started by: commodorejohn on February 02, 2010, 03:51 AM

Title: Split-screen question
Post by: commodorejohn on February 02, 2010, 03:51 AM
Quick question: if I change the screen-map address in the middle of a frame, will the scanlines rendered after the switch start from the top of the new map, or the "correct" position in the new map?
Title: Re: Split-screen question
Post by: Hydrophilic on February 12, 2010, 04:23 PM
The scan lines will start from the "correct" position (as you say); it will not start at the top.  However I must clarify a bit...

In bitmap mode, "screen-map address" might be interpreted as the bitmap data (pixel data) or as color data.  With bitmap data, the change happens instantly... in the middle of a scanline if you wish.

But for color data (of bitmap), or for normal text mode, the change will not happen until the next "bad line."  By default this occurs every 8 rasters (at the first/top raster of each character row).  Of course bitmaps don't have character rows, but the color data of a bitmap is fetched like text/character rows.

In character mode you can force a change sooner than every 8 rasters by either changing the charset-address (not screen map address) or by playing with the Y-Scroll bits... too complicated to fully describe now, I refer you to Commodore Hacking articles for more info.
Title: Re: Split-screen question
Post by: commodorejohn on February 13, 2010, 12:36 AM
Interesting. I'm not really looking to do anything fancy, though; I'm just trying to figure out how to arrange video memory in a potential project. Both screens are character-mode (although the top one is multicolor,) so I wanted to know if I'd need to keep the lower screen in a different character-map area. Looks like not, though!
EhPortal 1.34 © 2025, WebDev