First push

This commit is contained in:
Philip Smart
2019-10-25 19:57:02 +01:00
commit 3c842d6602
53 changed files with 57856 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
; the following is only to get the original length of 2048 bytes
ALIGN: MACRO ?boundary
DS ?boundary - 1 - ($ + ?boundary - 1) % ?boundary, 0FFh
ENDM
; the following is only to get the original length of 2048 bytes
ALIGN_NOPS:MACRO ?boundary
DS ?boundary - 1 - ($ + ?boundary - 1) % ?boundary, 000h
ENDM
;
; Pads up to a certain address.
; Gives an error message if that address is already exceeded.
;
PAD: MACRO ?address
IF $ > ?address
ERROR "Alignment exceeds %s"; % ?address
ENDIF
ds ?address - $
ENDM
;
; Pads up to the next multiple of the specified address.
;
;ALIGN: MACRO ?boundary
; ds ?boundary - 1 - ($ + ?boundary - 1) % ?boundary
; ENDM
;
; Pads to ensure a section of the given size does not cross a 100H boundary.
;
ALIGN_FIT8: MACRO ?size
ds (($ + ?size - 1) >> 8) != ($ >> 8) && (100H - ($ & 0FFH)) || 0
ENDM

View File

@@ -0,0 +1,267 @@
;--------------------------------------------------------------------------------------------------------
;-
;- Name: RFS_Definitions.asm
;- Created: September 2019
;- Author(s): Philip Smart
;- Description: Sharp MZ series Rom Filing System.
;- Definitions for the RFS including SA1510 locations.
;-
;- Credits:
;- Copyright: (c) 2019 Philip Smart <philip.smart@net2net.org>
;-
;- History: September 2019 - Initial version.
;-
;--------------------------------------------------------------------------------------------------------
;- This source file is free software: you can redistribute it and-or modify
;- it under the terms of the GNU General Public License as published
;- by the Free Software Foundation, either version 3 of the License, or
;- (at your option) any later version.
;-
;- This source file is distributed in the hope that it will be useful,
;- but WITHOUT ANY WARRANTY; without even the implied warranty of
;- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;- GNU General Public License for more details.
;-
;- You should have received a copy of the GNU General Public License
;- along with this program. If not, see <http://www.gnu.org/licenses/>.
;--------------------------------------------------------------------------------------------------------
;-----------------------------------------------
; Function entry points in the SA-1510 Monitor.
;-----------------------------------------------
GETL: EQU 00003h
LETNL: EQU 00006h
NL: EQU 00009h
PRNTS: EQU 0000Ch
PRNT: EQU 00012h
MSG: EQU 00015h
MSGX: EQU 00018h
GETKY EQU 0001Bh
BRKEY EQU 0001Eh
?WRI EQU 00021h
?WRD EQU 00024h
?RDI EQU 00027h
?RDD EQU 0002Ah
?VRFY EQU 0002Dh
?TMST EQU 00033h
MONIT: EQU 00000h
ST1: EQU 00095h
MSGE1 EQU 00118h
HLHEX EQU 00410h
_2HEX EQU 0041Fh
?KEY EQU 008CAh
PRNT3 EQU 0096Ch
MSG?2 EQU 000F7h
?ADCN EQU 00BB9h
?DACN EQU 00BCEh
?BLNK EQU 00DA6h
?DPCT EQU 00DDCh
PRTHL: EQU 003BAh
PRTHX: EQU 003C3h
DPCT: EQU 00DDCh
DLY12: EQU 00DA7h
DLY12A: EQU 00DAAh
?RSTR1: EQU 00EE6h
;-----------------------------------------------
; Memory mapped ports in hardware.
;-----------------------------------------------
SCRN: EQU 0D000H
ARAM: EQU 0D800H
DSPCTL: EQU 0DFFFH ; Screen 40/80 select register (bit 7)
KEYPA: EQU 0E000h
KEYPB: EQU 0E001h
KEYPC: EQU 0E002h
KEYPF: EQU 0E003h
CSTR: EQU 0E002h
CSTPT: EQU 0E003h
CONT0: EQU 0E004h
CONT1: EQU 0E005h
CONT2: EQU 0E006h
CONTF: EQU 0E007h
SUNDG: EQU 0E008h
TEMP: EQU 0E008h
MEMSW: EQU 0E00CH
MEMSWR: EQU 0E010H
INVDSP: EQU 0E014H
NRMDSP: EQU 0E015H
SCLDSP: EQU 0E200H
SCLBASE: EQU 0E2H
RFSBK1: EQU 0EFFCh ; Select RFS Bank1 (MROM)
RFSBK2: EQU 0EFFDh ; Select RFS Bank2 (User ROM)
RFSRST1: EQU 0EFFEh ; Reset RFS Bank1 to original.
RFSRST2: EQU 0EFFFh ; Reset RFS Bank2 to original.
;-----------------------------------------------
; Rom File System Header (MZF)
;-----------------------------------------------
RFS_ATRB: EQU 00000h ; Code Type, 01 = Machine Code.
RFS_NAME: EQU 00001h ; Title/Name (17 bytes).
RFS_SIZE: EQU 00012h ; Size of program.
RFS_DTADR: EQU 00014h ; Load address of program.
RFS_EXADR: EQU 00016h ; Exec address of program.
RFS_COMNT: EQU 00018h ; COMMENT
;-----------------------------------------------
; Entry/compilation start points.
;-----------------------------------------------
TPSTART: EQU 010F0h
MEMSTART: EQU 01200h
MSTART: EQU 0E900h
DIRMROM: EQU 0006Eh
MFINDMZF: EQU 00071h
MROMLOAD: EQU 00074h
MZFHDRSZ EQU 128
RFSSECTSZ EQU 256
MROMSIZE EQU 4096
UROMSIZE EQU 2048
;-----------------------------------------------
; ROM Banks, 0-3 are reserved for alternative
; Monitor versions in MROM bank,
; 0-7 are reserved for RFS code in the
; User ROM bank.
;-----------------------------------------------
ROMBANK0 EQU 0
ROMBANK1 EQU 1
ROMBANK2 EQU 2
ROMBANK3 EQU 3
ROMBANK4 EQU 4
ROMBANK5 EQU 5
ROMBANK6 EQU 6
ROMBANK7 EQU 7
;BRKCD EQU 00
;NTFECD EQU 40
;HDERCD EQU 41
;WPRTCD EQU 46
;QNTRCD EQU 50
;NFSECD EQU 53
;UNFMCD EQU 54
;NAMSIZ EQU 011h
OBJCD EQU 001h
;-----------------------------------------------
; Common character definitions.
;-----------------------------------------------
SCROLL EQU 01H ;Set scrool direction UP.
BELL EQU 07H
SPACE EQU 20H
TAB EQU 09H ;TAB ACROSS (8 SPACES FOR SD-BOARD)
CR EQU 0DH
LF EQU 0AH
FF EQU 0CH
ESC EQU 1BH
DELETE EQU 7FH
BACKS EQU 08H
SOH EQU 1 ; For XModem etc.
EOT EQU 4
ACK EQU 6
NAK EQU 15H
;-----------------------------------------------
; SA-1510 MONITOR WORK AREA (MZ80A)
;-----------------------------------------------
STACK: EQU 010F0H
;
ORG STACK
;
SPV:
IBUFE: ; TAPE BUFFER (128 BYTES)
ATRB: DS virtual 1 ; ATTRIBUTE
NAME: DS virtual 17 ; FILE NAME
SIZE: DS virtual 2 ; BYTESIZE
DTADR: DS virtual 2 ; DATA ADDRESS
EXADR: DS virtual 2 ; EXECUTION ADDRESS
COMNT: DS virtual 92 ; COMMENT
SWPW: DS virtual 10 ; SWEEP WORK
KDATW: DS virtual 2 ; KEY WORK
KANAF: DS virtual 1 ; KANA FLAG (01=GRAPHIC MODE)
DSPXY: DS virtual 2 ; DISPLAY COORDINATES
MANG: DS virtual 6 ; COLUMN MANAGEMENT
MANGE: DS virtual 1 ; COLUMN MANAGEMENT END
PBIAS: DS virtual 1 ; PAGE BIAS
ROLTOP: DS virtual 1 ; ROLL TOP BIAS
MGPNT: DS virtual 1 ; COLUMN MANAG. POINTER
PAGETP: DS virtual 2 ; PAGE TOP
ROLEND: DS virtual 1 ; ROLL END
DS virtual 14 ; BIAS
FLASH: DS virtual 1 ; FLASHING DATA
SFTLK: DS virtual 1 ; SHIFT LOCK
REVFLG: DS virtual 1 ; REVERSE FLAG
SPAGE: DS virtual 1 ; PAGE CHANGE
FLSDT: DS virtual 1 ; CURSOR DATA
STRGF: DS virtual 1 ; STRING FLAG
DPRNT: DS virtual 1 ; TAB COUNTER
TMCNT: DS virtual 2 ; TAPE MARK COUNTER
SUMDT: DS virtual 2 ; CHECK SUM DATA
CSMDT: DS virtual 2 ; FOR COMPARE SUM DATA
AMPM: DS virtual 1 ; AMPM DATA
TIMFG: DS virtual 1 ; TIME FLAG
SWRK: DS virtual 1 ; KEY SOUND FLAG
TEMPW: DS virtual 1 ; TEMPO WORK
ONTYO: DS virtual 1 ; ONTYO WORK
OCTV: DS virtual 1 ; OCTAVE WORK
RATIO: DS virtual 2 ; ONPU RATIO
BUFER: DS virtual 81 ; GET LINE BUFFER
; Starting 1000H - Generally unused bytes not cleared by the monitor.
ROMBK1: EQU 01000H ; CURRENT MROM BANK
ROMBK2: EQU 01001H ; CURRENT USERROM BANK
WRKROMBK1: EQU 01002H ; WORKING MROM BANK
WRKROMBK2: EQU 01003H ; WORKING USERROM BANK
SCRNMODE: EQU 01004H ; Mode of screen, 0 = 40 char, 1 = 80 char.
TMPADR: EQU 01010H ; TEMPORARY ADDRESS STORAGE
TMPSIZE: EQU 01012H ; TEMPORARY SIZE
TMPCNT: EQU 01014H ; TEMPOARY COUNTER
TMPLINECNT:EQU 01016H ; Temporary counter for displayed lines.
; Quickdisk work area
;QDPA EQU 01130h ; QD code 1
;QDPB EQU 01131h ; QD code 2
;QDPC EQU 01132h ; QD header startaddress
;QDPE EQU 01134h ; QD header length
;QDCPA EQU 0113Bh ; QD error flag
;HDPT EQU 0113Ch ; QD new headpoint possition
;HDPT0 EQU 0113Dh ; QD actual headpoint possition
;FNUPS EQU 0113Eh
;FNUPF EQU 01140h
;FNA EQU 01141h ; File Number A (actual file number)
;FNB EQU 01142h ; File Number B (next file number)
;MTF EQU 01143h ; QD motor flag
;RTYF EQU 01144h
;SYNCF EQU 01146h ; SyncFlags
;RETSP EQU 01147h
;BUFER EQU 011A3h
;QDIRBF EQU 0CD90h
;SPV:
;IBUFE: ; TAPE BUFFER (128 BYTES)
;ATRB: DS virtual 1 ; Code Type, 01 = Machine Code.
;NAME: DS virtual 17 ; Title/Name (17 bytes).
;SIZE: DS virtual 2 ; Size of program.
;DTADR: DS virtual 2 ; Load address of program.
;EXADR: DS virtual 2 ; Exec address of program.
;COMNT: DS virtual 104 ; COMMENT
;KANAF: DS virtual 1 ; KANA FLAG (01=GRAPHIC MODE)
;DSPXY: DS virtual 2 ; DISPLAY COORDINATES
;MANG: DS virtual 27 ; COLUMN MANAGEMENT
;FLASH: DS virtual 1 ; FLASHING DATA
;FLPST: DS virtual 2 ; FLASHING POSITION
;FLSST: DS virtual 1 ; FLASHING STATUS
;FLSDT: DS virtual 1 ; CURSOR DATA
;STRGF: DS virtual 1 ; STRING FLAG
;DPRNT: DS virtual 1 ; TAB COUNTER
;TMCNT: DS virtual 2 ; TAPE MARK COUNTER
;SUMDT: DS virtual 2 ; CHECK SUM DATA
;CSMDT: DS virtual 2 ; FOR COMPARE SUM DATA
;AMPM: DS virtual 1 ; AMPM DATA
;TIMFG: DS virtual 1 ; TIME FLAG
;SWRK: DS virtual 1 ; KEY SOUND FLAG
;TEMPW: DS virtual 1 ; TEMPO WORK
;ONTYO: DS virtual 1 ; ONTYO WORK
;OCTV: DS virtual 1 ; OCTAVE WORK
;RATIO: DS virtual 2 ; ONPU RATIO
; QD command table

View File

