User Tools

Site Tools


base:quick_vicii_screen_setup

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

base:quick_vicii_screen_setup [2015-04-17 04:33] (current)
Line 1: Line 1:
 +====== Quick VIC-II Screen Setup ======
 +
 +This code snippet will set the both the bank and the screen address registers, given simple pointers to screenChars and screenPixels.
 +
 +<​code>​
 + ​screenChars ​ = $0400 ; the 40x25 buffer
 + ​screenPixels = $1000 ; the pixel data for font or bitmap ($1000 or $9000 are always charrom)
 +
 +; Select VIC bank
 + lda # ((screenChars ^ $ffff) >> 14)
 + sta $dd00
 +
 +; Set VIC screen and font pointers
 + lda # (((screenChars & $3fff) / $0400) << 4) + (((screenPixels & $3fff) / $0800) << 1)
 + sta $d018
 +</​code>​
 +
 +by White Flame
 +
  
base/quick_vicii_screen_setup.txt ยท Last modified: 2015-04-17 04:33 (external edit)