From 18e9c6f6a03be1092ca8d8b885f9804b87834d4c Mon Sep 17 00:00:00 2001 From: Dan Sanderson Date: Tue, 18 Nov 2025 00:36:10 -0800 Subject: [PATCH] c65 target: conio accesses all color RAM in 80x25 text mode --- libsrc/c65/cpeekcolor.s | 11 +++++++++++ libsrc/c65/cputc.s | 9 +++++++++ 2 files changed, 20 insertions(+) diff --git a/libsrc/c65/cpeekcolor.s b/libsrc/c65/cpeekcolor.s index f4b4a5573..7e4fcf61d 100644 --- a/libsrc/c65/cpeekcolor.s +++ b/libsrc/c65/cpeekcolor.s @@ -18,8 +18,19 @@ _cpeekcolor: lda SCREEN_PTR sta ptr1 + php + sei + lda $d030 + ora #$01 + sta $d030 ldy #0 lda (ptr1),y + tay + lda $d030 + and #$fe + sta $d030 + plp + tya ldx #>$0000 rts diff --git a/libsrc/c65/cputc.s b/libsrc/c65/cputc.s index 926776df0..74a403eb3 100644 --- a/libsrc/c65/cputc.s +++ b/libsrc/c65/cputc.s @@ -116,7 +116,16 @@ putchar: adc #>$d000 sta ptr4 + 1 + php + sei + lda $d030 + ora #$01 + sta $d030 lda CHARCOLOR sta (ptr4),y ; Set color + lda $d030 + and #$fe + sta $d030 + plp rts