SCREEN_PTR does only contain the offset apparently (unlike on other cbm systems), so we need extra handling

This commit is contained in:
mrdudz
2025-06-25 05:13:09 +02:00
parent 955c6627c0
commit 4db5ac6c14
13 changed files with 356 additions and 36 deletions

View File

@@ -0,0 +1,25 @@
;
; 2016-02-28, Groepaz
; 2017-06-22, Greg King
;
; unsigned char cpeekcolor (void);
;
.include "mega65.inc"
.export _cpeekcolor
.importzp ptr1
_cpeekcolor:
lda SCREEN_PTR + 1
clc
adc #>$d800
sta ptr1 + 1
lda SCREEN_PTR
sta ptr1
ldy CURS_X
lda (ptr1),y
ldx #>$0000
rts