@@ -0,0 +1,496 @@
;--------------------------------------------------------------------------------------------------------
;-
;- Name: RFS_Utilities.asm
;- Created: September 2019
;- Author(s): Philip Smart
;- Description: Sharp MZ series Rom Filing System.
;- This assembly language program is written to utilise the banked flashroms added with
;- the MZ-80A RFS hardware upgrade.
;-
;- Credits:
;- Copyright: (c) 2019 Philip Smart <philip.smart@net2net.org>
;-
;- History: September 2018 - Merged 2 utilities to create this compilation.
;-
;--------------------------------------------------------------------------------------------------------
;- This source file is free software: you can redistribute it and-or modify
;- it under the terms of the GNU General Public License as published
;- by the Free Software Foundation, either version 3 of the License, or
;- (at your option) any later version.
;-
;- This source file is distributed in the hope that it will be useful,
;- but WITHOUT ANY WARRANTY; without even the implied warranty of
;- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;- GNU General Public License for more details.
;-
;- You should have received a copy of the GNU General Public License
;- along with this program. If not, see <http://www.gnu.org/licenses/>.
;--------------------------------------------------------------------------------------------------------
; Comparing Strings
; IN HL Address of string1.
; DE Address of string2.
; BC Max bytes to compare, 0x00 or 0x0d will early terminate.
; OUT zero Set if string1 = string2, reset if string1 != string2.
; carry Set if string1 > string2, reset if string1 <= string2.
CMPSTRING: IF USE_CMPSTRING = 1
PUSH HL
PUSH DE
CMPSTR1: LD A, (DE) ; Compare bytes.
CP 000h ; Check for end of string.
JR Z, CMPSTR3
CP 00Dh
JR Z, CMPSTR3
CPI ; Compare bytes.
JR NZ, CMPSTR2 ; If (HL) != (DE), abort.
INC DE ; Update pointer.
JP PE, CMPSTR1 ; Next byte if BC not zero.
CMPSTR2: DEC HL
CP (HL) ; Compare again to affect carry.
CMPSTR4: POP DE
POP HL
RET
CMPSTR3: LD A, (HL)
CP 000h ; Check for end of string.
JR Z, CMPSTR4
CP 00Dh
JR Z, CMPSTR4
SCF ; String 1 greater than string 2
JR CMPSTR4
ENDIF
; IN HL Address of source string, length-prefixed.
; DE Address of destination string, length-prefixed.
; B Start index. 1 = first character.
; C Length of substring to return.
;
; OUT carry Set if an error condition happened:
; If B is zero, then uses index of 1.
; If index > source length, an empty string is returned.
; If index + return length > source length, returns all
; characters from index to end-of-string.
SUBSTRING: IF USE_SUBSTRING = 1
PUSH DE ; It would be convenient to keep DE pointing to
; the start of the destination string
OR A ; Boolean OR resets carry
PUSH AF ; Save carry
LD A, B ; Is index beyond source length?
CP (HL)
DEC A ; Decrement A so NC can be used
JR NC,SUBST3
ADD A, C ; If index+len is > 255, error
JR C, SUBST1
INC A ; Increment A so C can be used
CP (HL) ; If index+len is beyond source length, then error
JR C, SUBST2
SUBST1: POP AF ; Set carry flag
SCF
PUSH AF
LD A, (HL) ; Get source length
SUB B ; Subtract start index
INC A ; Compensate
LD C, A ; New size of string
SUBST2: LD A, C ; Size of sting to get
LD (DE), A ; Save length index
INC DE ; To body of string
LD A, B ; Get index
LD B, 0 ; Zero-extend BC for LDIR
ADD A, L ; This is a sneaky way to add A to HL
LD L, A ; without using up another 16-bit register
ADC A, H ;
SUB L ;
LD H, A ;
LDIR ; Copy substring over
POP AF ; Restore flags
POP DE ; Restore destination
RET
SUBST3: XOR A ; Set a length index of zero
LD (DE), A
POP AF ; Clean off stack and set carry
POP DE
SCF
RET
ENDIF
; IN HL Address of string to look in, length prefixed.
; DE Address of string to find, length prefixed.
;
; OUT
; If found:
; A Offset into look-up string where the target string was found.
; The first byte (ignoring length prefix) is offset 1.
; carry Reset.
;
; If not found:
; A = 0
; carry Set.
INDEX: IF USE_INDEX = 1
LD A, (DE) ; Abort if string to find is too big
CP (HL)
INC A
JR NC, IDXABORT
DEC A ; Save length of string to find
LD IXL, A
LD B, 0 ; Put length of string to search in BC
LD C, (HL)
INC HL ; Advance pointers
INC DE
PUSH HL ; Save start of search string
IDXRST: PUSH DE ; Save start of key string
LD A, IXL ; Initialize matched characters counter
LD IXH, A
LD A, (DE) ; Get a character to match
CPIR ; Look for it
JR NZ, IDXNF ; Abort if not found
IDXLOOP: DEC IXH ; Update counter and see if done
JR Z, IDXFOUND
INC DE ; Get next character in key string
LD A, (DE)
CPI ; See if it matches next char in master
JR Z, IDXLOOP
JP PO, IDXNF ; Abort if we ran out of characters
POP DE ; If a mismatch, restart from the beginning
JR IDXRST
IDXNF: POP DE ; Clean stack
POP HL
IDXABORT: XOR A ; Report failure
SCF
RET
IDXFOUND: POP DE
POP BC ; BC = address of master
XOR A ; Put size of key string in DE
LD D, A
LD E, IXL
SBC HL, DE ; Find index
SBC HL, BC
LD A, L
INC A
RET
ENDIF
; IN HL Address of string to be inserted
; DE Address of string to receive insertion
; C Index. Start of string is 0
; OUT
; If successful:
; carry Reset
; HL Input DE
; If unsuccessful:
; carry Set. If new string length is > 255.
;
; Notes If index > string length, string is appended.
; Data after the string is destroyed.
STRINSERT: IF USE_STRINSERT = 1
LD A, (DE)
LD B, A
INC A
CP C
JR NC, STRINSERT1
LD C, B
STRINSERT1:DEC A
ADD A, (HL)
RET C
LD (DE), A ; Update length
PUSH DE ; Make room
PUSH HL
LD A, (HL)
INC C
LD H, 0
LD L, C
ADD HL, DE
LD D, H
LD E, L
PUSH AF
ADD A, E
LD E, A
ADC A, D
SUB E
LD D, A
POP AF
LD B, 0
LD C, A
PUSH HL
LDIR
POP DE ; Copy string over
POP HL
LD C, (HL)
INC HL
LDIR
POP HL
RET
ENDIF
; IN HL Address of string.
; B Index of first character to delete. First character is 0.
; C Number of characters to kill.
; OUT
; If successful:
; carry Reset
; If unsuccessful:
; carry Set
;
; Notes If B > string length, then error.
; If B + C > string length, deletion
; stops at end of string.
STRDELETE: IF USE_STRDELETE = 1
LD A, B ; See if index is too big
CP (HL)
CCF ; Flip for error
RET C
ADD A, C ; See if too many chars on chopping block
CP (HL)
JR C, STRDELETE1
INC B ; Set index as length
LD (HL), B
RET
STRDELETE1:PUSH HL
LD A, (HL)
SUB C
LD (HL), A
INC HL
LD E, C
LD C, B
LD B, 0
ADD HL, BC
SUB C
LD C, E
LD D, H
LD E, L
ADD HL, BC
LD C, A
LDIR
POP HL
RET
ENDIF
; IN HL Address of first string.
; DE Address of second string.
; OUT
; If successful:
; carry Reset
; If unsuccessful:
; carry Set
;
; Notes If new string lenght is > 255, error.
; HL is saved.
CONCAT: IF USE_CONCAT = 1
LD A, (DE) ; Combine lengths
ADD A, (HL)
RET C
LD C, (HL)
LD (HL), A
LD B, 0
INC C
PUSH HL
ADD HL, BC
EX DE, HL
LD C, (HL)
INC HL
LDIR
POP HL
RET
ENDIF
; Utility: Convert character to upper case
; On entry: A = Character in either case
; On exit: A = Character in upper case
; BC DE HL IX IY I AF' BC' DE' HL' preserved
ConvertCharToUCase: IF USE_CNVUPPER = 1
CP 'a' ;Character less than 'a'?
RET C ;Yes, so finished
CP 'z'+1 ;Character greater than 'z'?
RET NC ;Yes, so finished
SUB 'a'-'A' ;Convert case
RET
ENDIF
;
; Utility: Convert character to numberic value
; On entry: A = ASCII character (0-9 or A-F)
; On exit: If character is a valid hex digit:
; A = Numberic value (0 to 15) and Z flagged
; If character is not a valid hex digit:
; A = 0xFF and NZ flagged
; BC DE HL IX IY I AF' BC' DE' HL' preserved
; Interrupts not enabled
ConvertCharToNumber: IF USE_CNVCHRTONUM = 1
CALL ConvertCharToUCase
CP '0' ;Character < '0'?
JR C,@Bad ;Yes, so no hex character
CP '9'+1 ;Character <= '9'?
JR C,@OK ;Yes, got hex character
CP 'A' ;Character < 'A'
JR C,@Bad ;Yes, so not hex character
CP 'F'+1 ;Character <= 'F'
JR C,@OK ;No, not hex
; Character is not a hex digit so return
@Bad: LD A,0FFh ;Return status: not hex character
OR A ; A = 0xFF and NZ flagged
RET
; Character is a hex digit so adjust from ASCII to number
@OK: SUB '0' ;Subtract '0'
CP 00Ah ;Number < 10 ?
JR C,@Finished ;Yes, so finished
SUB 007h ;Adjust for 'A' to 'F'
@Finished: CP A ;Return A = number (0 to 15) and Z flagged to
RET ; indicate character is a valid hex digital
ENDIF
; Utility: Is character numeric?
; On entry: A = ASCII character
; On exit: Carry flag set if character is numeric (0 to 9)
; A BC DE HL IX IY I AF' BC' DE' HL' preserved
IsCharNumeric: IF USE_ISNUMERIC = 1
CP '0' ;Less than '0'?
JR C,@Not2 ;Yes, so go return NOT numeric
CP '9'+1 ;Less than or equal to '9'?
RET C ;Yes, so numeric (C flagged)
@Not2: OR A ;No, so NOT numeric (NC flagged)
RET
ENDIF
; Utility: Convert hexadecimal or decimal text to number
; On entry: DE = Pointer to start of ASCII string
; On exit: If valid number found:
; A = 0 and Z flagged
; HL = Number found
; If valid number not found:
; A != 0 and NZ flagged
; HL = Not specified
; DE = Not specified
; HL = Number
; BC DE IX IY I AF' BC' DE' HL' preserved
; Hexadecmal numbers can be prefixed with either "$" or "0x"
; Decimal numbers must be prefixed with "+"
; A number without a prefix is assumed to be hexadecimal
; Hexadecimal number without a prefix must start with "0" to "9"
; ... this is to stop the assembler getting confused between
; ... register names and constants which could be fixed by
; ... re-ordering the (dis)assebmer's instruction table
; Numbers can be terminated with ")", space, null or control code
; Negative numbers, preceded with "-", are not supported
; Text must be terminated with ')', space or control char.
ConvertStringToNumber: IF USE_CNVSTRTONUM = 1
PUSH BC
LD HL,0 ;Build result here
LD A,(DE) ;Get character from string
CP '+' ;Does string start with '+' ?
JR Z,@Decimal ;Yes, so its decimal
CP '$' ;Does string start with '$' ?
JR Z,@Hdecimal ;Yes, so its hexadecimal
CP 39 ;Does string start with apostrophe?
JR Z,@Char ;Yes, so its a character
CP '"' ;Does string start with '"' ?
JR Z,@Char ;Yes, so its a character
;; CALL IsCharNumeric ;Is first character '0' to '9' ?
;; JR NC,@Failure ;No, so invalid number
; CALL IsCharHex ;Is first character hexadecimal ?
; JR NC,@Failure ;No, so invalid hex character
CP '0' ;Is first character '0' ?
JR NZ,@HexNext ;No, so default to hexadecimal
; JR NZ,@DecNext ;No, so default to decimal
INC DE ;Point to next character in string
LD A,(DE) ;Get character from string
CALL ConvertCharToUCase
CP 'X' ;Is second character 'x' ?
JR NZ,@HexNext ;No, so must be default format
; JR NZ,@DecNext ;No, so must be default format
; Hexadecimal number...
@Hdecimal: INC DE ;Point to next character in string
@HexNext: LD A,(DE) ;Get character from string
CP ')' ;Terminated with a bracket?
JR Z,@Success ;yes, so success
CP 32+1 ;Space or control character?
JR C,@Success ;Yes, so successld hl
CALL ConvertCharToNumber ;Convert character to number
JR NZ,@Failure ;Return if failure (NZ flagged)
INC DE ;Point to next character in string
ADD HL,HL ;Current result = 16 * current result..
ADD HL,HL
ADD HL,HL
ADD HL,HL
OR L ;Add new number (0 to 15)..
LD L,A
JR @HexNext
; Decimal number...
@Decimal: INC DE ;Point to next character in string
@DecNext: LD A,(DE) ;Get character from string
CP ')' ;Terminated with a bracket?
JR Z,@Success ;yes, so success
CP 32+1 ;Space or control character?
JR C,@Success ;Yes, so success
CALL IsCharNumeric ;Is first character '0' to '9' ?
JR NC,@Failure ;No, so invalid number
CALL ConvertCharToNumber ;Convert character to number
JR NZ,@Failure ;Return if failure (NZ flagged)
INC DE ;Point to next character in string
PUSH DE
LD B,9 ;Current result = 10 * current result..
LD D,H
LD E,L
@DecLoop: ADD HL,DE ;Add result to itself 9 times
DJNZ @DecLoop
POP DE
ADD A,L ;Add new number (0 to 15)..
LD L,A
JR NC,@DecNext
INC H
JR @DecNext
; Character...
@Char: INC DE ;Point to next character in string
LD A,(DE) ;Get ASCII character
LD L,A ;Store ASCII value as result
LD H,0
; JR @Success
; Return result...
@Success: POP BC
XOR A ;Return success with A = 0 and Z flagged
RET
@Failure: POP BC
LD A,0FFh ;Return failure with A != 0
OR A ; and NZ flagged
RET
ENDIF

View File

@@ -0,0 +1,7 @@
; Configurable parameters.
COLW: EQU 80 ; Width of the display screen (ie. columns).
ROW: EQU 25 ; Number of rows on display screen.
SCRNSZ: EQU COLW * ROW ; Total size, in bytes, of the screen display area.
MODE80C:EQU 1
INCLUDE "1Z-013A.asm"

View File

@@ -0,0 +1,8 @@
; Configurable parameters.
COLW: EQU 80 ; Width of the display screen (ie. columns).
ROW: EQU 25 ; Number of rows on display screen.
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.
MODE80C:EQU 1
INCLUDE "sa1510.asm"

View File

@@ -0,0 +1,8 @@
; Configurable parameters.
COLW: EQU 40 ; Width of the display screen (ie. columns).
ROW: EQU 25 ; Number of rows on display screen.
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.
MODE80C:EQU 0
INCLUDE "sa1510.asm"

155
software/asm/ramcheck.asm Normal file
View File

@@ -0,0 +1,155 @@
LETNL: EQU 0006h
PRNTS: EQU 000Ch
PRNT: EQU 0012h
MSG: EQU 0015h
MONIT: EQU 0086h
PRTHL: EQU 03BAh
PRTHX: EQU 03C3h
DPCT: EQU 0DDCh
MSTART: EQU 1200h
ORG 10F0h
DB 01h ; Code Type, 01 = Machine Code.
DB "RAM TEST V1.0", 0Dh, 00h, 00h ; Title/Name (17 bytes).
DW MSTART - START ; Size of program.
DW START ; Load address of program.
DW START ; Exec address of program.
DB 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h ; Comment (104 bytes).
DB 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h
DB 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h
DB 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h
DB 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h
DB 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h
DB 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h
ORG 01200h
START: LD DE,TITLE
CALL MSG
CALL LETNL
LD B, 20 ; Number of loops
LOOP: LD HL,MSTART ; Start of checked memory,
LD D,0CEh ; End memory check CE00
LOOP1: LD A,000h
CP L
JR NZ,LOOP1b
CALL PRTHL ; Print HL as 4digit hex.
LD A,0C4h ; Move cursor left.
LD E,004h ; 4 times.
LOOP1a: CALL DPCT
DEC E
JR NZ,LOOP1a
LOOP1b: INC HL
LD A,H
CP D ; Have we reached end of memory.
JR Z,LOOP3 ; Yes, exit.
LD A,(HL) ; Read memory location under test, ie. 0.
CPL ; Subtract, ie. FF - A, ie FF - 0 = FF.
LD (HL),A ; Write it back, ie. FF.
SUB (HL) ; Subtract written memory value from A, ie. should be 0.
JR NZ,LOOP2 ; Not zero, we have an error.
LD A,(HL) ; Reread memory location, ie. FF
CPL ; Subtract FF - FF
LD (HL),A ; Write 0
SUB (HL) ; Subtract 0
JR Z,LOOP1 ; Loop if the same, ie. 0
LOOP2: LD A,16h
CALL PRNT ; Print A
CALL PRTHX ; Print HL as 4 digit hex.
CALL PRNTS ; Print space.
XOR A
LD (HL),A
LD A,(HL) ; Get into A the failing bits.
CALL PRTHX ; Print A as 2 digit hex.
CALL PRNTS ; Print space.
LD A,0FFh ; Repeat but first load FF into memory
LD (HL),A
LD A,(HL)
CALL PRTHX ; Print A as 2 digit hex.
NOP
JR LOOP4
LOOP3: LD DE,OKCHECK
CALL MSG ; Print check message in DE
LD A,B ; Print loop count.
CALL PRTHX
LD DE,OKMSG
CALL MSG ; Print ok message in DE
DEC B
JR NZ,LOOP
LD DE,DONEMSG
CALL MSG ; Print check message in DE
JP MONIT
OKCHECK: DB 11h
DB "CHECK: ", 0Dh
OKMSG: DB "OK.", 0Dh
DONEMSG: DB 11h
DB "RAM TEST COMPLETE.", 0Dh
LOOP4: LD B,09h
CALL PRNTS ; Print space.
XOR A ; Zero A
SCF ; Set Carry
LOOP5: PUSH AF ; Store A and Flags
LD (HL),A ; Store 0 to bad location.
LD A,(HL) ; Read back
CALL PRTHX ; Print A as 2 digit hex.
CALL PRNTS ; Print space
POP AF ; Get back A (ie. 0 + C)
RLA ; Rotate left A. Bit LSB becomes Carry (ie. 1 first instance), Carry becomes MSB
DJNZ LOOP5 ; Loop if not zero, ie. print out all bit locations written and read to memory to locate bad bit.
XOR A ; Zero A, clears flags.
LD A,80h
LD B,08h
LOOP6: PUSH AF ; Repeat above but AND memory location with original A (ie. 80)
LD C,A ; Basically walk through all the bits to find which one is stuck.
LD (HL),A
LD A,(HL)
AND C
NOP
JR Z,LOOP8 ; If zero then print out the bit number
NOP
NOP
LD A,C
CPL
LD (HL),A
LD A,(HL)
AND C
JR NZ,LOOP8 ; As above, if the compliment doesnt yield zero, print out the bit number.
LOOP7: POP AF
RRCA
NOP
DJNZ LOOP6
JP MONIT
LOOP8: CALL LETNL ; New line.
LD DE,BITMSG ; BIT message
CALL MSG ; Print message in DE
LD A,B
DEC A
CALL PRTHX ; Print A as 2 digit hex, ie. BIT number.
CALL LETNL ; New line
LD DE,BANKMSG ; BANK message
CALL MSG ; Print message in DE
LD A,H
CP 50h ; 'P'
JR NC,LOOP9 ; Work out bank number, 1, 2 or 3.
LD A,01h
JR LOOP11
LOOP9: CP 90h
JR NC,LOOP10
LD A,02h
JR LOOP11
LOOP10: LD A,03h
LOOP11: CALL PRTHX ; Print A as 2 digit hex, ie. BANK number.
JR LOOP7
BITMSG: DB " BIT: ", 0Dh
BANKMSG: DB " BANK: ", 0Dh
TITLE: DB "SHARPMZ RAM TEST (C) P. SMART 2018", 0Dh, 00h

1097
software/asm/rfs.asm Normal file

File diff suppressed because it is too large Load Diff

2256
software/asm/rfs.bak Normal file

File diff suppressed because it is too large Load Diff

2185
software/asm/rfs_bank1.asm Normal file

File diff suppressed because it is too large Load Diff

112
software/asm/rfs_bank2.asm Normal file
View File

