From ea43c34de86edca462c7e39ce27100becaa66e4c Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Fri, 1 Apr 2022 00:04:40 +0200 Subject: [PATCH] x16 r39: fix screen colors after changing screen mode --- docs/source/todo.rst | 6 ++---- examples/cx16/colorbars.p8 | 4 +++- examples/cx16/rasterbars.p8 | 3 +++ examples/cx16/tehtriz.p8 | 5 ++++- examples/test.p8 | 4 ++++ 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/docs/source/todo.rst b/docs/source/todo.rst index 16a6eb93f..75d1feb42 100644 --- a/docs/source/todo.rst +++ b/docs/source/todo.rst @@ -4,12 +4,10 @@ TODO For next release ^^^^^^^^^^^^^^^^ - x16: new vera memory layout https://github.com/commanderx16/x16-rom/issues/185 - (partly)broken examples: colorbars, rasterbars, tehtriz, testvtui - something is wrong with the screen colors. Palette offset? + (partly)broken examples: colorbars (no bars), testvtui (VTUI lib not updated for new r39 yet) - x16: optimize diskio load_raw because headerless files are now supported https://github.com/commanderx16/x16-rom/pull/216 note: must still work on c64/c128 that don't have this! -- x16: fix the separate applications as well (assembler, wormfood, ...) -- x16: fix Petaxian colors. +- x16: fix the separate applications as well (assembler, ...) - vm codegen: When - vm codegen: Pipe expression diff --git a/examples/cx16/colorbars.p8 b/examples/cx16/colorbars.p8 index 08463e5de..78ec7bc05 100644 --- a/examples/cx16/colorbars.p8 +++ b/examples/cx16/colorbars.p8 @@ -7,9 +7,11 @@ main { sub start() { ; make palette color 1 black so we can print black letters over the background color 0 void cx16.screen_mode(3, false) + txt.color2(1,0) ; make sure correct screen colors are (re)set + txt.clear_screen() + cx16.vpoke(1, $fa02, $0) cx16.vpoke(1, $fa03, $0) - txt.color(1) txt.plot(13,12) txt.print("amiga-inspired") txt.plot(10,14) diff --git a/examples/cx16/rasterbars.p8 b/examples/cx16/rasterbars.p8 index 6cbea7767..f7d83941e 100644 --- a/examples/cx16/rasterbars.p8 +++ b/examples/cx16/rasterbars.p8 @@ -9,6 +9,9 @@ main { sub start() { void cx16.screen_mode(3, false) + txt.color2(14,0) ; make sure correct screen colors are (re)set + txt.clear_screen() + txt.plot(14,14) txt.print("raster bars!") diff --git a/examples/cx16/tehtriz.p8 b/examples/cx16/tehtriz.p8 index fc0e0b7ca..6f22e834e 100644 --- a/examples/cx16/tehtriz.p8 +++ b/examples/cx16/tehtriz.p8 @@ -32,7 +32,10 @@ main { sub start() { - void cx16.screen_mode(3, false) ; low res + void cx16.screen_mode(3, false) ; low res + txt.color2(7,0) ; make sure correct screen colors are (re)set + txt.clear_screen() + sound.init() newGame() drawBoard() diff --git a/examples/test.p8 b/examples/test.p8 index 786c186df..d0b311b36 100644 --- a/examples/test.p8 +++ b/examples/test.p8 @@ -14,6 +14,10 @@ main { txt.setcc2(11,4,'*',$05) txt.setcc2(12,4,'*',$d0) + sys.wait(100) + cx16.screen_mode(0, false) + sys.wait(100) + ; byte[] barr = [-1,-2,-3] ; uword[] uwarr = [1111,2222,3333]