From 171c33645bd77c5b54047f57485afb48e36539af Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 1 Oct 2018 13:39:22 +0100 Subject: [PATCH] genie-eg64: update to z80 and irq changes --- Kernel/platform-genie-eg64/devtty.c | 2 +- Kernel/platform-genie-eg64/trs80-bank.s | 15 ++++++++++++--- Kernel/platform-genie-eg64/trs80.s | 16 +++++++++------- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/Kernel/platform-genie-eg64/devtty.c b/Kernel/platform-genie-eg64/devtty.c index f6408a16..9c2c1ee2 100644 --- a/Kernel/platform-genie-eg64/devtty.c +++ b/Kernel/platform-genie-eg64/devtty.c @@ -154,7 +154,7 @@ static const uint8_t trssize[4] = { 0x00, 0x40, 0x20, 0x60 }; -void tty_setup(uint8_t minor) +void tty_setup(uint8_t minor, uint8_t flags) { uint8_t baud; uint8_t ctrl = 3; /* DTR|RTS */ diff --git a/Kernel/platform-genie-eg64/trs80-bank.s b/Kernel/platform-genie-eg64/trs80-bank.s index c2f79ba1..a788d93f 100644 --- a/Kernel/platform-genie-eg64/trs80-bank.s +++ b/Kernel/platform-genie-eg64/trs80-bank.s @@ -7,11 +7,14 @@ ; exported symbols .globl init_hardware .globl map_kernel + .globl map_kernel_di .globl map_kernel_restore .globl map_process + .globl map_process_di .globl map_process_always + .globl map_process_always_di .globl map_for_swap - .globl map_save + .globl map_save_kernel .globl map_restore ; imported symbols @@ -74,6 +77,7 @@ init_hardware: ; flip r/w on syscall and irq entry/exit.. FIXME. ; map_kernel: +map_kernel_di: map_kernel_restore: push af ld a,#0xC0 ; Internal memory, ROM unmapped, IO @@ -82,18 +86,23 @@ map_kernel_restore: pop af ret map_process: +map_process_di: map_for_swap: map_process_always: +map_process_always_di: push af ld a,#0xD0 ; External high, ROM unmapped, IO ld (map_state),a ; (so we can do screen mapping) out (0xC0),a pop af ret -map_save: +map_save_kernel: push af ld a,(map_state) ld (map_save_val),a + ld a,#0xC0 ; Internal memory, ROM unmapped, IO + ld (map_state),a + out (0xC0),a pop af ret map_restore: @@ -107,4 +116,4 @@ map_restore: map_state: .db 0 map_save_val: - .db 0 \ No newline at end of file + .db 0 diff --git a/Kernel/platform-genie-eg64/trs80.s b/Kernel/platform-genie-eg64/trs80.s index ba35f722..e9008349 100644 --- a/Kernel/platform-genie-eg64/trs80.s +++ b/Kernel/platform-genie-eg64/trs80.s @@ -1,19 +1,14 @@ ; -; TRS 80 hardware support +; Genie EG64 hardware support ; - .module trs80 + .module genie ; exported symbols .globl init_early .globl interrupt_handler .globl _program_vectors .globl platform_interrupt_all - .globl map_kernel - .globl map_process - .globl map_process_always - .globl map_save - .globl map_restore .globl go_fast .globl go_slow @@ -21,7 +16,11 @@ .globl s__COMMONMEM .globl l__COMMONMEM + .globl map_kernel + .globl map_process_always + .globl _trs80_model + .globl _int_disabled ; hard disk helpers .globl _hd_xfer_in @@ -50,6 +49,9 @@ ; ----------------------------------------------------------------------------- .area _COMMONMEM +_int_disabled: + .db 1 + _platform_monitor: monitor_spin: di -- 2.34.1