signed char cursorx;
signed char cursory;
signed char ncursory;
+ uint8_t cursorhide;
};
struct vt_repeat {
void clear_across(int8_t y, int8_t x, int16_t l);
void cursor_off(void);
void cursor_on(int8_t y, int8_t x);
+void cursor_disable(void);
void scroll_up(void);
void scroll_down(void);
void plot_char(int8_t y, int8_t x, uint16_t c);
.globl _clear_across
.globl _cursor_on
.globl _cursor_off
+ .globl _cursor_disable
.globl _cursorpos
; need the font
.globl _font4x6
ret po
ei
_vtattr_notify:
+_cursor_disable:
ret
;
map_for_kernel();
}
+void cursor_disable(void)
+{
+}
+
void plot_char(int8_t y, int8_t x, uint16_t c)
{
unsigned char *p=char_addr(y,x);
.globl _clear_lines
.globl _cursor_on
.globl _cursor_off
+ .globl _cursor_disable
.globl _vtattr_notify
.globl _video_read
com 192,x
com 224,x
nocursor:
+_cursor_disable:
_vtattr_notify:
rts
;
.globl _scroll_up
.globl _scroll_down
.globl _plot_char
+ .globl _cursor_disable
;
; VDP routines are directly hooked into the vt layer
platform_interrupt_all:
ld c, #0x99
in a, (c)
+_cursor_disable:
ret
cur_blink_addr = blink_addr;
}
+void cursor_disable(void)
+{
+}
+
void memcpy_vram(uint16_t dst, uint16_t src, uint16_t size)
{
uint16_t i;
.globl _clear_lines
.globl _cursor_off
.globl _cursor_on
+ .globl _cursor_disable
.globl _plot_char
.globl vdpload
_cursor_off: ld a, (_curtty)
or a
jp nz, cursor_off ; VDP
+_cursor_disable:
ret
_clear_across:
.globl _scroll_down
.globl _cursor_on
.globl _cursor_off
+ .globl _cursor_disable
.globl _plot_char
.globl _do_beep
.globl _clear_lines
ld de, (cursorpos)
jr cursordo
+_cursor_disable:
_do_beep:
ret
ret
__endasm;
/* Cursor back */
- cursor_on(ttysave[inputtty].cursory, ttysave[inputtty].cursorx);
+ if (!ttysave[inputtty].cursorhide)
+ cursor_on(ttysave[inputtty].cursory, ttysave[inputtty].cursorx);
}
void tty_putc(uint8_t minor, unsigned char c)
curtty = minor - 1;
vt_load(&ttysave[curtty]);
/* Fix up the cursor */
- cursor_on(ttysave[curtty].cursory, ttysave[curtty].cursorx);
+ if (!ttysave[curtty].cursorhide)
+ cursor_on(ttysave[curtty].cursory, ttysave[curtty].cursorx);
}
vtoutput(&c, 1);
irqrestore(irq);
.area _VIDEO
.globl _cursor_off
+ .globl _cursor_disable
.globl _do_cursor_on
.globl _scroll_up
.globl _scroll_down
;
_cursor_off:
ret
+_cursor_disable:
+ call ___hard_di
+ push af
+ ld bc,#0x0e0c ; Address register
+ out (c),b
+ ld bc,#0x000d ; Set to 0 will hide cursor nicely
+ ; as the 6545 sees video RAM as 0x2000+
+ out (c),b
+ jr popout
_do_cursor_on:
; ld a,i handling is buggy on NMOS Z80
call ___hard_di
.export _scroll_down
.export _do_clear_bytes
.export _cursor_off
+ .export _cursor_disable
.export _do_cursor_on
_charprint:
plb
sep #$10
.i8
+_cursor_disable:
rts
.data
static signed char cursorx;
static signed char cursory = VT_INITIAL_LINE;
static signed char ncursory;
+static uint8_t cursorhide;
static uint8_t vtpend;
static uint8_t vtbusy;
clear_across(cursory, cursorx, VT_RIGHT - cursorx + 1);
return 0;
}
+ if (c == '_') {
+ cursorhide = 0;
+ return 0;
+ }
+ if (c == ' ') {
+ cursorhide = 1;
+ cursor_disable();
+ return 0;
+ }
if (c == 'Y')
return 2;
if (c == 'a')
}
vtbusy = 1;
irqrestore(irq);
- cursor_off();
+ if (!cursorhide)
+ cursor_off();
/* FIXME: do we ever get called with len > 1, if not we could strip
this right down */
do {
len = 1;
/* Until we don't get interrupted */
} while(cq);
-
- cursor_on(cursory, cursorx);
+ if (!cursorhide)
+ cursor_on(cursory, cursorx);
vtbusy = 0;
}
vt->cursorx = cursorx;
vt->cursory = cursory;
vt->ncursory = ncursory;
+ vt->cursorhide = cursorhide;
}
void vt_load(struct vt_switch *vt)
cursorx = vt->cursorx;
cursory = vt->cursory;
ncursory = vt->ncursory;
+ cursorhide = vt->cursorhide;
vtattr_notify();
}
#endif
*cpos = csave;
}
+/* Only needed for hardware cursors */
+void cursor_disable(void)
+{
+}
+
void cursor_on(int8_t y, int8_t x)
{
cpos = char_addr(y, x);