From e89cb654963438686d9c23f58b4ca0b1f7282165 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 27 Jan 2019 19:32:33 +0000 Subject: [PATCH] sc108: fix boot loader update other code Still has a weird crash to dig into --- Kernel/platform-sc108/README | 15 ++++++++++----- Kernel/platform-sc108/loader.s | 12 ++++++------ 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/Kernel/platform-sc108/README b/Kernel/platform-sc108/README index 1cd6250e..6c10bb69 100644 --- a/Kernel/platform-sc108/README +++ b/Kernel/platform-sc108/README @@ -1,4 +1,4 @@ -Experimental port for the proposed SC108 mainboard plus CF card plus RTC card +Experimental port for the SC108 mainboard plus CF card plus RTC or CTC card This is a design that happens to have 128K RAM but the 64K banks are flipped directly. Fortunately there is a ROM which lives in both banks. @@ -84,13 +84,18 @@ F300-FFFF Common (mostly valid in both banks) TO DO -Write a proper bootloader that can use partition tables properly -Fix hardcoded use of ACIA +Debug some crash cases we have from the latest updates + Use the extra space to put back some kernel bits we binned from -tiny Build a suitably high CP/M emuation and test it - Long term fun - OS core in ROM, high memory holding rest (like -tiny) but with two user space banks ?? -- Clean up the serial code (on all RC2014) + + +Emulation + +Write the bootloader once to block 0 (repair the parition tables afterwards) +Write kernel images to block 24 +rc2014 -m sc108 -r sc108.rom -s -i sc108.ide -c \ No newline at end of file diff --git a/Kernel/platform-sc108/loader.s b/Kernel/platform-sc108/loader.s index 686ec30b..330a70ee 100644 --- a/Kernel/platform-sc108/loader.s +++ b/Kernel/platform-sc108/loader.s @@ -30,8 +30,8 @@ BUSY .equ 7 ATA_READ .equ 0x20 -SIOB_C .equ 3 -SIOB_D .equ 1 +SIOA_C .equ 0x80 +SIOA_D .equ 0x81 .ds 10240 ; boot sector and more for loader space @@ -95,13 +95,13 @@ serout: ; wait for transmitter to be idle ocloop_sio: xor a ; read register 0 - out (SIOB_C), a - in a,(SIOB_C) ; read Line Status Register + out (SIOA_C), a + in a,(SIOA_C) ; read Line Status Register and #0x04 ; get THRE bit jr z,ocloop_sio ; now output the char to serial port pop af - out (SIOB_D),a + out (SIOA_D),a ret serstr: @@ -113,6 +113,6 @@ serstr: jr serstr hello: - .asciz 'LiNC80 FUZIX LOADER 0.1\n\n' + .asciz 'SC108 FUZIX LOADER 0.1\n\n' gogogo: .asciz '\nExecuting FUZIX...\n' -- 2.34.1