@@ -0,0 +1,112 @@
;--------------------------------------------------------------------------------------------------------
;-
;- Name: rfs_bank2.asm
;- Created: October 2018
;- Author(s): Philip Smart
;- Description: Sharp MZ series Rom Filing System.
;- This assembly language program is written to utilise the banked flashroms added with
;- the MZ-80A RFS hardware upgrade.
;-
;- Credits:
;- Copyright: (c) 2018 Philip Smart <philip.smart@net2net.org>
;-
;- History: October 2018 - Merged 2 utilities to create this compilation.
;-
;--------------------------------------------------------------------------------------------------------
;- This source file is free software: you can redistribute it and-or modify
;- it under the terms of the GNU General Public License as published
;- by the Free Software Foundation, either version 3 of the License, or
;- (at your option) any later version.
;-
;- This source file is distributed in the hope that it will be useful,
;- but WITHOUT ANY WARRANTY; without even the implied warranty of
;- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;- GNU General Public License for more details.
;-
;- You should have received a copy of the GNU General Public License
;- along with this program. If not, see <http://www.gnu.org/licenses/>.
;--------------------------------------------------------------------------------------------------------
;======================================
;
; USER ROM BANK 2
;
;======================================
ORG 0E800h
;--------------------------------
; Common code spanning all banks.
;--------------------------------
ROMFS2: NOP
LD A, (ROMBK1) ; Ensure all banks are at default on
CP 4 ; If the ROMBK1 value is 255, an illegal value, then the machine has just started so skip.
JR C, ROMFS2_2
XOR A ; Clear the lower stack space as we use it for variables.
LD B, 7*8
LD HL, 01000H
ROMFS2_1: LD (HL),A
INC HL
DJNZ ROMFS2_1
ROMFS2_2: LD (RFSBK1),A ; start up.
LD A, (ROMBK2)
LD (RFSBK2),A
JP MONITOR
;
; Bank switching code, allows a call to code in another bank.
; This code is duplicated in each bank such that a bank switch doesnt affect logic flow.
;
BKSW2to0: PUSH AF
LD A, ROMBANK2 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK0 ; Required bank to call.
JR BKSW2_0
BKSW2to1: PUSH AF
LD A, ROMBANK2 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK1 ; Required bank to call.
JR BKSW2_0
BKSW2to2: PUSH AF
LD A, ROMBANK2 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK2 ; Required bank to call.
JR BKSW2_0
BKSW2to3: PUSH AF
LD A, ROMBANK2 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK3 ; Required bank to call.
JR BKSW2_0
BKSW2to4: PUSH AF
LD A, ROMBANK2 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK4 ; Required bank to call.
JR BKSW2_0
BKSW2to5: PUSH AF
LD A, ROMBANK2 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK5 ; Required bank to call.
JR BKSW2_0
BKSW2to6: PUSH AF
LD A, ROMBANK2 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK6 ; Required bank to call.
JR BKSW2_0
BKSW2to7: PUSH AF
LD A, ROMBANK2 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK7 ; Required bank to call.
;
BKSW2_0: PUSH BC ; Save BC for caller.
LD BC, BKSWRET2 ; Place bank switchers return address on stack.
PUSH BC
LD (RFSBK2), A ; Bank switch in user rom space, A=bank.
JP (HL) ; Jump to required function.
BKSWRET2: POP BC
POP AF ; Get bank which called us.
LD (RFSBK2), A ; Return to that bank.
POP AF
RET ; Return to caller.
ALIGN 0EFFFh
DB 0FFh

468
software/asm/rfs_bank3.asm Normal file
View File

@@ -0,0 +1,468 @@
;--------------------------------------------------------------------------------------------------------
;-
;- Name: rfs_bank3.asm
;- Created: October 2018
;- Author(s): Philip Smart
;- Description: Sharp MZ series Rom Filing System.
;- This assembly language program is written to utilise the banked flashroms added with
;- the MZ-80A RFS hardware upgrade.
;-
;- Credits:
;- Copyright: (c) 2018 Philip Smart <philip.smart@net2net.org>
;-
;- History: October 2018 - Merged 2 utilities to create this compilation.
;-
;--------------------------------------------------------------------------------------------------------
;- This source file is free software: you can redistribute it and-or modify
;- it under the terms of the GNU General Public License as published
;- by the Free Software Foundation, either version 3 of the License, or
;- (at your option) any later version.
;-
;- This source file is distributed in the hope that it will be useful,
;- but WITHOUT ANY WARRANTY; without even the implied warranty of
;- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;- GNU General Public License for more details.
;-
;- You should have received a copy of the GNU General Public License
;- along with this program. If not, see <http://www.gnu.org/licenses/>.
;--------------------------------------------------------------------------------------------------------
ROW EQU 25
COLW EQU 40
SCRNSZ EQU COLW * ROW
MODE80C EQU 0
;======================================
;
; USER ROM BANK 3
;
;======================================
ORG 0E800h
;--------------------------------
; Common code spanning all banks.
;--------------------------------
ROMFS3: NOP
LD A, (ROMBK1) ; Ensure all banks are at default on
CP 4 ; If the ROMBK1 value is 255, an illegal value, then the machine has just started so skip.
JR C, ROMFS3_2
XOR A ; Clear the lower stack space as we use it for variables.
LD B, 7*8
LD HL, 01000H
ROMFS3_1: LD (HL),A
INC HL
DJNZ ROMFS3_1
ROMFS3_2: LD (RFSBK1),A ; start up.
LD A, (ROMBK2)
LD (RFSBK2),A
JP MONITOR
;
; Bank switching code, allows a call to code in another bank.
; This code is duplicated in each bank such that a bank switch doesnt affect logic flow.
;
BKSW3to0: PUSH AF
LD A, ROMBANK3 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK0 ; Required bank to call.
JR BKSW3_0
BKSW3to1: PUSH AF
LD A, ROMBANK3 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK1 ; Required bank to call.
JR BKSW3_0
BKSW3to2: PUSH AF
LD A, ROMBANK3 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK2 ; Required bank to call.
JR BKSW3_0
BKSW3to3: PUSH AF
LD A, ROMBANK3 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK3 ; Required bank to call.
JR BKSW3_0
BKSW3to4: PUSH AF
LD A, ROMBANK3 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK4 ; Required bank to call.
JR BKSW3_0
BKSW3to5: PUSH AF
LD A, ROMBANK3 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK5 ; Required bank to call.
JR BKSW3_0
BKSW3to6: PUSH AF
LD A, ROMBANK3 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK6 ; Required bank to call.
JR BKSW3_0
BKSW3to7: PUSH AF
LD A, ROMBANK3 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK7 ; Required bank to call.
;
BKSW3_0: PUSH BC ; Save BC for caller.
LD BC, BKSWRET3 ; Place bank switchers return address on stack.
PUSH BC
LD (RFSBK2), A ; Bank switch in user rom space, A=bank.
JP (HL) ; Jump to required function.
BKSWRET3: POP BC
POP AF ; Get bank which called us.
LD (RFSBK2), A ; Return to that bank.
POP AF
RET ; Return to caller.
MEMTEST: LD B,240 ; Number of loops
LOOP: LD HL,MEMSTART ; Start of checked memory,
LD D,0CFh ; End memory check CF00
LOOP1: LD A,000h
CP L
JR NZ,LOOP1b
CALL PRTHL ; Print HL as 4digit hex.
LD A,0C4h ; Move cursor left.
LD E,004h ; 4 times.
LOOP1a: CALL DPCT
DEC E
JR NZ,LOOP1a
LOOP1b: INC HL
LD A,H
CP D ; Have we reached end of memory.
JR Z,LOOP3 ; Yes, exit.
LD A,(HL) ; Read memory location under test, ie. 0.
CPL ; Subtract, ie. FF - A, ie FF - 0 = FF.
LD (HL),A ; Write it back, ie. FF.
SUB (HL) ; Subtract written memory value from A, ie. should be 0.
JR NZ,LOOP2 ; Not zero, we have an error.
LD A,(HL) ; Reread memory location, ie. FF
CPL ; Subtract FF - FF
LD (HL),A ; Write 0
SUB (HL) ; Subtract 0
JR Z,LOOP1 ; Loop if the same, ie. 0
LOOP2: LD A,16h
CALL PRNT ; Print A
CALL PRTHX ; Print HL as 4 digit hex.
CALL PRNTS ; Print space.
XOR A
LD (HL),A
LD A,(HL) ; Get into A the failing bits.
CALL PRTHX ; Print A as 2 digit hex.
CALL PRNTS ; Print space.
LD A,0FFh ; Repeat but first load FF into memory
LD (HL),A
LD A,(HL)
CALL PRTHX ; Print A as 2 digit hex.
NOP
JR LOOP4
LOOP3: CALL PRTHL
LD DE,OKCHECK
CALL MSG ; Print check message in DE
LD A,B ; Print loop count.
CALL PRTHX
LD DE,OKMSG
CALL MSG ; Print ok message in DE
CALL NL
DEC B
JR NZ,LOOP
LD DE,DONEMSG
CALL MSG ; Print check message in DE
JP ST1X
LOOP4: LD B,09h
CALL PRNTS ; Print space.
XOR A ; Zero A
SCF ; Set Carry
LOOP5: PUSH AF ; Store A and Flags
LD (HL),A ; Store 0 to bad location.
LD A,(HL) ; Read back
CALL PRTHX ; Print A as 2 digit hex.
CALL PRNTS ; Print space
POP AF ; Get back A (ie. 0 + C)
RLA ; Rotate left A. Bit LSB becomes Carry (ie. 1 first instance), Carry becomes MSB
DJNZ LOOP5 ; Loop if not zero, ie. print out all bit locations written and read to memory to locate bad bit.
XOR A ; Zero A, clears flags.
LD A,80h
LD B,08h
LOOP6: PUSH AF ; Repeat above but AND memory location with original A (ie. 80)
LD C,A ; Basically walk through all the bits to find which one is stuck.
LD (HL),A
LD A,(HL)
AND C
NOP
JR Z,LOOP8 ; If zero then print out the bit number
NOP
NOP
LD A,C
CPL
LD (HL),A
LD A,(HL)
AND C
JR NZ,LOOP8 ; As above, if the compliment doesnt yield zero, print out the bit number.
LOOP7: POP AF
RRCA
NOP
DJNZ LOOP6
JP ST1X
LOOP8: CALL LETNL ; New line.
LD DE,BITMSG ; BIT message
CALL MSG ; Print message in DE
LD A,B
DEC A
CALL PRTHX ; Print A as 2 digit hex, ie. BIT number.
CALL LETNL ; New line
LD DE,BANKMSG ; BANK message
CALL MSG ; Print message in DE
LD A,H
CP 50h ; 'P'
JR NC,LOOP9 ; Work out bank number, 1, 2 or 3.
LD A,01h
JR LOOP11
LOOP9: CP 90h
JR NC,LOOP10
LD A,02h
JR LOOP11
LOOP10: LD A,03h
LOOP11: CALL PRTHX ; Print A as 2 digit hex, ie. BANK number.
JR LOOP7
DLY1S: PUSH AF
PUSH BC
LD C,10
L0324: CALL DLY12
DEC C
JR NZ,L0324
POP BC
POP AF
RET
; Test the 8253 Timer, configure it as per the monitor and display the read back values.
TIMERTST: CALL NL
LD DE,MSG_TIMERTST
CALL MSG
CALL NL
LD DE,MSG_TIMERVAL
CALL MSG
LD A,01h
LD DE,8000h
CALL TIMERTST1
NDE: JP NDE
JP ST1X
TIMERTST1: DI
PUSH BC
PUSH DE
PUSH HL
LD (AMPM),A
LD A,0F0H
LD (TIMFG),A
ABCD: LD HL,0A8C0H
XOR A
SBC HL,DE
PUSH HL
INC HL
EX DE,HL
LD HL,CONTF ; Control Register
LD (HL),0B0H ; 10110000 Control Counter 2 10, Write 2 bytes 11, 000 Interrupt on Terminal Count, 0 16 bit binary
LD (HL),074H ; 01110100 Control Counter 1 01, Write 2 bytes 11, 010 Rate Generator, 0 16 bit binary
LD (HL),030H ; 00110100 Control Counter 1 01, Write 2 bytes 11, 010 interrupt on Terminal Count, 0 16 bit binary
LD HL,CONT2 ; Counter 2
LD (HL),E
LD (HL),D
LD HL,CONT1 ; Counter 1
LD (HL),00AH
LD (HL),000H
LD HL,CONT0 ; Counter 0
LD (HL),00CH
LD (HL),0C0H
; LD HL,CONT2 ; Counter 2
; LD C,(HL)
; LD A,(HL)
; CP D
; JP NZ,L0323H
; LD A,C
; CP E
; JP Z,CDEF
;
L0323H: PUSH AF
PUSH BC
PUSH DE
PUSH HL
;
LD HL,CONTF ; Control Register
LD (HL),080H
LD HL,CONT2 ; Counter 2
LD C,(HL)
LD A,(HL)
CALL PRTHX
LD A,C
CALL PRTHX
;
CALL PRNTS
;CALL DLY1S
;
LD HL,CONTF ; Control Register
LD (HL),040H
LD HL,CONT1 ; Counter 1
LD C,(HL)
LD A,(HL)
CALL PRTHX
LD A,C
CALL PRTHX
;
CALL PRNTS
;CALL DLY1S
;
LD HL,CONTF ; Control Register
LD (HL),000H
LD HL,CONT0 ; Counter 0
LD C,(HL)
LD A,(HL)
CALL PRTHX
LD A,C
CALL PRTHX
;
;CALL DLY1S
;
LD A,0C4h ; Move cursor left.
LD E,0Eh ; 4 times.
L0330: CALL DPCT
DEC E
JR NZ,L0330
;
; LD C,20
;L0324: CALL DLY12
; DEC C
; JR NZ,L0324
;
POP HL
POP DE
POP BC
POP AF
;
LD HL,CONT2 ; Counter 2
LD C,(HL)
LD A,(HL)
CP D
JP NZ,L0323H
LD A,C
CP E
JP NZ,L0323H
;
;
PUSH AF
PUSH BC
PUSH DE
PUSH HL
CALL NL
CALL NL
CALL NL
LD DE,MSG_TIMERVAL2
CALL MSG
POP HL
POP DE
POP BC
POP AF
;
CDEF: POP DE
LD HL,CONT1
LD (HL),00CH
LD (HL),07BH
INC HL
L0336H: PUSH AF
PUSH BC
PUSH DE
PUSH HL
;
LD HL,CONTF ; Control Register
LD (HL),080H
LD HL,CONT2 ; Counter 2
LD C,(HL)
LD A,(HL)
CALL PRTHX
LD A,C
CALL PRTHX
;
CALL PRNTS
CALL DLY1S
;
LD HL,CONTF ; Control Register
LD (HL),040H
LD HL,CONT1 ; Counter 1
LD C,(HL)
LD A,(HL)
CALL PRTHX
LD A,C
CALL PRTHX
;
CALL PRNTS
CALL DLY1S
;
LD HL,CONTF ; Control Register
LD (HL),000H
LD HL,CONT0 ; Counter 0
LD C,(HL)
LD A,(HL)
CALL PRTHX
LD A,C
CALL PRTHX
;
CALL DLY1S
;
LD A,0C4h ; Move cursor left.
LD E,0Eh ; 4 times.
L0340: CALL DPCT
DEC E
JR NZ,L0340
;
POP HL
POP DE
POP BC
POP AF
LD HL,CONT2 ; Counter 2
LD C,(HL)
LD A,(HL)
CP D
JR NZ,L0336H
LD A,C
CP E
JR NZ,L0336H
CALL NL
LD DE,MSG_TIMERVAL3
CALL MSG
POP HL
POP DE
POP BC
EI
RET
OKCHECK: DB ", CHECK: ", 0Dh
OKMSG: DB " OK.", 0Dh
DONEMSG: DB 11h
DB "RAM TEST COMPLETE.", 0Dh
BITMSG: DB " BIT: ", 0Dh
BANKMSG: DB " BANK: ", 0Dh
MSG_TIMERTST:
DB "8253 TIMER TEST", 0Dh, 00h
MSG_TIMERVAL:
DB "READ VALUE 1: ", 0Dh, 00h
MSG_TIMERVAL2:
DB "READ VALUE 2: ", 0Dh, 00h
MSG_TIMERVAL3:
DB "READ DONE.", 0Dh, 00h
ALIGN 0EFFFh
DB 0FFh

112
software/asm/rfs_bank4.asm Normal file
View File

@@ -0,0 +1,112 @@
;--------------------------------------------------------------------------------------------------------
;-
;- Name: rfs_bank4.asm
;- Created: October 2018
;- Author(s): Philip Smart
;- Description: Sharp MZ series Rom Filing System.
;- This assembly language program is written to utilise the banked flashroms added with
;- the MZ-80A RFS hardware upgrade.
;-
;- Credits:
;- Copyright: (c) 2018 Philip Smart <philip.smart@net2net.org>
;-
;- History: October 2018 - Merged 2 utilities to create this compilation.
;-
;--------------------------------------------------------------------------------------------------------
;- This source file is free software: you can redistribute it and-or modify
;- it under the terms of the GNU General Public License as published
;- by the Free Software Foundation, either version 3 of the License, or
;- (at your option) any later version.
;-
;- This source file is distributed in the hope that it will be useful,
;- but WITHOUT ANY WARRANTY; without even the implied warranty of
;- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;- GNU General Public License for more details.
;-
;- You should have received a copy of the GNU General Public License
;- along with this program. If not, see <http://www.gnu.org/licenses/>.
;--------------------------------------------------------------------------------------------------------
;======================================
;
; USER ROM BANK 4
;
;======================================
ORG 0E800h
;--------------------------------
; Common code spanning all banks.
;--------------------------------
ROMFS4: NOP
LD A, (ROMBK1) ; Ensure all banks are at default on
CP 4 ; If the ROMBK1 value is 255, an illegal value, then the machine has just started so skip.
JR C, ROMFS4_2
XOR A ; Clear the lower stack space as we use it for variables.
LD B, 7*8
LD HL, 01000H
ROMFS4_1: LD (HL),A
INC HL
DJNZ ROMFS4_1
ROMFS4_2: LD (RFSBK1),A ; start up.
LD A, (ROMBK2)
LD (RFSBK2),A
JP MONITOR
;
; Bank switching code, allows a call to code in another bank.
; This code is duplicated in each bank such that a bank switch doesnt affect logic flow.
;
BKSW4to0: PUSH AF
LD A, ROMBANK4 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK0 ; Required bank to call.
JR BKSW4_0
BKSW4to1: PUSH AF
LD A, ROMBANK4 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK1 ; Required bank to call.
JR BKSW4_0
BKSW4to2: PUSH AF
LD A, ROMBANK4 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK2 ; Required bank to call.
JR BKSW4_0
BKSW4to3: PUSH AF
LD A, ROMBANK4 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK3 ; Required bank to call.
JR BKSW4_0
BKSW4to4: PUSH AF
LD A, ROMBANK4 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK4 ; Required bank to call.
JR BKSW4_0
BKSW4to5: PUSH AF
LD A, ROMBANK4 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK5 ; Required bank to call.
JR BKSW4_0
BKSW4to6: PUSH AF
LD A, ROMBANK4 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK6 ; Required bank to call.
JR BKSW4_0
BKSW4to7: PUSH AF
LD A, ROMBANK4 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK7 ; Required bank to call.
;
BKSW4_0: PUSH BC ; Save BC for caller.
LD BC, BKSWRET4 ; Place bank switchers return address on stack.
PUSH BC
LD (RFSBK2), A ; Bank switch in user rom space, A=bank.
JP (HL) ; Jump to required function.
BKSWRET4: POP BC
POP AF ; Get bank which called us.
LD (RFSBK2), A ; Return to that bank.
POP AF
RET ; Return to caller.
ALIGN 0EFFFh
DB 0FFh

