coco3: all graphics mode buffers start at 0x0000 in physical block 9
authorBrett Gordon <beretta42@gmail.com>
Fri, 9 Oct 2015 06:16:41 +0000 (02:16 -0400)
committerBrett Gordon <beretta42@gmail.com>
Tue, 13 Oct 2015 13:10:42 +0000 (09:10 -0400)
Kernel/platform-coco3/devtty.c

index 1d5fe96..61cffb9 100644 (file)
@@ -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;
 }