From 24956366164a130d9fbe3b5a7e42b1e4e072970e Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 11 Aug 2018 00:31:49 +0100 Subject: [PATCH] sam: update boot logic Thanks to the various Sam folks who explained how BOOT works --- Kernel/platform-sam/boot.s | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Kernel/platform-sam/boot.s b/Kernel/platform-sam/boot.s index ce282008..140b4488 100644 --- a/Kernel/platform-sam/boot.s +++ b/Kernel/platform-sam/boot.s @@ -1,5 +1,5 @@ ; -; Boot block, loaded at 0x4000 +; Boot block, loaded at 0x4000 in the top bank that is free (varies) ; ; Banks and SP we need to double check are ROM0/1/2/3 and valid ; @@ -36,7 +36,7 @@ CMD_STEPIN .equ 0x58 .db 0,0,0,0,0,0,0,0 ; need to work out what goes here boot: di - ld de,#2 ; track 0 sector 2 (we are sector 0) + ld de,#0x0401 ; track 4 sector 2 (we are sector 1) ld a,e ; Start in bank 2 ld hl,#0x8000 ; Which we map high out (HIMEM),a @@ -82,7 +82,7 @@ wait: in a,(STATUS) ; Wait for DRQ ; We read 14 tracks minus 1 sector which loads us ; ; - ld a,#14 + ld a,#18 cp d ; Jump to the start of the last bank loaded. This is actually ; packed up boot stuff and font. We loaded 5.5K here, of which 4K -- 2.34.1