zxdiv: enable ability to set border colour in DivIDE
authorAlan Cox <alan@linux.intel.com>
Mon, 26 Nov 2018 11:47:05 +0000 (11:47 +0000)
committerAlan Cox <alan@linux.intel.com>
Mon, 26 Nov 2018 11:47:05 +0000 (11:47 +0000)
Kernel/platform-zxdiv/devtty.c
Kernel/platform-zxdiv/devtty.h
Kernel/platform-zxdiv/divide.c

index 4ba199b..f1f2dbf 100644 (file)
@@ -13,6 +13,7 @@
 char tbuf1[TTYSIZ];
 
 uint8_t vtattr_cap = VTA_INVERSE|VTA_FLASH;
+uint8_t vtborder;
 uint8_t curattr = 7;
 struct vt_repeat keyrepeat;
 static uint8_t kbd_timer;
index a8d5c6a..40a67f5 100644 (file)
@@ -14,4 +14,6 @@ extern uint8_t timer_wait;
 
 extern int gfx_ioctl(uint8_t minor, uarg_t arg, char *ptr);
 
+extern uint8_t vtborder;
+
 #endif
index 16bf9a7..0bc91d9 100644 (file)
@@ -4,6 +4,7 @@
 #include <devide.h>
 #include <blkdev.h>
 #include <platform_ide.h>
+#include <devtty.h>
 
 /* We have to provide slightly custom methods here because of the banked
    kernel */
@@ -34,7 +35,7 @@ doread:
             ld a,#0x02
             out (0xfe),a
             inir                                    ; transfer second 256 bytes
-            xor a
+            ld a,(_vtborder)
             out (0xfe),a
             pop af
             or a
@@ -68,7 +69,7 @@ dowrite:
             ld a,#0x02
             out (0xfe),a
             otir                                    ; transfer second 256 bytes
-            xor a
+            ld a,(_vtborder)
             out (0xfe),a
             pop af
             or a