ubee: update the vt code to make the 6545 hardware cursor work
authorAlan Cox <alan@linux.intel.com>
Mon, 23 Apr 2018 13:24:48 +0000 (14:24 +0100)
committerAlan Cox <alan@linux.intel.com>
Mon, 23 Apr 2018 13:24:48 +0000 (14:24 +0100)
Kernel/platform-ubee/devtty.h
Kernel/platform-ubee/ubee.s
Kernel/platform-ubee/vt.c

index aaa66bb..3dc30a1 100644 (file)
@@ -15,5 +15,6 @@ extern uint16_t vtcount;
 extern uint8_t vtchar;
 
 extern void vwrite(void);
+extern void do_cursor_on(void);
 
 #endif
index 0acb827..c55c209 100644 (file)
@@ -578,7 +578,7 @@ scanner_done:
            .area _VIDEO
 
            .globl _cursor_off
-           .globl _cursor_on
+           .globl _do_cursor_on
            .globl _scroll_up
            .globl _scroll_down
            .globl _vwrite
@@ -597,17 +597,15 @@ scanner_done:
 ;
 _cursor_off:
            ret
-_cursor_on:
-           pop hl
-           pop de
-           push de
-           push hl
+_do_cursor_on:
            ; ld a,i handling is buggy on NMOS Z80
            call ___hard_di
            push af
+           ld de, (_vtaddr)
            ld c,#0x0d
            ld a,#0x0e
            out (0x0c),a
+           set 5,d             ; As seen by the 6545 its 0x20xx
            out (c),d
            inc a
            out (0x0c),a
index 0f1477a..da59cec 100644 (file)
@@ -38,6 +38,12 @@ void clear_across(int8_t y, int8_t x, int16_t l)
        vwrite();
 }
 
+void cursor_on(int8_t y, int8_t x)
+{
+       char_addr(y,x);
+       do_cursor_on();
+}
+
 void vtattr_notify(void)
 {
        if (ubee_model == UBEE_256TC) {