111
software/asm/rfs_bank5.asm Normal file
View File

@@ -0,0 +1,111 @@
;--------------------------------------------------------------------------------------------------------
;-
;- Name: rfs_bank5.asm
;- Created: October 2018
;- Author(s): Philip Smart
;- Description: Sharp MZ series Rom Filing System.
;- This assembly language program is written to utilise the banked flashroms added with
;- the MZ-80A RFS hardware upgrade.
;-
;- Credits:
;- Copyright: (c) 2018 Philip Smart <philip.smart@net2net.org>
;-
;- History: October 2018 - Merged 2 utilities to create this compilation.
;-
;--------------------------------------------------------------------------------------------------------
;- This source file is free software: you can redistribute it and-or modify
;- it under the terms of the GNU General Public License as published
;- by the Free Software Foundation, either version 3 of the License, or
;- (at your option) any later version.
;-
;- This source file is distributed in the hope that it will be useful,
;- but WITHOUT ANY WARRANTY; without even the implied warranty of
;- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;- GNU General Public License for more details.
;-
;- You should have received a copy of the GNU General Public License
;- along with this program. If not, see <http://www.gnu.org/licenses/>.
;--------------------------------------------------------------------------------------------------------
;======================================
;
; USER ROM BANK 5
;
;======================================
ORG 0E800h
;--------------------------------
; Common code spanning all banks.
;--------------------------------
ROMFS5: NOP
LD A, (ROMBK1) ; Ensure all banks are at default on
CP 4 ; If the ROMBK1 value is 255, an illegal value, then the machine has just started so skip.
JR C, ROMFS5_2
XOR A ; Clear the lower stack space as we use it for variables.
LD B, 7*8
LD HL, 01000H
ROMFS5_1: LD (HL),A
INC HL
DJNZ ROMFS5_1
ROMFS5_2: LD (RFSBK1),A ; start up.
LD A, (ROMBK2)
LD (RFSBK2),A
JP MONITOR
;
; Bank switching code, allows a call to code in another bank.
; This code is duplicated in each bank such that a bank switch doesnt affect logic flow.
;
BKSW5to0: PUSH AF
LD A, ROMBANK5 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK0 ; Required bank to call.
JR BKSW5_0
BKSW5to1: PUSH AF
LD A, ROMBANK5 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK1 ; Required bank to call.
JR BKSW5_0
BKSW5to2: PUSH AF
LD A, ROMBANK5 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK2 ; Required bank to call.
JR BKSW5_0
BKSW5to3: PUSH AF
LD A, ROMBANK5 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK3 ; Required bank to call.
JR BKSW5_0
BKSW5to4: PUSH AF
LD A, ROMBANK5 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK4 ; Required bank to call.
JR BKSW5_0
BKSW5to5: PUSH AF
LD A, ROMBANK5 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK5 ; Required bank to call.
JR BKSW5_0
BKSW5to6: PUSH AF
LD A, ROMBANK5 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK6 ; Required bank to call.
JR BKSW5_0
BKSW5to7: PUSH AF
LD A, ROMBANK5 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK7 ; Required bank to call.
;
BKSW5_0: PUSH BC ; Save BC for caller.
LD BC, BKSWRET5 ; Place bank switchers return address on stack.
PUSH BC
LD (RFSBK2), A ; Bank switch in user rom space, A=bank.
JP (HL) ; Jump to required function.
BKSWRET5: POP BC
POP AF ; Get bank which called us.
LD (RFSBK2), A ; Return to that bank.
POP AF
RET ; Return to caller.
ALIGN 0EFFFh
DB 0FFh

111
software/asm/rfs_bank6.asm Normal file
View File

@@ -0,0 +1,111 @@
;--------------------------------------------------------------------------------------------------------
;-
;- Name: rfs_bank6.asm
;- Created: October 2018
;- Author(s): Philip Smart
;- Description: Sharp MZ series Rom Filing System.
;- This assembly language program is written to utilise the banked flashroms added with
;- the MZ-80A RFS hardware upgrade.
;-
;- Credits:
;- Copyright: (c) 2018 Philip Smart <philip.smart@net2net.org>
;-
;- History: October 2018 - Merged 2 utilities to create this compilation.
;-
;--------------------------------------------------------------------------------------------------------
;- This source file is free software: you can redistribute it and-or modify
;- it under the terms of the GNU General Public License as published
;- by the Free Software Foundation, either version 3 of the License, or
;- (at your option) any later version.
;-
;- This source file is distributed in the hope that it will be useful,
;- but WITHOUT ANY WARRANTY; without even the implied warranty of
;- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;- GNU General Public License for more details.
;-
;- You should have received a copy of the GNU General Public License
;- along with this program. If not, see <http://www.gnu.org/licenses/>.
;--------------------------------------------------------------------------------------------------------
;======================================
;
; USER ROM BANK 6
;
;======================================
ORG 0E800h
;--------------------------------
; Common code spanning all banks.
;--------------------------------
ROMFS6: NOP
LD A, (ROMBK1) ; Ensure all banks are at default on
CP 4 ; If the ROMBK1 value is 255, an illegal value, then the machine has just started so skip.
JR C, ROMFS6_2
XOR A ; Clear the lower stack space as we use it for variables.
LD B, 7*8
LD HL, 01000H
ROMFS6_1: LD (HL),A
INC HL
DJNZ ROMFS6_1
ROMFS6_2: LD (RFSBK1),A ; start up.
LD A, (ROMBK2)
LD (RFSBK2),A
JP MONITOR
;
; Bank switching code, allows a call to code in another bank.
; This code is duplicated in each bank such that a bank switch doesnt affect logic flow.
;
BKSW6to0: PUSH AF
LD A, ROMBANK6 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK0 ; Required bank to call.
JR BKSW6_0
BKSW6to1: PUSH AF
LD A, ROMBANK6 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK1 ; Required bank to call.
JR BKSW6_0
BKSW6to2: PUSH AF
LD A, ROMBANK6 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK2 ; Required bank to call.
JR BKSW6_0
BKSW6to3: PUSH AF
LD A, ROMBANK6 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK3 ; Required bank to call.
JR BKSW6_0
BKSW6to4: PUSH AF
LD A, ROMBANK6 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK4 ; Required bank to call.
JR BKSW6_0
BKSW6to5: PUSH AF
LD A, ROMBANK6 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK5 ; Required bank to call.
JR BKSW6_0
BKSW6to6: PUSH AF
LD A, ROMBANK6 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK6 ; Required bank to call.
JR BKSW6_0
BKSW6to7: PUSH AF
LD A, ROMBANK6 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK7 ; Required bank to call.
;
BKSW6_0: PUSH BC ; Save BC for caller.
LD BC, BKSWRET6 ; Place bank switchers return address on stack.
PUSH BC
LD (RFSBK2), A ; Bank switch in user rom space, A=bank.
JP (HL) ; Jump to required function.
BKSWRET6: POP BC
POP AF ; Get bank which called us.
LD (RFSBK2), A ; Return to that bank.
POP AF
RET ; Return to caller.
ALIGN 0EFFFh
DB 0FFh

111
software/asm/rfs_bank7.asm Normal file
View File

@@ -0,0 +1,111 @@
;--------------------------------------------------------------------------------------------------------
;-
;- Name: rfs_bank7.asm
;- Created: October 2018
;- Author(s): Philip Smart
;- Description: Sharp MZ series Rom Filing System.
;- This assembly language program is written to utilise the banked flashroms added with
;- the MZ-80A RFS hardware upgrade.
;-
;- Credits:
;- Copyright: (c) 2018 Philip Smart <philip.smart@net2net.org>
;-
;- History: October 2018 - Merged 2 utilities to create this compilation.
;-
;--------------------------------------------------------------------------------------------------------
;- This source file is free software: you can redistribute it and-or modify
;- it under the terms of the GNU General Public License as published
;- by the Free Software Foundation, either version 3 of the License, or
;- (at your option) any later version.
;-
;- This source file is distributed in the hope that it will be useful,
;- but WITHOUT ANY WARRANTY; without even the implied warranty of
;- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;- GNU General Public License for more details.
;-
;- You should have received a copy of the GNU General Public License
;- along with this program. If not, see <http://www.gnu.org/licenses/>.
;--------------------------------------------------------------------------------------------------------
;======================================
;
; USER ROM BANK 7
;
;======================================
ORG 0E800h
;--------------------------------
; Common code spanning all banks.
;--------------------------------
ROMFS7: NOP
LD A, (ROMBK1) ; Ensure all banks are at default on
CP 4 ; If the ROMBK1 value is 255, an illegal value, then the machine has just started so skip.
JR C, ROMFS7_2
XOR A ; Clear the lower stack space as we use it for variables.
LD B, 7*8
LD HL, 01000H
ROMFS7_1: LD (HL),A
INC HL
DJNZ ROMFS7_1
ROMFS7_2: LD (RFSBK1),A ; start up.
LD A, (ROMBK2)
LD (RFSBK2),A
JP MONITOR
;
; Bank switching code, allows a call to code in another bank.
; This code is duplicated in each bank such that a bank switch doesnt affect logic flow.
;
BKSW7to0: PUSH AF
LD A, ROMBANK7 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK0 ; Required bank to call.
JR BKSW7_0
BKSW7to1: PUSH AF
LD A, ROMBANK7 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK1 ; Required bank to call.
JR BKSW7_0
BKSW7to2: PUSH AF
LD A, ROMBANK7 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK2 ; Required bank to call.
JR BKSW7_0
BKSW7to3: PUSH AF
LD A, ROMBANK7 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK3 ; Required bank to call.
JR BKSW7_0
BKSW7to4: PUSH AF
LD A, ROMBANK7 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK4 ; Required bank to call.
JR BKSW7_0
BKSW7to5: PUSH AF
LD A, ROMBANK7 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK5 ; Required bank to call.
JR BKSW7_0
BKSW7to6: PUSH AF
LD A, ROMBANK7 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK6 ; Required bank to call.
JR BKSW7_0
BKSW7to7: PUSH AF
LD A, ROMBANK7 ; Calling bank (ie. us).
PUSH AF
LD A, ROMBANK7 ; Required bank to call.
;
BKSW7_0: PUSH BC ; Save BC for caller.
LD BC, BKSWRET7 ; Place bank switchers return address on stack.
PUSH BC
LD (RFSBK2), A ; Bank switch in user rom space, A=bank.
JP (HL) ; Jump to required function.
BKSWRET7: POP BC
POP AF ; Get bank which called us.
LD (RFSBK2), A ; Return to that bank.
POP AF
RET ; Return to caller.
ALIGN 0EFFFh
DB 0FFh

543
software/asm/rfs_mrom.asm Normal file
View File

