From 70436f5dcaa2f59e210ee1af321028744974d974 Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Tue, 7 Nov 2023 22:09:53 +0100 Subject: [PATCH] cx16.vpeek() use VERA_DATA0 instead of 1, to not cause ADDRSEL to be != 0 (interferes with kernal) --- compiler/res/prog8lib/cx16/syslib.p8 | 8 ++------ docs/source/todo.rst | 1 + examples/cx16/bobs.p8 | 1 + 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/compiler/res/prog8lib/cx16/syslib.p8 b/compiler/res/prog8lib/cx16/syslib.p8 index ef54b4c4d..62d1804ad 100644 --- a/compiler/res/prog8lib/cx16/syslib.p8 +++ b/compiler/res/prog8lib/cx16/syslib.p8 @@ -526,16 +526,12 @@ asmsub vpeek(ubyte bank @A, uword address @XY) -> ubyte @A { ; -- get a byte from VERA's video memory ; note: inefficient when reading multiple sequential bytes! %asm {{ - pha - lda cx16.VERA_CTRL - ora #1 - sta cx16.VERA_CTRL - pla + stz cx16.VERA_CTRL and #1 sta cx16.VERA_ADDR_H sty cx16.VERA_ADDR_M stx cx16.VERA_ADDR_L - lda cx16.VERA_DATA1 + lda cx16.VERA_DATA0 rts }} } diff --git a/docs/source/todo.rst b/docs/source/todo.rst index 0b1de6096..cc51cd776 100644 --- a/docs/source/todo.rst +++ b/docs/source/todo.rst @@ -1,6 +1,7 @@ TODO ==== +- integrate MCIOUT into diskio.f_write() - revisit the seek example to see if write-seeking now works? - remove unused interned strings in the resulting code (for example from removed if/else blocks) - [on branch: shortcircuit] investigate McCarthy evaluation again? this may also reduce code size perhaps for things like if a>4 or a<2 .... diff --git a/examples/cx16/bobs.p8 b/examples/cx16/bobs.p8 index e07e51164..615c7b61e 100644 --- a/examples/cx16/bobs.p8 +++ b/examples/cx16/bobs.p8 @@ -6,6 +6,7 @@ ; "unlimited sprites / bobs" demo effect. ; Note that everything is prog8, no inline assembly used/required. ; Note2: these aren't actual sprites, it's a bitmap backbuffer display trick. +; TODO don't add bobs in pairs of 2 make them appear individually main { sub start() {