equi

A self-descriptive stack-based PC platform
git clone git://git.luxferre.top/equi.git
Log | Files | Refs | README | LICENSE

commit ac18f1499cd7987f3aac988a07c901cc8cbd9cbc
parent ef0aee083f2b5ed77354c3a38ca7f38057320b4e
Author: Luxferre <lux@ferre>
Date:   Thu, 11 Aug 2022 12:11:27 +0300

Some cc65 screen init and welcome prompt fix

Diffstat:
Mequi.c | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/equi.c b/equi.c @@ -523,12 +523,17 @@ void equi_main_loop() { /* Equi VM entry point */ int main(int argc, char* argv[]) { + uchar instr, bc; + /* CC65-specific terminal init */ +#ifdef __CC65__ + clrscr(); + bc = cursor(1); +#endif /* _attempt_ to disable buffering for char input/output */ #if !defined __CC65__ && !defined __TINYC__ setvbuf(stdin, NULL, _IONBF, 0); setvbuf(stdout, NULL, _IONBF, 0); #endif - uchar instr; /* initialize the RAM in the most standard way */ ram.gpd_start = (uchar *)&ram.gpd - (uchar *)&ram.main_stack; ram.cmd_start = (uchar *)&ram.cmdbuf - (uchar *)&ram.main_stack; @@ -537,7 +542,7 @@ int main(int argc, char* argv[]) { /* Start both execution and input buffering from the start of command buffer (-1 because we use prefix increment) */ ram.pc = ram.ibp = 65535U; - printf("Welcome to Equi v" EQUI_VER " by Luxferre, 2022\n\nCLT: 0x%04X (%d bytes)\nGPD: 0x%04X (%d bytes)\nCommand buffer: 0x%04X (%d bytes)\nEqui ready\n\n> ", + printf("\nWelcome to Equi v" EQUI_VER " by Luxferre, 2022\nCLT: 0x%04X (%d bytes)\nGPD: 0x%04X (%d bytes)\nCommand buffer: 0x%04X (%d bytes)\nEqui ready\n\n> ", (unsigned int) ((uchar *)&ram.clt - (uchar *)&ram.main_stack), (unsigned int) ((uchar *)&ram.gpd - (uchar *)&ram.clt), ram.gpd_start,