@@ -0,0 +1,543 @@
;--------------------------------------------------------------------------------------------------------
;-
;- Name: rfs_mrom.asm
;- Created: September 2019
;- Author(s): Philip Smart
;- Description: Sharp MZ series Rom Filing System.
;- This assembly language program is written to utilise the banked flashroms added with
;- the MZ-80A RFS hardware upgrade.
;- The purpose of this program is to provide helper utilities to the RFS in order that
;- the RFS can read the User Banks and extract required programs.
;-
;- Credits:
;- Copyright: (c) 2018 Philip Smart <philip.smart@net2net.org>
;-
;- History: September 2019 - Initial version.
;-
;--------------------------------------------------------------------------------------------------------
;- This source file is free software: you can redistribute it and-or modify
;- it under the terms of the GNU General Public License as published
;- by the Free Software Foundation, either version 3 of the License, or
;- (at your option) any later version.
;-
;- This source file is distributed in the hope that it will be useful,
;- but WITHOUT ANY WARRANTY; without even the implied warranty of
;- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;- GNU General Public License for more details.
;-
;- You should have received a copy of the GNU General Public License
;- along with this program. If not, see <http://www.gnu.org/licenses/>.
;--------------------------------------------------------------------------------------------------------
; MONITOR WORK AREA
; (MZ-80A)
STACK: EQU 010F0H
ORG STACK
SPV:
IBUFE: ; TAPE BUFFER (128 BYTES)
ATRB: DS virtual 1 ; ATTRIBUTE
NAME: DS virtual 17 ; FILE NAME
SIZE: DS virtual 2 ; BYTESIZE
DTADR: DS virtual 2 ; DATA ADDRESS
EXADR: DS virtual 2 ; EXECUTION ADDRESS
COMNT: DS virtual 92 ; COMMENT
SWPW: DS virtual 10 ; SWEEP WORK
KDATW: DS virtual 2 ; KEY WORK
KANAF: DS virtual 1 ; KANA FLAG (01=GRAPHIC MODE)
DSPXY: DS virtual 2 ; DISPLAY COORDINATES
MANG: DS virtual 6 ; COLUMN MANAGEMENT
MANGE: DS virtual 1 ; COLUMN MANAGEMENT END
PBIAS: DS virtual 1 ; PAGE BIAS
ROLTOP: DS virtual 1 ; ROLL TOP BIAS
MGPNT: DS virtual 1 ; COLUMN MANAG. POINTER
PAGETP: DS virtual 2 ; PAGE TOP
ROLEND: DS virtual 1 ; ROLL END
DS virtual 14 ; BIAS
FLASH: DS virtual 1 ; FLASHING DATA
SFTLK: DS virtual 1 ; SHIFT LOCK
REVFLG: DS virtual 1 ; REVERSE FLAG
SPAGE: DS virtual 1 ; PAGE CHANGE
FLSDT: DS virtual 1 ; CURSOR DATA
STRGF: DS virtual 1 ; STRING FLAG
DPRNT: DS virtual 1 ; TAB COUNTER
TMCNT: DS virtual 2 ; TAPE MARK COUNTER
SUMDT: DS virtual 2 ; CHECK SUM DATA
CSMDT: DS virtual 2 ; FOR COMPARE SUM DATA
AMPM: DS virtual 1 ; AMPM DATA
TIMFG: DS virtual 1 ; TIME FLAG
SWRK: DS virtual 1 ; KEY SOUND FLAG
TEMPW: DS virtual 1 ; TEMPO WORK
ONTYO: DS virtual 1 ; ONTYO WORK
OCTV: DS virtual 1 ; OCTAVE WORK
RATIO: DS virtual 2 ; ONPU RATIO
BUFER: DS virtual 81 ; GET LINE BUFFER
; Starting 1000H - Generally unused bytes not cleared by the monitor.
ROMBK1: EQU 01000H ; CURRENT MROM BANK
ROMBK2: EQU 01001H ; CURRENT USERROM BANK
WRKROMBK1: EQU 01002H ; WORKING MROM BANK
WRKROMBK2: EQU 01003H ; WORKING USERROM BANK
SCRNMODE: EQU 01004H ; Screen Mode
TMPADR: EQU 01010H ; TEMPORARY ADDRESS STORAGE
TMPSIZE: EQU 01012H ; TEMPORARY SIZE
TMPCNT: EQU 01014H ; TEMPOARY COUNTER
TMPLINECNT:EQU 01016H ; Temporary counter for displayed lines.
; EQU TABLE I/O REPORT
;-----------------------------------------------
; Memory mapped ports in hardware.
;-----------------------------------------------
SCRN: EQU 0D000H
ARAM: EQU 0D800H
KEYPA: EQU 0E000h
KEYPB: EQU 0E001h
KEYPC: EQU 0E002h
KEYPF: EQU 0E003h
CSTR: EQU 0E002h
CSTPT: EQU 0E003h
CONT0: EQU 0E004h
CONT1: EQU 0E005h
CONT2: EQU 0E006h
CONTF: EQU 0E007h
SUNDG: EQU 0E008h
TEMP: EQU 0E008h
MEMSW: EQU 0E00CH
MEMSWR: EQU 0E010H
INVDSP: EQU 0E014H
NRMDSP: EQU 0E015H
SCLDSP: EQU 0E200H
RFSBK1: EQU 0EFFCh
RFSBK2: EQU 0EFFDh
RFSRST1: EQU 0EFFEh
RFSRST2: EQU 0EFFFh
;-----------------------------------------------
; Rom File System Header (MZF)
;-----------------------------------------------
RFS_ATRB: EQU 00000h ; Code Type, 01 = Machine Code.
RFS_NAME: EQU 00001h ; Title/Name (17 bytes).
RFS_SIZE: EQU 00012h ; Size of program.
RFS_DTADR: EQU 00014h ; Load address of program.
RFS_EXADR: EQU 00016h ; Exec address of program.
RFS_COMNT: EQU 00018h ; COMMENT
;-----------------------------------------------
; ROM Banks, 0-3 are reserved for alternative
; Monitor versions in MROM bank,
; 0-7 are reserved for RFS code in the
; User ROM bank.
;-----------------------------------------------
ROMBANK0 EQU 0
ROMBANK1 EQU 1
ROMBANK2 EQU 2
ROMBANK3 EQU 3
ROMBANK4 EQU 4
ROMBANK5 EQU 5
ROMBANK6 EQU 6
ROMBANK7 EQU 7
PRTMZF EQU 0E880H
MZFHDRSZ EQU 128
RFSSECTSZ EQU 256
MROMSIZE EQU 4096
UROMSIZE EQU 2048
;ROW EQU 25
;COLW40 EQU 80
;SCRNSZ40 EQU COLW40 * ROW
;COLW80 EQU 80
;SCRNSZ80 EQU COLW80 * ROW
;MODE80C EQU 0
;======================================
;
; MONITOR ROM BANK 3 - RFS Utilities
;
;======================================
ORG 00000h
MONIT:
MROMBK3: JP START ; The lower part of the rom mimics the SA1510 MROM such that if a reset occurs when
; this bank is paged in, it starts up and reverts to the SA1510 MROM.
ALIGN_NOPS 0038H
ORG 0038H ; NMI Vector
JP 1038H ; Interrupt routine
; As this is not the monitor ROM, if we arrive at START it means a reset without the monitor rom bank being selected
; so we switch it in and do a jump to 0 for reset.
ALIGN_NOPS 004AH
ORG 004Ah
START: LD SP, STACK
IM 1
CALL ?MODE
LD B,0FFH
LD HL,NAME
CALL ?CLER
NOP
NOP
NOP
NOP
NOP
NOP
LD A,(ROMBK2) ; User ROM to default.
LD (RFSBK2), A
LD A, (ROMBK1) ; Monitor ROM to default.
LD (RFSBK1), A
; Location for STRT1 in monitor ROM (just after Colour RAM clear call). After the bank switch we should
; resume at this point in original monitor.
ORG 06Ch
JR START
;-----------------------------------------
; Enhanced function Jump table.
;-----------------------------------------
DIRMROM: JP _DIRMROM
MFINDMZF: JP _MFINDMZF
MROMLOAD: JP _MROMLOAD
;-----------------------------------------
;
;====================================
;
; ROM File System Commands
;
;====================================
; HL contains address of block to check.
ISMZF: PUSH BC
PUSH DE
PUSH HL
;
LD A,(HL)
CP 001h ; Only interested in machine code images.
JR NZ, ISMZFNOT
;
INC HL
LD DE,NAME ; Checks to confirm this is an MZF header.
LD B,17 ; Maximum of 17 characters, including terminator in filename.
ISMZFNXT: LD A,(HL)
LD (DE),A
CP 00Dh ; If we find a terminator then this indicates potentially a valid name.
JR Z, ISMZFVFY
CP 020h ; >= Space
JR C, ISMZFNOT
CP 05Dh ; =< ]
JR C, ISMZFNXT3
ISMZFNXT2: CP 091h
JR C, ISMZFNOT ; DEL or > 0x7F, cant be a valid filename so this is not an MZF header.
ISMZFNXT3: INC DE
INC HL
DJNZ ISMZFNXT
JR ISMZFNOT ; No end of string terminator, this cant be a valid filename.
ISMZFVFY: LD A,B
CP 17
JR Z,ISMZFNOT ; If the filename has no length it cant be valid, so loop.
ISMZFYES: CP A ; Set zero flag to indicate match.
ISMZFNOT: POP HL
POP DE
POP BC
RET
; B contains Bank to select.
; HL contains the Block page address.
_DIRMROM: PUSH BC
PUSH DE
;
; Scan MROM Bank
; B = Bank Page
; C = Block in page
; D = File sequence number.
;
LD B,8 ; First 8x2K pages are reserved in User bank.
LD C,0 ; Block in page.
DIRNXTPG: LD A,B
LD (WRKROMBK2), A
LD (RFSBK2), A ; Select bank.
PUSH BC ; Preserve bank count/block number.
PUSH DE ; Preserve file numbering.
LD A,C
IF RFSSECTSZ >= 512
RLCA
ENDIF
IF RFSSECTSZ >= 1024
RLCA
ENDIF
LD B,A
LD C,0
LD HL,0E800h + RFS_ATRB ; Add block offset to get the valid block address.
ADD HL,BC
CALL ISMZF
POP DE
POP BC
JR NZ, DIRNOTMZF
;
CALL _PRTMZF
INC D ; Next file sequence number.
DIRNOTMZF: INC C
LD A,C
CP UROMSIZE/RFSSECTSZ ; Max blocks per page reached?
JR C, DIRNXTPG2
LD C,0
INC B
DIRNXTPG2: LD A,B
CP 000h ; User rom has 256 banks of 2K, so stop when we wrap round to 0.
JR NZ, DIRNXTPG
LD A,(ROMBK2)
LD (RFSBK2), A ; Set the User bank back to original.
POP DE
POP BC
RET
; Wrapper to call the User ROM function to display the MZF filename.
_PRTMZF: LD A,(ROMBK2)
LD (RFSBK2), A
CALL PRTMZF
LD A,(WRKROMBK2)
LD (RFSBK2), A
RET
; In:
; HL = filename
; Out:
; B = Bank Page file found
; C = Block where found.
; D = File sequence number.
; Z set if found.
_MFINDMZF: PUSH DE
LD (TMPADR), HL ; Save name of program to load.
EX DE, HL ; String needed in DE for conversion.
LD HL,0FFFFh ; Tag the filenumber as invalid.
LD (TMPCNT), HL
CALL ConvertStringToNumber ; See if a file number was given instead of a filename.
JR NZ, FINDMZF0 ;
LD (TMPCNT), HL ; Store filenumber making load by filenumber valid.
;
; Scan MROM Bank
; B = Bank Page
; C = Block in page
; D = File sequence number.
;
FINDMZF0: POP DE ; Get file sequence number in D.
LD B,8 ; First 8 pages are reserved in User ROM bank.
LD C,0 ; Block in page.
;LD D,0 ; File numbering start.
FINDMZF1: LD A,B
LD (WRKROMBK2), A
LD (RFSBK2), A ; Select bank.
FINDMZF2: PUSH BC ; Preserve bank count/block number.
PUSH DE ; Preserve file numbering.
LD HL,0E800h + RFS_ATRB ; Add block offset to get the valid block.
LD A,C
IF RFSSECTSZ >= 512
RLCA
ENDIF
IF RFSSECTSZ >= 1024
RLCA
ENDIF
LD B,A
LD C,0
ADD HL,BC
CALL ISMZF
POP DE
POP BC
JR NZ, FINDMZF4 ; Z set if we found an MZF record.
INC HL ; Save address of filename.
PUSH HL
LD HL,(TMPCNT)
LD A,H
CP 0FFh ; If TMPCNT tagged as 0xFF then we dont have a filenumber so must match filename.
JR Z, FINDMZF3
LD A,L ; Check file number, load if match
CP D
JR NZ, FINDMZF3 ; Check name just in case.
POP HL
JR FINDMZFYES ; Else the filenumber matches so load the file.
FINDMZF3: POP HL
PUSH DE
PUSH BC
LD DE,(TMPADR) ; Original DE put onto stack, original filename into DE
LD BC,17
CALL CMPSTRING
POP BC
POP DE
JR Z, FINDMZFYES
INC D ; Next file sequence number.
FINDMZF4: INC C
LD A,C
CP UROMSIZE/RFSSECTSZ ; Max blocks per page reached?
JR C, FINDMZF5
LD C,0
INC B
FINDMZF5: LD A,B
CP 000h ; User ROM has 256 banks of 2K, so stop when we wrap around to zero.
JR NZ, FINDMZF1
INC B
JR FINDMZFNO
FINDMZFYES: ; Flag set by previous test.
FINDMZFNO: PUSH AF
LD A,(ROMBK2)
LD (RFSBK2), A ; Set the MROM bank back to original.
POP AF
RET
; Load Program from ROM
; IN BC Bank and Block to of MZF file.
; OUT zero Set if file loaded, reset if an error occurred.
;
; Load program from RFS Bank 1 (MROM Bank)
;
_MROMLOAD: PUSH BC
LD A,B
LD (WRKROMBK2),A
LD (RFSBK2), A
;
LD DE, IBUFE ; Copy the header into the work area.
LD HL, 0E800h ; Add block offset to get the valid block.
LD A,C
IF RFSSECTSZ >= 512
RLCA
ENDIF
IF RFSSECTSZ >= 1024
RLCA
ENDIF
LD B,A
LD C,0
ADD HL,BC
LD BC, MZFHDRSZ
LDIR
PUSH HL
LD DE, (DTADR)
LD HL, (SIZE)
LD BC, RFSSECTSZ - MZFHDRSZ
SBC HL, BC
JR NC, LROMLOAD4
LD HL, (SIZE)
JR LROMLOAD4
; HL = address in active block to read.
; B = Bank
; C = Block
LROMLOAD2: LD A, B
LD (WRKROMBK2), A
LD (RFSBK2), A
LROMLOAD3: PUSH BC
LD HL, 0E800h
LD A, C
IF RFSSECTSZ >= 512
RLCA
ENDIF
IF RFSSECTSZ >= 1024
RLCA
ENDIF
LD B, A
LD C, 0
ADD HL,BC
PUSH HL
LD DE, (TMPADR)
LD HL, (TMPSIZE)
LD BC, RFSSECTSZ
SBC HL, BC
JR NC, LROMLOAD4
LD BC, (TMPSIZE)
LD HL, 0
LROMLOAD4: LD (TMPSIZE), HL ; HL contains remaining amount of bytes to load.
POP HL
;
LD A, B ; Pre check to ensure BC is not zero.
OR C
JR Z, LROMLOAD8
LDIR
LD BC, (TMPSIZE)
LD A, B ; Post check to ensure we still have bytes
OR C
JR Z, LROMLOAD8
;
LD (TMPADR),DE ; Address we are loading into.
POP BC
LROMLOAD6: INC C
LD A, C
CP UROMSIZE/RFSSECTSZ ; Max blocks per page reached?
JR C, LROMLOAD7
LD C, 0
INC B
;
LROMLOAD7: LD A, B
CP 000h
JR NZ, LROMLOAD2
OR 1
JR LROMLOAD5
;
LROMLOAD8: POP BC
LROMLOAD5: PUSH AF
LD A,(ROMBK2)
LD (RFSBK2), A ; Set the MROM bank back to original.
POP AF
RET
;======================================
;
; SA1510 mirrored functions.
;
;======================================
?MODE: LD HL,KEYPF
LD (HL),08AH
LD (HL),007H
LD (HL),005H
LD (HL),001H
RET
?CLER: XOR A
JR ?DINT
?CLRFF: LD A,0FFH
?DINT: LD (HL),A
INC HL
DJNZ ?DINT
RET
; Bring in additional resources.
USE_CMPSTRING: EQU 1
USE_SUBSTRING: EQU 0
USE_INDEX: EQU 0
USE_STRINSERT: EQU 0
USE_STRDELETE: EQU 0
USE_CONCAT: EQU 0
USE_CNVUPPER: EQU 1
USE_CNVCHRTONUM: EQU 1
USE_ISNUMERIC: EQU 1
USE_CNVSTRTONUM: EQU 1
;
INCLUDE "Macros.asm"
;INCLUDE "RFS_Definitions.asm"
INCLUDE "RFS_Utilities.asm"
; Ensure we fill the entire 4K by padding with FF's.
ALIGN 1000H
;
;======================================
;
; Message table
;
;======================================

2795
software/asm/sa1510.asm Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

644
software/make_roms.sh Executable file
View File

