From f90b32ecfe4c74ed065579628f90210ba4317e2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20L=C3=B6fgren?= Date: Sun, 12 Oct 2025 14:18:10 +0200 Subject: [PATCH 1/2] Actually check the tty busy flag --- arch/nano-z80/tty.z80 | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/nano-z80/tty.z80 b/arch/nano-z80/tty.z80 index aedab20..2fb6b42 100644 --- a/arch/nano-z80/tty.z80 +++ b/arch/nano-z80/tty.z80 @@ -92,6 +92,7 @@ video_init: ld b,37 video_init_delay: in a, (VID_BUSY) + or a ret z djnz video_init_delay ret From 8218fb2a651f360bebd872b18884430b708061de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20L=C3=B6fgren?= Date: Fri, 17 Oct 2025 17:54:34 +0200 Subject: [PATCH 2/2] TTY busy fixed in hardware, updated BIOS to match --- arch/nano-z80/tty.z80 | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/arch/nano-z80/tty.z80 b/arch/nano-z80/tty.z80 index 2fb6b42..95ef98d 100644 --- a/arch/nano-z80/tty.z80 +++ b/arch/nano-z80/tty.z80 @@ -84,19 +84,14 @@ tty_clear_to_eos: out (VID_CLEAR_TO_EOS), a ret ;jp tty_update_cursor -; Add a timeout as just checking the busy flag gets stuck sometimes -; for unknows reasons video_init: ld a, IO_SELECT_VID out (IO_BANK), a - ld b,37 -video_init_delay: +video_init_wait: in a, (VID_BUSY) or a - ret z - djnz video_init_delay + jr nz, video_init_wait ret - ; vim: ts=4 sw=4 et ft=asm