Browse Source

Misc. Cleanup

pull/91/head
Wayne Warthen 6 years ago
parent
commit
5f07834b47
  1. 11
      Source/CBIOS/cbios.asm
  2. 20
      Source/HBIOS/Build.ps1
  3. 9
      Source/HBIOS/Build.sh
  4. 1
      Source/HBIOS/Makefile
  5. 89
      Source/HBIOS/eastaegg.asm
  6. 5
      Source/HBIOS/nascom.asm
  7. 7
      Source/HBIOS/romldr.asm
  8. 6
      Source/HBIOS/std.asm
  9. 4
      Source/HBIOS/tastybasic.asm
  10. 44
      Source/UBIOS/ubios.inc

11
Source/CBIOS/cbios.asm

@ -76,6 +76,17 @@ MEMTOP .EQU $10000
;
#IFDEF PLTUNA
#INCLUDE "../UBIOS/ubios.inc"
;
; EQUATES BELOW SHOULD BE REPLACED WITH RUNTIME CALLS TO UNA GET BIOS INFO FUNCS
;
RAMSIZE .EQU 512
;
BID_RAM0 .EQU $8000
BID_RAMN .EQU (BID_RAM0 + ((RAMSIZE / 32) - 1))
;
BID_RAMD0 .EQU BID_RAM0 ; FIRST RAM DRIVE BANK
BID_BIOS .EQU BID_RAMN - 2 ; BIOS BANK
BID_USR .EQU BID_RAMN - 1 ; USER BANK (CP/M TPA, ETC.)
#ENDIF
;
.ORG CBIOS_LOC ; DEFINED IN STD.ASM

20
Source/HBIOS/Build.ps1

@ -155,15 +155,14 @@ ROMSIZE .EQU ${ROMSize}
;
"@ | Out-File "build.inc" -Encoding ASCII
# Bring over previously assembled binary copy of Forth for later use.
Copy-Item '..\Forth\camel80.bin' 'camel80.bin'
# # Bring over previously assembled binary copy of Forth for later use.
# Copy-Item '..\Forth\camel80.bin' 'camel80.bin'
# Bring over previously generated font files.
Copy-Item '..\Fonts\font*.asm' '.'
# Assemble individual components. Note in the case of UNA, there is less to build.
#
$RomComponentList = "dbgmon", "romldr", "eastaegg", "nascom", "tastybasic", "game", "usrrom", "imgpad", "imgpad0"
$RomComponentList = "dbgmon", "romldr", "eastaegg", "imgpad"
ForEach ($RomComponentName in $RomComponentList) {Asm $RomComponentName}
if ($Platform -ne "UNA")
@ -171,6 +170,12 @@ if ($Platform -ne "UNA")
Asm 'hbios' '-dROMBOOT' -Output 'hbios_rom.bin' -List 'hbios_rom.lst'
Asm 'hbios' '-dAPPBOOT' -Output 'hbios_app.bin' -List 'hbios_app.lst'
Asm 'hbios' '-dIMGBOOT' -Output 'hbios_img.bin' -List 'hbios_img.lst'
Asm 'nascom'
Asm 'tastybasic'
Asm 'game'
Asm 'usrrom'
Asm 'imgpad0'
}
#
@ -181,7 +186,12 @@ if ($Platform -ne "UNA")
# Build 32K OS chunk containing the loader, debug monitor, and OS images
Concat 'romldr.bin', 'eastaegg.bin','dbgmon.bin', "..\cpm22\cpm_${Bios}.bin", "..\zsdos\zsys_${Bios}.bin" osimg.bin
Concat 'camel80.bin', 'nascom.bin', 'tastybasic.bin', 'game.bin', 'imgpad0.bin', 'usrrom.bin' osimg1.bin
# Build second 32K chunk containing supplemental ROM apps (not for UNA)
if ($Platform -ne "UNA")
{
Concat '..\Forth\camel80.bin', 'nascom.bin', 'tastybasic.bin', 'game.bin', 'imgpad0.bin', 'usrrom.bin' osimg1.bin
}
#
# Now the ROM disk image is created. This is done by starting with a