@@ -0,0 +1,644 @@
#!/bin/bash
ROM256_USER=
#ROM256_USER+="../../../MZB/80A_PENCIL.A2_C2.256.bin "
#ROM256_USER+="../../../MZB/80A_PENCIL.A2_S.256.bin "
ROM256_USER+="../../../MZB/APOLLO_CHESS_v2a.256.bin "
#ROM256_USER+="../../../MZB/B880.A3_P6.256.bin "
ROM256_USER+="../../../MZB/B880_MASTER.256.bin "
ROM256_USER+="../../../MZB/BASIC.SA-5510.256.bin "
#ROM256_USER+="../../../MZB/BASIC_SA-5575_C.256.bin "
#ROM256_USER+="../../../MZB/BASIC_SA-5575_S.256.bin "
#ROM256_USER+="../../../MZB/BASIC_SA-5577_C.256.bin "
#ROM256_USER+="../../../MZB/BASIC_SA-5577_S.256.bin "
#ROM256_USER+="../../../MZB/BASIC_SA-5580.256.bin "
ROM256_USER+="../../../MZB/BAS_MOD_v3.74.256.bin "
ROM256_USER+="../../../MZB/BINARY_COUNT.256.bin "
#ROM256_USER+="../../../MZB/BYTESAVER_SA5510.256.bin "
#ROM256_USER+="../../../MZB/CLUB_COPY.U1.256.bin "
#ROM256_USER+="../../../MZB/CLUB_MON.A1_M.256.bin "
#ROM256_USER+="../../../MZB/CLUB_MON.A1_S.256.bin "
ROM256_USER+="../../../MZB/cmttofd.256.bin "
ROM256_USER+="../../../MZB/COLONY.256.bin "
ROM256_USER+="../../../MZB/COMPILER_A2.256.bin "
ROM256_USER+="../../../MZB/CONVERTER.256.bin "
#ROM256_USER+="../../../MZB/CONVERTER_A_700.256.bin "
ROM256_USER+="../../../MZB/COPIER.256.bin "
#ROM256_USER+="../../../MZB/DCS_MZ80A_APPEND.256.bin "
#ROM256_USER+="../../../MZB/DCS_MZ80A_RENUM.256.bin "
ROM256_USER+="../../../MZB/diamond.256.bin "
#ROM256_USER+="../../../MZB/DISASM_8800.A15.256.bin "
ROM256_USER+="../../../MZB/DISASM_B800.A15.256.bin "
#ROM256_USER+="../../../MZB/DISKEDIT.A4B.256.bin "
ROM256_USER+="../../../MZB/DISKEDIT.A7_40T.256.bin "
ROM256_USER+="../../../MZB/diskutility.256.bin "
#ROM256_USER+="../../../MZB/EXPRESS_BAS_700.256.bin "
#ROM256_USER+="../../../MZB/EXPRESS_COMPILER.256.bin "
#ROM256_USER+="../../../MZB/EXPRESS_PLUS.256.bin "
#ROM256_USER+="../../../MZB/Filing(CMT).256.bin "
#ROM256_USER+="../../../MZB/FRONT_PANEL_v1.5.256.bin "
#ROM256_USER+="../../../MZB/GALAXI_FORM.256.bin "
ROM256_USER+="../../../MZB/GALAXY_INVADERS.256.bin "
ROM256_USER+="../../../MZB/Greedy_Gremlins.256.bin "
#ROM256_USER+="../../../MZB/HU-BASIC.A1_M.256.bin "
#ROM256_USER+="../../../MZB/HU-BASIC.A1_S.256.bin "
#ROM256_USER+="../../../MZB/HU-BASIC.A2_80M.256.bin "
#ROM256_USER+="../../../MZB/HU-BASIC.A2_80S.256.bin "
#ROM256_USER+="../../../MZB/HUCALC_80A+_C2.256.bin "
#ROM256_USER+="../../../MZB/HUCALC_80A+_M.256.bin "
#ROM256_USER+="../../../MZB/HUCALC_80A+_S.256.bin "
#ROM256_USER+="../../../MZB/INSTRUCS_v1.1.256.bin "
ROM256_USER+="../../../MZB/JIGSAW.256.bin "
ROM256_USER+="../../../MZB/Le_Mans.256.bin "
ROM256_USER+="../../../MZB/loader.256.bin "
ROM256_USER+="../../../MZB/MAGIC_PAINTBOX.256.bin "
ROM256_USER+="../../../MZB/m_c_Breakout_2.256.bin "
ROM256_USER+="../../../MZB/m_c_Hissing_Sid.256.bin "
ROM256_USER+="../../../MZB/m_c_Race_Chase.256.bin "
ROM256_USER+="../../../MZB/MEMORY_TEST.256.bin "
ROM256_USER+="../../../MZB/MINI_DATACARD..256.bin "
ROM256_USER+="../../../MZB/minotaur.256.bin "
ROM256_USER+="../../../MZB/MZ-80A_GALACTIC.256.bin "
ROM256_USER+="../../../MZB/NEW_INVADERS.256.bin "
ROM256_USER+="../../../MZB/OTHELLO.256.bin "
ROM256_USER+="../../../MZB/PAINTBOX.BAS.256.bin "
#ROM256_USER+="../../../MZB/PROBE_A_1200.256.bin "
#ROM256_USER+="../../../MZB/PROBE_A_8000.256.bin "
#ROM256_USER+="../../../MZB/PROBE_A_B600.256.bin "
#ROM256_USER+="../../../MZB/RAM_CHECK_A.256.bin "
#ROM256_USER+="../../../MZB/sa-5510_Bas_MZ80K.256.bin "
#ROM256_USER+="../../../MZB/SA-5510_Compiler.256.bin "
#ROM256_USER+="../../../MZB/SA-5510+KN.COMM..256.bin "
#ROM256_USER+="../../../MZB/sa-6510.256.bin "
ROM256_USER+="../../../MZB/SARGON_2.71.256.bin "
ROM256_USER+="../../../MZB/SCRAMBLE_A.256.bin "
ROM256_USER+="../../../MZB/SECTOR_R_W.256.bin "
#ROM256_USER+="../../../MZB/SECTOR_R_W(NEC).256.bin "
ROM256_USER+="../../../MZB/SHARPLAN01.256.bin "
#ROM256_USER+="../../../MZB/SHARP_PENCIL.A1.256.bin "
#ROM256_USER+="../../../MZB/SHARP_PENCIL.ALF.256.bin "
ROM256_USER+="../../../MZB/SLAVE_v1.1A.256.bin "
ROM256_USER+="../../../MZB/SNOWFLAKES.256.bin "
#ROM256_USER+="../../../MZB/SP-4015.A1_C.256.bin "
#ROM256_USER+="../../../MZB/SP-4015.A1_S.256.bin "
#ROM256_USER+="../../../MZB/SP-5060.A1_M.256.bin "
#ROM256_USER+="../../../MZB/SP-5060.A1_S.256.bin "
ROM256_USER+="../../../MZB/SPACE_INVADERS.256.bin "
ROM256_USER+="../../../MZB/SP-CONVERT.A1.256.bin "
#ROM256_USER+="../../../MZB/STKEEPER2BAS700A.256.bin "
ROM256_USER+="../../../MZB/SUCOPY_A000.A16.256.bin "
ROM256_USER+="../../../MZB/SUPERFIRE.256.bin "
ROM256_USER+="../../../MZB/SUPERTAPE_2.256.bin "
ROM256_USER+="../../../MZB/TEXT_BASIC_I.256.bin "
ROM256_USER+="../../../MZB/TEXT~ED_v1.2.256.bin "
ROM256_USER+="../../../MZB/textsobs5.256.bin "
ROM256_USER+="../../../MZB/ufo.256.bin "
ROM256_USER+="../../../MZB/Utility_2.256.bin "
#ROM256_USER+="../../../MZB/Utility_V_1.1.256.bin "
#ROM256_USER+="../../../MZB/Utility_V_2.0.256.bin "
#ROM256_USER+="../../../MZB/WDPRO_2.37AT.256.bin "
ROM256_USER+="../../../MZB/WDPRO_2.37AT_C2.256.bin "
ROM256_USER+="../../../MZB/XPATCH_5510_v2.2.256.bin "
ROM256_USER+="../../../MZB/Z80_MACHINE.A1_M.256.bin "
#ROM256_USER+="../../../MZB/Z80_MACHINE.A1_S.256.bin "
#ROM256_USER+="../../../MZB/Z80_MACHINE.A2_M.256.bin "
#ROM256_USER+="../../../MZB/Z80MACHINE.A3_C2.256.bin "
#ROM256_USER+="../../../MZB/Z80_MACHINE.A3_S.256.bin "
ROM256_USER+="../../../MZB/ZEN7E.A2.256.bin "
cat rfs.rom $ROM256_USER > USER_ROM_256.bin
ROM256_MROM=
#ROM256_MROM+="../../../MZB/80A_PENCIL.A2_C2.256.bin "
#ROM256_MROM+="../../../MZB/80A_PENCIL.A2_S.256.bin "
#ROM256_MROM+="../../../MZB/APOLLO_CHESS_v2a.256.bin "
#ROM256_MROM+="../../../MZB/B880.A3_P6.256.bin "
ROM256_MROM+="../../../MZB/B880_MASTER.256.bin "
#ROM256_MROM+="../../../MZB/BASIC.SA-5510.256.bin "
ROM256_MROM+="../../../MZB/BASIC_SA-5575_C.256.bin "
#ROM256_MROM+="../../../MZB/BASIC_SA-5575_S.256.bin "
ROM256_MROM+="../../../MZB/BASIC_SA-5577_C.256.bin "
#ROM256_MROM+="../../../MZB/BASIC_SA-5577_S.256.bin "
ROM256_MROM+="../../../MZB/BASIC_SA-5580.256.bin "
ROM256_MROM+="../../../MZB/BAS_MOD_v3.74.256.bin "
#ROM256_MROM+="../../../MZB/BINARY_COUNT.256.bin "
ROM256_MROM+="../../../MZB/BYTESAVER_SA5510.256.bin "
ROM256_MROM+="../../../MZB/CLUB_COPY.U1.256.bin "
#ROM256_MROM+="../../../MZB/CLUB_MON.A1_M.256.bin "
ROM256_MROM+="../../../MZB/CLUB_MON.A1_S.256.bin "
#ROM256_MROM+="../../../MZB/cmttofd.256.bin "
#ROM256_MROM+="../../../MZB/COLONY.256.bin "
ROM256_MROM+="../../../MZB/COMPILER_A2.256.bin "
ROM256_MROM+="../../../MZB/CONVERTER.256.bin "
#ROM256_MROM+="../../../MZB/CONVERTER_A_700.256.bin "
ROM256_MROM+="../../../MZB/COPIER.256.bin "
ROM256_MROM+="../../../MZB/DCS_MZ80A_APPEND.256.bin "
ROM256_MROM+="../../../MZB/DCS_MZ80A_RENUM.256.bin "
#ROM256_MROM+="../../../MZB/diamond.256.bin "
#ROM256_MROM+="../../../MZB/DISASM_8800.A15.256.bin "
ROM256_MROM+="../../../MZB/DISASM_B800.A15.256.bin "
#ROM256_MROM+="../../../MZB/DISKEDIT.A4B.256.bin "
ROM256_MROM+="../../../MZB/DISKEDIT.A7_40T.256.bin "
ROM256_MROM+="../../../MZB/diskutility.256.bin "
ROM256_MROM+="../../../MZB/EXPRESS_BAS_700.256.bin "
ROM256_MROM+="../../../MZB/EXPRESS_COMPILER.256.bin "
ROM256_MROM+="../../../MZB/EXPRESS_PLUS.256.bin "
#ROM256_MROM+="../../../MZB/Filing(CMT).256.bin "
#ROM256_MROM+="../../../MZB/FRONT_PANEL_v1.5.256.bin "
#ROM256_MROM+="../../../MZB/GALAXI_FORM.256.bin "
#ROM256_MROM+="../../../MZB/GALAXY_INVADERS.256.bin "
#ROM256_MROM+="../../../MZB/Greedy_Gremlins.256.bin "
ROM256_MROM+="../../../MZB/HU-BASIC.A1_M.256.bin "
#ROM256_MROM+="../../../MZB/HU-BASIC.A1_S.256.bin "
#ROM256_MROM+="../../../MZB/HU-BASIC.A2_80M.256.bin "
#ROM256_MROM+="../../../MZB/HU-BASIC.A2_80S.256.bin "
ROM256_MROM+="../../../MZB/HUCALC_80A+_C2.256.bin "
#ROM256_MROM+="../../../MZB/HUCALC_80A+_M.256.bin "
#ROM256_MROM+="../../../MZB/HUCALC_80A+_S.256.bin "
#ROM256_MROM+="../../../MZB/INSTRUCS_v1.1.256.bin "
#ROM256_MROM+="../../../MZB/JIGSAW.256.bin "
#ROM256_MROM+="../../../MZB/Le_Mans.256.bin "
ROM256_MROM+="../../../MZB/loader.256.bin "
#ROM256_MROM+="../../../MZB/MAGIC_PAINTBOX.256.bin "
#ROM256_MROM+="../../../MZB/m_c_Breakout_2.256.bin "
#ROM256_MROM+="../../../MZB/m_c_Hissing_Sid.256.bin "
#ROM256_MROM+="../../../MZB/m_c_Race_Chase.256.bin "
#ROM256_MROM+="../../../MZB/MEMORY_TEST.256.bin "
ROM256_MROM+="../../../MZB/MINI_DATACARD..256.bin "
#ROM256_MROM+="../../../MZB/minotaur.256.bin "
#ROM256_MROM+="../../../MZB/MZ-80A_GALACTIC.256.bin "
#ROM256_MROM+="../../../MZB/NEW_INVADERS.256.bin "
#ROM256_MROM+="../../../MZB/OTHELLO.256.bin "
#ROM256_MROM+="../../../MZB/PAINTBOX.BAS.256.bin "
ROM256_MROM+="../../../MZB/PROBE_A_1200.256.bin "
#ROM256_MROM+="../../../MZB/PROBE_A_8000.256.bin "
#ROM256_MROM+="../../../MZB/PROBE_A_B600.256.bin "
ROM256_MROM+="../../../MZB/RAM_CHECK_A.256.bin "
ROM256_MROM+="../../../MZB/sa-5510_Bas_MZ80K.256.bin "
ROM256_MROM+="../../../MZB/SA-5510_Compiler.256.bin "
ROM256_MROM+="../../../MZB/SA-5510+KN.COMM..256.bin "
ROM256_MROM+="../../../MZB/sa-6510.256.bin "
#ROM256_MROM+="../../../MZB/SARGON_2.71.256.bin "
#ROM256_MROM+="../../../MZB/SCRAMBLE_A.256.bin "
ROM256_MROM+="../../../MZB/SECTOR_R_W.256.bin "
#ROM256_MROM+="../../../MZB/SECTOR_R_W(NEC).256.bin "
ROM256_MROM+="../../../MZB/SHARPLAN01.256.bin "
#ROM256_MROM+="../../../MZB/SHARP_PENCIL.A1.256.bin "
#ROM256_MROM+="../../../MZB/SHARP_PENCIL.ALF.256.bin "
#ROM256_MROM+="../../../MZB/SLAVE_v1.1A.256.bin "
#ROM256_MROM+="../../../MZB/SNOWFLAKES.256.bin "
ROM256_MROM+="../../../MZB/SP-4015.A1_C.256.bin "
#ROM256_MROM+="../../../MZB/SP-4015.A1_S.256.bin "
ROM256_MROM+="../../../MZB/SP-5060.A1_M.256.bin "
#ROM256_MROM+="../../../MZB/SP-5060.A1_S.256.bin "
#ROM256_MROM+="../../../MZB/SPACE_INVADERS.256.bin "
#ROM256_MROM+="../../../MZB/SP-CONVERT.A1.256.bin "
#ROM256_MROM+="../../../MZB/STKEEPER2BAS700A.256.bin "
ROM256_MROM+="../../../MZB/SUCOPY_A000.A16.256.bin "
#ROM256_MROM+="../../../MZB/SUPERFIRE.256.bin "
#ROM256_MROM+="../../../MZB/SUPERTAPE_2.256.bin "
ROM256_MROM+="../../../MZB/TEXT_BASIC_I.256.bin "
ROM256_MROM+="../../../MZB/TEXT~ED_v1.2.256.bin "
ROM256_MROM+="../../../MZB/textsobs5.256.bin "
#ROM256_MROM+="../../../MZB/ufo.256.bin "
ROM256_MROM+="../../../MZB/Utility_2.256.bin "
#ROM256_MROM+="../../../MZB/Utility_V_1.1.256.bin "
#ROM256_MROM+="../../../MZB/Utility_V_2.0.256.bin "
ROM256_MROM+="../../../MZB/WDPRO_2.37AT.256.bin "
#ROM256_MROM+="../../../MZB/WDPRO_2.37AT_C2.256.bin "
ROM256_MROM+="../../../MZB/XPATCH_5510_v2.2.256.bin "
ROM256_MROM+="../../../MZB/Z80_MACHINE.A1_M.256.bin "
#ROM256_MROM+="../../../MZB/Z80_MACHINE.A1_S.256.bin "
#ROM256_MROM+="../../../MZB/Z80_MACHINE.A2_M.256.bin "
#ROM256_MROM+="../../../MZB/Z80MACHINE.A3_C2.256.bin "
#ROM256_MROM+="../../../MZB/Z80_MACHINE.A3_S.256.bin "
#ROM256_MROM+="../../../MZB/ZEN7E.A2.256.bin "
cat monitor_SA1510.rom monitor_80c_SA1510.rom monitor_SA1510.rom rfs_mrom.rom $ROM256_MROM > MROM_256.bin
ROM1K_MROM=
#ROM1K_MROM+="../../../MZB/80A_PENCIL.A2_C2.1024.bin "
#ROM1K_MROM+="../../../MZB/80A_PENCIL.A2_S.1024.bin "
#ROM1K_MROM+="../../../MZB/APOLLO_CHESS_v2a.1024.bin "
#ROM1K_MROM+="../../../MZB/B880.A3_P6.1024.bin "
ROM1K_MROM+="../../../MZB/B880_MASTER.1024.bin "
#ROM1K_MROM+="../../../MZB/BASIC.SA-5510.1024.bin "
ROM1K_MROM+="../../../MZB/BASIC_SA-5575_C.1024.bin "
#ROM1K_MROM+="../../../MZB/BASIC_SA-5575_S.1024.bin "
ROM1K_MROM+="../../../MZB/BASIC_SA-5577_C.1024.bin "
#ROM1K_MROM+="../../../MZB/BASIC_SA-5577_S.1024.bin "
ROM1K_MROM+="../../../MZB/BASIC_SA-5580.1024.bin "
ROM1K_MROM+="../../../MZB/BAS_MOD_v3.74.1024.bin "
#ROM1K_MROM+="../../../MZB/BINARY_COUNT.1024.bin "
ROM1K_MROM+="../../../MZB/BYTESAVER_SA5510.1024.bin "
ROM1K_MROM+="../../../MZB/CLUB_COPY.U1.1024.bin "
#ROM1K_MROM+="../../../MZB/CLUB_MON.A1_M.1024.bin "
ROM1K_MROM+="../../../MZB/CLUB_MON.A1_S.1024.bin "
#ROM1K_MROM+="../../../MZB/cmttofd.1024.bin "
#ROM1K_MROM+="../../../MZB/COLONY.1024.bin "
ROM1K_MROM+="../../../MZB/COMPILER_A2.1024.bin "
ROM1K_MROM+="../../../MZB/CONVERTER.1024.bin "
#ROM1K_MROM+="../../../MZB/CONVERTER_A_700.1024.bin "
ROM1K_MROM+="../../../MZB/COPIER.1024.bin "
ROM1K_MROM+="../../../MZB/DCS_MZ80A_APPEND.1024.bin "
ROM1K_MROM+="../../../MZB/DCS_MZ80A_RENUM.1024.bin "
#ROM1K_MROM+="../../../MZB/diamond.1024.bin "
#ROM1K_MROM+="../../../MZB/DISASM_8800.A15.1024.bin "
ROM1K_MROM+="../../../MZB/DISASM_B800.A15.1024.bin "
#ROM1K_MROM+="../../../MZB/DISKEDIT.A4B.1024.bin "
ROM1K_MROM+="../../../MZB/DISKEDIT.A7_40T.1024.bin "
ROM1K_MROM+="../../../MZB/diskutility.1024.bin "
ROM1K_MROM+="../../../MZB/EXPRESS_BAS_700.1024.bin "
ROM1K_MROM+="../../../MZB/EXPRESS_COMPILER.1024.bin "
ROM1K_MROM+="../../../MZB/EXPRESS_PLUS.1024.bin "
#ROM1K_MROM+="../../../MZB/Filing(CMT).1024.bin "
#ROM1K_MROM+="../../../MZB/FRONT_PANEL_v1.5.1024.bin "
#ROM1K_MROM+="../../../MZB/GALAXI_FORM.1024.bin "
#ROM1K_MROM+="../../../MZB/GALAXY_INVADERS.1024.bin "
#ROM1K_MROM+="../../../MZB/Greedy_Gremlins.1024.bin "
ROM1K_MROM+="../../../MZB/HU-BASIC.A1_M.1024.bin "
#ROM1K_MROM+="../../../MZB/HU-BASIC.A1_S.1024.bin "
#ROM1K_MROM+="../../../MZB/HU-BASIC.A2_80M.1024.bin "
#ROM1K_MROM+="../../../MZB/HU-BASIC.A2_80S.1024.bin "
ROM1K_MROM+="../../../MZB/HUCALC_80A+_C2.1024.bin "
#ROM1K_MROM+="../../../MZB/HUCALC_80A+_M.1024.bin "
#ROM1K_MROM+="../../../MZB/HUCALC_80A+_S.1024.bin "
#ROM1K_MROM+="../../../MZB/INSTRUCS_v1.1.1024.bin "
#ROM1K_MROM+="../../../MZB/JIGSAW.1024.bin "
#ROM1K_MROM+="../../../MZB/Le_Mans.1024.bin "
ROM1K_MROM+="../../../MZB/loader.1024.bin "
#ROM1K_MROM+="../../../MZB/MAGIC_PAINTBOX.1024.bin "
#ROM1K_MROM+="../../../MZB/m_c_Breakout_2.1024.bin "
#ROM1K_MROM+="../../../MZB/m_c_Hissing_Sid.1024.bin "
#ROM1K_MROM+="../../../MZB/m_c_Race_Chase.1024.bin "
#ROM1K_MROM+="../../../MZB/MEMORY_TEST.1024.bin "
ROM1K_MROM+="../../../MZB/MINI_DATACARD..1024.bin "
#ROM1K_MROM+="../../../MZB/minotaur.1024.bin "
#ROM1K_MROM+="../../../MZB/MZ-80A_GALACTIC.1024.bin "
#ROM1K_MROM+="../../../MZB/NEW_INVADERS.1024.bin "
#ROM1K_MROM+="../../../MZB/OTHELLO.1024.bin "
#ROM1K_MROM+="../../../MZB/PAINTBOX.BAS.1024.bin "
ROM1K_MROM+="../../../MZB/PROBE_A_1200.1024.bin "
#ROM1K_MROM+="../../../MZB/PROBE_A_8000.1024.bin "
#ROM1K_MROM+="../../../MZB/PROBE_A_B600.1024.bin "
ROM1K_MROM+="../../../MZB/RAM_CHECK_A.1024.bin "
ROM1K_MROM+="../../../MZB/sa-5510_Bas_MZ80K.1024.bin "
ROM1K_MROM+="../../../MZB/SA-5510_Compiler.1024.bin "
ROM1K_MROM+="../../../MZB/SA-5510+KN.COMM..1024.bin "
ROM1K_MROM+="../../../MZB/sa-6510.1024.bin "
#ROM1K_MROM+="../../../MZB/SARGON_2.71.1024.bin "
#ROM1K_MROM+="../../../MZB/SCRAMBLE_A.1024.bin "
ROM1K_MROM+="../../../MZB/SECTOR_R_W.1024.bin "
#ROM1K_MROM+="../../../MZB/SECTOR_R_W(NEC).1024.bin "
ROM1K_MROM+="../../../MZB/SHARPLAN01.1024.bin "
#ROM1K_MROM+="../../../MZB/SHARP_PENCIL.A1.1024.bin "
#ROM1K_MROM+="../../../MZB/SHARP_PENCIL.ALF.1024.bin "
#ROM1K_MROM+="../../../MZB/SLAVE_v1.1A.1024.bin "
#ROM1K_MROM+="../../../MZB/SNOWFLAKES.1024.bin "
ROM1K_MROM+="../../../MZB/SP-4015.A1_C.1024.bin "
#ROM1K_MROM+="../../../MZB/SP-4015.A1_S.1024.bin "
ROM1K_MROM+="../../../MZB/SP-5060.A1_M.1024.bin "
#ROM1K_MROM+="../../../MZB/SP-5060.A1_S.1024.bin "
#ROM1K_MROM+="../../../MZB/SPACE_INVADERS.1024.bin "
#ROM1K_MROM+="../../../MZB/SP-CONVERT.A1.1024.bin "
#ROM1K_MROM+="../../../MZB/STKEEPER2BAS700A.1024.bin "
ROM1K_MROM+="../../../MZB/SUCOPY_A000.A16.1024.bin "
#ROM1K_MROM+="../../../MZB/SUPERFIRE.1024.bin "
#ROM1K_MROM+="../../../MZB/SUPERTAPE_2.1024.bin "
ROM1K_MROM+="../../../MZB/TEXT_BASIC_I.1024.bin "
ROM1K_MROM+="../../../MZB/TEXT~ED_v1.2.1024.bin "
ROM1K_MROM+="../../../MZB/textsobs5.1024.bin "
#ROM1K_MROM+="../../../MZB/ufo.1024.bin "
ROM1K_MROM+="../../../MZB/Utility_2.1024.bin "
#ROM1K_MROM+="../../../MZB/Utility_V_1.1.1024.bin "
#ROM1K_MROM+="../../../MZB/Utility_V_2.0.1024.bin "
ROM1K_MROM+="../../../MZB/WDPRO_2.37AT.1024.bin "
#ROM1K_MROM+="../../../MZB/WDPRO_2.37AT_C2.1024.bin "
ROM1K_MROM+="../../../MZB/XPATCH_5510_v2.2.1024.bin "
ROM1K_MROM+="../../../MZB/Z80_MACHINE.A1_M.1024.bin "
#ROM1K_MROM+="../../../MZB/Z80_MACHINE.A1_S.1024.bin "
#ROM1K_MROM+="../../../MZB/Z80_MACHINE.A2_M.1024.bin "
#ROM1K_MROM+="../../../MZB/Z80MACHINE.A3_C2.1024.bin "
#ROM1K_MROM+="../../../MZB/Z80_MACHINE.A3_S.1024.bin "
#ROM1K_MROM+="../../../MZB/ZEN7E.A2.1024.bin "
cat monitor_SA1510.rom monitor_80c_SA1510.rom monitor_SA1510.rom rfs_mrom.rom $ROM1K_MROM > MROM_1K.bin
ROM1K_USER=
#ROM1K_USER+="../../../MZB/80A_PENCIL.A2_C2.1024.bin "
#ROM1K_USER+="../../../MZB/80A_PENCIL.A2_S.1024.bin "
ROM1K_USER+="../../../MZB/APOLLO_CHESS_v2a.1024.bin "
#ROM1K_USER+="../../../MZB/B880.A3_P6.1024.bin "
ROM1K_USER+="../../../MZB/B880_MASTER.1024.bin "
ROM1K_USER+="../../../MZB/BASIC.SA-5510.1024.bin "
#ROM1K_USER+="../../../MZB/BASIC_SA-5575_C.1024.bin "
#ROM1K_USER+="../../../MZB/BASIC_SA-5575_S.1024.bin "
#ROM1K_USER+="../../../MZB/BASIC_SA-5577_C.1024.bin "
#ROM1K_USER+="../../../MZB/BASIC_SA-5577_S.1024.bin "
#ROM1K_USER+="../../../MZB/BASIC_SA-5580.1024.bin "
ROM1K_USER+="../../../MZB/BAS_MOD_v3.74.1024.bin "
ROM1K_USER+="../../../MZB/BINARY_COUNT.1024.bin "
#ROM1K_USER+="../../../MZB/BYTESAVER_SA5510.1024.bin "
#ROM1K_USER+="../../../MZB/CLUB_COPY.U1.1024.bin "
#ROM1K_USER+="../../../MZB/CLUB_MON.A1_M.1024.bin "
#ROM1K_USER+="../../../MZB/CLUB_MON.A1_S.1024.bin "
ROM1K_USER+="../../../MZB/cmttofd.1024.bin "
ROM1K_USER+="../../../MZB/COLONY.1024.bin "
ROM1K_USER+="../../../MZB/COMPILER_A2.1024.bin "
ROM1K_USER+="../../../MZB/CONVERTER.1024.bin "
#ROM1K_USER+="../../../MZB/CONVERTER_A_700.1024.bin "
ROM1K_USER+="../../../MZB/COPIER.1024.bin "
#ROM1K_USER+="../../../MZB/DCS_MZ80A_APPEND.1024.bin "
#ROM1K_USER+="../../../MZB/DCS_MZ80A_RENUM.1024.bin "
ROM1K_USER+="../../../MZB/diamond.1024.bin "
#ROM1K_USER+="../../../MZB/DISASM_8800.A15.1024.bin "
ROM1K_USER+="../../../MZB/DISASM_B800.A15.1024.bin "
#ROM1K_USER+="../../../MZB/DISKEDIT.A4B.1024.bin "
ROM1K_USER+="../../../MZB/DISKEDIT.A7_40T.1024.bin "
ROM1K_USER+="../../../MZB/diskutility.1024.bin "
#ROM1K_USER+="../../../MZB/EXPRESS_BAS_700.1024.bin "
#ROM1K_USER+="../../../MZB/EXPRESS_COMPILER.1024.bin "
#ROM1K_USER+="../../../MZB/EXPRESS_PLUS.1024.bin "
#ROM1K_USER+="../../../MZB/Filing(CMT).1024.bin "
#ROM1K_USER+="../../../MZB/FRONT_PANEL_v1.5.1024.bin "
#ROM1K_USER+="../../../MZB/GALAXI_FORM.1024.bin "
ROM1K_USER+="../../../MZB/GALAXY_INVADERS.1024.bin "
ROM1K_USER+="../../../MZB/Greedy_Gremlins.1024.bin "
#ROM1K_USER+="../../../MZB/HU-BASIC.A1_M.1024.bin "
#ROM1K_USER+="../../../MZB/HU-BASIC.A1_S.1024.bin "
#ROM1K_USER+="../../../MZB/HU-BASIC.A2_80M.1024.bin "
#ROM1K_USER+="../../../MZB/HU-BASIC.A2_80S.1024.bin "
#ROM1K_USER+="../../../MZB/HUCALC_80A+_C2.1024.bin "
#ROM1K_USER+="../../../MZB/HUCALC_80A+_M.1024.bin "
#ROM1K_USER+="../../../MZB/HUCALC_80A+_S.1024.bin "
#ROM1K_USER+="../../../MZB/INSTRUCS_v1.1.1024.bin "
ROM1K_USER+="../../../MZB/JIGSAW.1024.bin "
ROM1K_USER+="../../../MZB/Le_Mans.1024.bin "
ROM1K_USER+="../../../MZB/loader.1024.bin "
ROM1K_USER+="../../../MZB/MAGIC_PAINTBOX.1024.bin "
ROM1K_USER+="../../../MZB/m_c_Breakout_2.1024.bin "
ROM1K_USER+="../../../MZB/m_c_Hissing_Sid.1024.bin "
ROM1K_USER+="../../../MZB/m_c_Race_Chase.1024.bin "
ROM1K_USER+="../../../MZB/MEMORY_TEST.1024.bin "
ROM1K_USER+="../../../MZB/MINI_DATACARD..1024.bin "
ROM1K_USER+="../../../MZB/minotaur.1024.bin "
ROM1K_USER+="../../../MZB/MZ-80A_GALACTIC.1024.bin "
ROM1K_USER+="../../../MZB/NEW_INVADERS.1024.bin "
ROM1K_USER+="../../../MZB/OTHELLO.1024.bin "
ROM1K_USER+="../../../MZB/PAINTBOX.BAS.1024.bin "
#ROM1K_USER+="../../../MZB/PROBE_A_1200.1024.bin "
#ROM1K_USER+="../../../MZB/PROBE_A_8000.1024.bin "
#ROM1K_USER+="../../../MZB/PROBE_A_B600.1024.bin "
#ROM1K_USER+="../../../MZB/RAM_CHECK_A.1024.bin "
#ROM1K_USER+="../../../MZB/sa-5510_Bas_MZ80K.1024.bin "
#ROM1K_USER+="../../../MZB/SA-5510_Compiler.1024.bin "
#ROM1K_USER+="../../../MZB/SA-5510+KN.COMM..1024.bin "
#ROM1K_USER+="../../../MZB/sa-6510.1024.bin "
ROM1K_USER+="../../../MZB/SARGON_2.71.1024.bin "
ROM1K_USER+="../../../MZB/SCRAMBLE_A.1024.bin "
ROM1K_USER+="../../../MZB/SECTOR_R_W.1024.bin "
#ROM1K_USER+="../../../MZB/SECTOR_R_W(NEC).1024.bin "
ROM1K_USER+="../../../MZB/SHARPLAN01.1024.bin "
#ROM1K_USER+="../../../MZB/SHARP_PENCIL.A1.1024.bin "
#ROM1K_USER+="../../../MZB/SHARP_PENCIL.ALF.1024.bin "
ROM1K_USER+="../../../MZB/SLAVE_v1.1A.1024.bin "
ROM1K_USER+="../../../MZB/SNOWFLAKES.1024.bin "
#ROM1K_USER+="../../../MZB/SP-4015.A1_C.1024.bin "
#ROM1K_USER+="../../../MZB/SP-4015.A1_S.1024.bin "
#ROM1K_USER+="../../../MZB/SP-5060.A1_M.1024.bin "
#ROM1K_USER+="../../../MZB/SP-5060.A1_S.1024.bin "
ROM1K_USER+="../../../MZB/SPACE_INVADERS.1024.bin "
ROM1K_USER+="../../../MZB/SP-CONVERT.A1.1024.bin "
#ROM1K_USER+="../../../MZB/STKEEPER2BAS700A.1024.bin "
ROM1K_USER+="../../../MZB/SUCOPY_A000.A16.1024.bin "
ROM1K_USER+="../../../MZB/SUPERFIRE.1024.bin "
ROM1K_USER+="../../../MZB/SUPERTAPE_2.1024.bin "
ROM1K_USER+="../../../MZB/TEXT_BASIC_I.1024.bin "
ROM1K_USER+="../../../MZB/TEXT~ED_v1.2.1024.bin "
ROM1K_USER+="../../../MZB/textsobs5.1024.bin "
ROM1K_USER+="../../../MZB/ufo.1024.bin "
ROM1K_USER+="../../../MZB/Utility_2.1024.bin "
#ROM1K_USER+="../../../MZB/Utility_V_1.1.1024.bin "
#ROM1K_USER+="../../../MZB/Utility_V_2.0.1024.bin "
#ROM1K_USER+="../../../MZB/WDPRO_2.37AT.1024.bin "
ROM1K_USER+="../../../MZB/WDPRO_2.37AT_C2.1024.bin "
ROM1K_USER+="../../../MZB/XPATCH_5510_v2.2.1024.bin "
ROM1K_USER+="../../../MZB/Z80_MACHINE.A1_M.1024.bin "
#ROM1K_USER+="../../../MZB/Z80_MACHINE.A1_S.1024.bin "
#ROM1K_USER+="../../../MZB/Z80_MACHINE.A2_M.1024.bin "
#ROM1K_USER+="../../../MZB/Z80MACHINE.A3_C2.1024.bin "
#ROM1K_USER+="../../../MZB/Z80_MACHINE.A3_S.1024.bin "
ROM1K_USER+="../../../MZB/ZEN7E.A2.1024.bin "
cat rfs.rom $ROM1K_USER > USER_ROM_1K.bin
ROM2K=
#ROM2K+="../../../MZB/80A_PENCIL.A2_C2.2048.bin "
#ROM2K+="../../../MZB/80A_PENCIL.A2_S.2048.bin "
ROM2K+="../../../MZB/APOLLO_CHESS_v2a.2048.bin "
#ROM2K+="../../../MZB/B880.A3_P6.2048.bin "
ROM2K+="../../../MZB/B880_MASTER.2048.bin "
ROM2K+="../../../MZB/BASIC.SA-5510.2048.bin "
#ROM2K+="../../../MZB/BASIC_SA-5575_C.2048.bin "
#ROM2K+="../../../MZB/BASIC_SA-5575_S.2048.bin "
#ROM2K+="../../../MZB/BASIC_SA-5577_C.2048.bin "
#ROM2K+="../../../MZB/BASIC_SA-5577_S.2048.bin "
#ROM2K+="../../../MZB/BASIC_SA-5580.2048.bin "
ROM2K+="../../../MZB/BAS_MOD_v3.74.2048.bin "
ROM2K+="../../../MZB/BINARY_COUNT.2048.bin "
#ROM2K+="../../../MZB/BYTESAVER_SA5510.2048.bin "
#ROM2K+="../../../MZB/CLUB_COPY.U1.2048.bin "
#ROM2K+="../../../MZB/CLUB_MON.A1_M.2048.bin "
#ROM2K+="../../../MZB/CLUB_MON.A1_S.2048.bin "
ROM2K+="../../../MZB/cmttofd.2048.bin "
ROM2K+="../../../MZB/COLONY.2048.bin "
ROM2K+="../../../MZB/COMPILER_A2.2048.bin "
ROM2K+="../../../MZB/CONVERTER.2048.bin "
#ROM2K+="../../../MZB/CONVERTER_A_700.2048.bin "
ROM2K+="../../../MZB/COPIER.2048.bin "
#ROM2K+="../../../MZB/DCS_MZ80A_APPEND.2048.bin "
#ROM2K+="../../../MZB/DCS_MZ80A_RENUM.2048.bin "
ROM2K+="../../../MZB/diamond.2048.bin "
#ROM2K+="../../../MZB/DISASM_8800.A15.2048.bin "
ROM2K+="../../../MZB/DISASM_B800.A15.2048.bin "
#ROM2K+="../../../MZB/DISKEDIT.A4B.2048.bin "
ROM2K+="../../../MZB/DISKEDIT.A7_40T.2048.bin "
ROM2K+="../../../MZB/diskutility.2048.bin "
#ROM2K+="../../../MZB/EXPRESS_BAS_700.2048.bin "
#ROM2K+="../../../MZB/EXPRESS_COMPILER.2048.bin "
#ROM2K+="../../../MZB/EXPRESS_PLUS.2048.bin "
#ROM2K+="../../../MZB/Filing(CMT).2048.bin "
#ROM2K+="../../../MZB/FRONT_PANEL_v1.5.2048.bin "
#ROM2K+="../../../MZB/GALAXI_FORM.2048.bin "
ROM2K+="../../../MZB/GALAXY_INVADERS.2048.bin "
ROM2K+="../../../MZB/Greedy_Gremlins.2048.bin "
#ROM2K+="../../../MZB/HU-BASIC.A1_M.2048.bin "
#ROM2K+="../../../MZB/HU-BASIC.A1_S.2048.bin "
#ROM2K+="../../../MZB/HU-BASIC.A2_80M.2048.bin "
#ROM2K+="../../../MZB/HU-BASIC.A2_80S.2048.bin "
#ROM2K+="../../../MZB/HUCALC_80A+_C2.2048.bin "
#ROM2K+="../../../MZB/HUCALC_80A+_M.2048.bin "
#ROM2K+="../../../MZB/HUCALC_80A+_S.2048.bin "
#ROM2K+="../../../MZB/INSTRUCS_v1.1.2048.bin "
ROM2K+="../../../MZB/JIGSAW.2048.bin "
ROM2K+="../../../MZB/Le_Mans.2048.bin "
ROM2K+="../../../MZB/loader.2048.bin "
ROM2K+="../../../MZB/MAGIC_PAINTBOX.2048.bin "
ROM2K+="../../../MZB/m_c_Breakout_2.2048.bin "
ROM2K+="../../../MZB/m_c_Hissing_Sid.2048.bin "
ROM2K+="../../../MZB/m_c_Race_Chase.2048.bin "
ROM2K+="../../../MZB/MEMORY_TEST.2048.bin "
ROM2K+="../../../MZB/MINI_DATACARD..2048.bin "
ROM2K+="../../../MZB/minotaur.2048.bin "
ROM2K+="../../../MZB/MZ-80A_GALACTIC.2048.bin "
ROM2K+="../../../MZB/NEW_INVADERS.2048.bin "
ROM2K+="../../../MZB/OTHELLO.2048.bin "
ROM2K+="../../../MZB/PAINTBOX.BAS.2048.bin "
#ROM2K+="../../../MZB/PROBE_A_1200.2048.bin "
#ROM2K+="../../../MZB/PROBE_A_8000.2048.bin "
#ROM2K+="../../../MZB/PROBE_A_B600.2048.bin "
#ROM2K+="../../../MZB/RAM_CHECK_A.2048.bin "
#ROM2K+="../../../MZB/sa-5510_Bas_MZ80K.2048.bin "
#ROM2K+="../../../MZB/SA-5510_Compiler.2048.bin "
#ROM2K+="../../../MZB/SA-5510+KN.COMM..2048.bin "
#ROM2K+="../../../MZB/sa-6510.2048.bin "
ROM2K+="../../../MZB/SARGON_2.71.2048.bin "
ROM2K+="../../../MZB/SCRAMBLE_A.2048.bin "
ROM2K+="../../../MZB/SECTOR_R_W.2048.bin "
#ROM2K+="../../../MZB/SECTOR_R_W(NEC).2048.bin "
ROM2K+="../../../MZB/SHARPLAN01.2048.bin "
#ROM2K+="../../../MZB/SHARP_PENCIL.A1.2048.bin "
#ROM2K+="../../../MZB/SHARP_PENCIL.ALF.2048.bin "
ROM2K+="../../../MZB/SLAVE_v1.1A.2048.bin "
ROM2K+="../../../MZB/SNOWFLAKES.2048.bin "
#ROM2K+="../../../MZB/SP-4015.A1_C.2048.bin "
#ROM2K+="../../../MZB/SP-4015.A1_S.2048.bin "
#ROM2K+="../../../MZB/SP-5060.A1_M.2048.bin "
#ROM2K+="../../../MZB/SP-5060.A1_S.2048.bin "
ROM2K+="../../../MZB/SPACE_INVADERS.2048.bin "
ROM2K+="../../../MZB/SP-CONVERT.A1.2048.bin "
#ROM2K+="../../../MZB/STKEEPER2BAS700A.2048.bin "
ROM2K+="../../../MZB/SUCOPY_A000.A16.2048.bin "
ROM2K+="../../../MZB/SUPERFIRE.2048.bin "
ROM2K+="../../../MZB/SUPERTAPE_2.2048.bin "
ROM2K+="../../../MZB/TEXT_BASIC_I.2048.bin "
ROM2K+="../../../MZB/TEXT~ED_v1.2.2048.bin "
ROM2K+="../../../MZB/textsobs5.2048.bin "
ROM2K+="../../../MZB/ufo.2048.bin "
ROM2K+="../../../MZB/Utility_2.2048.bin "
#ROM2K+="../../../MZB/Utility_V_1.1.2048.bin "
#ROM2K+="../../../MZB/Utility_V_2.0.2048.bin "
#ROM2K+="../../../MZB/WDPRO_2.37AT.2048.bin "
ROM2K+="../../../MZB/WDPRO_2.37AT_C2.2048.bin "
ROM2K+="../../../MZB/XPATCH_5510_v2.2.2048.bin "
ROM2K+="../../../MZB/Z80_MACHINE.A1_M.2048.bin "
#ROM2K+="../../../MZB/Z80_MACHINE.A1_S.2048.bin "
#ROM2K+="../../../MZB/Z80_MACHINE.A2_M.2048.bin "
#ROM2K+="../../../MZB/Z80MACHINE.A3_C2.2048.bin "
#ROM2K+="../../../MZB/Z80_MACHINE.A3_S.2048.bin "
ROM2K+="../../../MZB/ZEN7E.A2.2048.bin "
cat rfs.rom $ROM2K > USER_ROM_2K.bin
ROM4K=
#ROM4K+="../../../MZB/80A_PENCIL.A2_C2.4096.bin "
#ROM4K+="../../../MZB/80A_PENCIL.A2_S.4096.bin "
#ROM4K+="../../../MZB/APOLLO_CHESS_v2a.4096.bin "
#ROM4K+="../../../MZB/B880.A3_P6.4096.bin "
ROM4K+="../../../MZB/B880_MASTER.4096.bin "
#ROM4K+="../../../MZB/BASIC.SA-5510.4096.bin "
ROM4K+="../../../MZB/BASIC_SA-5575_C.4096.bin "
#ROM4K+="../../../MZB/BASIC_SA-5575_S.4096.bin "
ROM4K+="../../../MZB/BASIC_SA-5577_C.4096.bin "
#ROM4K+="../../../MZB/BASIC_SA-5577_S.4096.bin "
ROM4K+="../../../MZB/BASIC_SA-5580.4096.bin "
ROM4K+="../../../MZB/BAS_MOD_v3.74.4096.bin "
#ROM4K+="../../../MZB/BINARY_COUNT.4096.bin "
ROM4K+="../../../MZB/BYTESAVER_SA5510.4096.bin "
ROM4K+="../../../MZB/CLUB_COPY.U1.4096.bin "
#ROM4K+="../../../MZB/CLUB_MON.A1_M.4096.bin "
ROM4K+="../../../MZB/CLUB_MON.A1_S.4096.bin "
#ROM4K+="../../../MZB/cmttofd.4096.bin "
#ROM4K+="../../../MZB/COLONY.4096.bin "
ROM4K+="../../../MZB/COMPILER_A2.4096.bin "
ROM4K+="../../../MZB/CONVERTER.4096.bin "
#ROM4K+="../../../MZB/CONVERTER_A_700.4096.bin "
ROM4K+="../../../MZB/COPIER.4096.bin "
ROM4K+="../../../MZB/DCS_MZ80A_APPEND.4096.bin "
ROM4K+="../../../MZB/DCS_MZ80A_RENUM.4096.bin "
#ROM4K+="../../../MZB/diamond.4096.bin "
#ROM4K+="../../../MZB/DISASM_8800.A15.4096.bin "
ROM4K+="../../../MZB/DISASM_B800.A15.4096.bin "
#ROM4K+="../../../MZB/DISKEDIT.A4B.4096.bin "
ROM4K+="../../../MZB/DISKEDIT.A7_40T.4096.bin "
ROM4K+="../../../MZB/diskutility.4096.bin "
ROM4K+="../../../MZB/EXPRESS_BAS_700.4096.bin "
ROM4K+="../../../MZB/EXPRESS_COMPILER.4096.bin "
ROM4K+="../../../MZB/EXPRESS_PLUS.4096.bin "
#ROM4K+="../../../MZB/Filing(CMT).4096.bin "
#ROM4K+="../../../MZB/FRONT_PANEL_v1.5.4096.bin "
#ROM4K+="../../../MZB/GALAXI_FORM.4096.bin "
#ROM4K+="../../../MZB/GALAXY_INVADERS.4096.bin "
#ROM4K+="../../../MZB/Greedy_Gremlins.4096.bin "
ROM4K+="../../../MZB/HU-BASIC.A1_M.4096.bin "
#ROM4K+="../../../MZB/HU-BASIC.A1_S.4096.bin "
#ROM4K+="../../../MZB/HU-BASIC.A2_80M.4096.bin "
#ROM4K+="../../../MZB/HU-BASIC.A2_80S.4096.bin "
ROM4K+="../../../MZB/HUCALC_80A+_C2.4096.bin "
#ROM4K+="../../../MZB/HUCALC_80A+_M.4096.bin "
#ROM4K+="../../../MZB/HUCALC_80A+_S.4096.bin "
#ROM4K+="../../../MZB/INSTRUCS_v1.1.4096.bin "
#ROM4K+="../../../MZB/JIGSAW.4096.bin "
#ROM4K+="../../../MZB/Le_Mans.4096.bin "
ROM4K+="../../../MZB/loader.4096.bin "
#ROM4K+="../../../MZB/MAGIC_PAINTBOX.4096.bin "
#ROM4K+="../../../MZB/m_c_Breakout_2.4096.bin "
#ROM4K+="../../../MZB/m_c_Hissing_Sid.4096.bin "
#ROM4K+="../../../MZB/m_c_Race_Chase.4096.bin "
#ROM4K+="../../../MZB/MEMORY_TEST.4096.bin "
ROM4K+="../../../MZB/MINI_DATACARD..4096.bin "
#ROM4K+="../../../MZB/minotaur.4096.bin "
#ROM4K+="../../../MZB/MZ-80A_GALACTIC.4096.bin "
#ROM4K+="../../../MZB/NEW_INVADERS.4096.bin "
#ROM4K+="../../../MZB/OTHELLO.4096.bin "
#ROM4K+="../../../MZB/PAINTBOX.BAS.4096.bin "
ROM4K+="../../../MZB/PROBE_A_1200.4096.bin "
#ROM4K+="../../../MZB/PROBE_A_8000.4096.bin "
#ROM4K+="../../../MZB/PROBE_A_B600.4096.bin "
ROM4K+="../../../MZB/RAM_CHECK_A.4096.bin "
ROM4K+="../../../MZB/sa-5510_Bas_MZ80K.4096.bin "
ROM4K+="../../../MZB/SA-5510_Compiler.4096.bin "
ROM4K+="../../../MZB/SA-5510+KN.COMM..4096.bin "
ROM4K+="../../../MZB/sa-6510.4096.bin "
#ROM4K+="../../../MZB/SARGON_2.71.4096.bin "
#ROM4K+="../../../MZB/SCRAMBLE_A.4096.bin "
ROM4K+="../../../MZB/SECTOR_R_W.4096.bin "
#ROM4K+="../../../MZB/SECTOR_R_W(NEC).4096.bin "
ROM4K+="../../../MZB/SHARPLAN01.4096.bin "
#ROM4K+="../../../MZB/SHARP_PENCIL.A1.4096.bin "
#ROM4K+="../../../MZB/SHARP_PENCIL.ALF.4096.bin "
#ROM4K+="../../../MZB/SLAVE_v1.1A.4096.bin "
#ROM4K+="../../../MZB/SNOWFLAKES.4096.bin "
ROM4K+="../../../MZB/SP-4015.A1_C.4096.bin "
#ROM4K+="../../../MZB/SP-4015.A1_S.4096.bin "
ROM4K+="../../../MZB/SP-5060.A1_M.4096.bin "
#ROM4K+="../../../MZB/SP-5060.A1_S.4096.bin "
#ROM4K+="../../../MZB/SPACE_INVADERS.4096.bin "
#ROM4K+="../../../MZB/SP-CONVERT.A1.4096.bin "
#ROM4K+="../../../MZB/STKEEPER2BAS700A.4096.bin "
ROM4K+="../../../MZB/SUCOPY_A000.A16.4096.bin "
#ROM4K+="../../../MZB/SUPERFIRE.4096.bin "
#ROM4K+="../../../MZB/SUPERTAPE_2.4096.bin "
ROM4K+="../../../MZB/TEXT_BASIC_I.4096.bin "
ROM4K+="../../../MZB/TEXT~ED_v1.2.4096.bin "
ROM4K+="../../../MZB/textsobs5.4096.bin "
#ROM4K+="../../../MZB/ufo.4096.bin "
ROM4K+="../../../MZB/Utility_2.4096.bin "
#ROM4K+="../../../MZB/Utility_V_1.1.4096.bin "
#ROM4K+="../../../MZB/Utility_V_2.0.4096.bin "
ROM4K+="../../../MZB/WDPRO_2.37AT.4096.bin "
#ROM4K+="../../../MZB/WDPRO_2.37AT_C2.4096.bin "
ROM4K+="../../../MZB/XPATCH_5510_v2.2.4096.bin "
ROM4K+="../../../MZB/Z80_MACHINE.A1_M.4096.bin "
#ROM4K+="../../../MZB/Z80_MACHINE.A1_S.4096.bin "
#ROM4K+="../../../MZB/Z80_MACHINE.A2_M.4096.bin "
#ROM4K+="../../../MZB/Z80MACHINE.A3_C2.4096.bin "
#ROM4K+="../../../MZB/Z80_MACHINE.A3_S.4096.bin "
#ROM4K+="../../../MZB/ZEN7E.A2.4096.bin "
cat monitor_SA1510.rom monitor_80c_SA1510.rom monitor_SA1510.rom rfs_mrom.rom $ROM4K > MROM_4K.bin

