From: Brett Gordon Date: Sat, 8 Aug 2015 15:20:19 +0000 (-0400) Subject: added 64 and 32 column modes. X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=1b406a20c9154d335d03df855d7586a682c3f259;p=FUZIX.git added 64 and 32 column modes. added tty init routine. --- diff --git a/Kernel/platform-coco3/devtty.c b/Kernel/platform-coco3/devtty.c index 7b760cb1..38d558ce 100644 --- a/Kernel/platform-coco3/devtty.c +++ b/Kernel/platform-coco3/devtty.c @@ -60,6 +60,22 @@ struct s_queue ttyinq[NUM_DEV_TTY + 1] = { // unsigned char bottom; /* bottom most coord */ //}; +struct mode_s{ + uint8_t gime; + uint8_t width; + uint8_t height; + uint8_t right; + uint8_t bottom; +}; + +static struct mode_s mode[4] = { + { 0x14, 80, 21, 79, 20 }, + { 0x0c, 40, 21, 39, 20 }, + { 0x10, 64, 21, 63, 20 }, + { 0x08, 32, 21, 31, 20 }, +}; + + static struct pty ptytab[] = { { (unsigned char *) 0xb400, @@ -413,3 +429,23 @@ unsigned char vt_map(unsigned char c) return 0x7F; return c; } + + +/* Initial Setup stuff down here. */ + + +void devtty_init() +{ + int i; + int vtmode=0; + /* scan cmdline for params for vt */ + + /* apply default/cmdline mode to terminal structs */ + for( i=0; i<2; i++){ + memcpy( &(ptytab[i].gime), &(mode[vtmode]), 5 ); + } + /* apply terminal to registers */ + *(unsigned int *) 0xff9d = ptytab[0].scrloc; + *(unsigned char *) 0xff99 = ptytab[0].gime; +} +