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