Binary file not shown.

Binary file not shown.

46
software/proc_mzf.sh Executable file
View File

@@ -0,0 +1,46 @@
#!/bin/bash
ls -l *.MZF *.mzf | sed 's/ / /g' | sed 's/ / /g' | sed 's/mzf/MZF/g'| cut -d' ' -f5,9 > /tmp/filelist
IFS=' '; while read -r FSIZE FNAME;
do
for BLOCKSIZE in 2048 4096
do
BASE=`basename $FNAME .MZF`
ROUNDEDSIZE=0
if [ $ROUNDEDSIZE -eq 0 -a $BLOCKSIZE -eq 2048 -a `echo $FSIZE - 2048 | bc` -le 0 ]; then ROUNDEDSIZE=2048; fi
if [ $ROUNDEDSIZE -eq 0 -a `echo $FSIZE - 4096 | bc` -le 0 ]; then ROUNDEDSIZE=4096; fi
if [ $ROUNDEDSIZE -eq 0 -a $BLOCKSIZE -eq 2048 -a `echo $FSIZE - 6144 | bc` -le 0 ]; then ROUNDEDSIZE=6144; fi
if [ $ROUNDEDSIZE -eq 0 -a `echo $FSIZE - 8192 | bc` -le 0 ]; then ROUNDEDSIZE=8192; fi
if [ $ROUNDEDSIZE -eq 0 -a $BLOCKSIZE -eq 2048 -a `echo $FSIZE - 10240 | bc` -le 0 ]; then ROUNDEDSIZE=10240; fi
if [ $ROUNDEDSIZE -eq 0 -a `echo $FSIZE - 12288 | bc` -le 0 ]; then ROUNDEDSIZE=12288; fi
if [ $ROUNDEDSIZE -eq 0 -a $BLOCKSIZE -eq 2048 -a `echo $FSIZE - 14336 | bc` -le 0 ]; then ROUNDEDSIZE=14336; fi
if [ $ROUNDEDSIZE -eq 0 -a `echo $FSIZE - 16384 | bc` -le 0 ]; then ROUNDEDSIZE=16384; fi
if [ $ROUNDEDSIZE -eq 0 -a $BLOCKSIZE -eq 2048 -a `echo $FSIZE - 18432 | bc` -le 0 ]; then ROUNDEDSIZE=18432; fi
if [ $ROUNDEDSIZE -eq 0 -a `echo $FSIZE - 20480 | bc` -le 0 ]; then ROUNDEDSIZE=20480; fi
if [ $ROUNDEDSIZE -eq 0 -a $BLOCKSIZE -eq 2048 -a `echo $FSIZE - 22528 | bc` -le 0 ]; then ROUNDEDSIZE=22528; fi
if [ $ROUNDEDSIZE -eq 0 -a `echo $FSIZE - 24576 | bc` -le 0 ]; then ROUNDEDSIZE=24576; fi
if [ $ROUNDEDSIZE -eq 0 -a $BLOCKSIZE -eq 2048 -a `echo $FSIZE - 26624 | bc` -le 0 ]; then ROUNDEDSIZE=26624; fi
if [ $ROUNDEDSIZE -eq 0 -a `echo $FSIZE - 28672 | bc` -le 0 ]; then ROUNDEDSIZE=28672; fi
if [ $ROUNDEDSIZE -eq 0 -a $BLOCKSIZE -eq 2048 -a `echo $FSIZE - 30720 | bc` -le 0 ]; then ROUNDEDSIZE=30720; fi
if [ $ROUNDEDSIZE -eq 0 -a `echo $FSIZE - 32768 | bc` -le 0 ]; then ROUNDEDSIZE=32768; fi
if [ $ROUNDEDSIZE -eq 0 -a $BLOCKSIZE -eq 2048 -a `echo $FSIZE - 34816 | bc` -le 0 ]; then ROUNDEDSIZE=34816; fi
if [ $ROUNDEDSIZE -eq 0 -a `echo $FSIZE - 36864 | bc` -le 0 ]; then ROUNDEDSIZE=36864; fi
if [ $ROUNDEDSIZE -eq 0 -a $BLOCKSIZE -eq 2048 -a `echo $FSIZE - 38912 | bc` -le 0 ]; then ROUNDEDSIZE=38912; fi
if [ $ROUNDEDSIZE -eq 0 -a `echo $FSIZE - 40960 | bc` -le 0 ]; then ROUNDEDSIZE=40960; fi
if [ $ROUNDEDSIZE -eq 0 -a $BLOCKSIZE -eq 2048 -a `echo $FSIZE - 43008 | bc` -le 0 ]; then ROUNDEDSIZE=43008; fi
if [ $ROUNDEDSIZE -eq 0 -a `echo $FSIZE - 45056 | bc` -le 0 ]; then ROUNDEDSIZE=45056; fi
if [ $ROUNDEDSIZE -eq 0 -a $BLOCKSIZE -eq 2048 -a `echo $FSIZE - 47104 | bc` -le 0 ]; then ROUNDEDSIZE=47104; fi
if [ $ROUNDEDSIZE -eq 0 -a `echo $FSIZE - 49152 | bc` -le 0 ]; then ROUNDEDSIZE=49152; fi
if [ $ROUNDEDSIZE -eq 0 ];
then
echo "File:$FNAME is of uncatered size:$FSIZE"
exit 1
fi
echo $BASE $FNAME $ROUNDEDSIZE
dd if=/dev/zero ibs=1 count=$ROUNDEDSIZE | tr "\000" "\377" > $BASE.$BLOCKSIZE.bin
dd if=$FNAME of=$BASE.$BLOCKSIZE.bin conv=notrunc
done
done </tmp/filelist

BIN
software/roms/MROM_1K.bin Normal file

Binary file not shown.

BIN
software/roms/MROM_256.bin Normal file

Binary file not shown.

BIN
software/roms/MROM_4K.bin Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

1
software/roms/make_roms.sh Symbolic link
View File

@@ -0,0 +1 @@
../make_roms.sh

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
software/roms/rfs.rom Normal file

Binary file not shown.

BIN
software/roms/rfs_mrom.rom Normal file

Binary file not shown.