From 78bd2cdcc49e1e51d277d10c4e4f1433055b8c5e Mon Sep 17 00:00:00 2001 From: Brett Gordon Date: Fri, 9 Oct 2015 02:16:41 -0400 Subject: [PATCH] coco3: all graphics mode buffers start at 0x0000 in physical block 9 --- Kernel/platform-coco3/devtty.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Kernel/platform-coco3/devtty.c b/Kernel/platform-coco3/devtty.c index 1d5fe96b..61cffb90 100644 --- a/Kernel/platform-coco3/devtty.c +++ b/Kernel/platform-coco3/devtty.c @@ -186,9 +186,14 @@ int curminor = 1; /* Apply settings to GIME chip */ void apply_gime( int minor ){ - *(volatile uint16_t *) 0xff9d = ptytab[minor-1].scrloc; - *(volatile uint8_t *) 0xff98 = ( hz & 0x78 )| ptytab[minor-1].vmod; - *(volatile uint8_t *) 0xff99 = ptytab[minor-1].vres; + struct pty *p=&(ptytab[minor-1]); + uint16_t s; + if( p->vmod & 0x80 ) + s=0x12000 / 8 ; + else s=p->scrloc; + *(volatile uint16_t *) 0xff9d = s; + *(volatile uint8_t *) 0xff98 = ( hz & 0x78 )| p->vmod; + *(volatile uint8_t *) 0xff99 = p->vres; } -- 2.34.1