mirror of
https://github.com/wwarthen/RomWBW.git
synced 2026-02-07 15:03:13 -06:00
Compare commits
2 Commits
v3.3.0-dev
...
v3.3.0-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
68e841e62c | ||
|
|
bb70c36b36 |
@@ -19,6 +19,7 @@ Version 3.3
|
||||
- WBW: Early support for Duodyne base system (CPU/UART/ROM/RAM/RTC/SPK)
|
||||
- M?C: Fixed XM to allow specifying HBIOS port for send operations
|
||||
- WBW: Fix S100 Z180 LED operation (credit to Jay Cotton for finding this issue)
|
||||
- WBW: QPM system image is now combined with current CBIOS during build
|
||||
|
||||
Version 3.2.1
|
||||
-------------
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -3,7 +3,7 @@
|
||||
**RomWBW ReadMe** \
|
||||
Version 3.3 \
|
||||
Wayne Warthen ([wwarthen@gmail.com](mailto:wwarthen@gmail.com)) \
|
||||
08 Aug 2023
|
||||
10 Sep 2023
|
||||
|
||||
# Overview
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
RomWBW ReadMe
|
||||
Wayne Warthen (wwarthen@gmail.com)
|
||||
08 Aug 2023
|
||||
10 Sep 2023
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -136,6 +136,8 @@ MAIN:
|
||||
ld de,$A000
|
||||
ld bc,hsiz
|
||||
ldir
|
||||
ld a,(dmaport)
|
||||
ld (int_dmaport),a
|
||||
;
|
||||
; Install interrupt vector (RomWBW specific!!!)
|
||||
ld hl,int ; pointer to my interrupt handler
|
||||
@@ -215,6 +217,9 @@ DMACFG_S:
|
||||
call HEXIN
|
||||
ld hl,dmaport
|
||||
ld (hl),a
|
||||
#IF (INTENABLE)
|
||||
ld (int_dmaport),a
|
||||
#ENDIF
|
||||
jp MENULP
|
||||
;
|
||||
DMACFG_L:
|
||||
@@ -1193,7 +1198,6 @@ CST:
|
||||
RET
|
||||
;
|
||||
USEINT .DB FALSE ; USE INTERRUPTS FLAG
|
||||
counter .dw 0
|
||||
dmaport .db DMABASE
|
||||
dmalach .db DMALATCH
|
||||
dmaxfer .db DMA_XMODE
|
||||
@@ -1214,11 +1218,16 @@ reladr .equ $ ; relocation start adr
|
||||
.org $A000 ; code will run here
|
||||
;
|
||||
int:
|
||||
;LD E,'.' ; OUTPUT CHAR TO E
|
||||
;LD C,CIO_CONSOLE ; CONSOLE UNIT TO C
|
||||
;LD B,BF_CIOOUT ; HBIOS FUNC: OUTPUT CHAR
|
||||
;CALL $FFF0 ; HBIOS OUTPUTS CHARACTER
|
||||
|
||||
; According to the DMA doc, you must issue
|
||||
; a DMA_DISABLE command prior to a
|
||||
; DMA_REINIT_STATUS_BYTE command to avoid a
|
||||
; potential race condition.
|
||||
ld a,(dmaport)
|
||||
ld a,(int_dmaport)
|
||||
ld c,a
|
||||
ld a,DMA_DISABLE
|
||||
out (c),a
|
||||
@@ -1238,6 +1247,11 @@ int:
|
||||
or $ff ; signal int handled
|
||||
ret
|
||||
;
|
||||
; data referred to in handler must reside in high mem
|
||||
;
|
||||
int_dmaport .db 0 ; hi mem copy of dmaport
|
||||
counter .dw 0 ; interrupt counter
|
||||
;
|
||||
hsiz .equ $ - $A000 ; size of handler to relocate
|
||||
;
|
||||
.org reladr + hsiz
|
||||
|
||||
@@ -4,6 +4,7 @@ setlocal
|
||||
pushd HDIAG && call Build || exit /b & popd
|
||||
pushd CBIOS && call Build || exit /b & popd
|
||||
pushd CPM22 && call Build || exit /b & popd
|
||||
pushd QPM && call Build || exit /b & popd
|
||||
pushd ZCPR && call Build || exit /b & popd
|
||||
pushd ZCPR-DJ && call Build || exit /b & popd
|
||||
pushd ZSDOS && call Build || exit /b & popd
|
||||
|
||||
@@ -4,6 +4,7 @@ setlocal
|
||||
pushd HDIAG && call Clean.cmd & popd
|
||||
pushd Apps && call Clean.cmd & popd
|
||||
pushd CPM22 && call Clean.cmd & popd
|
||||
pushd QPM && call Clean.cmd & popd
|
||||
pushd ZCPR && call Clean.cmd & popd
|
||||
pushd ZCPR-DJ && call Clean.cmd & popd
|
||||
pushd ZSDOS && call Clean.cmd & popd
|
||||
|
||||
@@ -2143,10 +2143,36 @@ regarding the RomWBW adaptation and customizations.
|
||||
|
||||
#### Boot Disk
|
||||
|
||||
There is no RomWBW-specific boot disk creation procedure. QP/M
|
||||
comes with a QINSTALL which is used to install QPM over an existing
|
||||
CP/M 2 installation or to update an existing QPM disk. `QINSTALL.COM`
|
||||
is included with the RomWBW distribution.
|
||||
|
||||
To create or update a bootable QP/M Z-System disk, a special process
|
||||
is required. QP/M is not provided in source format. You are expected
|
||||
to install QP/M over an existing CP/M installation using the
|
||||
`QINSTALL.COM` application.
|
||||
|
||||
To update an existing QP/M boot disk with the latest RomWBW CBIOS, you
|
||||
must use 2 steps: apply the generic CP/M system track, then reinstall
|
||||
the QP/M components. To do this, you can perform the following steps:
|
||||
|
||||
1. Boot to the existing QP/M disk. At this point, drive A should be
|
||||
the QP/M disk that you wish to update. You may receive a warning
|
||||
about CBIOS/HBIOS version mismatch.
|
||||
|
||||
1. Use RomWBW `SYSCOPY` to place the stock RomWBW CP/M OS image
|
||||
onto the system tracks of the QP/M boot disk:
|
||||
|
||||
`SYSCOPY A:=x:CPM.SYS`
|
||||
|
||||
where x is the drive letter of your ROM Disk.
|
||||
|
||||
1. Run `QINSTALL` to overlay the QP/M OS components on your
|
||||
QP/M boot disk.
|
||||
|
||||
**WARNING**: `QINSTALL` has no mechanism for retaining previous
|
||||
non-default settings. Any previous non-default settings you
|
||||
previously made with `QINSTALL` will need to be reapplied. The
|
||||
pre-built RomWBW QP/M disk image includes a couple of specific
|
||||
non-default settings to optimize use with RomWBW. Please review the
|
||||
notes in the ReadMe.txt file in Source/Images/d_qpm.
|
||||
|
||||
#### Notes
|
||||
|
||||
@@ -2154,6 +2180,9 @@ is included with the RomWBW distribution.
|
||||
on the QPM binary distribution and has been minimally customized
|
||||
for RomWBW.
|
||||
|
||||
- When booted, the QPM startup banner will indicate CP/M 2.2. This
|
||||
is because QPM uses the CP/M 2.2 CBIOS code.
|
||||
|
||||
- QINSTALL is used to customize QPM. It is included on the
|
||||
disk image. You should review the notes in the ReadMe.txt
|
||||
file in Source/Images/d_qpm before making changes.
|
||||
|
||||
@@ -13,7 +13,7 @@ call BuildDisk.cmd nzcom fd wbw_fd144 ..\zsdos\zsys_wbw.sys || exit /b
|
||||
call BuildDisk.cmd cpm3 fd wbw_fd144 ..\cpm3\cpmldr.sys || exit /b
|
||||
call BuildDisk.cmd zpm3 fd wbw_fd144 ..\zpm3\zpmldr.sys || exit /b
|
||||
call BuildDisk.cmd ws4 fd wbw_fd144 || exit /b
|
||||
call BuildDisk.cmd qpm fd wbw_fd144 d_qpm\u0\qpm.sys || exit /b
|
||||
call BuildDisk.cmd qpm fd wbw_fd144 ..\qpm\qpm_wbw.sys || exit /b
|
||||
call BuildDisk.cmd z80asm hd wbw_fd144 || exit /b
|
||||
call BuildDisk.cmd aztecc hd wbw_fd144 || exit /b
|
||||
call BuildDisk.cmd hitechc hd wbw_fd144 || exit /b
|
||||
@@ -32,7 +32,7 @@ call BuildDisk.cmd cpm3 hd wbw_hd512 ..\cpm3\cpmldr.sys || exit /b
|
||||
call BuildDisk.cmd zpm3 hd wbw_hd512 ..\zpm3\zpmldr.sys || exit /b
|
||||
call BuildDisk.cmd ws4 hd wbw_hd512 || exit /b
|
||||
call BuildDisk.cmd dos65 hd wbw_hd512 ..\zsdos\zsys_wbw.sys || exit /b
|
||||
call BuildDisk.cmd qpm hd wbw_hd512 d_qpm\u0\qpm.sys || exit /b
|
||||
call BuildDisk.cmd qpm hd wbw_hd512 ..\qpm\qpm_wbw.sys || exit /b
|
||||
call BuildDisk.cmd z80asm hd wbw_hd512 || exit /b
|
||||
call BuildDisk.cmd aztecc hd wbw_hd512 || exit /b
|
||||
call BuildDisk.cmd hitechc hd wbw_hd512 || exit /b
|
||||
@@ -56,7 +56,7 @@ call BuildDisk.cmd nzcom hd wbw_hd1k ..\zsdos\zsys_wbw.sys || exit /b
|
||||
call BuildDisk.cmd cpm3 hd wbw_hd1k ..\cpm3\cpmldr.sys || exit /b
|
||||
call BuildDisk.cmd zpm3 hd wbw_hd1k ..\zpm3\zpmldr.sys || exit /b
|
||||
call BuildDisk.cmd ws4 hd wbw_hd1k || exit /b
|
||||
call BuildDisk.cmd qpm hd wbw_hd1k d_qpm\u0\qpm.sys || exit /b
|
||||
call BuildDisk.cmd qpm hd wbw_hd1k ..\qpm\qpm_wbw.sys || exit /b
|
||||
call BuildDisk.cmd z80asm hd wbw_hd1k || exit /b
|
||||
call BuildDisk.cmd aztecc hd wbw_hd1k || exit /b
|
||||
call BuildDisk.cmd hitechc hd wbw_hd1k || exit /b
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# this makefile subsumes all the work done in Build.cmd, BuildDisk.cmd, BuildDisk.ps1
|
||||
#
|
||||
SYSTEMS = ../CPM22/cpm_wbw.sys ../ZSDOS/zsys_wbw.sys ../CPM3/cpmldr.sys ../ZPM3/zpmldr.sys
|
||||
SYSTEMS = ../CPM22/cpm_wbw.sys ../ZSDOS/zsys_wbw.sys ../QPM/qpm_wbw.sys ../CPM3/cpmldr.sys ../ZPM3/zpmldr.sys
|
||||
|
||||
FDIMGS = fd144_cpm22.img fd144_zsdos.img fd144_nzcom.img \
|
||||
fd144_cpm3.img fd144_zpm3.img fd144_ws4.img fd144_qpm.img \
|
||||
@@ -80,7 +80,7 @@ blankhd1k:
|
||||
@sys= ; \
|
||||
case $@ in \
|
||||
(*cpm22*) sys=../CPM22/cpm_wbw.sys;; \
|
||||
(*qpm*) sys=d_qpm/u0/qpm.sys;; \
|
||||
(*qpm*) sys=../QPM/qpm_wbw.sys;; \
|
||||
(*zsdos* | *nzcom* | *dos65*) sys=../ZSDOS/zsys_wbw.sys;; \
|
||||
(*cpm3*) sys=../CPM3/cpmldr.sys;; \
|
||||
(*zpm3*) sys=../ZPM3/zpmldr.sys;; \
|
||||
|
||||
@@ -36,11 +36,19 @@ code brakpoints. This conflicts the use of that vector for any
|
||||
system that is using interrupt mode 1. DEBUGZ can be configured
|
||||
(using DBGINST) to use a different vector.
|
||||
|
||||
The QSTAMP program, which is used to initialize a disk for date/time
|
||||
stamping, misbehavews when run on the (new) RomWBW 1024 directory
|
||||
format disks. It creates an invalid directory entry for the
|
||||
date/time stamp data file. This is definitely a QP/M issue. The
|
||||
directory entry can be manually corrected.
|
||||
The QSTAMP program, which is used to initialize a disk for date/time
|
||||
stamping, misbehavews when run on the (new) RomWBW 1024 directory
|
||||
format disks. It creates an invalid directory entry for the date/time
|
||||
stamp data file. This is definitely a QP/M issue. The directory entry
|
||||
can be manually corrected. Specifically the byte offset 15 should
|
||||
contain the number of 128-byte records in the file. Instead, it is set
|
||||
to 0x01. You can edit the entry, change it to 0x80 and everything
|
||||
starts working.
|
||||
|
||||
There are two text files (QPMCMDS.TXT and QPMUTILS.TXT) included. They
|
||||
came from the original QP/M 2.7 distribution. These files have
|
||||
escape sequences imbedded in them which makes them look a little
|
||||
strange depending on the terminal emulation you are using.
|
||||
|
||||
== QPM 2.7 Files ==
|
||||
|
||||
@@ -48,10 +56,9 @@ The following files came from the official QP/M distribution. Actually,
|
||||
they came from 3 Microcode Consulting files (qpm27.zip, debugz.zip,
|
||||
and linkz.zip). The original distribution files can be found on the
|
||||
Microcode Consulting website at https://www.microcodeconsulting.com/.
|
||||
Documentation (pdf) files are incuded in these original distribution
|
||||
.zip files. These documentation files have not been included in the
|
||||
RomWBW distribution. Please retrieve them yourself from the website
|
||||
if desired.
|
||||
Documentation (pdf) files are included in these original distribution
|
||||
.zip files. These documentation files have been included in the
|
||||
RomWBW distribution in the Doc folder.
|
||||
|
||||
D.COM - Directory lister
|
||||
DBGINST.COM - Configures DEBUGZ debugger
|
||||
|
||||
Binary file not shown.
@@ -44,7 +44,7 @@ d_cpm22/u0/*.* 0:
|
||||
#
|
||||
# Add OS image
|
||||
#
|
||||
../CPM22/cpm_wbw.sys 0:cpm.sys
|
||||
../QPM/qpm_wbw.sys 0:qpm.sys
|
||||
#
|
||||
# Add Common Applications
|
||||
#
|
||||
|
||||
@@ -51,7 +51,7 @@ cpnet12/*.* 4:
|
||||
#
|
||||
# Add OS image
|
||||
#
|
||||
../CPM22/cpm_wbw.sys 0:cpm.sys
|
||||
../QPM/qpm_wbw.sys 0:qpm.sys
|
||||
#
|
||||
# Add Common Applications
|
||||
#
|
||||
|
||||
@@ -8,7 +8,7 @@ SUBDIRS += CBIOS
|
||||
SUBDIRS += Forth
|
||||
SUBDIRS += TastyBasic
|
||||
SUBDIRS += Fonts
|
||||
SUBDIRS += CPM22 ZCPR ZCPR-DJ ZSDOS CPM3 ZPM3
|
||||
SUBDIRS += CPM22 ZCPR ZCPR-DJ ZSDOS CPM3 ZPM3 QPM
|
||||
#SUBDIRS += BPBIOS
|
||||
SUBDIRS += pSys
|
||||
SUBDIRS += RomDsk
|
||||
|
||||
20
Source/QPM/Build.cmd
Normal file
20
Source/QPM/Build.cmd
Normal file
@@ -0,0 +1,20 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
set TOOLS=../../Tools
|
||||
|
||||
set PATH=%TOOLS%\tasm32;%TOOLS%\zxcc;%PATH%
|
||||
|
||||
set TASMTABS=%TOOLS%\tasm32
|
||||
|
||||
set CPMDIR80=%TOOLS%/cpm/
|
||||
|
||||
tasm -t80 -g3 -fFF loader.asm loader.bin loader.lst || exit /b
|
||||
|
||||
copy /b qcp27.dat + qdos27.dat + ..\cbios\cbios_wbw.bin qpm_wbw.bin || exit /b
|
||||
copy /b qcp27.dat + qdos27.dat + ..\cbios\cbios_una.bin qpm_una.bin || exit /b
|
||||
|
||||
copy /b loader.bin + qpm_wbw.bin qpm_wbw.sys || exit /b
|
||||
copy /b loader.bin + qpm_una.bin qpm_una.sys || exit /b
|
||||
|
||||
goto :eof
|
||||
8
Source/QPM/Clean.cmd
Normal file
8
Source/QPM/Clean.cmd
Normal file
@@ -0,0 +1,8 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
if exist *.bin del *.bin
|
||||
if exist *.lst del *.lst
|
||||
if exist *.prn del *.prn
|
||||
if exist *.hex del *.hex
|
||||
if exist *.sys del *.sys
|
||||
15
Source/QPM/Makefile
Normal file
15
Source/QPM/Makefile
Normal file
@@ -0,0 +1,15 @@
|
||||
SYSFILES = qpm_wbw.sys qpm_una.sys
|
||||
BINFILES = qpm_wbw.bin qpm_una.bin
|
||||
OBJECTS = loader.bin $(SYSFILES) $(BINFILES)
|
||||
OTHERS = *.hex
|
||||
TOOLS = ../../Tools
|
||||
include $(TOOLS)/Makefile.inc
|
||||
|
||||
%.sys: %.bin loader.bin
|
||||
cat loader.bin $*.bin > $@
|
||||
|
||||
qpm_una.bin: qcp27.dat qdos27.dat ../CBIOS/cbios_una.bin
|
||||
cat qcp27.dat qdos27.dat ../CBIOS/cbios_una.bin > $@
|
||||
|
||||
qpm_wbw.bin: qcp27.dat qdos27.dat ../CBIOS/cbios_wbw.bin
|
||||
cat qcp27.dat qdos27.dat ../CBIOS/cbios_wbw.bin > $@
|
||||
15
Source/QPM/ReadMe.txt
Normal file
15
Source/QPM/ReadMe.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
QPM27
|
||||
-----
|
||||
|
||||
QPM is not available in source form. In this folder, you will find
|
||||
qcp27.dat and qdos27.dat. These are the CCP and BDOS components for
|
||||
QPM. They were created by running QINSTALL on a normal RomWBW
|
||||
CP/M 2.2 system, then extracting the resultant CCP and BDOS binaries.
|
||||
|
||||
When this folder goes through the build process, it just combines the
|
||||
QPM CCP and BDOS binaries with the RomWBW CBIOS to create an up-to-date
|
||||
QPM system image.
|
||||
|
||||
QPM 2.7 is distributed at https://www.microcodeconsulting.com/.
|
||||
|
||||
-- WBW 3:13 PM 9/9/2023
|
||||
271
Source/QPM/loader.asm
Normal file
271
Source/QPM/loader.asm
Normal file
@@ -0,0 +1,271 @@
|
||||
;===============================================================================
|
||||
; LOADER.ASM
|
||||
;
|
||||
; BOOTLOADER FOR ROMWBW DISK OPERATING SYSTEMS.
|
||||
;
|
||||
; CP/M DISK FORMATS ALLOW FOR RESERVED TRACKS THAT CONTAIN AN IMAGE OF THE
|
||||
; OPERATING SYSTEM TO BE LOADED WHEN THE DISK IS BOOTED. THE OPERATING SYSTEM
|
||||
; IMAGE ITSELF IS NORMALLY PREFIXED BY A 1-N SECTORS CONTAINING OS BOOTSTRAP
|
||||
; CODE AND DISK METADATA.
|
||||
;
|
||||
; THE RETROBREW COMPUTING GROUP HAS BEEN USING A CONVENTION OF PREFIXING THE
|
||||
; OS IMAGE WITH 3 SECTORS (512 BYTES X 3 FOR A TOTAL OF 1536 BYTES):
|
||||
;
|
||||
; SECTOR 1: IBM-PC STYLE BOOT BLOCK CONTAINING BOOTSTRAP,
|
||||
; PARTITION TABLE, AND BOOT SIGNATURE
|
||||
; SECTOR 2: RESERVED
|
||||
; SECTOR 3: METADATA
|
||||
;
|
||||
; THE HARDWARE BIOS IS EXPECTED TO READ AND LOAD THE FIRST TWO SECTORS FROM THE
|
||||
; DISK TO MEMORY ADDRESS $8000 AND JUMP TO THAT LOCATION TO BEGIN THE BOOT
|
||||
; PROCESS. THE BIOS IS EXPECTED TO VERIFY THAT A STANDARD BOOT SIGNATURE
|
||||
; OF $55, $AA IS PRESENT AT OFFSET $1FE-$1FF. IF THE SIGNATURE IS NOT FOUND,
|
||||
; THE BIOS SHOULD ASSUME THE DISK HAS NOT BEEN PROPERLY INITIALIZED AND SHOULD
|
||||
; NOT JUMP TO THE LOAD ADDRESS.
|
||||
;
|
||||
;===============================================================================
|
||||
;
|
||||
#INCLUDE "../ver.inc"
|
||||
;
|
||||
SYS_ENT .EQU $E600 ; SYSTEM (OS) ENTRY POINT ADDRESS
|
||||
SYS_LOC .EQU $D000 ; STARTING ADDRESS TO LOAD SYSTEM IMAGE
|
||||
SYS_END .EQU $FE00 ; ENDING ADDRESS OF SYSTEM IMAGE
|
||||
;
|
||||
SEC_SIZE .EQU 512 ; DISK SECTOR SIZE
|
||||
BLK_SIZE .EQU 128 ; OS BLOCK/RECORD SIZE
|
||||
;
|
||||
PREFIX_SIZE .EQU (SEC_SIZE * 3) ; 3 SECTORS
|
||||
;
|
||||
META_SIZE .EQU 32 ; SEE BELOW
|
||||
META_LOC .EQU (PREFIX_SIZE - META_SIZE)
|
||||
;
|
||||
PT_LOC .EQU $1BE
|
||||
PT_SIZ .EQU $40
|
||||
;
|
||||
;-------------------------------------------------------------------------------
|
||||
; SECTOR 1
|
||||
;
|
||||
; THIS SECTOR FOLLOWS THE CONVENTIONS OF AN IBM-PC MBR CONTAINING THE OS
|
||||
; BOOTSTRAP CODE, PARTITION TABLE, AND BOOT SIGNATURE
|
||||
;
|
||||
;----------------------------------------------------------------------------
|
||||
;
|
||||
; THE FOLLOWING BOOTSTRAP CODE IS BUILT TO ASSUME IT WILL BE EXECUTED AT A STARTING
|
||||
; ADDRESS OF $8000. THIS CODE IS *ONLY* FOR UNA. THE ROMWBW ROM BOOTLOADER
|
||||
; USES THE METADATA TO LOAD THE OS DIRECTLY.
|
||||
;
|
||||
.ORG $8000
|
||||
JR BOOT
|
||||
;
|
||||
BOOT:
|
||||
LD DE,STR_LOAD ; LOADING STRING
|
||||
CALL PRTSTR ; PRINT
|
||||
CALL PRTDOT ; PROGRESS
|
||||
;
|
||||
LD BC,$00FC ; UNA FUNC: GET BOOTSTRAP HISTORY
|
||||
CALL $FFFD ; CALL UNA
|
||||
JR NZ,ERROR ; HANDLE ERROR
|
||||
CALL PRTDOT ; PROGRESS
|
||||
LD B,L ; MOVE BOOT UNIT ID TO B
|
||||
;
|
||||
LD C,$41 ; UNA FUNC: SET LBA
|
||||
LD DE,0 ; HI WORD ALWAYS ZERO
|
||||
LD HL,3 ; IMAGE STARTS AT FOURTH SECTOR
|
||||
CALL $FFFD ; SET LBA
|
||||
JR NZ,ERROR ; HANDLE ERROR
|
||||
CALL PRTDOT ; PROGRESS
|
||||
;
|
||||
LD C,$42 ; UNA FUNC: READ SECTORS
|
||||
LD DE,$D000 ; STARTING ADDRESS FOR IMAGE
|
||||
LD L,22 ; READ 22 SECTORS
|
||||
CALL $FFFD ; DO READ
|
||||
JR NZ,ERROR ; HANDLE ERROR
|
||||
CALL PRTDOT ; PROGRESS
|
||||
;
|
||||
LD DE,STR_DONE ; DONE MESSAGE
|
||||
CALL PRTSTR ; PRINT IT
|
||||
;
|
||||
LD D,B ; PASS BOOT UNIT TO OS
|
||||
LD E,0 ; ASSUME LU IS ZERO
|
||||
JP SYS_ENT ; GO TO SYSTEM
|
||||
;
|
||||
PRTCHR:
|
||||
PUSH BC
|
||||
PUSH DE
|
||||
LD BC,$0012 ; UNIT 0, WRITE CHAR
|
||||
LD E,A ; CHAR TO PRINT
|
||||
CALL $FFFD ; PRINT
|
||||
POP DE
|
||||
POP BC
|
||||
RET
|
||||
;
|
||||
PRTSTR:
|
||||
PUSH BC
|
||||
PUSH HL
|
||||
LD BC,$0015 ; UNIT 0, WRITE CHARS UNTIL TERMINATOR
|
||||
LD L,0 ; TERMINATOR IS NULL
|
||||
CALL $FFFD ; PRINT
|
||||
POP HL
|
||||
POP BC
|
||||
RET
|
||||
;
|
||||
PRTDOT:
|
||||
LD A,'.' ; DOT CHARACTER
|
||||
JR PRTCHR ; PRINT AND RETURN
|
||||
;
|
||||
; PRINT THE HEX BYTE VALUE IN A
|
||||
;
|
||||
PRTHEXBYTE:
|
||||
PUSH AF
|
||||
PUSH DE
|
||||
CALL HEXASCII
|
||||
LD A,D
|
||||
CALL PRTCHR
|
||||
LD A,E
|
||||
CALL PRTCHR
|
||||
POP DE
|
||||
POP AF
|
||||
RET
|
||||
;
|
||||
; CONVERT BINARY VALUE IN A TO ASCII HEX CHARACTERS IN DE
|
||||
;
|
||||
HEXASCII:
|
||||
LD D,A
|
||||
CALL HEXCONV
|
||||
LD E,A
|
||||
LD A,D
|
||||
RLCA
|
||||
RLCA
|
||||
RLCA
|
||||
RLCA
|
||||
CALL HEXCONV
|
||||
LD D,A
|
||||
RET
|
||||
;
|
||||
; CONVERT LOW NIBBLE OF A TO ASCII HEX
|
||||
;
|
||||
HEXCONV:
|
||||
AND $0F ;LOW NIBBLE ONLY
|
||||
ADD A,$90
|
||||
DAA
|
||||
ADC A,$40
|
||||
DAA
|
||||
RET
|
||||
;
|
||||
ERROR:
|
||||
LD DE,STR_ERR ; POINT TO ERROR STRING
|
||||
CALL PRTSTR ; PRINT IT
|
||||
HALT ; HALT
|
||||
;
|
||||
; DATA
|
||||
;
|
||||
STR_LOAD .DB "\r\nLoading",0
|
||||
STR_DONE .DB "\r\n",0
|
||||
STR_ERR .DB " Read Error!",0
|
||||
;
|
||||
.ORG $ - $8000 ; BACK TO ABSOLUTE ADDRESS
|
||||
;
|
||||
.FILL PT_LOC - $,0 ; FILL TO START OF PARTITION TABLE
|
||||
;
|
||||
; STANDARD IBM-PC PARTITION TABLE. ALTHOUGH A
|
||||
; PARTITION TABLE IS NOT RELEVANT FOR A FLOPPY DISK, IT DOES NO HARM.
|
||||
; THE CONTENTS OF THE PARTITION TABLE CAN BE MANAGED BY FDISK80.
|
||||
;
|
||||
; BELOW WE ALLOW FOR 32 SLICES OF ROMWBW CP/M FILESYSTEMS
|
||||
; FOLLOWED BY A FAT16 PARTITION. THE SLICES FOLLOW THE ORIGINAL
|
||||
; HD512 ROMWBW FORMAT. IF THE DISK IS USING HD1K, A SEPARATE
|
||||
; PARTITION TABLE WILL BE IN PLACE AND RENDER THIS PARTITION TABLE
|
||||
; IRRELEVANT.
|
||||
;
|
||||
; THE CYL/SEC FIELDS ENCODE CYLINDER AND SECTOR AS:
|
||||
; CCCCCCCC:CCSSSSSS
|
||||
; 76543210:98543210
|
||||
;
|
||||
PART0:
|
||||
.DB 0 ; ACTIVE IF $80
|
||||
.DB 0 ; CHS START ADDRESS (HEAD)
|
||||
.DW 0 ; CHS START ADDRESS (CYL/SEC)
|
||||
.DB 0 ; PART TYPE ID
|
||||
.DB 0 ; CHS LAST ADDRESS (HEAD)
|
||||
.DW 0 ; CHS LAST ADDRESS (CYL/SEC)
|
||||
.DW 0,0 ; LBA FIRST (DWORD)
|
||||
.DW 0,0 ; LBA COUNT (DWORD)
|
||||
PART1:
|
||||
.DB 0 ; ACTIVE IF $80
|
||||
.DB 0 ; CHS START ADDRESS (HEAD)
|
||||
.DW %1111111111000001 ; CHS START ADDRESS (CYL/SEC)
|
||||
.DB 6 ; PART TYPE ID
|
||||
.DB 15 ; CHS LAST ADDRESS (HEAD)
|
||||
.DW %1111111111010000 ; CHS LAST ADDRESS (CYL/SEC)
|
||||
.DW $4000,$0010 ; LBA FIRST (DWORD)
|
||||
.DW $0000,$000C ; LBA COUNT (DWORD)
|
||||
PART2:
|
||||
.DB 0 ; ACTIVE IF $80
|
||||
.DB 0 ; CHS START ADDRESS (HEAD)
|
||||
.DW 0 ; CHS START ADDRESS (CYL/SEC)
|
||||
.DB 0 ; PART TYPE ID
|
||||
.DB 0 ; CHS LAST ADDRESS (HEAD)
|
||||
.DW 0 ; CHS LAST ADDRESS (CYL/SEC)
|
||||
.DW 0,0 ; LBA FIRST (DWORD)
|
||||
.DW 0,0 ; LBA COUNT (DWORD)
|
||||
PART3:
|
||||
.DB 0 ; ACTIVE IF $80
|
||||
.DB 0 ; CHS START ADDRESS (HEAD)
|
||||
.DW 0 ; CHS START ADDRESS (CYL/SEC)
|
||||
.DB 0 ; PART TYPE ID
|
||||
.DB 0 ; CHS LAST ADDRESS (HEAD)
|
||||
.DW 0 ; CHS LAST ADDRESS (CYL/SEC)
|
||||
.DW 0,0 ; LBA FIRST (DWORD)
|
||||
.DW 0,0 ; LBA COUNT (DWORD)
|
||||
;
|
||||
; THE END OF THE FIRST SECTOR MUST CONTAIN THE TWO BYTE BOOT SIGNATURE.
|
||||
;
|
||||
BOOTSIG .DB $55,$AA ; STANDARD BOOT SIGNATURE
|
||||
;
|
||||
;-------------------------------------------------------------------------------
|
||||
; SECTOR 2
|
||||
;
|
||||
; THIS SECTOR HAS NOT BEEN DEFINED AND IS RESERVED.
|
||||
;
|
||||
;----------------------------------------------------------------------------
|
||||
;
|
||||
.FILL SEC_SIZE,0 ; JUST FILL SECTOR WITH ZEROES
|
||||
;
|
||||
;-------------------------------------------------------------------------------
|
||||
; SECTOR 3
|
||||
;
|
||||
; OS AND DISK METADATA
|
||||
;
|
||||
;----------------------------------------------------------------------------
|
||||
;
|
||||
.FILL (BLK_SIZE * 3),0 ; FIRST 384 BYTES ARE NOT YET DEFINED
|
||||
;
|
||||
; THE FOLLOWING TWO BYTES ARE AN ADDITIONAL SIGNATURE THAT IS VERIFIED BY
|
||||
; SOME HARDWARE BIOSES.
|
||||
;
|
||||
PR_SIG .DB $5A,$A5 ; SIGNATURE GOES HERE
|
||||
;
|
||||
.FILL (META_LOC - $),0
|
||||
;
|
||||
; METADATA
|
||||
;
|
||||
PR_WP .DB 0 ; (1) WRITE PROTECT BOOLEAN
|
||||
PR_UPDSEQ .DW 0 ; (2) PREFIX UPDATE SEQUENCE NUMBER (DEPRECATED?)
|
||||
PR_VER .DB RMJ,RMN,RUP,RTP ; (4) OS BUILD VERSION
|
||||
PR_LABEL .DB "Unlabeled$$$$$$$","$" ; (17) DISK LABEL (EXACTLY 16 BYTES!!!)
|
||||
.DW 0 ; (2) DEPRECATED
|
||||
PR_LDLOC .DW SYS_LOC ; (2) ADDRESS TO START LOADING SYSTEM
|
||||
PR_LDEND .DW SYS_END ; (2) ADDRESS TO STOP LOADING SYSTEM
|
||||
PR_ENTRY .DW SYS_ENT ; (2) ADDRESS TO ENTER SYSTEM (OS)
|
||||
;
|
||||
#IF (META_SIZE != ($ - META_LOC))
|
||||
.ECHO "META_SIZE VALUE IS WRONG!!!\r\n"
|
||||
!!!
|
||||
#ENDIF
|
||||
;
|
||||
#IF ($ != PREFIX_SIZE)
|
||||
.ECHO "LOADER PREFIX IS WRONG SIZE!!!\r\n"
|
||||
!!!
|
||||
#ENDIF
|
||||
;
|
||||
.END
|
||||
BIN
Source/QPM/qcp27.dat
Normal file
BIN
Source/QPM/qcp27.dat
Normal file
Binary file not shown.
BIN
Source/QPM/qdos27.dat
Normal file
BIN
Source/QPM/qdos27.dat
Normal file
Binary file not shown.
@@ -2,7 +2,7 @@
|
||||
#DEFINE RMN 3
|
||||
#DEFINE RUP 0
|
||||
#DEFINE RTP 0
|
||||
#DEFINE BIOSVER "3.3.0-dev.50"
|
||||
#DEFINE BIOSVER "3.3.0-dev.52"
|
||||
#define rmj RMJ
|
||||
#define rmn RMN
|
||||
#define rup RUP
|
||||
|
||||
@@ -3,5 +3,5 @@ rmn equ 3
|
||||
rup equ 0
|
||||
rtp equ 0
|
||||
biosver macro
|
||||
db "3.3.0-dev.50"
|
||||
db "3.3.0-dev.52"
|
||||
endm
|
||||
|
||||
Reference in New Issue
Block a user