From 9cf9893ed4cee7d39e10a9f7e44d3bae7820ed3b Mon Sep 17 00:00:00 2001 From: Wayne Warthen Date: Fri, 12 Mar 2021 15:11:15 -0800 Subject: [PATCH] Miscellaneous - Update romldr to stop using address space >= 0xA000 - ZZRCC work in progress (not finished) --- Source/HBIOS/romldr.asm | 55 ++++++++++++++++++---------------- Source/ZZR/Build.cmd | 8 +++++ Source/ZZR/Clean.cmd | 3 ++ Source/ZZR/ZZR Disk Layout.txt | 29 ++++++++++++++++++ Source/ver.inc | 2 +- Source/ver.lib | 2 +- 6 files changed, 72 insertions(+), 27 deletions(-) create mode 100644 Source/ZZR/Build.cmd create mode 100644 Source/ZZR/Clean.cmd create mode 100644 Source/ZZR/ZZR Disk Layout.txt diff --git a/Source/HBIOS/romldr.asm b/Source/HBIOS/romldr.asm index f8f9954b..05b4cc33 100644 --- a/Source/HBIOS/romldr.asm +++ b/Source/HBIOS/romldr.asm @@ -2084,6 +2084,30 @@ newcon .db 0 newspeed .db 0 ; ;======================================================================= +; Working data storage +;======================================================================= +; + .fill 64,0 ; 32 level stack +bl_stack .equ $ ; ... top is here +; +#if (BIOS == BIOS_WBW) +bid_ldr .db 0 ; bank at startup +#endif +#if (BIOS == BIOS_UNA) +bid_ldr .dw 0 ; bank at startup +#endif +; +lba .fill 4,0 ; lba for load, dword +dma .dw 0 ; address for load +sps .dw 0 ; sectors per slice +mediaid .db 0 ; media id +; +ra_tbl_loc .dw 0 ; points to active ra_tbl +bootunit .db 0 ; boot disk unit +bootslice .db 0 ; boot disk slice +loadcnt .db 0 ; num disk sectors to load +; +;======================================================================= ; Pad remainder of ROM Loader ;======================================================================= ; @@ -2094,29 +2118,16 @@ slack .equ ($8000 + LDR_SIZ - $) .echo slack .echo " bytes.\n" ; +; ;======================================================================= -; Working data storage (uninitialized) +; Disk buffers (uninitialized) ;======================================================================= ; - .ds 64 ; 32 level stack -bl_stack .equ $ ; ... top is here -; -#if (BIOS == BIOS_WBW) -bid_ldr .ds 1 ; bank at startup -#endif -#if (BIOS == BIOS_UNA) -bid_ldr .ds 2 ; bank at startup -#endif -; -lba .ds 4 ; lba for load, dword -dma .ds 2 ; address for load -sps .ds 2 ; sectors per slice -mediaid .ds 1 ; media id +; Master Boot Record sector is read into area below. +; Note that this buffer is actually shared with bl_infosec +; buffer below. ; -ra_tbl_loc .ds 2 ; points to active ra_tbl -bootunit .ds 1 ; boot disk unit -bootslice .ds 1 ; boot disk slice -loadcnt .ds 1 ; num disk sectors to load +bl_mbrsec .equ $ ; ; Boot info sector is read into area below. ; The third sector of a disk device is reserved for boot info. @@ -2144,11 +2155,5 @@ bb_biloc .ds 2 ; loc to patch boot drive info bb_cpmloc .ds 2 ; final ram dest for cpm/cbios bb_cpmend .ds 2 ; end address for load bb_cpment .ds 2 ; CP/M entry point (cbios boot) -; -; -; Master Boot Record sector is read into area below. -; -bl_mbrsec .equ $ - .ds 512 ; .end diff --git a/Source/ZZR/Build.cmd b/Source/ZZR/Build.cmd new file mode 100644 index 00000000..78e1e785 --- /dev/null +++ b/Source/ZZR/Build.cmd @@ -0,0 +1,8 @@ +@echo off +setlocal + +if not exist ..\..\Binary\RCZ280_nat_zzr.rom goto :eof + +copy /b zzr_cfldr.bin + zzr_ptbl.bin + zzr_fill_1.bin + zzr_mon.bin + zzr_fill_2.bin + ..\..\Binary\RCZ280_nat_zzr.rom + zzr_fill_3.bin ..\..\Binary\hd1024_zzr_prefix.dat + +copy /b ..\..\Binary\hd1024_zzr_prefix.dat + ..\..\Binary\hd1024_cpm22.img + ..\..\Binary\hd1024_zsdos.img + ..\..\Binary\hd1024_nzcom.img + ..\..\Binary\hd1024_cpm3.img + ..\..\Binary\hd1024_zpm3.img + ..\..\Binary\hd1024_ws4.img ..\..\Binary\hd1024_zzr_combo.img \ No newline at end of file diff --git a/Source/ZZR/Clean.cmd b/Source/ZZR/Clean.cmd new file mode 100644 index 00000000..fa12c5c7 --- /dev/null +++ b/Source/ZZR/Clean.cmd @@ -0,0 +1,3 @@ +@echo off +setlocal + diff --git a/Source/ZZR/ZZR Disk Layout.txt b/Source/ZZR/ZZR Disk Layout.txt new file mode 100644 index 00000000..4965cea7 --- /dev/null +++ b/Source/ZZR/ZZR Disk Layout.txt @@ -0,0 +1,29 @@ +CF Boot Loader: Sector 0 (bytes 0-255) +RomWBW Partition Table: Sector 0 (bytes 256-511) +ZZRCC Monitor: Sectors 0xF8-0xFF (bytes 0x1F000-0x1FFFF) +RomWBW: Sectors 0x120-0x31F (bytes 0x24000-0x63FFF) +Start of Slices (0x1E partition): Sector 0x800 (byte 0x100000) + +Start Length Description +------- ------- --------------------------- +0x00000 0x00100 CF Boot Loader +0x00100 0x00100 RomWBW Partition Table +0x00200 0x1EE00 Filler +0x1F000 0x01000 ZZRCC Monitor +0x20000 0x04000 Filler +0x24000 0x40000 RomWBW +0x64000 0x9C000 Filler +0x100000: Start of slices (partition 0x1E) + +Notes +----- + +- At startup CPLD ROM is mapped to Z80 CPU address space 0x0000-0x003F, CPU begins execution at 0x0000 +- CPLD ROM (CF bootstrap mode) reads CF Boot Loader (256B) from start of CF (MBR) to 0xB000 and runs it +- CF Boot Loader reads ZRC Monitor (4KB) from sectors 0xF8-0xFF of CF to 0xB400 and runs it +- User sends ZZRCC RomWBW Loader hex file (?KB) at 0x5000, then runs it using G5000 +- User sends RomWBW ROM image (512KB) which is autoexecuted + + +;;- ZZRCC Monitor reads 512KB (RomWBW) from sectors 0x120-0x51F of CF into first 512KB of RAM + diff --git a/Source/ver.inc b/Source/ver.inc index 862710d7..5ace54e1 100644 --- a/Source/ver.inc +++ b/Source/ver.inc @@ -2,4 +2,4 @@ #DEFINE RMN 1 #DEFINE RUP 1 #DEFINE RTP 0 -#DEFINE BIOSVER "3.1.1-pre.60" +#DEFINE BIOSVER "3.1.1-pre.61" diff --git a/Source/ver.lib b/Source/ver.lib index a957628a..c659c02b 100644 --- a/Source/ver.lib +++ b/Source/ver.lib @@ -3,5 +3,5 @@ rmn equ 1 rup equ 1 rtp equ 0 biosver macro - db "3.1.1-pre.60" + db "3.1.1-pre.61" endm