3 ms·
The video chip was designed around this: each scanline it would look at the characters occupying the current row, then use that plus how many times it'd display
by panic 11y ago
The video chip was designed around this: each scanline it would look at the characters occupying the current row, then use that plus how many times it'd displayed that row as an index into the 1k of character ROM to pull out the appropriate byte, and display its individual bits as pixels.
The C64 reads the current characters every 8 scanlines, not each scanline (well, you can get it to read on arbitrary scanlines by manipulating the vertical scroll register, but that's beside the point here). Due to the way the C64's data bus works, the main processor has to stop executing instructions while the graphics chip reads the character data.
You have to account for this if you're trying to synchronize code to particular scanlines -- on the scanlines where character data is read, you'll only get 23 cycles instead of the usual 63 (on a PAL machine, at least). For even more info, see http://www.zimmers.net/cbmpics/cbm/c64/vic-ii.txt http://www.zimmers.net/cbmpics/cbm/c64/vic-ii.txt
- egypturnash 11y agoYeah, I should have been more clear on that. I didn't feel like explaining the care and feeding of badlines. grin