Some cc65 screen init and welcome prompt fix
This commit is contained in:
@@ -523,12 +523,17 @@ void equi_main_loop() {
|
|||||||
/* Equi VM entry point */
|
/* Equi VM entry point */
|
||||||
|
|
||||||
int main(int argc, char* argv[]) {
|
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 */
|
/* _attempt_ to disable buffering for char input/output */
|
||||||
#if !defined __CC65__ && !defined __TINYC__
|
#if !defined __CC65__ && !defined __TINYC__
|
||||||
setvbuf(stdin, NULL, _IONBF, 0);
|
setvbuf(stdin, NULL, _IONBF, 0);
|
||||||
setvbuf(stdout, NULL, _IONBF, 0);
|
setvbuf(stdout, NULL, _IONBF, 0);
|
||||||
#endif
|
#endif
|
||||||
uchar instr;
|
|
||||||
/* initialize the RAM in the most standard way */
|
/* initialize the RAM in the most standard way */
|
||||||
ram.gpd_start = (uchar *)&ram.gpd - (uchar *)&ram.main_stack;
|
ram.gpd_start = (uchar *)&ram.gpd - (uchar *)&ram.main_stack;
|
||||||
ram.cmd_start = (uchar *)&ram.cmdbuf - (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) */
|
/* Start both execution and input buffering from the start of command buffer (-1 because we use prefix increment) */
|
||||||
ram.pc = ram.ibp = 65535U;
|
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.clt - (uchar *)&ram.main_stack),
|
||||||
(unsigned int) ((uchar *)&ram.gpd - (uchar *)&ram.clt),
|
(unsigned int) ((uchar *)&ram.gpd - (uchar *)&ram.clt),
|
||||||
ram.gpd_start,
|
ram.gpd_start,
|
||||||
|
|||||||
Reference in New Issue
Block a user