]> git.sur5r.net Git - cc65/blobdiff - libsrc/atari5200/conioscreen.s
atari5200: conio now uses just four colors altogether
[cc65] / libsrc / atari5200 / conioscreen.s
index 412dd582d6ddc8c8eafe890107535fbb10a46451..d1a709fc3a035d78fa5e41aa896a120c31d1bf0e 100644 (file)
@@ -7,10 +7,18 @@
 SCREEN_BUF_SIZE =       20 * 24
 SCREEN_BUF      =       $4000 - SCREEN_BUF_SIZE
 
-                .code
-                .export screen_setup_20x24
+                .import conio_colors
+                .export screen_setup
+                .export screen_width, screen_height
+                .export conio_color
 
-screen_setup_20x24:
+screen_width    =       20
+screen_height   =       24
+
+
+                .segment "ONCE"
+
+screen_setup:
 
                 ; initialize SAVMSC
                 lda     #<SCREEN_BUF
@@ -36,16 +44,15 @@ clrscr:         sta     (SAVMSC),y
 
                 ; set default colors
 
-                lda     #40
+                lda     conio_colors
                 sta     COLOR0
-                lda     #202
+                lda     conio_colors+1
                 sta     COLOR1
-                lda     #148
+                lda     conio_colors+2
                 sta     COLOR2
-                lda     #70
+                lda     conio_colors+3
                 sta     COLOR3
-                lda     #0
-                sta     COLOR4
+                sta     COLOR4          ; background
 
                 ; set display list
 
@@ -56,8 +63,11 @@ clrscr:         sta     (SAVMSC),y
 
                 rts
 
+                .data
+
+conio_color:    .byte   0
 
-                .segment "RODATA"
+                .segment "DLIST"
 
 ; display list for 20x24 text mode
 
@@ -79,5 +89,4 @@ dlist:          .repeat 3
 
 .assert ((* >> 10) = (dlist >> 10)), error, "Display list crosses 1K boundary"
 
-
                 .end