From ffc30c0c6ea220d8adaedcdcc9517436fdb98f86 Mon Sep 17 00:00:00 2001 From: Greg King Date: Sun, 18 Apr 2021 01:39:44 -0400 Subject: [PATCH] Added RAM_BANK and ROM_BANK macro definitions to cx16.h header. --- include/cx16.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/cx16.h b/include/cx16.h index f3d02bd28..179021e84 100644 --- a/include/cx16.h +++ b/include/cx16.h @@ -278,6 +278,9 @@ struct __vera { #define VIA1 (*(volatile struct __6522 *)0x9F60) #define VIA2 (*(volatile struct __6522 *)0x9F70) +#define RAM_BANK (VIA1.pra) +#define ROM_BANK (VIA1.prb) + /* A structure with the x16emu's settings registers */ struct __emul { unsigned char debug; /* Boolean: debugging enabled */ @@ -295,7 +298,7 @@ struct __emul { #define EMULATOR (*(volatile struct __emul *)0x9FB0) /* An array window into the half Mebibyte or two Mebibytes of banked RAM */ -#define BANK_RAM ((unsigned char[0x2000])0xA000) +#define BANK_RAM ((unsigned char *)0xA000)