Solved CPM boot hang, uninitialised memory so now on cold boot all memory is initialised. Also added 320K ROM drive definitions.

This commit is contained in:
Philip Smart
2020-05-15 00:54:26 +01:00
parent e70a5414f8
commit aeb8c49ea2
21 changed files with 2157 additions and 439 deletions

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -326,9 +326,8 @@ OPTBL: DB 001H
; ;
; BC:DE:HL contains the time in milliseconds (100msec resolution) since 01/01/1980. In IX is held the interrupt service handler routine address for the RTC. ; BC:DE:HL contains the time in milliseconds (100msec resolution) since 01/01/1980. In IX is held the interrupt service handler routine address for the RTC.
; HL contains lower 16 bits, DE contains middle 16 bits, BC contains upper 16bits, allows for a time from 00:00:00 to 23:59:59, for > 500000 days! ; HL contains lower 16 bits, DE contains middle 16 bits, BC contains upper 16bits, allows for a time from 00:00:00 to 23:59:59, for > 500000 days!
?TIMESET: DI ; NB. Caller must disable interrupts before calling this method.
; ?TIMESET: LD (TIMESEC),HL ; Load lower 16 bits.
LD (TIMESEC),HL ; Load lower 16 bits.
EX DE,HL EX DE,HL
LD (TIMESEC+2),HL ; Load middle 16 bits. LD (TIMESEC+2),HL ; Load middle 16 bits.
PUSH BC PUSH BC
@@ -352,7 +351,6 @@ OPTBL: DB 001H
LD A, 0C3H ; Install the interrupt vector for when interrupts are enabled. LD A, 0C3H ; Install the interrupt vector for when interrupts are enabled.
LD (00038H),A LD (00038H),A
LD (00039H),IX LD (00039H),IX
;EI
RET RET
; Time Read; ; Time Read;
@@ -375,9 +373,9 @@ OPTBL: DB 001H
?MODE: LD HL,KEYPF ?MODE: LD HL,KEYPF
LD (HL),08AH LD (HL),08AH
LD (HL),007H LD (HL),007H ; Set Motor to Off.
LD (HL),005H LD (HL),004H ; Disable interrupts by setting INTMSK to 0.
LD (HL),001H LD (HL),001H ; Set VGATE to 1.
RET RET
; Method to check if a key has been pressed and stored in buffer.. ; Method to check if a key has been pressed and stored in buffer..

View File

