From e1e6bec9ff3d993efb6986990b11ec1751d97372 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Wed, 10 Apr 2019 22:15:27 +0200 Subject: [PATCH] atari5200: changes from discussions in #870 - rename screen_setup to initconio - use Greg King's version of bgcolor() --- libsrc/atari5200/bgcolor.s | 32 ++++++++-------------- libsrc/atari5200/conioscreen.s | 9 +++--- libsrc/atari5200/cputc.s | 6 ++-- libsrc/atari5200/extra/conioscreen_20x12.s | 9 +++--- 4 files changed, 24 insertions(+), 32 deletions(-) diff --git a/libsrc/atari5200/bgcolor.s b/libsrc/atari5200/bgcolor.s index 127d26998..90db8892b 100644 --- a/libsrc/atari5200/bgcolor.s +++ b/libsrc/atari5200/bgcolor.s @@ -1,36 +1,26 @@ ; -; Christian Groessler, 05-Apr-2019 +; Greg King, 10-Apr-2019 ; .export _bgcolor .include "atari5200.inc" - .constructor init_old_bgcolor +.data -.bss - -old_bg_color: - .res 1 +old_bg_index: + .byte COLOR_BLACK ; see conioscreen.s for default palette .code _bgcolor: - and #3 + and #$03 tax - lda COLOR0,x - ldx old_bg_color - sta COLOR4 ; set new value - sta old_bg_color - txa - ldx #0 ; fix X - rts - -.segment "ONCE" - -init_old_bgcolor: - lda COLOR0+3 ; see also conioscreen.s for initialization - sta old_bg_color + ldy COLOR0,x + lda old_bg_index + sty COLOR4 ; set new value + stx old_bg_index + ldx #0 ; fix high byte rts - .end +.end diff --git a/libsrc/atari5200/conioscreen.s b/libsrc/atari5200/conioscreen.s index 895e946ef..4e769b126 100644 --- a/libsrc/atari5200/conioscreen.s +++ b/libsrc/atari5200/conioscreen.s @@ -7,7 +7,7 @@ SCREEN_BUF_SIZE = 20 * 24 SCREEN_BUF = $4000 - SCREEN_BUF_SIZE - .export screen_setup + .export initconio .export screen_width, screen_height .export conio_color @@ -17,7 +17,8 @@ screen_height = 24 .segment "ONCE" -screen_setup: +; initialize color registers, display list, and screen memory +initconio: ; initialize SAVMSC lda #