atari5200: get rid of conio_colors table

use system color variables instead; improve testcode/lib/atari5200/hello.c
test program
This commit is contained in:
Christian Groessler
2019-04-09 14:34:28 +02:00
committed by Oliver Schmidt
parent dfb7c0f24d
commit d7eecb57f8
4 changed files with 64 additions and 59 deletions

View File

@@ -2,7 +2,6 @@
; Christian Groessler, 05-Apr-2019
;
.import conio_colors
.export _bgcolor
.include "atari5200.inc"
@@ -19,7 +18,7 @@ old_bg_color:
_bgcolor:
and #3
tax
lda conio_colors,x
lda COLOR0,x
ldx old_bg_color
sta COLOR4 ; set new value
sta old_bg_color
@@ -30,7 +29,7 @@ _bgcolor:
.segment "ONCE"
init_old_bgcolor:
lda conio_colors+3 ; see also conioscreen.s for initialization
lda COLOR0+3 ; see also conioscreen.s for initialization
sta old_bg_color
rts

View File

@@ -7,7 +7,6 @@
SCREEN_BUF_SIZE = 20 * 24
SCREEN_BUF = $4000 - SCREEN_BUF_SIZE
.import conio_colors
.export screen_setup
.export screen_width, screen_height
.export conio_color
@@ -44,13 +43,13 @@ clrscr: sta (SAVMSC),y
; set default colors
lda conio_colors
lda #GTIA_COLOR_WHITE
sta COLOR0
lda conio_colors+1
lda #GTIA_COLOR_LIGHTRED
sta COLOR1
lda conio_colors+2
lda #GTIA_COLOR_LIGHTGREEN
sta COLOR2
lda conio_colors+3
lda #GTIA_COLOR_BLACK
sta COLOR3
sta COLOR4 ; background

View File

@@ -7,7 +7,6 @@
SCREEN_BUF_SIZE = 20 * 12
SCREEN_BUF = $4000 - SCREEN_BUF_SIZE
.import conio_colors
.export screen_setup
.export screen_width, screen_height
.export conio_color
@@ -44,13 +43,13 @@ clrscr: sta (SAVMSC),y
; set default colors
lda conio_colors
lda #GTIA_COLOR_WHITE
sta COLOR0
lda conio_colors+1
lda #GTIA_COLOR_LIGHTRED
sta COLOR1
lda conio_colors+2
lda #GTIA_COLOR_LIGHTGREEN
sta COLOR2
lda conio_colors+3
lda #GTIA_COLOR_BLACK
sta COLOR3
sta COLOR4 ; background