@@ -108,13 +108,14 @@ ROW: EQU 25 ; Numbe
SCRNSZ: EQU COLW * ROW ; Total size, in bytes, of the screen display area. SCRNSZ: EQU COLW * ROW ; Total size, in bytes, of the screen display area.
SCRLW: EQU COLW / 8 ; Number of 8 byte regions in a line for hardware scroll. SCRLW: EQU COLW / 8 ; Number of 8 byte regions in a line for hardware scroll.
MODE80C: EQU 1 MODE80C: EQU 1
ROMDRVSIZE: EQU 320 ; Size in K of the Rom RFS Drive, currently 240 or 320 are coded. Please set value in make_cpmdisks.sh when changing this parameter.
; BIOS equates ; BIOS equates
MAXDISKS EQU 7 ; Max number of Drives supported MAXDISKS EQU 7 ; Max number of Drives supported
KEYBUFSIZE EQU 16 ; Ensure this is a power of 2, max size 256. KEYBUFSIZE EQU 16 ; Ensure this is a power of 2, max size 256.
; Debugging ; Debugging
ENADEBUG EQU 1 ; Enable debugging logic, 1 = enable, 0 = disable ENADEBUG EQU 0 ; Enable debugging logic, 1 = enable, 0 = disable
;------------------------------------------------------- ;-------------------------------------------------------
; Function entry points in the CBIOS ROMS ; Function entry points in the CBIOS ROMS
@@ -207,7 +208,7 @@ BK2A20 EQU 128 ; User
; 1 0 = Flasm RAM 2 or Static RAM 0. ; 1 0 = Flasm RAM 2 or Static RAM 0.
; 1 1 = Reserved. ; 1 1 = Reserved.
BNKCTRLDEF EQU CDLTCH2+CDLTCH1+BBMOSI+SDCS+BBCLK ; Default on startup for the Bank Control register. BNKCTRLDEF EQU BBMOSI+SDCS+BBCLK ; Default on startup for the Bank Control register.
;----------------------------------------------- ;-----------------------------------------------
; IO ports in hardware and values. ; IO ports in hardware and values.
@@ -427,6 +428,7 @@ KEYLAST: DS virtual 1 ; KEY L
KEYRPT: DS virtual 1 ; KEY REPEAT COUNTER KEYRPT: DS virtual 1 ; KEY REPEAT COUNTER
USRBANKSAV: DS virtual 1 ; Save user bank number when calling another user bank. USRBANKSAV: DS virtual 1 ; Save user bank number when calling another user bank.
HLSAVE: DS virtual 2 ; Space to save HL register when manipulating stack. HLSAVE: DS virtual 2 ; Space to save HL register when manipulating stack.
ROMCTL DS virtual 1 ; Rom Paging control register contents.
; ;
SPV: SPV:
IBUFE: ; TAPE BUFFER (128 BYTES) IBUFE: ; TAPE BUFFER (128 BYTES)
@@ -475,7 +477,6 @@ TRK0FD2 DS virtual 1 ; FD 2
TRK0FD3 DS virtual 1 ; FD 3 IS AT TRACK 0 = BIT 0 set TRK0FD3 DS virtual 1 ; FD 3 IS AT TRACK 0 = BIT 0 set
TRK0FD4 DS virtual 1 ; FD 4 IS AT TRACK 0 = BIT 0 set TRK0FD4 DS virtual 1 ; FD 4 IS AT TRACK 0 = BIT 0 set
RETRIES DS virtual 2 ; DATA READ RETRIES RETRIES DS virtual 2 ; DATA READ RETRIES
ROMCTL DS virtual 1 ; Rom Paging control register contents.
TMPADR DS virtual 2 ; TEMPORARY ADDRESS STORAGE TMPADR DS virtual 2 ; TEMPORARY ADDRESS STORAGE
TMPSIZE DS virtual 2 ; TEMPORARY SIZE TMPSIZE DS virtual 2 ; TEMPORARY SIZE
TMPCNT DS virtual 2 ; TEMPORARY COUNTER TMPCNT DS virtual 2 ; TEMPORARY COUNTER
@@ -546,10 +547,15 @@ COLOUR EQU 0
SPSAVE: DS virtual 2 ; CPM Stack save. SPSAVE: DS virtual 2 ; CPM Stack save.
SPISRSAVE: DS virtual 2 SPISRSAVE: DS virtual 2
VAREND EQU $ ; End of variables
; Stack space for the CBIOS. ; Stack space for the CBIOS.
MSGSTRBUF: DS virtual 128 ; Lower end of the stack space is for interbank message printing, ie.space for a string to print. MSGSTRBUF: DS virtual 128 ; Lower end of the stack space is for interbank message printing, ie.space for a string to print.
BIOSSTACK EQU $ BIOSSTACK EQU $
; Stack space for the Interrupt Service Routine. ; Stack space for the Interrupt Service Routine.
DS virtual 16 ; Max 8 stack pushes. DS virtual 16 ; Max 8 stack pushes.
ISRSTACK EQU $ ISRSTACK EQU $
DBGSTACKP: DS virtual 2
DS virtual 64
DBGSTACK: EQU $
VAREND EQU $ ; End of variables

View File

@@ -759,7 +759,8 @@ LOADROM1: DI
CALL MFINDMZF ; Try and find the file in User ROM via MROM utility. CALL MFINDMZF ; Try and find the file in User ROM via MROM utility.
JR NZ, LROMNTFND JR NZ, LROMNTFND
; ;
PUSH BC PUSH BC ; Preserve bank and block where MZF file found.
PUSH AF
LD A,(ROMBK1) ; Page in monitor so we can print a message. LD A,(ROMBK1) ; Page in monitor so we can print a message.
LD (BNKSELMROM),A LD (BNKSELMROM),A
LD DE,MSGLOAD+1 ; Skip initial CR. LD DE,MSGLOAD+1 ; Skip initial CR.
@@ -768,8 +769,8 @@ LOADROM1: DI
CALL BKSW0to6 CALL BKSW0to6
LD A,(WRKROMBK1) ; Revert to MROM bank to load the application. LD A,(WRKROMBK1) ; Revert to MROM bank to load the application.
LD (BNKSELMROM),A LD (BNKSELMROM),A
POP AF
POP BC POP BC
; ;
CALL MROMLOAD ; Load the file from User ROM via MROM utility. CALL MROMLOAD ; Load the file from User ROM via MROM utility.
JP Z, LROMLOAD5 JP Z, LROMLOAD5

View File