9
Source/HBIOS/Build.sh

@ -90,17 +90,20 @@ done
cp ../Forth/camel80.bin .
make dbgmon.bin romldr.bin eastaegg.bin nascom.bin \
tastybasic.bin game.bin usrrom.bin imgpad.bin imgpad0.bin
make dbgmon.bin romldr.bin eastaegg.bin imgpad.bin
if [ $platform != UNA ] ; then
make nascom.bin tastybasic.bin game.bin usrrom.bin imgpad0.bin
make hbios_rom.bin hbios_app.bin hbios_img.bin
fi
echo "Building $romname output files..."
cat romldr.bin eastaegg.bin dbgmon.bin ../CPM22/cpm_$BIOS.bin ../ZSDOS/zsys_$BIOS.bin >osimg.bin
cat camel80.bin nascom.bin tastybasic.bin game.bin imgpad0.bin usrrom.bin >osimg1.bin
if [ $platform != UNA ] ; then
cat camel80.bin nascom.bin tastybasic.bin game.bin imgpad0.bin usrrom.bin >osimg1.bin
fi
echo "Building ${romsize}KB $romname ROM disk data file..."

1
Source/HBIOS/Makefile

@ -61,6 +61,7 @@ hbios_img.bin: hbios.asm build.inc
romldr.bin: build.inc
dbgmon.bin: build.inc
nascom.bin: build.inc
eastaegg.bin: build.inc
dumps:
for i in $(MOREDIFF) ; do \

89
Source/HBIOS/eastaegg.asm

@ -17,11 +17,6 @@
;
#include "std.asm"
; *** HACK TO GET THIS TO BUILD UNDER UNA ***
#IF (BIOS == BIOS_UNA)
#INCLUDE "hbios.inc"
#ENDIF
cr .equ 0dh
lf .equ 0ah
eos .equ 00h
@ -33,7 +28,7 @@ scale .equ 256 ; Do NOT change this - the
; this scaling factor! :-)
divergent .equ scale * 4
ld sp,0fdffh
ld sp,HBX_LOC
ld hl, welcome ; Print a welcome message
call _puts
@ -178,16 +173,29 @@ inner_loop_end call _putcrlf ; Print a CR/LF pair
mandel_end ld hl, finished ; Print finished-message
call _puts
; GET CONSOLE INPUT STATUS VIA HBIOS
waitch LD C,CIODEV_CONSOLE ; CONSOLE UNIT TO C
LD B,BF_CIOIST ; HBIOS FUNC: INPUT STATUS
RST 08 ; HBIOS RETURNS STATUS IN A
; RESTORE REGISTERS (AF IS OUTPUT)
JR Z,waitch
; Return to the loader
LD A,BID_BOOT ; BOOT BANK
LD HL,0 ; ADDRESS ZERO
CALL HB_BNKCALL ; DOES NOT RETURN
HALT
waitch
#IF (BIOS == BIOS_WBW)
LD C,CIODEV_CONSOLE ; CONSOLE UNIT TO C
LD B,BF_CIOIN ; HBIOS FUNC: INPUT CHAR
RST 08 ; DO IT
; RETURN TO THE LOADER
LD A,BID_BOOT ; BOOT BANK
LD HL,0 ; ADDRESS ZERO
CALL HB_BNKCALL ; DOES NOT RETURN
HALT
#ENDIF
#IF (BIOS == BIOS_UNA)
LD B,0 ; CONSOLE UNIT TO B
LD C,BF_CIOIN ; UBIOS FUNC: INPUT CHAR
CALL $FFFD ; DO IT
; RETURN TO THE LOADER
LD BC,$01FB ; UNA FUNC = SET BANK
LD DE,0 ; ROM BANK 0
CALL $FFFD ; DO IT
JP 0 ; JUMP TO RESTART ADDRESS
#ENDIF
_putcrlf ld hl, crlf
_puts push af
@ -200,22 +208,41 @@ puts0 ld a,(hl)
puts1 pop af
ret
_putc PUSH AF
PUSH BC
PUSH DE
PUSH HL
LD E,A ; OUTPUT CHAR TO E
LD C,CIODEV_CONSOLE; CONSOLE UNIT TO C
LD B,BF_CIOOUT ; HBIOS FUNC: OUTPUT CHAR
RST 08 ; HBIOS OUTPUTS CHARACTDR
POP HL
POP DE
POP BC
POP AF
RET
_putc
#IF (BIOS == BIOS_WBW)
PUSH AF
PUSH BC
PUSH DE
PUSH HL
LD E,A ; OUTPUT CHAR TO E
LD C,CIODEV_CONSOLE ; CONSOLE UNIT TO C
LD B,BF_CIOOUT ; HBIOS FUNC: OUTPUT CHAR
RST 08 ; HBIOS OUTPUTS CHARACTDR
POP HL
POP DE
POP BC
POP AF
RET
#ENDIF
#IF (BIOS == BIOS_UNA)
PUSH AF
PUSH BC
PUSH DE
PUSH HL
LD E,A ; OUTPUT CHAR TO E
LD B,0 ; CONSOLE UNIT TO B
LD C,BF_CIOOUT ; UBIOS FUNC: OUTPUT CHAR
CALL $FFFD ; UBIOS OUTPUTS CHARACTDR
POP HL
POP DE
POP BC
POP AF
RET
#ENDIF
welcome .db "Generating a Mandelbrot set"
.db cr, lf, eos
welcome .db "Generating a Mandelbrot set..."
.db cr, lf, cr, lf, eos
finished .db "Computation finished."
crlf .db cr, lf, eos

5
Source/HBIOS/nascom.asm

@ -29,11 +29,6 @@
;
#INCLUDE "std.asm"
;
; *** HACK TO GET THIS TO BUILD UNDER UNA ***
#IF (BIOS == BIOS_UNA)
#INCLUDE "hbios.inc"
#ENDIF
;
; CUSTOMIZATION
;
ABBRERR .EQU FALSE ; Choose between long error message and abbreviated error messages.

7
Source/HBIOS/romldr.asm

@ -459,9 +459,10 @@ REBOOT:
CALL HB_BNKCALL ; DOES NOT RETURN
#ENDIF
#IF (BIOS == BIOS_UNA)
; UMMM... NEED TO DO SOMETHING HERE...
LD DE,STR_INVALID ; SET ERROR STRING MESSAGE
JP MENU ; AND RESTART MENU LOOP
LD BC,$01FB ; UNA FUNC = SET BANK
LD DE,0 ; ROM BANK 0
RST 08 ; DO IT
JP 0 ; JUMP TO RESTART ADDRESS
#ENDIF
;
;==================================================================================================

6
Source/HBIOS/std.asm

@ -320,6 +320,10 @@ FORCECON .EQU 0 ; DEFAULT IS TO FOLLOW NORMAL SEQUENCE
#INCLUDE "hbios.inc"
#ENDIF
;
#IF (BIOS == BIOS_UNA)
#INCLUDE "../UBIOS/ubios.inc"
#ENDIF
;
;
; INCLUDE Z180 REGISTER DEFINITIONS
;
@ -419,7 +423,7 @@ TBC_LOC .EQU $0A00 ; TASTYBASIC
TBC_SIZ .EQU $0900
TBC_END .EQU TBC_LOC + TBC_SIZ
EGG_LOC .EQU $0A00 ; EASTER EGG
EGG_LOC .EQU $F000 ; EASTER EGG
EGG_SIZ .EQU $0200
EGG_END .EQU EGG_LOC + EGG_SIZ

4
Source/HBIOS/tastybasic.asm

@ -40,10 +40,6 @@ TBC_LOC .equ 0
#else ; RomWBW
#include "std.asm"
#endif
; *** HACK TO GET THIS TO BUILD UNDER UNA ***
#IF (BIOS == BIOS_UNA)
#INCLUDE "hbios.inc"
#ENDIF
.org TBC_LOC
start:

44
Source/UBIOS/ubios.inc

@ -11,27 +11,27 @@ BF_CIOOST .EQU BF_CIO + 4 ; CHARACTER OUTPUT STATUS
BF_DIO .EQU $40
BF_DIOREAD .EQU BF_DIO + 2 ; DISK READ
BF_DIOWRITE .EQU BF_DIO + 3 ; DISK WRITE
;;
;; MEMORY BANK CONFIGURATION
;;
;ROMSIZE .EQU 512
;RAMSIZE .EQU 512
;
; MEMORY BANK CONFIGURATION
;BID_ROM0 .EQU $0000
;BID_ROMN .EQU (BID_ROM0 + ((ROMSIZE / 32) - 1))
;BID_RAM0 .EQU $8000
;BID_RAMN .EQU (BID_RAM0 + ((RAMSIZE / 32) - 1))
;
ROMSIZE .EQU 512
RAMSIZE .EQU 512
BID_ROM0 .EQU $0000
BID_ROMN .EQU (BID_ROM0 + ((ROMSIZE / 32) - 1))
BID_RAM0 .EQU $8000
BID_RAMN .EQU (BID_RAM0 + ((RAMSIZE / 32) - 1))
BID_BOOT .EQU BID_ROM0 ; BOOT BANK
BID_BIOSIMG .EQU BID_ROM0 + 1 ; BIOS IMAGE BANK
BID_OSIMG .EQU BID_ROM0 + 2 ; ROM LOADER AND IMAGES BANK
BID_FSFAT .EQU BID_ROM0 + 3 ; FAT FILESYSTEM DRIVER BANK
BID_ROMD0 .EQU BID_ROM0 + 4 ; FIRST ROM DRIVE BANK
BID_ROMDN .EQU BID_ROMN ; LAST ROM DRIVE BANK
BID_RAMD0 .EQU BID_RAM0 ; FIRST RAM DRIVE BANK
BID_RAMDN .EQU BID_RAMN - 4 ; LAST RAM DRIVE BANK
BID_AUX .EQU BID_RAMN - 3 ; AUX BANK (BPBIOS, ETC.)
BID_BIOS .EQU BID_RAMN - 2 ; BIOS BANK
BID_USR .EQU BID_RAMN - 1 ; USER BANK (CP/M TPA, ETC.)
BID_COM .EQU BID_RAMN ; COMMON BANK, UPPER 32K
;BID_BOOT .EQU BID_ROM0 ; BOOT BANK
;BID_BIOSIMG .EQU BID_ROM0 + 1 ; BIOS IMAGE BANK
;BID_OSIMG .EQU BID_ROM0 + 2 ; ROM LOADER AND IMAGES BANK
;BID_FSFAT .EQU BID_ROM0 + 3 ; FAT FILESYSTEM DRIVER BANK
;BID_ROMD0 .EQU BID_ROM0 + 4 ; FIRST ROM DRIVE BANK
;BID_ROMDN .EQU BID_ROMN ; LAST ROM DRIVE BANK
;
;BID_RAMD0 .EQU BID_RAM0 ; FIRST RAM DRIVE BANK
;BID_RAMDN .EQU BID_RAMN - 4 ; LAST RAM DRIVE BANK
;BID_AUX .EQU BID_RAMN - 3 ; AUX BANK (BPBIOS, ETC.)
;BID_BIOS .EQU BID_RAMN - 2 ; BIOS BANK
;BID_USR .EQU BID_RAMN - 1 ; USER BANK (CP/M TPA, ETC.)
;BID_COM .EQU BID_RAMN ; COMMON BANK, UPPER 32K

Loading…
Cancel
Save