Commit fdb58432 authored by deuce's avatar deuce
Browse files

Add support to 8-bit Atari mode (40x24)

parent 41feb854
......@@ -20270,7 +20270,265 @@ struct conio_font_data_struct conio_fontdata[257] = {
"\x0f\x0f\x0f\x0f\xff\xff\xff\xff"
"\x0f\x0f\x0f\x0f\xf0\xf0\xf0\xf0"
, "Commodore 128 (Lower)"}
,{NULL, NULL, NULL, NULL}
,{NULL, NULL
, "\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x18\x18\x18\x18\x00\x18\x00"
"\x00\x66\x66\x66\x00\x00\x00\x00"
"\x00\x66\xff\x66\x66\xff\x66\x00"
"\x18\x3e\x60\x3c\x06\x7c\x18\x00"
"\x00\x66\x6c\x18\x30\x66\x46\x00"
"\x1c\x36\x1c\x38\x6f\x66\x3b\x00"
"\x00\x18\x18\x18\x00\x00\x00\x00"
"\x00\x0e\x1c\x18\x18\x1c\x0e\x00"
"\x00\x70\x38\x18\x18\x38\x70\x00"
"\x00\x66\x3c\xff\x3c\x66\x00\x00"
"\x00\x18\x18\x7e\x18\x18\x00\x00"
"\x00\x00\x00\x00\x00\x18\x18\x30"
"\x00\x00\x00\x7e\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x18\x18\x00"
"\x00\x06\x0c\x18\x30\x60\x40\x00"
"\x00\x3c\x66\x6e\x76\x66\x3c\x00"
"\x00\x18\x38\x18\x18\x18\x7e\x00"
"\x00\x3c\x66\x0c\x18\x30\x7e\x00"
"\x00\x7e\x0c\x18\x0c\x66\x3c\x00"
"\x00\x0c\x1c\x3c\x6c\x7e\x0c\x00"
"\x00\x7e\x60\x7c\x06\x66\x3c\x00"
"\x00\x3c\x60\x7c\x66\x66\x3c\x00"
"\x00\x7e\x06\x0c\x18\x30\x30\x00"
"\x00\x3c\x66\x3c\x66\x66\x3c\x00"
"\x00\x3c\x66\x3e\x06\x0c\x38\x00"
"\x00\x00\x18\x18\x00\x18\x18\x00"
"\x00\x00\x18\x18\x00\x18\x18\x30"
"\x06\x0c\x18\x30\x18\x0c\x06\x00"
"\x00\x00\x7e\x00\x00\x7e\x00\x00"
"\x60\x30\x18\x0c\x18\x30\x60\x00"
"\x00\x3c\x66\x0c\x18\x00\x18\x00"
"\x00\x3c\x66\x6e\x6e\x60\x3e\x00"
"\x00\x18\x3c\x66\x66\x7e\x66\x00"
"\x00\x7c\x66\x7c\x66\x66\x7c\x00"
"\x00\x3c\x66\x60\x60\x66\x3c\x00"
"\x00\x78\x6c\x66\x66\x6c\x78\x00"
"\x00\x7e\x60\x7c\x60\x60\x7e\x00"
"\x00\x7e\x60\x7c\x60\x60\x60\x00"
"\x00\x3e\x60\x60\x6e\x66\x3e\x00"
"\x00\x66\x66\x7e\x66\x66\x66\x00"
"\x00\x7e\x18\x18\x18\x18\x7e\x00"
"\x00\x06\x06\x06\x06\x66\x3c\x00"
"\x00\x66\x6c\x78\x78\x6c\x66\x00"
"\x00\x60\x60\x60\x60\x60\x7e\x00"
"\x00\x63\x77\x7f\x6b\x63\x63\x00"
"\x00\x66\x76\x7e\x7e\x6e\x66\x00"
"\x00\x3c\x66\x66\x66\x66\x3c\x00"
"\x00\x7c\x66\x66\x7c\x60\x60\x00"
"\x00\x3c\x66\x66\x66\x6c\x36\x00"
"\x00\x7c\x66\x66\x7c\x6c\x66\x00"
"\x00\x3c\x60\x3c\x06\x06\x3c\x00"
"\x00\x7e\x18\x18\x18\x18\x18\x00"
"\x00\x66\x66\x66\x66\x66\x7e\x00"
"\x00\x66\x66\x66\x66\x3c\x18\x00"
"\x00\x63\x63\x6b\x7f\x77\x63\x00"
"\x00\x66\x66\x3c\x3c\x66\x66\x00"
"\x00\x66\x66\x3c\x18\x18\x18\x00"
"\x00\x7e\x0c\x18\x30\x60\x7e\x00"
"\x00\x1e\x18\x18\x18\x18\x1e\x00"
"\x00\x40\x60\x30\x18\x0c\x06\x00"
"\x00\x78\x18\x18\x18\x18\x78\x00"
"\x00\x08\x1c\x36\x63\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\xff\x00"
"\x00\x36\x7f\x7f\x3e\x1c\x08\x00"
"\x18\x18\x18\x1f\x1f\x18\x18\x18"
"\x03\x03\x03\x03\x03\x03\x03\x03"
"\x18\x18\x18\xf8\xf8\x00\x00\x00"
"\x18\x18\x18\xf8\xf8\x18\x18\x18"
"\x00\x00\x00\xf8\xf8\x18\x18\x18"
"\x03\x07\x0e\x1c\x38\x70\xe0\xc0"
"\xc0\xe0\x70\x38\x1c\x0e\x07\x03"
"\x01\x03\x07\x0f\x1f\x3f\x7f\xff"
"\x00\x00\x00\x00\x0f\x0f\x0f\x0f"
"\x80\xc0\xe0\xf0\xf8\xfc\xfe\xff"
"\x0f\x0f\x0f\x0f\x00\x00\x00\x00"
"\xf0\xf0\xf0\xf0\x00\x00\x00\x00"
"\xff\xff\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\xff\xff"
"\x00\x00\x00\x00\xf0\xf0\xf0\xf0"
"\x00\x1c\x1c\x77\x77\x08\x1c\x00"
"\x00\x00\x00\x1f\x1f\x18\x18\x18"
"\x00\x00\x00\xff\xff\x00\x00\x00"
"\x18\x18\x18\xff\xff\x18\x18\x18"
"\x00\x00\x3c\x7e\x7e\x7e\x3c\x00"
"\x00\x00\x00\x00\xff\xff\xff\xff"
"\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0"
"\x00\x00\x00\xff\xff\x18\x18\x18"
"\x18\x18\x18\xff\xff\x00\x00\x00"
"\xf0\xf0\xf0\xf0\xf0\xf0\xf0\xf0"
"\x18\x18\x18\x1f\x1f\x00\x00\x00"
"\x78\x60\x78\x60\x7e\x18\x1e\x00"
"\x00\x18\x3c\x7e\x18\x18\x18\x00"
"\x00\x18\x18\x18\x7e\x3c\x18\x00"
"\x00\x18\x30\x7e\x30\x18\x00\x00"
"\x00\x18\x0c\x7e\x0c\x18\x00\x00"
"\x00\x18\x3c\x7e\x7e\x3c\x18\x00"
"\x00\x00\x3c\x06\x3e\x66\x3e\x00"
"\x00\x60\x60\x7c\x66\x66\x7c\x00"
"\x00\x00\x3c\x60\x60\x60\x3c\x00"
"\x00\x06\x06\x3e\x66\x66\x3e\x00"
"\x00\x00\x3c\x66\x7e\x60\x3c\x00"
"\x00\x0e\x18\x3e\x18\x18\x18\x00"
"\x00\x00\x3e\x66\x66\x3e\x06\x7c"
"\x00\x60\x60\x7c\x66\x66\x66\x00"
"\x00\x18\x00\x38\x18\x18\x3c\x00"
"\x00\x06\x00\x06\x06\x06\x06\x3c"
"\x00\x60\x60\x6c\x78\x6c\x66\x00"
"\x00\x38\x18\x18\x18\x18\x3c\x00"
"\x00\x00\x66\x7f\x7f\x6b\x63\x00"
"\x00\x00\x7c\x66\x66\x66\x66\x00"
"\x00\x00\x3c\x66\x66\x66\x3c\x00"
"\x00\x00\x7c\x66\x66\x7c\x60\x60"
"\x00\x00\x3e\x66\x66\x3e\x06\x06"
"\x00\x00\x7c\x66\x60\x60\x60\x00"
"\x00\x00\x3e\x60\x3c\x06\x7c\x00"
"\x00\x18\x7e\x18\x18\x18\x0e\x00"
"\x00\x00\x66\x66\x66\x66\x3e\x00"
"\x00\x00\x66\x66\x66\x3c\x18\x00"
"\x00\x00\x63\x6b\x7f\x3e\x36\x00"
"\x00\x00\x66\x3c\x18\x3c\x66\x00"
"\x00\x00\x66\x66\x66\x3e\x0c\x78"
"\x00\x00\x7e\x0c\x18\x30\x7e\x00"
"\x00\x18\x3c\x7e\x7e\x18\x3c\x00"
"\x18\x18\x18\x18\x18\x18\x18\x18"
"\x00\x7e\x78\x7c\x6e\x66\x06\x00"
"\x08\x18\x38\x78\x38\x18\x08\x00"
"\x10\x18\x1c\x1e\x1c\x18\x10\x00"
/* Inverted */
"\xff\xff\xff\xff\xff\xff\xff\xff"
"\xff\xe7\xe7\xe7\xe7\xff\xe7\xff"
"\xff\x99\x99\x99\xff\xff\xff\xff"
"\xff\x99\x00\x99\x99\x00\x99\xff"
"\xe7\xc1\x9f\xc3\xf9\x83\xe7\xff"
"\xff\x99\x93\xe7\xcf\x99\xb9\xff"
"\xe3\xc9\xe3\xc7\x90\x99\xc4\xff"
"\xff\xe7\xe7\xe7\xff\xff\xff\xff"
"\xff\xf1\xe3\xe7\xe7\xe3\xf1\xff"
"\xff\x8f\xc7\xe7\xe7\xc7\x8f\xff"
"\xff\x99\xc3\x00\xc3\x99\xff\xff"
"\xff\xe7\xe7\x81\xe7\xe7\xff\xff"
"\xff\xff\xff\xff\xff\xe7\xe7\xcf"
"\xff\xff\xff\x81\xff\xff\xff\xff"
"\xff\xff\xff\xff\xff\xe7\xe7\xff"
"\xff\xf9\xf3\xe7\xcf\x9f\xbf\xff"
"\xff\xc3\x99\x91\x89\x99\xc3\xff"
"\xff\xe7\xc7\xe7\xe7\xe7\x81\xff"
"\xff\xc3\x99\xf3\xe7\xcf\x81\xff"
"\xff\x81\xf3\xe7\xf3\x99\xc3\xff"
"\xff\xf3\xe3\xc3\x93\x81\xf3\xff"
"\xff\x81\x9f\x83\xf9\x99\xc3\xff"
"\xff\xc3\x9f\x83\x99\x99\xc3\xff"
"\xff\x81\xf9\xf3\xe7\xcf\xcf\xff"
"\xff\xc3\x99\xc3\x99\x99\xc3\xff"
"\xff\xc3\x99\xc1\xf9\xf3\xc7\xff"
"\xff\xff\xe7\xe7\xff\xe7\xe7\xff"
"\xff\xff\xe7\xe7\xff\xe7\xe7\xcf"
"\xf9\xf3\xe7\xcf\xe7\xf3\xf9\xff"
"\xff\xff\x81\xff\xff\x81\xff\xff"
"\x9f\xcf\xe7\xf3\xe7\xcf\x9f\xff"
"\xff\xc3\x99\xf3\xe7\xff\xe7\xff"
"\xff\xc3\x99\x91\x91\x9f\xc1\xff"
"\xff\xe7\xc3\x99\x99\x81\x99\xff"
"\xff\x83\x99\x83\x99\x99\x83\xff"
"\xff\xc3\x99\x9f\x9f\x99\xc3\xff"
"\xff\x87\x93\x99\x99\x93\x87\xff"
"\xff\x81\x9f\x83\x9f\x9f\x81\xff"
"\xff\x81\x9f\x83\x9f\x9f\x9f\xff"
"\xff\xc1\x9f\x9f\x91\x99\xc1\xff"
"\xff\x99\x99\x81\x99\x99\x99\xff"
"\xff\x81\xe7\xe7\xe7\xe7\x81\xff"
"\xff\xf9\xf9\xf9\xf9\x99\xc3\xff"
"\xff\x99\x93\x87\x87\x93\x99\xff"
"\xff\x9f\x9f\x9f\x9f\x9f\x81\xff"
"\xff\x9c\x88\x80\x94\x9c\x9c\xff"
"\xff\x99\x89\x81\x81\x91\x99\xff"
"\xff\xc3\x99\x99\x99\x99\xc3\xff"
"\xff\x83\x99\x99\x83\x9f\x9f\xff"
"\xff\xc3\x99\x99\x99\x93\xc9\xff"
"\xff\x83\x99\x99\x83\x93\x99\xff"
"\xff\xc3\x9f\xc3\xf9\xf9\xc3\xff"
"\xff\x81\xe7\xe7\xe7\xe7\xe7\xff"
"\xff\x99\x99\x99\x99\x99\x81\xff"
"\xff\x99\x99\x99\x99\xc3\xe7\xff"
"\xff\x9c\x9c\x94\x80\x88\x9c\xff"
"\xff\x99\x99\xc3\xc3\x99\x99\xff"
"\xff\x99\x99\xc3\xe7\xe7\xe7\xff"
"\xff\x81\xf3\xe7\xcf\x9f\x81\xff"
"\xff\xe1\xe7\xe7\xe7\xe7\xe1\xff"
"\xff\xbf\x9f\xcf\xe7\xf3\xf9\xff"
"\xff\x87\xe7\xe7\xe7\xe7\x87\xff"
"\xff\xf7\xe3\xc9\x9c\xff\xff\xff"
"\xff\xff\xff\xff\xff\xff\x00\xff"
"\xff\xc9\x80\x80\xc1\xe3\xf7\xff"
"\xe7\xe7\xe7\xe0\xe0\xe7\xe7\xe7"
"\xfc\xfc\xfc\xfc\xfc\xfc\xfc\xfc"
"\xe7\xe7\xe7\x07\x07\xff\xff\xff"
"\xe7\xe7\xe7\x07\x07\xe7\xe7\xe7"
"\xff\xff\xff\x07\x07\xe7\xe7\xe7"
"\xfc\xf8\xf1\xe3\xc7\x8f\x1f\x3f"
"\x3f\x1f\x8f\xc7\xe3\xf1\xf8\xfc"
"\xfe\xfc\xf8\xf0\xe0\xc0\x80\x00"
"\xff\xff\xff\xff\xf0\xf0\xf0\xf0"
"\x7f\x3f\x1f\x0f\x07\x03\x01\x00"
"\xf0\xf0\xf0\xf0\xff\xff\xff\xff"
"\x0f\x0f\x0f\x0f\xff\xff\xff\xff"
"\x00\x00\xff\xff\xff\xff\xff\xff"
"\xff\xff\xff\xff\xff\xff\x00\x00"
"\xff\xff\xff\xff\x0f\x0f\x0f\x0f"
"\xff\xe3\xe3\x88\x88\xf7\xe3\xff"
"\xff\xff\xff\xe0\xe0\xe7\xe7\xe7"
"\xff\xff\xff\x00\x00\xff\xff\xff"
"\xe7\xe7\xe7\x00\x00\xe7\xe7\xe7"
"\xff\xff\xc3\x81\x81\x81\xc3\xff"
"\xff\xff\xff\xff\x00\x00\x00\x00"
"\x3f\x3f\x3f\x3f\x3f\x3f\x3f\x3f"
"\xff\xff\xff\x00\x00\xe7\xe7\xe7"
"\xe7\xe7\xe7\x00\x00\xff\xff\xff"
"\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f"
"\xe7\xe7\xe7\xe0\xe0\xff\xff\xff"
"\x87\x9f\x87\x9f\x81\xe7\xe1\xff"
"\xff\xe7\xc3\x81\xe7\xe7\xe7\xff"
"\xff\xe7\xe7\xe7\x81\xc3\xe7\xff"
"\xff\xe7\xcf\x81\xcf\xe7\xff\xff"
"\xff\xe7\xf3\x81\xf3\xe7\xff\xff"
"\xff\xe7\xc3\x81\x81\xc3\xe7\xff"
"\xff\xff\xc3\xf9\xc1\x99\xc1\xff"
"\xff\x9f\x9f\x83\x99\x99\x83\xff"
"\xff\xff\xc3\x9f\x9f\x9f\xc3\xff"
"\xff\xf9\xf9\xc1\x99\x99\xc1\xff"
"\xff\xff\xc3\x99\x81\x9f\xc3\xff"
"\xff\xf1\xe7\xc1\xe7\xe7\xe7\xff"
"\xff\xff\xc1\x99\x99\xc1\xf9\x83"
"\xff\x9f\x9f\x83\x99\x99\x99\xff"
"\xff\xe7\xff\xc7\xe7\xe7\xc3\xff"
"\xff\xf9\xff\xf9\xf9\xf9\xf9\xc3"
"\xff\x9f\x9f\x93\x87\x93\x99\xff"
"\xff\xc7\xe7\xe7\xe7\xe7\xc3\xff"
"\xff\xff\x99\x80\x80\x94\x9c\xff"
"\xff\xff\x83\x99\x99\x99\x99\xff"
"\xff\xff\xc3\x99\x99\x99\xc3\xff"
"\xff\xff\x83\x99\x99\x83\x9f\x9f"
"\xff\xff\xc1\x99\x99\xc1\xf9\xf9"
"\xff\xff\x83\x99\x9f\x9f\x9f\xff"
"\xff\xff\xc1\x9f\xc3\xf9\x83\xff"
"\xff\xe7\x81\xe7\xe7\xe7\xf1\xff"
"\xff\xff\x99\x99\x99\x99\xc1\xff"
"\xff\xff\x99\x99\x99\xc3\xe7\xff"
"\xff\xff\x9c\x94\x80\xc1\xc9\xff"
"\xff\xff\x99\xc3\xe7\xc3\x99\xff"
"\xff\xff\x99\x99\x99\xc1\xf3\x87"
"\xff\xff\x81\xf3\xe7\xcf\x81\xff"
"\xff\xe7\xc3\x81\x81\xe7\xc3\xff"
"\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7"
"\xff\x81\x87\x83\x91\x99\xf9\xff"
"\xf7\xe7\xc7\x87\xc7\xe7\xf7\xff"
"\xef\xe7\xe3\xe1\xe3\xe7\xef\xff"
, "Atari"}
,{NULL, NULL, NULL, NULL}
,{NULL, NULL, NULL, NULL}
,{NULL, NULL, NULL, NULL}
......@@ -173,6 +173,7 @@ enum text_modes
C64_40X25 = 147, /* Commodore 64 40x25 colour mode */
C128_40X25, /* Commodore 128 40x25 colour mode */
C128_80X25, /* Commodore 128 40x25 colour mode */
ATARI_40X24, /* Atari 800 40x24 colour text mode */
};
#define COLOR_MODE C80
......
......@@ -1146,6 +1146,7 @@ void cterm_init(int height, int width, int xpos, int ypos, int backlines, unsign
char *revision="$Revision$";
char *in;
char *out;
int i;
memset(&cterm, 0, sizeof(cterm));
cterm.x=xpos;
......@@ -1205,6 +1206,12 @@ void cterm_init(int height, int width, int xpos, int ypos, int backlines, unsign
sem_init(&playnote_thread_terminated,0,0);
_beginthread(playnote_thread, 0, NULL);
}
/* Set up tabs for ATASCII */
if(cterm.emulation == CTERM_EMULATION_ATASCII) {
for(i=0; i<(sizeof(cterm_tabs)/sizeof(cterm_tabs[0])); i++)
cterm.escbuf[cterm_tabs[i]]=1;
}
}
void ctputs(char *buf)
......@@ -1468,7 +1475,160 @@ char *cterm_write(unsigned char *buf, int buflen, char *retbuf, size_t retsize,
}
}
else {
if(cterm.emulation == CTERM_EMULATION_PETASCII) {
if(cterm.emulation == CTERM_EMULATION_ATASCII) {
switch(buf[j]) {
if(cterm.attr==7) {
case 28: /* Up (No Scroll) */
if(wherey()>1)
gotoxy(wherex(),wherey()-1);
break;
case 29: /* Down (Scrolls) */
if(wherey()==cterm.height)
scrollup();
else
gotoxy(wherex(), wherey()+1);
break;
case 30: /* Left (Wraps) */
if(wherex()==1) {
if(wherey() > 1)
gotoxy(cterm.width, wherey()-1);
}
else
gotoxy(wherex()-1, wherey());
break;
case 31: /* Right (Wraps) */
if(wherex()==cterm.width) {
if(wherey()==cterm.height) {
scrollup();
gotoxy(1,wherey());
}
else
gotoxy(1,wherey()+1);
}
else
gotoxy(wherex()+1,wherey());
break;
case 126: /* Backspace (Wraps) */
if(wherex()==1) {
if(wherey()==1)
break;
gotoxy(cterm.width, wherey()-1);
}
else
gotoxy(wherex()-1, wherey());
/* Fall Through */
case 254: /* Delete Char */
p=(char *)alloca((cterm.width-wherex()+1)*2);
gettext(cterm.x+wherex(),cterm.y+wherey()-1,cterm.x+cterm.width-1,cterm.y+wherey()-1,p);
k=(cterm.width-wherex())*2;
p[k++]=' ';
p[k++]=cterm.attr;
puttext(cterm.x+wherex()-1,cterm.y+wherey()-1,cterm.x+cterm.width-1,cterm.y+wherey()-1,p);
break;
case 156: /* Delete Line */
dellines(1);
break;
case 157: /* Insert Line */
if(cterm.height-wherey()) {
p=(char *)alloca((cterm.height-wherey())*cterm.width*2);
gettext(cterm.x,cterm.y+wherey()-1,cterm.x+cterm.width-1,cterm.y+cterm.height-2,p);
puttext(cterm.x,cterm.y+wherey(),cterm.x+cterm.width-1,cterm.y+cterm.height-1,p);
}
else {
p=(char *)alloca(cterm.width*2);
}
for(k=0;k<cterm.width;k++) {
p[k*2]=' ';
p[k*2+1]=cterm.attr;
}
puttext(cterm.x,cterm.y+wherey()-1,cterm.x+cterm.width-1,cterm.y+wherey()-1,p);
break;
case 255: /* Insert Char */
p=(char *)alloca((cterm.width-wherex()+1)*2);
gettext(cterm.x+wherex()-1,cterm.y+wherey()-1,cterm.x+cterm.width-2,cterm.y+wherey()-1,p+2);
p[0]=' ';
p[1]=cterm.attr;
puttext(cterm.x+wherex()-1,cterm.y+wherey()-1,cterm.x+cterm.width-1,cterm.y+wherey()-1,p);
break;
case 125: /* Clear Screen */
clearscreen(cterm.attr);
break;
case 253: /* Beep */
#ifdef __unix__
putch(7);
#else
MessageBeep(MB_OK);
#endif
break;
/* We abuse the ESC buffer for tab stops */
case 127: /* Tab */
if(wherex()==cterm.width)
break;
for(k=wherex()+1; k<=cterm.width; k++) {
if(cterm.escbuf[k]) {
gotoxy(k,wherey());
break;
}
}
break;
case 158: /* Clear Tab */
cterm.escbuf[wherex()]=0;
break;
case 159: /* Set Tab */
cterm.escbuf[wherex()]=1;
break;
case 27: /* ESC */
cterm.attr=1;
break;
}
case 155: /* Return (Clears ESC) */
cterm.attr=7;
gotoxy(1, wherey());
if(wherey()==cterm.height)
scrollup();
else
gotoxy(wherex(), wherey()+1);
break;
default:
cterm.attr=7;
/* Translate to screen codes */
k=buf[j];
if(k < 32) {
k +=64;
}
else if(k < 96) {
k -= 32;
}
else if(k < 128) {
/* No translation */
}
else if(k < 160) {
k +=64;
}
else if(k < 224) {
k -= 32;
}
else if(k < 256) {
/* No translation */
}
ch[0] = k;
ch[1] = cterm.attr;
puttext(cterm.x+wherex()-1,cterm.y+wherey()-1,cterm.x+wherex()-1,cterm.y+wherey()-1,ch);
ch[1]=0;
if(wherex()==cterm.width) {
if(wherey()==cterm.height) {
scrollup();
gotoxy(1,wherey());
}
else
gotoxy(1,wherey()+1);
}
else
gotoxy(wherex()+1,wherey());
break;
}
}
else if(cterm.emulation == CTERM_EMULATION_PETASCII) {
switch(buf[j]) {
case 5: /* White */
case 28: /* Red */
......
......@@ -94,6 +94,7 @@ struct cterminal {
enum {
CTERM_EMULATION_ANSI_BBS
,CTERM_EMULATION_PETASCII
,CTERM_EMULATION_ATASCII
};
#ifdef __cplusplus
......
......@@ -4,7 +4,7 @@
#include "vidmodes.h"
struct video_params vparams[39] = {
struct video_params vparams[40] = {
/* BW 40x25 */
{BW40, GREYSCALE_PALETTE, 40, 25, 14, 15, 16, 8},
/* CO 40x25 */
......@@ -83,6 +83,8 @@ struct video_params vparams[39] = {
{C128_40X25, COLOUR_PALETTE, 40, 25, 0, 7, 8, 8},
/* Commodore 128 80x25 mode */
{C128_80X25, COLOUR_PALETTE, 80, 25, 0, 7, 8, 8},
/* Atari 800 40x24 mode */
{ATARI_40X24, MONO_PALETTE, 40, 24, 0, 7, 8, 8},
};
unsigned char palettes[4][16] = {
......@@ -101,7 +103,7 @@ unsigned char palettes[4][16] = {
/* C64 */
{ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
}
},
};
struct dac_colors dac_default[32] = {
......@@ -117,7 +119,7 @@ struct dac_colors dac_default[32] = {
{0x35, 0x29, 0x79}, {0xb8, 0xc7, 0x6f}, {0x6f, 0x4f, 0x25},
{0x43, 0x39, 0x00}, {0x9a, 0x67, 0x59}, {0x44, 0x44, 0x44},
{0x6c, 0x6c, 0x6c}, {0x9a, 0xd2, 0x84}, {0x6c, 0x5e, 0xb5},
{0x95, 0x95, 0x95}
{0x95, 0x95, 0x95},
};
int find_vmode(int mode)
......
......@@ -87,7 +87,7 @@ enum {
,C64_PALETTE
};
extern struct video_params vparams[39];
extern struct video_params vparams[40];
#define NUMMODES (sizeof(vparams) / sizeof(struct video_params))
extern unsigned char palettes[4][16];
extern struct dac_colors dac_default[32];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment