From 15e8557f64790f06920ca96156744c74ab6c724f Mon Sep 17 00:00:00 2001 From: Stefan Wessels Date: Tue, 10 Oct 2023 14:14:20 -0700 Subject: [PATCH] Fixed CX16 and added Plus4 to Makefile --- Makefile | 2 +- src/cx16/platCX16.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 57c37fc..5901a54 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ # Space or comma separated list of cc65 supported target platforms to build for. # Default: c64 (lowercase!) -TARGETS := apple2 atari atmos c64 c64.chr cx16 +TARGETS := apple2 atari atmos c64 c64.chr plus4 cx16 # Name of the final, single-file executable. # Default: name of the current dir with target name appended diff --git a/src/cx16/platCX16.c b/src/cx16/platCX16.c index b472ae7..8ec41c0 100644 --- a/src/cx16/platCX16.c +++ b/src/cx16/platCX16.c @@ -97,7 +97,7 @@ char plat_TimeExpired(unsigned int aTime, char *timerInit); void clearTextLayer(int x, int y, int w, int h) { int sx, sw; - unsigned int offset = y * 256; // lines have a stride of 256 + unsigned long offset = 0x1B000 + y * 256; // lines have a stride of 256 // Double width for characters - character then color x *= 2; @@ -118,6 +118,11 @@ void clearTextLayer(int x, int y, int w, int h) // Skip to the start of the next area to fill offset += 256 - w; } + // long i; + // for(i=0x1B000; i < 0x1EBFF; i+=2) { + // vpoke(32,i); + // vpoke(0,i+1); + // } } /*-----------------------------------------------------------------------*/ @@ -210,7 +215,7 @@ void plat_Init() VIA1.pra = 0; // Video mode and graphics init - sc_vm = videomode(VIDEOMODE_320x200) ; + sc_vm = videomode(VIDEOMODE_320x240) ; clearTextLayer(0, 0, 40, 25); plat_setColors(COLOR_WHITE, COLOR_WHITE, COLOR_GREEN); __asm__("jsr GRAPH_CLEAR");