From: Brett Gordon Date: Wed, 7 Oct 2015 15:02:33 +0000 (-0400) Subject: coco3: tty: flesh out a array of supported modes. X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=7b746285c3c02ca2f585835cc03c0a6324a0fa03;p=FUZIX.git coco3: tty: flesh out a array of supported modes. --- diff --git a/Kernel/platform-coco3/devtty.c b/Kernel/platform-coco3/devtty.c index ead98f7f..3251af8d 100644 --- a/Kernel/platform-coco3/devtty.c +++ b/Kernel/platform-coco3/devtty.c @@ -57,6 +57,67 @@ struct mode_s{ uint8_t bottom; }; + +/* List (array) of all supported modes, as relayed to ioctl */ +static struct display fmodes[] = { + { + 0, /* Mode number */ + 80, 25, /* screen size */ + 80, 25, /* buffer size */ + 0xFF, 0xFF, /* no pan, scroll */ + FMT_TEXT, /* this is a text mode */ + HW_UNACCEL, /* no acceleration */ + GFX_PALETTE | + GFX_MULTIMODE | + GFX_PALETTE_SET | + GFX_TEXT, /* all the crap we support in this mode */ + 0, /* Memory size irrelevant */ + 0, /* supports no graphics commands */ + }, + { + 1, /* Mode number */ + 40, 25, /* screen size */ + 40, 25, /* buffer size */ + 0xFF, 0xFF, /* no pan, scroll */ + FMT_TEXT, /* this is a text mode */ + HW_UNACCEL, /* no acceleration */ + GFX_PALETTE | + GFX_MULTIMODE | + GFX_PALETTE_SET | + GFX_TEXT, /* all the crap we support in this mode */ + 0, /* Memory size irrelevant */ + 0, /* supports no graphics commands */ + }, + { + 2, /* Mode number */ + 64, 25, /* screen size */ + 64, 25, /* buffer size */ + 0xFF, 0xFF, /* no pan, scroll */ + FMT_TEXT, /* this is a text mode */ + HW_UNACCEL, /* no acceleration */ + GFX_PALETTE | + GFX_MULTIMODE | + GFX_PALETTE_SET | + GFX_TEXT, /* all the crap we support in this mode */ + 0, /* Memory size irrelevant */ + 0, /* supports no graphics commands */ + }, + { + 3, /* Mode number */ + 32, 25, /* screen size */ + 32, 25, /* buffer size */ + 0xFF, 0xFF, /* no pan, scroll */ + FMT_TEXT, /* this is a text mode */ + HW_UNACCEL, /* no acceleration */ + GFX_PALETTE | + GFX_MULTIMODE | + GFX_PALETTE_SET | + GFX_TEXT, /* all the crap we support in this mode */ + 0, /* Memory size irrelevant */ + 0, /* supports no graphics commands */ + } +}; + static struct mode_s mode[4] = { { 0x14, 80, 21, 79, 20 }, { 0x0c, 40, 21, 39, 20 }, @@ -424,21 +485,6 @@ unsigned char vt_map(unsigned char c) return c; } -static struct display display = { - 0, /* Mode number */ - 256, 192, /* screen size */ - 256, 192, /* buffer size */ - 0xFF, 0xFF, /* no pan, scroll */ - FMT_TEXT, /* all our supported modes */ - HW_UNACCEL, /* no acceleration */ - GFX_PALETTE | - GFX_MULTIMODE | - GFX_PALETTE_SET | - GFX_TEXT, /* all the crap we support in this mode */ - 0, /* Memory size irrelevant */ - 0, /* supports no commands */ -}; - int gfx_ioctl(uint8_t minor, uarg_t arg, char *ptr) {