From: Alan Cox Date: Mon, 23 Apr 2018 13:24:48 +0000 (+0100) Subject: ubee: update the vt code to make the 6545 hardware cursor work X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=316a90126c665f3d48cec6a997e4bf82ffd31d44;p=FUZIX.git ubee: update the vt code to make the 6545 hardware cursor work --- diff --git a/Kernel/platform-ubee/devtty.h b/Kernel/platform-ubee/devtty.h index aaa66bb0..3dc30a14 100644 --- a/Kernel/platform-ubee/devtty.h +++ b/Kernel/platform-ubee/devtty.h @@ -15,5 +15,6 @@ extern uint16_t vtcount; extern uint8_t vtchar; extern void vwrite(void); +extern void do_cursor_on(void); #endif diff --git a/Kernel/platform-ubee/ubee.s b/Kernel/platform-ubee/ubee.s index 0acb827b..c55c2097 100644 --- a/Kernel/platform-ubee/ubee.s +++ b/Kernel/platform-ubee/ubee.s @@ -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 diff --git a/Kernel/platform-ubee/vt.c b/Kernel/platform-ubee/vt.c index 0f1477aa..da59cec4 100644 --- a/Kernel/platform-ubee/vt.c +++ b/Kernel/platform-ubee/vt.c @@ -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) {