@@ -277,6 +277,7 @@ INITBNK_1: LD A,(BNKCTRLRST)
SELUSRBNK: PUSH BC SELUSRBNK: PUSH BC
PUSH AF PUSH AF
LD A,(ROMCTL) ; Get current setting for the coded latch, ie. number of reads needed to enable it. LD A,(ROMCTL) ; Get current setting for the coded latch, ie. number of reads needed to enable it.
LD C,A
RRA RRA
RRA RRA
CPL CPL
@@ -286,11 +287,16 @@ SELUSRBNK: PUSH BC
SELUSRBNK1:LD A,(BNKSELUSER) SELUSRBNK1:LD A,(BNKSELUSER)
DJNZ SELUSRBNK1 DJNZ SELUSRBNK1
POP AF POP AF
POP BC
LD (BNKSELUSER),A ; Select the required bank. LD (BNKSELUSER),A ; Select the required bank.
JR C,SELUSRBNK2 ; If Carry is set by caller then leave the control registers active. LD A,C
POP BC
JR NC,SELUSRBNK2 ; If Carry is set by caller then leave the control registers active.
AND 03FH ; When we leave the registers active, set upper bank bits to 0 to select Flash RAM I, the default.
LD (BNKCTRL),A
RET
SELUSRBNK2:LD (BNKCTRL),A ; Update the upper address lines according to in-memory value.
LD (BNKCTRLDIS),A ; Disable the control registers, value of A is not important. LD (BNKCTRLDIS),A ; Disable the control registers, value of A is not important.
SELUSRBNK2:RET RET
; HL contains address of block to check. ; HL contains address of block to check.
@@ -339,6 +345,10 @@ _DIRMROM: PUSH BC
; D = File sequence number. ; D = File sequence number.
; ;
LD B,USRROMPAGES ; First 16x2K pages are reserved in User bank. LD B,USRROMPAGES ; First 16x2K pages are reserved in User bank.
LD A,(ROMCTL)
AND 03FH ; Mask out the upper bank address lines so we start with Flash RAM I.
;
DIRNXTDVC: LD (ROMCTL),A
LD C,0 ; Block in page. LD C,0 ; Block in page.
DIRNXTPG: LD A,B DIRNXTPG: LD A,B
LD (WRKROMBK2), A LD (WRKROMBK2), A
@@ -373,6 +383,12 @@ DIRNOTMZF: INC C
DIRNXTPG2: LD A,B DIRNXTPG2: LD A,B
CP 000h ; User rom has 256 banks of 2K, so stop when we wrap round to 0. CP 000h ; User rom has 256 banks of 2K, so stop when we wrap round to 0.
JR NZ, DIRNXTPG JR NZ, DIRNXTPG
LD A,(ROMCTL)
ADD A, 64
CP 0C0H ; If both upper address bits are set then we have come to the end.
JR C,DIRNXTDVC
AND 03FH
LD (ROMCTL),A ; Switch back to primary Flash RAM I device.
LD A,(ROMBK2) LD A,(ROMBK2)
SCF ; Select the required user bank and Set carry so that the control registers remain enabled. SCF ; Select the required user bank and Set carry so that the control registers remain enabled.
CALL SELUSRBNK CALL SELUSRBNK
@@ -382,6 +398,7 @@ DIRNXTPG2: LD A,B
; Wrapper to call the User ROM function to display the MZF filename. ; Wrapper to call the User ROM function to display the MZF filename.
; This function needs to manipulate the banks such that the calling bank is accessible.
_PRTMZF: LD A,(ROMBK2) _PRTMZF: LD A,(ROMBK2)
SCF ; Select the required user bank and Set carry so that the control registers remain enabled. SCF ; Select the required user bank and Set carry so that the control registers remain enabled.
CALL SELUSRBNK CALL SELUSRBNK
@@ -414,10 +431,19 @@ _MFINDMZF: PUSH DE
; C = Block in page ; C = Block in page
; D = File sequence number. ; D = File sequence number.
; ;
; Output: B = Bank where file found
; C = Block within bank where page found.
; A[7:6] = Upper bits of bank where page found.
;
FINDMZF0: POP DE ; Get file sequence number in D. FINDMZF0: POP DE ; Get file sequence number in D.
LD B,USRROMPAGES ; First 8 pages are reserved in User ROM bank. LD B,USRROMPAGES ; First 8 pages are reserved in User ROM bank.
LD C,0 ; Block in page.
;LD D,0 ; File numbering start. ;LD D,0 ; File numbering start.
LD A,(ROMCTL)
AND 03FH ; Mask out the upper bank address lines so we start with Flash RAM I.
;
FINDNXTDVC:LD (ROMCTL),A
LD C,0 ; Block in page.
;
FINDMZF1: LD A,B FINDMZF1: LD A,B
LD (WRKROMBK2), A LD (WRKROMBK2), A
OR A ; Select the required user bank and Clear carry so that the control registers are disabled. OR A ; Select the required user bank and Clear carry so that the control registers are disabled.
@@ -471,9 +497,16 @@ FINDMZF4: INC C
FINDMZF5: LD A,B FINDMZF5: LD A,B
CP 000h ; User ROM has 256 banks of 2K, so stop when we wrap around to zero. CP 000h ; User ROM has 256 banks of 2K, so stop when we wrap around to zero.
JR NZ, FINDMZF1 JR NZ, FINDMZF1
;
LD A,(ROMCTL)
ADD A, 64
CP 0C0H ; If both upper address bits are set then we have come to the end.
JR C,FINDNXTDVC
AND 03FH
LD (ROMCTL),A ; Switch back to primary Flash RAM I device.
;
INC B INC B
JR FINDMZFNO JR FINDMZFNO
FINDMZFYES: ; Flag set by previous test. FINDMZFYES: ; Flag set by previous test.
FINDMZFNO: PUSH AF FINDMZFNO: PUSH AF
LD A,(ROMBK2) LD A,(ROMBK2)
@@ -482,14 +515,27 @@ FINDMZFNO: PUSH AF
POP AF POP AF
RET RET
LD A,(ROMCTL)
AND 03FH
LD (ROMCTL),A ; Switch back to primary Flash RAM I device.
; Load Program from ROM ; Load Program from ROM
; IN BC Bank and Block to of MZF file. ; Input: B = Bank of MZF File to load
; OUT zero Set if file loaded, reset if an error occurred. ; C = Block within bank of start of MZF file.
; A[7:6] = Upper bits of bank containing MZF File to load.
; Output:Zero = Set if file loaded, reset if an error occurred.
; ;
; Load program from RFS Bank 1 (MROM Bank) ; Load program from User ROM Banks I, II or III
; ;
_MROMLOAD: PUSH BC _MROMLOAD: PUSH BC
;
AND 0C0H ; Ensure only top two bits are used.
LD D,A
LD A,(ROMCTL)
AND 03FH ; Mask out the upper bank address lines so we can OR in the value given.
OR D
LD (ROMCTL),A
;
LD A,B LD A,B
LD (WRKROMBK2),A LD (WRKROMBK2),A
OR A ; Select the required user bank and Clear carry so that the control registers are disabled. OR A ; Select the required user bank and Clear carry so that the control registers are disabled.
@@ -577,6 +623,9 @@ LROMLOAD7: LD A, B
; ;
LROMLOAD8: POP BC LROMLOAD8: POP BC
LROMLOAD5: PUSH AF LROMLOAD5: PUSH AF
LD A,(ROMCTL)
AND 03FH
LD (ROMCTL),A ; Switch back to primary Flash RAM I device.
LD A,(ROMBK2) LD A,(ROMBK2)
SCF ; Select the required user bank and Set carry so that the control registers remain enabled. SCF ; Select the required user bank and Set carry so that the control registers remain enabled.
CALL SELUSRBNK CALL SELUSRBNK

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -14,7 +14,8 @@
## Credits: ## Credits:
## Copyright: (c) 2020 Philip Smart <philip.smart@net2net.org> ## Copyright: (c) 2020 Philip Smart <philip.smart@net2net.org>
## ##
## History: January 2020 - Initial script written. ## History: Jan 2020 - Initial script written.
## May 2020 - Updated to allow 240/320K Rom RFS images to be built
## ##
######################################################################################################### #########################################################################################################
## This source file is free software: you can redistribute it and#or modify ## This source file is free software: you can redistribute it and#or modify
@@ -53,7 +54,7 @@ FD1M44_SECTORS=36
FD1M44_GAP3=78 FD1M44_GAP3=78
FD1M44_INTERLEAVE=4 FD1M44_INTERLEAVE=4
ROMRFS_PATH=${CPM_PATH}/ROMRFS ROMRFS_PATH=${CPM_PATH}/ROMRFS
ROMRFS_CYLS=15 ROMRFS_CYLS=20 # Set to 15 for a 240K disk, 20 for a 320K disk
ROMRFS_HEADS=1 ROMRFS_HEADS=1
ROMRFS_SECTORS=128 ROMRFS_SECTORS=128
ROMRFS_GAP3=78 ROMRFS_GAP3=78
@@ -88,10 +89,22 @@ echo "Creating CPM Disks from all the directories in:$CPM_PATH} matching this fi
echo "Building ROM Drive:${src}...Size:`du -sh --apparent-size ${src} | cut -f1`, Dir Entries:`ls -l ${src} | wc -l`" echo "Building ROM Drive:${src}...Size:`du -sh --apparent-size ${src} | cut -f1`, Dir Entries:`ls -l ${src} | wc -l`"
# Copy a blank image to create the new disk. # Copy a blank image to create the new disk.
cp ${CPM_PATH}/BLANKFD/BLANK_240K.RAW ${ROMRFS_PATH}/RAW/${src}.RAW; if [[ ${ROMRFS_CYLS} == 15 ]]; then
echo "Creating 240K ROM RFS Drive Image..."
# Copy the CPM files from the linux filesystem into the CPM Disk under the CPM filesystem. cp ${CPM_PATH}/BLANKFD/BLANK_240K.RAW ${ROMRFS_PATH}/RAW/${src}.RAW;
cpmcp -f MZ80A-RFS ${ROMRFS_PATH}/RAW/${src}.RAW ${CPM_PATH}/${src}/*.* 0:
# Copy the CPM files from the linux filesystem into the CPM Disk under the CPM filesystem.
cpmcp -f MZ80A-RFS ${ROMRFS_PATH}/RAW/${src}.RAW ${CPM_PATH}/${src}/*.* 0:
elif [[ ${ROMRFS_CYLS} == 20 ]]; then
echo "Creating 320K ROM RFS Drive Image..."
cp ${CPM_PATH}/BLANKFD/BLANK_320K.RAW ${ROMRFS_PATH}/RAW/${src}.RAW;
# Copy the CPM files from the linux filesystem into the CPM Disk under the CPM filesystem.
cpmcp -f MZ80A-RFS-320 ${ROMRFS_PATH}/RAW/${src}.RAW ${CPM_PATH}/${src}/*.* 0:
else
echo "ROMRFS config error, ROMRFS_CYLS should = 15 or 20"
exit 1
fi
fi fi
else else
# Place size of disk in the name, useful when using the Floppy Emulator. # Place size of disk in the name, useful when using the Floppy Emulator.

View File

@@ -34,6 +34,7 @@ ROOTDIR=../../MZ80A_RFS
MZB_PATH=${ROOTDIR}/software/MZB MZB_PATH=${ROOTDIR}/software/MZB
ROM_PATH=${ROOTDIR}/software/roms/ ROM_PATH=${ROOTDIR}/software/roms/
SECTORSIZE=256 SECTORSIZE=256
CPMDISKMODE=SPLIT
# Place the RFS rom into the User ROM at the beginning as it contains all the banked pages. # Place the RFS rom into the User ROM at the beginning as it contains all the banked pages.
echo "cat ${ROM_PATH}/rfs.rom ${ROM_PATH}/cbios_bank1.rom ${ROM_PATH}/cbios_bank2.rom ${ROM_PATH}/cbios_bank3.rom ${ROM_PATH}/cbios_bank4.rom > /tmp/user.rom" echo "cat ${ROM_PATH}/rfs.rom ${ROM_PATH}/cbios_bank1.rom ${ROM_PATH}/cbios_bank2.rom ${ROM_PATH}/cbios_bank3.rom ${ROM_PATH}/cbios_bank4.rom > /tmp/user.rom"
@@ -41,14 +42,31 @@ cat ${ROM_PATH}/rfs.rom ${ROM_PATH}/cbios_bank1.rom ${ROM_PATH}/cbios_bank2.rom
${ROM_PATH}/cbios_bank3.rom ${ROM_PATH}/cbios_bank4.rom \ ${ROM_PATH}/cbios_bank3.rom ${ROM_PATH}/cbios_bank4.rom \
> /tmp/user.rom > /tmp/user.rom
# CPM RFS Disks currently only in User ROM. # User ROM 2 = empty.
for f in 1 2 > /tmp/user2.rom
do
if [ -f ${MZB_PATH}/CPM_RFS_${f}.${SECTORSIZE}.bin ]; then # According to flag set above, either put the CPM Disks in the first ROM, or place one in each ROM allowing for better write spread and larger disks.
echo "cat ${MZB_PATH}/CPM_RFS_${f}.${SECTORSIZE}.bin >> /tmp/user.rom" #
cat ${MZB_PATH}/CPM_RFS_${f}.${SECTORSIZE}.bin >> /tmp/user.rom if [ "${CPMDISKMODE}" != "SPLIT" ]; then
# CPM RFS Disks currently only in User ROM.
for f in 1 2
do
if [ -f ${MZB_PATH}/CPM_RFS_${f}.${SECTORSIZE}.bin ]; then
echo "cat ${MZB_PATH}/CPM_RFS_${f}.${SECTORSIZE}.bin >> /tmp/user.rom"
cat ${MZB_PATH}/CPM_RFS_${f}.${SECTORSIZE}.bin >> /tmp/user.rom
fi
done
else
if [ -f ${MZB_PATH}/CPM_RFS_1.${SECTORSIZE}.bin ]; then
echo "cat ${MZB_PATH}/CPM_RFS_1.${SECTORSIZE}.bin >> /tmp/user.rom"
cat ${MZB_PATH}/CPM_RFS_1.${SECTORSIZE}.bin >> /tmp/user.rom
fi fi
done
if [ -f ${MZB_PATH}/CPM_RFS_2.${SECTORSIZE}.bin ]; then
echo "cat ${MZB_PATH}/CPM_RFS_2.${SECTORSIZE}.bin >> /tmp/user2.rom"
cat ${MZB_PATH}/CPM_RFS_2.${SECTORSIZE}.bin >> /tmp/user2.rom
fi
fi
# Place the monitor roms into the MROM at the beginning for banked page usage. # Place the monitor roms into the MROM at the beginning for banked page usage.
echo "cat ${ROM_PATH}/monitor_SA1510.rom ${ROM_PATH}/monitor_80c_SA1510.rom ${ROM_PATH}/cbios.rom ${ROM_PATH}/rfs_mrom.rom ${ROM_PATH}/blank_mrom.rom ${ROM_PATH}/blank_mrom.rom ${ROM_PATH}/blank_mrom.rom ${ROM_PATH}/blank_mrom.rom > /tmp/mrom.rom" echo "cat ${ROM_PATH}/monitor_SA1510.rom ${ROM_PATH}/monitor_80c_SA1510.rom ${ROM_PATH}/cbios.rom ${ROM_PATH}/rfs_mrom.rom ${ROM_PATH}/blank_mrom.rom ${ROM_PATH}/blank_mrom.rom ${ROM_PATH}/blank_mrom.rom ${ROM_PATH}/blank_mrom.rom > /tmp/mrom.rom"
@@ -61,6 +79,9 @@ GENROM=0
# Manually choose the programs you want installed into the ROMS. The files will be first placed into the USER ROM and when full into the # Manually choose the programs you want installed into the ROMS. The files will be first placed into the USER ROM and when full into the
# Monitor ROM. Thus order is important if you want a particular program in a particular ROM. # Monitor ROM. Thus order is important if you want a particular program in a particular ROM.
#
# NB: A Double Hash (##) indicates a program found not to work on the Sharp MZ-80A.
#
ROM_INCLUDE= ROM_INCLUDE=
ROM_INCLUDE+="${MZB_PATH}/cpm22.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/cpm22.${SECTORSIZE}.bin:"
ROM_INCLUDE+="${MZB_PATH}/sdtest.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/sdtest.${SECTORSIZE}.bin:"
@@ -78,7 +99,7 @@ ROM_INCLUDE+="${MZB_PATH}/6502_Betriebssys.${SECTORSIZE}.bin:"
ROM_INCLUDE+="${MZB_PATH}/A-BASIC_SA-5510.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/A-BASIC_SA-5510.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/AIP_-_LOGO_xrr.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/AIP_-_LOGO_xrr.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/APOLLO CHESS v2a.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/APOLLO CHESS v2a.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/APOLLO_CHESS_v2a.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/APOLLO_CHESS_v2a.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/B880.A3_P6.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/B880.A3_P6.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/B880 MASTER.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/B880 MASTER.${SECTORSIZE}.bin:"
ROM_INCLUDE+="${MZB_PATH}/B880_MASTER.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/B880_MASTER.${SECTORSIZE}.bin:"
@@ -126,7 +147,7 @@ ROM_INCLUDE+="${MZB_PATH}/CONVERTER_A_700.${SECTORSIZE}.bin:"
ROM_INCLUDE+="${MZB_PATH}/COPIER.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/COPIER.${SECTORSIZE}.bin:"
ROM_INCLUDE+="${MZB_PATH}/COSMO_BLASTER_MZ700.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/COSMO_BLASTER_MZ700.${SECTORSIZE}.bin:"
##ROM_INCLUDE+="${MZB_PATH}/DCS MZ80A APPEND.${SECTORSIZE}.bin:" ##ROM_INCLUDE+="${MZB_PATH}/DCS MZ80A APPEND.${SECTORSIZE}.bin:"
##ROM_INCLUDE+="${MZB_PATH}/DCS_MZ80A_APPEND.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/DCS_MZ80A_APPEND.${SECTORSIZE}.bin:"
##ROM_INCLUDE+="${MZB_PATH}/DCS MZ80A RENUM.${SECTORSIZE}.bin:" ##ROM_INCLUDE+="${MZB_PATH}/DCS MZ80A RENUM.${SECTORSIZE}.bin:"
##ROM_INCLUDE+="${MZB_PATH}/DCS_MZ80A_RENUM.${SECTORSIZE}.bin:" ##ROM_INCLUDE+="${MZB_PATH}/DCS_MZ80A_RENUM.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/DELETE.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/DELETE.${SECTORSIZE}.bin:"
@@ -139,11 +160,11 @@ ROM_INCLUDE+="${MZB_PATH}/DISKEDIT.A4B.${SECTORSIZE}.bin:"
##ROM_INCLUDE+="${MZB_PATH}/DISKEDIT.A7_40T.${SECTORSIZE}.bin:" ##ROM_INCLUDE+="${MZB_PATH}/DISKEDIT.A7_40T.${SECTORSIZE}.bin:"
ROM_INCLUDE+="${MZB_PATH}/diskutility.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/diskutility.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/EXPRESS BAS_700.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/EXPRESS BAS_700.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/EXPRESS_BAS_700.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/EXPRESS_BAS_700.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/EXPRESS COMPILER.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/EXPRESS COMPILER.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/EXPRESS_COMPILER.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/EXPRESS_COMPILER.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/EXPRESS PLUS.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/EXPRESS PLUS.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/EXPRESS_PLUS.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/EXPRESS_PLUS.${SECTORSIZE}.bin:"
ROM_INCLUDE+="${MZB_PATH}/EXT.BASIC_OM-500.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/EXT.BASIC_OM-500.${SECTORSIZE}.bin:"
##ROM_INCLUDE+="${MZB_PATH}/FDCOPY.${SECTORSIZE}.bin:" ##ROM_INCLUDE+="${MZB_PATH}/FDCOPY.${SECTORSIZE}.bin:"
ROM_INCLUDE+="${MZB_PATH}/FD_Editor_MZ700.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/FD_Editor_MZ700.${SECTORSIZE}.bin:"
@@ -154,7 +175,7 @@ ROM_INCLUDE+="${MZB_PATH}/fortransosz80.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/GALAXI_FORM.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/GALAXI_FORM.${SECTORSIZE}.bin:"
ROM_INCLUDE+="${MZB_PATH}/GALAXY_INVADERS.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/GALAXY_INVADERS.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/GDP9-BA.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/GDP9-BA.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/Greedy_Gremlins.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/Greedy_Gremlins.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/Hardcopy.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/Hardcopy.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/HP4TMZ7.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/HP4TMZ7.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/HP4TMZ7L.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/HP4TMZ7L.${SECTORSIZE}.bin:"
@@ -175,17 +196,17 @@ ROM_INCLUDE+="${MZB_PATH}/HU-BASIC.A2_80M.${SECTORSIZE}.bin:"
ROM_INCLUDE+="${MZB_PATH}/KNIFORTH.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/KNIFORTH.${SECTORSIZE}.bin:"
ROM_INCLUDE+="${MZB_PATH}/KUMA_INTERPR..${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/KUMA_INTERPR..${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/KuPTest.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/KuPTest.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/LAND_ESCAPE.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/LAND_ESCAPE.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/Le_Mans.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/Le_Mans.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/loader.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/loader.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/MAGIC_PAINTBOX.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/MAGIC_PAINTBOX.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/MAN-HUNT.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/MAN-HUNT.${SECTORSIZE}.bin:"
ROM_INCLUDE+="${MZB_PATH}/m_c_Breakout_2.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/m_c_Breakout_2.${SECTORSIZE}.bin:"
ROM_INCLUDE+="${MZB_PATH}/m_c_Hissing_Sid.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/m_c_Hissing_Sid.${SECTORSIZE}.bin:"
ROM_INCLUDE+="${MZB_PATH}/m_c_Race_Chase.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/m_c_Race_Chase.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/MEMORY_TEST.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/MEMORY_TEST.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/MINI_DATACARD..${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/MINI_DATACARD..${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/minotaur.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/minotaur.${SECTORSIZE}.bin:"
ROM_INCLUDE+="${MZB_PATH}/ML-SP_8002_BBG.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/ML-SP_8002_BBG.${SECTORSIZE}.bin:"
##ROM_INCLUDE+="${MZB_PATH}/monitor3.${SECTORSIZE}.bin:" ##ROM_INCLUDE+="${MZB_PATH}/monitor3.${SECTORSIZE}.bin:"
ROM_INCLUDE+="${MZB_PATH}/MONITOR6.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/MONITOR6.${SECTORSIZE}.bin:"
@@ -199,7 +220,7 @@ ROM_INCLUDE+="${MZB_PATH}/MZ-80A_GALACTIC.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/Mzprint.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/Mzprint.${SECTORSIZE}.bin:"
ROM_INCLUDE+="${MZB_PATH}/NEW_INVADERS.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/NEW_INVADERS.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/OPENING_DATA.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/OPENING_DATA.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/OTHELLO.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/OTHELLO.${SECTORSIZE}.bin:"
ROM_INCLUDE+="${MZB_PATH}/PAC-MAN.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/PAC-MAN.${SECTORSIZE}.bin:"
##ROM_INCLUDE+="${MZB_PATH}/PAC-MAN3.${SECTORSIZE}.bin:" ##ROM_INCLUDE+="${MZB_PATH}/PAC-MAN3.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/PAINFUL_MAN.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/PAINFUL_MAN.${SECTORSIZE}.bin:"
@@ -237,7 +258,7 @@ ROM_INCLUDE+="${MZB_PATH}/SARGON_2.71.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/SP-4015.A1_S.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/SP-4015.A1_S.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/SP-5060.A1_M.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/SP-5060.A1_M.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/SP-5060.A1_S.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/SP-5060.A1_S.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/SPACE_INVADERS.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/SPACE_INVADERS.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/SP-CONVERT.A1.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/SP-CONVERT.A1.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/STKEEPER2BAS700A.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/STKEEPER2BAS700A.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/SUB-MONITOR-700.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/SUB-MONITOR-700.${SECTORSIZE}.bin:"
@@ -263,15 +284,15 @@ ROM_INCLUDE+="${MZB_PATH}/Utility_2.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/Utility_V_1.1.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/Utility_V_1.1.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/Utility_V_2.0.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/Utility_V_2.0.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/WDPRO_2.37AT.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/WDPRO_2.37AT.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/WDPRO_2.37AT_C2.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/WDPRO_2.37AT_C2.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/Wooky.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/Wooky.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/XPATCH_5510_v2.2.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/XPATCH_5510_v2.2.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/Z80_MACHINE.A1_M.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/Z80_MACHINE.A1_M.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/Z80_MACHINE.A1_S.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/Z80_MACHINE.A1_S.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/Z80_MACHINE.A2_M.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/Z80_MACHINE.A2_M.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/Z80MACHINE.A3_C2.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/Z80MACHINE.A3_C2.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/Z80_MACHINE.A3_S.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/Z80_MACHINE.A3_S.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/ZEN7E.A2.${SECTORSIZE}.bin:" ROM_INCLUDE+="${MZB_PATH}/ZEN7E.A2.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/Zexas_MZ800.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/Zexas_MZ800.${SECTORSIZE}.bin:"
#ROM_INCLUDE+="${MZB_PATH}/ZSP.${SECTORSIZE}.bin:" #ROM_INCLUDE+="${MZB_PATH}/ZSP.${SECTORSIZE}.bin:"
@@ -282,7 +303,7 @@ do
cat /tmp/user.rom "${f}" > /tmp/tmp.size cat /tmp/user.rom "${f}" > /tmp/tmp.size
FILESIZE=$(stat -c%s "/tmp/tmp.size") FILESIZE=$(stat -c%s "/tmp/tmp.size")
if (( ${FILESIZE} < 524288 )); then if (( ${FILESIZE} < 524288 )); then
echo "Adding $f to User Rom" echo "Adding $f to User I Rom"
cat "${f}" >> /tmp/user.rom cat "${f}" >> /tmp/user.rom
else else
GENROM=1 GENROM=1
@@ -301,6 +322,17 @@ do
fi fi
if (( ${GENROM} == 2 )); then if (( ${GENROM} == 2 )); then
cat /tmp/user2.rom "${f}" > /tmp/tmp.size
FILESIZE=$(stat -c%s "/tmp/tmp.size")
if (( ${FILESIZE} < 524288 )); then
echo "Adding $f to User II Rom"
cat "${f}" >> /tmp/user.rom
else
GENROM=3
fi
fi
if (( ${GENROM} == 3 )); then
echo "Limit reached ROMS full, skipping from ${f}..." echo "Limit reached ROMS full, skipping from ${f}..."
break break
fi fi
@@ -311,7 +343,12 @@ done
if [ -f /tmp/user.rom ]; then if [ -f /tmp/user.rom ]; then
mv /tmp/user.rom ${ROM_PATH}/USER_ROM_${SECTORSIZE}.bin mv /tmp/user.rom ${ROM_PATH}/USER_ROM_${SECTORSIZE}.bin
FILESIZE=$(stat -c%s "${ROM_PATH}USER_ROM_${SECTORSIZE}.bin") FILESIZE=$(stat -c%s "${ROM_PATH}USER_ROM_${SECTORSIZE}.bin")
echo "USER ROM SIZE (${ROM_PATH}USER_ROM_${SECTORSIZE}.bin) = ${FILESIZE} Bytes" echo "USER ROM I SIZE (${ROM_PATH}USER_ROM_${SECTORSIZE}.bin) = ${FILESIZE} Bytes"
fi
if [ -f /tmp/user2.rom ]; then
mv /tmp/user2.rom ${ROM_PATH}/USER_ROM_II_${SECTORSIZE}.bin
FILESIZE=$(stat -c%s "${ROM_PATH}USER_ROM_II_${SECTORSIZE}.bin")
echo "USER ROM II SIZE (${ROM_PATH}USER_ROM_II_${SECTORSIZE}.bin) = ${FILESIZE} Bytes"
fi fi
if [ -f /tmp/mrom.rom ]; then if [ -f /tmp/mrom.rom ]; then
mv /tmp/mrom.rom ${ROM_PATH}/MROM_${SECTORSIZE}.bin mv /tmp/mrom.rom ${ROM_PATH}/MROM_${SECTORSIZE}.bin