From: Brett Gordon Date: Thu, 24 May 2018 14:49:14 +0000 (-0400) Subject: coco3: dont keep vt color state, kernel does it now. X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=a2abb67f617b8e9f73c9ed260ad5ed0e0ee9ef35;p=FUZIX.git coco3: dont keep vt color state, kernel does it now. --- diff --git a/Kernel/platform-coco3/devtty.c b/Kernel/platform-coco3/devtty.c index d4c58544..82fd6e96 100644 --- a/Kernel/platform-coco3/devtty.c +++ b/Kernel/platform-coco3/devtty.c @@ -26,7 +26,7 @@ extern uint8_t hz; uint8_t vtattr_cap; - +uint8_t curattr; #define tbuf1 (uint8_t *)(0x2000+TTYSIZ*0) #define tbuf2 (uint8_t *)(0x2000+TTYSIZ*1) @@ -476,7 +476,7 @@ void platform_interrupt(void) void vtattr_notify(void) { - curpty->attr = ((vtink&7)<<3) + (vtpaper&7); + curattr = ((vtink&7)<<3) + (vtpaper&7); } int gfx_ioctl(uint8_t minor, uarg_t arg, char *ptr) diff --git a/Kernel/platform-coco3/devtty.h b/Kernel/platform-coco3/devtty.h index 34a2c867..43c3d501 100644 --- a/Kernel/platform-coco3/devtty.h +++ b/Kernel/platform-coco3/devtty.h @@ -23,10 +23,10 @@ struct pty { unsigned char right; /* right most coord */ unsigned char bottom; /* bottom most coord */ struct display *fdisp; /* ptr to struct for ioctl */ - uint8_t attr; /* attribute byte to apply */ }; extern struct pty *curpty; +extern uint8_t curattr; int my_tty_close( uint8_t minor ); /* wrapper call to close DW ports */ int gfx_ioctl(uint8_t minor, uarg_t arg, char *ptr); diff --git a/Kernel/platform-coco3/video.c b/Kernel/platform-coco3/video.c index da391a60..c1b7e1dd 100644 --- a/Kernel/platform-coco3/video.c +++ b/Kernel/platform-coco3/video.c @@ -1,4 +1,5 @@ #include +#include #include #include @@ -60,7 +61,7 @@ void plot_char(int8_t y, int8_t x, uint16_t c) unsigned char *p=char_addr(y,x); map_for_video(); *p++ = VT_MAP_CHAR(c); - *p = curpty->attr; + *p = curattr; map_for_kernel(); } @@ -69,7 +70,7 @@ void clear_lines(int8_t y, int8_t ct) uint16_t wc= ct * VT_WIDTH; map_for_video(); uint16_t *s = (uint16_t *)char_addr(y, 0); - uint16_t w = ' ' * 0x100 + curpty->attr; + uint16_t w = ' ' * 0x100 + curattr; while( wc-- ) *s++=w; map_for_kernel(); @@ -79,7 +80,7 @@ void clear_across(int8_t y, int8_t x, int16_t l) { map_for_video(); uint16_t *s = (uint16_t *)char_addr(y, x); - uint16_t w=' ' * 0x100 + curpty->attr; + uint16_t w=' ' * 0x100 + curattr; while( l-- ) *s++=w; map_for_kernel();