feat(kernal): $E5B4, $EA24, and $ECF0 at their well-known addresses

cc65's C64 runtime and ip65 call past the jump table: $E5B4 takes the first
key from the keyboard buffer (cgetc), $EA24 points USER at the colour RAM of
PNT's line (cursor positioning), and $ECF0 holds the low bytes of the screen
lines' addresses (ip65's VT100 code), as Mapping the Commodore 64 describes
them. vicii_init's work moves out of $E5A0-$E5C8 to free $E5B4, and on the
standard layout PNT and USER are worked out through the routine at $EA24.
This commit is contained in:
chris committed 2026-10-18 07:24:08 +02:00
1 parent ec4dc7df62
commit a45f63e34e
9 files changed
+132 -39

No files matched your search

@@ -0,0 +1,24 @@
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * * #IGNORE
;
; Well-known Kernal routine, described in:
;
; - [CM64] Computes Mapping the Commodore 64 - $EA24
;
; Sets USER to the colour RAM location of PNT's screen line. Screen RAM starts on a
; kilobyte boundary, as the VIC-II fetches it, so the line's place within its kilobyte
; is its place in the colour RAM.
;
screen_calculate_USER:
lda PNT+0
sta USER+0
lda PNT+1
and #$03
ora #>COLOR_RAM
sta USER+1
rts