diff --git a/asm/cbios.asm b/asm/cbios.asm index 053b622..ff098e8 100644 --- a/asm/cbios.asm +++ b/asm/cbios.asm @@ -719,7 +719,7 @@ KTBLC: ; CTRL ON ; ; Keyboard routine for the MZ-700 hardware. ; - IF BUILD_MZ700 = 1 + IF BUILD_MZ700+BUILD_MZ1500 > 0 ; ; KEY BOARD SWEEP ; EXIT B,D7=0 NO DATA diff --git a/asm/cbiosII.asm b/asm/cbiosII.asm index 2a81488..b52b812 100644 --- a/asm/cbiosII.asm +++ b/asm/cbiosII.asm @@ -1437,6 +1437,10 @@ TIMESET: LD (TIMESEC),HL ; Load LD (HL),09CH ; Place divisor in Counter 1, = 156, thus 15611/156 = 100 LD (HL),000H ENDIF + IF BUILD_MZ1500 = 1 + LD (HL),09CH ; Place divisor in Counter 1, = 156, thus 15611/156 = 100 + LD (HL),000H + ENDIF NOP NOP NOP diff --git a/asm/include/cpm_buildversion.asm b/asm/include/cpm_buildversion.asm index c28c4fb..5ccc6a1 100644 --- a/asm/include/cpm_buildversion.asm +++ b/asm/include/cpm_buildversion.asm @@ -1 +1 @@ -BUILD_VERSION EQU 3 +BUILD_VERSION EQU 4 diff --git a/asm/include/cpm_definitions.asm b/asm/include/cpm_definitions.asm index 5f39302..2116554 100644 --- a/asm/include/cpm_definitions.asm +++ b/asm/include/cpm_definitions.asm @@ -40,6 +40,7 @@ BUILD_VIDEOMODULE EQU 1 ; Build for the Video Module v2 board (=1) otherwise build for the 80Char Colour Board v1.0 BUILD_MZ80A EQU 0 ; Build for the Sharp MZ-80A base hardware. BUILD_MZ700 EQU 1 ; Build for the Sharp MZ-700 base hardware. +BUILD_MZ1500 EQU 0 ; Build for the Sharp MZ-1500 base hardware. BUILD_80C EQU 1 ; Build for an 80 column (Video Module or 40/80 Colour Card) equipped machine, 0 = standard 40 column. ENDIF ; CPM for MZ-80A with with Video Module (if not present expects 40/80 Colour Board) and 80 Columns display. @@ -47,6 +48,7 @@ BUILD_80C EQU 1 ; Build BUILD_VIDEOMODULE EQU 1 ; Build for the Video Module v2 board (=1) otherwise build for the 80Char Colour Board v1.0 BUILD_MZ80A EQU 1 ; Build for the Sharp MZ-80A base hardware. BUILD_MZ700 EQU 0 ; Build for the Sharp MZ-700 base hardware. +BUILD_MZ1500 EQU 0 ; Build for the Sharp MZ-1500 base hardware. BUILD_80C EQU 1 ; Build for an 80 column (Video Module or 40/80 Colour Card) equipped machine, 0 = standard 40 column. ENDIF ; CPM for MZ-80A with with standard 40 column display. @@ -54,6 +56,7 @@ BUILD_80C EQU 1 ; Build BUILD_VIDEOMODULE EQU 0 ; Build for the Video Module v2 board (=1) otherwise build for the 80Char Colour Board v1.0 BUILD_MZ80A EQU 1 ; Build for the Sharp MZ-80A base hardware. BUILD_MZ700 EQU 0 ; Build for the Sharp MZ-700 base hardware. +BUILD_MZ1500 EQU 0 ; Build for the Sharp MZ-1500 base hardware. BUILD_80C EQU 0 ; Build for an 80 column (Video Module or 40/80 Colour Card) equipped machine, 0 = standard 40 column. ENDIF ; CPM for MZ-700 with with standard 40 column display. @@ -61,6 +64,15 @@ BUILD_80C EQU 0 ; Build BUILD_VIDEOMODULE EQU 0 ; Build for the Video Module v2 board (=1) otherwise build for the 80Char Colour Board v1.0 BUILD_MZ80A EQU 0 ; Build for the Sharp MZ-80A base hardware. BUILD_MZ700 EQU 1 ; Build for the Sharp MZ-700 base hardware. +BUILD_MZ1500 EQU 0 ; Build for the Sharp MZ-1500 base hardware. +BUILD_80C EQU 0 ; Build for an 80 column (Video Module or 40/80 Colour Card) equipped machine, 0 = standard 40 column. + ENDIF + ; CPM for MZ-1500 with with standard 40 column display. + IF BUILD_VERSION = 4 +BUILD_VIDEOMODULE EQU 0 ; Build for the Video Module v2 board (=1) otherwise build for the 80Char Colour Board v1.0 +BUILD_MZ80A EQU 0 ; Build for the Sharp MZ-80A base hardware. +BUILD_MZ700 EQU 0 ; Build for the Sharp MZ-700 base hardware. +BUILD_MZ1500 EQU 1 ; Build for the Sharp MZ-1500 base hardware. BUILD_80C EQU 0 ; Build for an 80 column (Video Module or 40/80 Colour Card) equipped machine, 0 = standard 40 column. ENDIF diff --git a/asm/include/msbasic_definitions.asm b/asm/include/msbasic_definitions.asm index 26bc924..006ffc7 100644 --- a/asm/include/msbasic_definitions.asm +++ b/asm/include/msbasic_definitions.asm @@ -48,8 +48,10 @@ IF BUILD_VERSION = 0 BUILD_MZ80A EQU 1 ; Build for the standard Sharp MZ80A, no lower memory. Manually change MAXMEM above. BUILD_MZ700 EQU 0 ; Build for the Sharp MZ-700 base hardware. +BUILD_MZ1500 EQU 0 ; Build for the Sharp MZ-1500 base hardware. BUILD_MZ80A_TZFS EQU 0 ; Build for TZFS running on an MZ-80A where extended memory is available. BUILD_MZ700_TZFS EQU 0 ; Build for TZFS running on an MZ-700 where extended memory is available. +BUILD_MZ1500_TZFS EQU 0 ; Build for TZFS running on an MZ-1500 where extended memory is available. BUILD_VIDEOMODULE EQU 0 ; Build for the Video Module v2 board (=1) otherwise build for the 80Char Colour Board v1.0 BUILD_80C EQU 0 INCLUDE_ANSITERM EQU 1 ; Include the Ansi terminal emulation processor in the build. @@ -58,8 +60,10 @@ INCLUDE_ANSITERM EQU 1 ; Inclu IF BUILD_VERSION = 1 BUILD_MZ80A EQU 0 BUILD_MZ700 EQU 1 ; Build for the Sharp MZ-700 base hardware. +BUILD_MZ1500 EQU 0 ; Build for the Sharp MZ-1500 base hardware. BUILD_MZ80A_TZFS EQU 0 ; Build for TZFS running on an MZ-80A where extended memory is available. BUILD_MZ700_TZFS EQU 0 ; Build for TZFS running on an MZ-700 where extended memory is available. +BUILD_MZ1500_TZFS EQU 0 ; Build for TZFS running on an MZ-1500 where extended memory is available. BUILD_VIDEOMODULE EQU 0 ; Build for the Video Module v2 board (=1) otherwise build for the 80Char Colour Board v1.0 BUILD_80C EQU 0 INCLUDE_ANSITERM EQU 1 ; Include the Ansi terminal emulation processor in the build. @@ -68,22 +72,51 @@ INCLUDE_ANSITERM EQU 1 ; Inclu IF BUILD_VERSION = 2 BUILD_MZ80A EQU 0 BUILD_MZ700 EQU 0 ; Build for the Sharp MZ-700 base hardware. +BUILD_MZ1500 EQU 0 ; Build for the Sharp MZ-1500 base hardware. BUILD_MZ80A_TZFS EQU 0 ; Build for TZFS running on an MZ-80A where extended memory is available. BUILD_MZ700_TZFS EQU 1 ; Build for TZFS running on an MZ-700 where extended memory is available. +BUILD_MZ1500_TZFS EQU 0 ; Build for TZFS running on an MZ-1500 where extended memory is available. BUILD_VIDEOMODULE EQU 0 ; Build for the Video Module v2 board (=1) otherwise build for the 80Char Colour Board v1.0 BUILD_80C EQU 0 INCLUDE_ANSITERM EQU 1 ; Include the Ansi terminal emulation processor in the build. ENDIF ; TZFS Enhanced MZ-80A/MZ-700 with VideoModule (or 40/80 Colour Board on MZ-80A). IF BUILD_VERSION = 3 -BUILD_MZ700 EQU 0 ; Build for the Sharp MZ-700 base hardware. BUILD_MZ80A EQU 0 +BUILD_MZ700 EQU 0 ; Build for the Sharp MZ-700 base hardware. +BUILD_MZ1500 EQU 0 ; Build for the Sharp MZ-1500 base hardware. BUILD_MZ80A_TZFS EQU 0 ; Build for TZFS running on an MZ-80A where extended memory is available. BUILD_MZ700_TZFS EQU 1 ; Build for TZFS running on an MZ-700 where extended memory is available. +BUILD_MZ1500_TZFS EQU 0 ; Build for TZFS running on an MZ-1500 where extended memory is available. BUILD_VIDEOMODULE EQU 1 ; Build for the Video Module v2 board (=1) otherwise build for the 80Char Colour Board v1.0 BUILD_80C EQU 1 INCLUDE_ANSITERM EQU 1 ; Include the Ansi terminal emulation processor in the build. ENDIF + ; MZ-1500 Standard Machine Configuration. + IF BUILD_VERSION = 4 +BUILD_MZ80A EQU 0 +BUILD_MZ700 EQU 0 ; Build for the Sharp MZ-700 base hardware. +BUILD_MZ1500 EQU 1 ; Build for the Sharp MZ-1500 base hardware. +BUILD_MZ80A_TZFS EQU 0 ; Build for TZFS running on an MZ-80A where extended memory is available. +BUILD_MZ700_TZFS EQU 0 ; Build for TZFS running on an MZ-700 where extended memory is available. +BUILD_MZ1500_TZFS EQU 0 ; Build for TZFS running on an MZ-1500 where extended memory is available. +BUILD_VIDEOMODULE EQU 0 ; Build for the Video Module v2 board (=1) otherwise build for the 80Char Colour Board v1.0 +BUILD_80C EQU 0 +INCLUDE_ANSITERM EQU 1 ; Include the Ansi terminal emulation processor in the build. + ENDIF + ; TZFS Enhanced MZ-1500 with no video card upgrade. + IF BUILD_VERSION = 5 +BUILD_MZ80A EQU 0 +BUILD_MZ700 EQU 0 ; Build for the Sharp MZ-700 base hardware. +BUILD_MZ1500 EQU 0 ; Build for the Sharp MZ-1500 base hardware. +BUILD_MZ80A_TZFS EQU 0 ; Build for TZFS running on an MZ-80A where extended memory is available. +BUILD_MZ700_TZFS EQU 0 ; Build for TZFS running on an MZ-700 where extended memory is available. +BUILD_MZ1500_TZFS EQU 1 ; Build for TZFS running on an MZ-1500 where extended memory is available. +BUILD_VIDEOMODULE EQU 0 ; Build for the Video Module v2 board (=1) otherwise build for the 80Char Colour Board v1.0 +BUILD_80C EQU 0 +INCLUDE_ANSITERM EQU 1 ; Include the Ansi terminal emulation processor in the build. + ENDIF + IF BUILD_80C = 1 COLW: EQU 80 ; Width of the display screen (ie. columns). ELSE diff --git a/asm/include/tzfs_definitions.asm b/asm/include/tzfs_definitions.asm index 12ae7bf..19e91b2 100644 --- a/asm/include/tzfs_definitions.asm +++ b/asm/include/tzfs_definitions.asm @@ -35,9 +35,10 @@ ; Features. ;----------------------------------------------- BUILD_MZ80A EQU 0 ; Build for the standard Sharp MZ80A, no lower memory. -BUILD_MZ700 EQU 1 ; Build for the Sharp MZ-700 base hardware. +BUILD_MZ700 EQU 0 ; Build for the Sharp MZ-700 base hardware. +BUILD_MZ1500 EQU 1 ; Build for the Sharp MZ-1500 base hardware. BUILD_MZ2000 EQU 0 ; Build for the Sharp MZ-2000 base hardware. -BUILD_FUSIONX EQU 0 ; Build for the set host using the FusionX board. +BUILD_FUSIONX EQU 1 ; Build for the set host using the FusionX board. ; Debugging ENADEBUG EQU 0 ; Enable debugging logic, 1 = enable, 0 = disable diff --git a/asm/msbasic.asm b/asm/msbasic.asm index f490acd..3238fbf 100644 --- a/asm/msbasic.asm +++ b/asm/msbasic.asm @@ -46,23 +46,30 @@ HEADER1: IF BUILD_MZ80A = 1 ENDIF HEADER2: IF BUILD_MZ700 = 1 - DB "MS-BASIC(MZ700)", 0DH, 0DH, 0DH, 0DH ; Title/Name (17 bytes). + DB "MS-BASIC(MZ700)", 0DH, 0DH ; Title/Name (17 bytes). DW (CODEEND - CODESTART) + (RELOCEND - RELOC) ; Size of program. DW 01200H ; Load address of program. DW RELOC ; Exec address of program. ENDIF -HEADER3: IF BUILD_MZ80A_TZFS+BUILD_MZ700_TZFS > 0 +HEADER3: IF BUILD_MZ1500 = 1 + DB "MS-BASIC(MZ1500)", 0DH ; Title/Name (17 bytes). + DW (CODEEND - CODESTART) + (RELOCEND - RELOC) ; Size of program. + DW 01200H ; Load address of program. + DW RELOC ; Exec address of program. + ENDIF + +HEADER4: IF BUILD_MZ80A_TZFS+BUILD_MZ700_TZFS+BUILD_MZ1500_TZFS > 0 IF BUILD_80C = 0 - DB "MS-BASIC(TZFS40)", 0DH ; Title/Name (17 bytes). - DW (CODEEND - CODESTART) + (RELOCEND - RELOC) ; Size of program. - DW 01200H ; Load address of program. - DW RELOC ; Exec address of program. + DB "MS-BASIC(TZFS40)", 0DH ; Title/Name (17 bytes). + DW (CODEEND - CODESTART) + (RELOCEND - RELOC) ; Size of program. + DW 01200H ; Load address of program. + DW RELOC ; Exec address of program. ELSE - DB "MS-BASIC(TZFS80)", 0DH ; Title/Name (17 bytes). - DW (CODEEND - CODESTART) + (RELOCEND - RELOC) ; Size of program. - DW 01200H ; Load address of program. - DW RELOC ; Exec address of program. + DB "MS-BASIC(TZFS80)", 0DH ; Title/Name (17 bytes). + DW (CODEEND - CODESTART) + (RELOCEND - RELOC) ; Size of program. + DW 01200H ; Load address of program. + DW RELOC ; Exec address of program. ENDIF ENDIF @@ -84,7 +91,11 @@ BUILD2: IF BUILD_MZ700 = 1 ORG 0000H ENDIF -BUILD3: IF BUILD_MZ80A_TZFS + BUILD_MZ700_TZFS > 0 +BUILD3: IF BUILD_MZ1500 = 1 + ORG 0000H + ENDIF + +BUILD4: IF BUILD_MZ80A_TZFS + BUILD_MZ700_TZFS + BUILD_MZ1500_TZFS > 0 ORG 0000H ENDIF @@ -100,7 +111,7 @@ STARTB: DW ABPASS ; Return integer in AB -VECTORS: IF BUILD_MZ700+BUILD_MZ700_TZFS > 1 +VECTORS: IF BUILD_MZ700+BUILD_MZ700_TZFS+BUILD_MZ1500+BUILD_MZ1500_TZFS > 1 ALIGN 0038H ORG 0038H INTVEC: DS 3 ; Space for the Interrupt vector. @@ -114,7 +125,7 @@ CSTART: DI ; Disable Interrupts and sat mode. NB. IM 1 LD SP,STACK ; Start of workspace RAM -MEMSW0: IF BUILD_MZ700+BUILD_MZ700_TZFS > 1 +MEMSW0: IF BUILD_MZ700+BUILD_MZ700_TZFS+BUILD_MZ1500+BUILD_MZ1500_TZFS > 1 LD A,TZMM_MZ700_0 ; Ensure the top part of RAM is set to use the mainboard as we need to configure hardware. OUT (MMCFG),A ENDIF @@ -223,7 +234,7 @@ INITANSI: IF INCLUDE_ANSITERM = 1 ; If the ansi terminal emulator is buil LD A,05H ; Enable interrupts at hardware level, this must be done before switching memory mode. LD (KEYPF),A ; -MEMSW1: IF BUILD_MZ700+BUILD_MZ700_TZFS > 0 +MEMSW1: IF BUILD_MZ700+BUILD_MZ700_TZFS+BUILD_MZ1500+BUILD_MZ1500_TZFS > 0 LD A,TZMM_MZ700_2 ; Enable the full 64K memory range before starting BASIC initialisation. OUT (MMCFG),A ENDIF @@ -233,7 +244,7 @@ MEMSW1: IF BUILD_MZ700+BUILD_MZ700_TZFS > 0 MEMSZ1: IF BUILD_MZ80A = 1 LD BC,MAXMEM - WRKSPC ; Clear to top of physical RAM. ENDIF -MEMSZ2: IF BUILD_MZ700+BUILD_MZ700_TZFS > 0 +MEMSZ2: IF BUILD_MZ700+BUILD_MZ700_TZFS+BUILD_MZ1500+BUILD_MZ1500_TZFS > 0 LD BC,10000H - WRKSPC ; Clear to top of physical RAM. ENDIF LD E,00H @@ -360,7 +371,7 @@ WORDS: DB 'E'+80H,"ND" ; 0x80 DB 'A'+80H,"NSITERM" ; 0xa2 ; Optional commands to be builtin when a tranZPUter board is present. -OPTIONS0: IF BUILD_MZ80A_TZFS + BUILD_MZ700_TZFS > 0 +OPTIONS0: IF BUILD_MZ80A_TZFS + BUILD_MZ700_TZFS + BUILD_MZ1500_TZFS > 0 DB 'C'+80H,"LOAD" ; 0xa3 DB 'C'+80H,"SAVE" ; 0xa4 DB 'L'+80H,"OAD" ; 0xa5 @@ -380,7 +391,18 @@ OPTIONS1: IF BUILD_MZ700 = 1 DB 'R'+80H,"EM" ; 0xa8 DB 'R'+80H,"EM" ; 0xa9 ENDIF -OPTIONS2: IF BUILD_MZ80A = 1 +OPTIONS2: IF BUILD_MZ1500 = 1 + ;DB 'C'+80H,"LOAD" ; 0xa3 + ;DB 'C'+80H,"SAVE" ; 0xa4 + DB 'R'+80H,"EM" ; 0xa3 + DB 'R'+80H,"EM" ; 0xa4 + DB 'R'+80H,"EM" ; 0xa5 + DB 'R'+80H,"EM" ; 0xa6 + DB 'R'+80H,"EM" ; 0xa7 + DB 'R'+80H,"EM" ; 0xa8 + DB 'R'+80H,"EM" ; 0xa9 + ENDIF +OPTIONS3: IF BUILD_MZ80A = 1 DB 'C'+80H,"LOAD" ; 0xa3 DB 'C'+80H,"SAVE" ; 0xa4 DB 'R'+80H,"EM" ; 0xa5 @@ -501,7 +523,7 @@ WORDTB: DW PEND DW SETANSITERM ; Enable/disable the ANSI Terminal Emulator. ; Optional commands to be builtin when a tranZPUter board is present. -OPTIONS1A: IF BUILD_MZ80A_TZFS + BUILD_MZ700_TZFS > 0 +OPTIONS1A: IF BUILD_MZ80A_TZFS + BUILD_MZ700_TZFS + BUILD_MZ1500_TZFS > 0 DW CLOADTZ ; Load tokenised BASIC program. DW CSAVETZ ; Save tokenised BASIC program. DW LOAD ; Load ASCII text BASIC program. @@ -519,7 +541,16 @@ OPTIONS2A: IF BUILD_MZ700 = 1 DW REM DW REM ENDIF -OPTIONS3A: IF BUILD_MZ80A = 1 +OPTIONS3A: IF BUILD_MZ1500 = 1 + DW CLOAD80A ; Load tokenised BASIC program from tape. + DW CSAVE80A ; Save tokenised BASIC program to tape. + DW REM + DW REM + DW REM + DW REM + DW REM + ENDIF +OPTIONS4A: IF BUILD_MZ80A = 1 DW CLOAD80A ; Load tokenised BASIC program from tape. DW CSAVE80A ; Save tokenised BASIC program to tape. DW REM @@ -4568,7 +4599,7 @@ SETANSIERR: LD E,BV ; ?BV Error ;---------------------------------------- ; TZFS Commands. ;---------------------------------------- -OPTIONS1C: IF BUILD_MZ80A_TZFS + BUILD_MZ700_TZFS > 0 +OPTIONS1C: IF BUILD_MZ80A_TZFS + BUILD_MZ700_TZFS + BUILD_MZ1500_TZFS > 0 ; Method to load BASIC text program. LOAD: LD A,TAPELOAD ; Set the type of operation into the flag var. @@ -5305,10 +5336,45 @@ RFSMSGOK: DB "Saved", C ;---------------------------------------- ENDIF ; End of optional commands for use when a tranZPUter board is present. + ;---------------------------------------- + ; MZ-1500 Commands. + ;---------------------------------------- +OPTIONS3C: IF BUILD_MZ1500 = 1 + + + ;-------------------------------------- + ; Error jump table for RFS. + ;-------------------------------------- +RFSNONAM: LD HL,RFSBADFN ; Must give a name for SD card load and save. +RFSERR: CALL PRS + POP AF ; Waste return address. + JP ERRIN +RFSFNTG: LD HL,RFSFNTOOG + JR RFSERR +RFSLDER: LD HL,RFSLOADERR + JR RFSERR +RFSSVER: LD HL,RFSSAVEERR + JR RFSERR + + ;-------------------------------------- + ; Test Message table + ;-------------------------------------- +RFSBADFN: DB "Filename missing!", CR, NUL +RFSFNTOOG: DB "Filename too long!", CR, NUL +RFSLOADERR: DB "File loading error!", CR, NUL +RFSSAVEERR: DB "File save error!", CR, NUL +RFSMSGLOAD: DB "Loading", NUL +RFSMSGOK: DB "Saved", CR, NUL + + ;---------------------------------------- + ; End of Options3 Code - MZ-1500 Build + ;---------------------------------------- + ENDIF ; End of optional commands for use when a tranZPUter board is present. + ;---------------------------------------- ; MZ80A Commands. ;---------------------------------------- -OPTIONS3C: IF BUILD_MZ80A+BUILD_MZ700 > 0 +OPTIONS4C: IF BUILD_MZ80A+BUILD_MZ700+BUILD_MZ1500 > 0 ; Method to load a cassette image (tokenised basic script). ; @@ -5435,7 +5501,7 @@ CSAVE80A_1: LD A,(DE) ; Copy filename into service record. RET ; MZ80A specific commands. -OPTIONS3B: IF BUILD_MZ80A = 1 +OPTIONS4B: IF BUILD_MZ80A = 1 ENDIF ;-------------------------------------- @@ -5473,10 +5539,10 @@ CMTMSGOK: DB "Saved", C MONITR: -MONITR2 IF BUILD_MZ700+BUILD_MZ700_TZFS > 0 - ; Switch memory back to TZFS mode. - LD A, TZMM_TZFS - OUT (MMCFG),A +MONITR2 IF BUILD_MZ700+BUILD_MZ700_TZFS+BUILD_MZ1500+BUILD_MZ1500_TZFS > 0 + ; Switch memory back to TZFS mode. + LD A, TZMM_TZFS + OUT (MMCFG),A ENDIF JP REBOOT ; Restart (Normally Monitor Start) @@ -5494,9 +5560,9 @@ TIMIN: LD (SPISRSAVE),SP ; Use a PUSH DE PUSH HL ; -MEMSW2: IF BUILD_MZ700+BUILD_MZ700_TZFS > 0 - LD A,TZMM_MZ700_0 ; We meed to be in memory mode 10 to process the interrupts as this allows us access to the hardware. - OUT (MMCFG),A +MEMSW2: IF BUILD_MZ700+BUILD_MZ700_TZFS+BUILD_MZ1500+BUILD_MZ1500_TZFS > 0 + LD A,TZMM_MZ700_0 ; We meed to be in memory mode 10 to process the interrupts as this allows us access to the hardware. + OUT (MMCFG),A ENDIF ; ; Reset the interrupt counter. @@ -5726,9 +5792,9 @@ ISRKEYRPT: LD A,(KEYCOUNT) ; Get c LD (KEYWRITE),HL ; Store updated pointer. ; ISREXIT: -MEMSW3: IF BUILD_MZ700+BUILD_MZ700_TZFS > 0 - LD A,TZMM_MZ700_2 ; Return to the full 64K memory mode. - OUT (MMCFG),A +MEMSW3: IF BUILD_MZ700+BUILD_MZ700_TZFS+BUILD_MZ1500+BUILD_MZ1500_TZFS > 0 + LD A,TZMM_MZ700_2 ; Return to the full 64K memory mode. + OUT (MMCFG),A ENDIF ; POP HL @@ -6113,7 +6179,7 @@ KTBLC: ; CTRL ON ; ; Keyboard routine for the MZ-700 hardware. ; - IF BUILD_MZ700 + BUILD_MZ700_TZFS > 0 + IF BUILD_MZ700 + BUILD_MZ700_TZFS + BUILD_MZ1500 + BUILD_MZ1500_TZFS > 0 ; ; KEY BOARD SWEEP ; EXIT B,D7=0 NO DATA @@ -6250,9 +6316,9 @@ ISRKEYRPT: LD A,(KEYCOUNT) ; Get c LD (KEYWRITE),HL ; Store updated pointer. ; ISREXIT -MEMSW3: IF BUILD_MZ700+BUILD_MZ700_TZFS > 0 - LD A,TZMM_MZ700_2 ; Return to the full 64K memory mode. - OUT (MMCFG),A +MEMSW3: IF BUILD_MZ700+BUILD_MZ700_TZFS+BUILD_MZ1500+BUILD_MZ1500_TZFS > 0 + LD A,TZMM_MZ700_2 ; Return to the full 64K memory mode. + OUT (MMCFG),A ENDIF ; POP HL @@ -6671,7 +6737,7 @@ KTBLC: ; CONTROL CODE ;------------------------------------------------------------------------------- ; SERVICE COMMAND METHODS ;------------------------------------------------------------------------------- -SVC_CMD: IF BUILD_MZ80A_TZFS + BUILD_MZ700_TZFS > 0 +SVC_CMD: IF BUILD_MZ80A_TZFS + BUILD_MZ700_TZFS + BUILD_MZ1500_TZFS> 0 ; Method to send a command to the I/O processor and verify it is being acted upon. ; THe method, after sending the command, polls the service structure result to see if the I/O processor has updated it. If it doesnt update the result @@ -7018,6 +7084,10 @@ TIMESET: LD (TIMESEC),HL ; Load LD (HL),09CH ; Place divisor in Counter 1, = 156, thus 15611/156 = 100 LD (HL),000H ENDIF + IF BUILD_MZ1500 + BUILD_MZ1500_TZFS > 0 + LD (HL),09CH ; Place divisor in Counter 1, = 156, thus 15611/156 = 100 + LD (HL),000H + ENDIF NOP NOP NOP @@ -7032,6 +7102,9 @@ TIMESET1: IF BUILD_MZ80A + BUILD_MZ80A_TZFS > 0 TIMESET2: IF BUILD_MZ700+BUILD_MZ700_TZFS > 0 LD (00039H),IX ENDIF +TIMESET3: IF BUILD_MZ1500+BUILD_MZ1500_TZFS > 0 + LD (00039H),IX + ENDIF RET ; Time Read; @@ -7445,7 +7518,7 @@ PRNT: CALL CURSOROFF ; Disab LD (SPISRSAVE),SP ; Share the interrupt stack for banked access as the BASIC stack goes out of scope. LD SP,ISRSTACK ; Interrupts are disabled so we can safely use this stack. ; -MEMSW4: IF BUILD_MZ700+BUILD_MZ700_TZFS > 0 +MEMSW4: IF BUILD_MZ700+BUILD_MZ700_TZFS+BUILD_MZ1500+BUILD_MZ1500_TZFS > 0 PUSH AF LD A,TZMM_MZ700_0 ; Enable access to the hardware by paging out the upper bank. OUT (MMCFG),A @@ -7468,9 +7541,9 @@ MEMSW4: IF BUILD_MZ700+BUILD_MZ700_TZFS > 0 POP BC PRNT1: CALL DSPXYTOADDR ; -MEMSW5: IF BUILD_MZ700+BUILD_MZ700_TZFS > 0 - LD A,TZMM_MZ700_2 ; Enable access to the hardware by paging out the upper bank. - OUT (MMCFG),A +MEMSW5: IF BUILD_MZ700+BUILD_MZ700_TZFS+BUILD_MZ1500+BUILD_MZ1500_TZFS > 0 + LD A,TZMM_MZ700_2 ; Enable access to the hardware by paging out the upper bank. + OUT (MMCFG),A ENDIF ; LD SP,(SPISRSAVE) ; Restore the BASIC stack to exit. @@ -8183,7 +8256,7 @@ WTAP3: POP HL LD BC,00080H LD HL,IBUFE RD1: DI -MEMSWRT0: IF BUILD_MZ700+BUILD_MZ700_TZFS > 0 +MEMSWRT0: IF BUILD_MZ700+BUILD_MZ700_TZFS+BUILD_MZ1500+BUILD_MZ1500_TZFS > 0 LD (SPISRSAVE),SP ; Share the interrupt stack whilst accessing hardware as the BASIC stack goes out of scope. LD SP,ISRSTACK ; Interrupts are disabled so we can safely use this stack. LD A,TZMM_MZ700_0 ; We meed to be in memory mode 10 to access the tape hardware. @@ -8232,7 +8305,7 @@ RTP2: CALL EDGE RTP3: CALL RBYTE JP C,RTP6 ; For TZFS/RFS page in top bank of memory for potential data store. -MEMSWRT1: IF BUILD_MZ700+BUILD_MZ700_TZFS > 0 +MEMSWRT1: IF BUILD_MZ700+BUILD_MZ700_TZFS+BUILD_MZ1500+BUILD_MZ1500_TZFS > 0 EX AF,AF' LD A,TZMM_MZ700_2 OUT (MMCFG),A @@ -8262,7 +8335,7 @@ MEMSWRT1: IF BUILD_MZ700+BUILD_MZ700_TZFS > 0 JP NZ,RTP5 RTP8: XOR A RET2: CALL MSTOP -MEMSWRT4: IF BUILD_MZ700+BUILD_MZ700_TZFS > 0 +MEMSWRT4: IF BUILD_MZ700+BUILD_MZ700_TZFS+BUILD_MZ1500+BUILD_MZ1500_TZFS > 0 EX AF,AF' LD A,TZMM_MZ700_2 ; Return to the full 64K memory mode. OUT (MMCFG),A @@ -9069,7 +9142,7 @@ CALC3: POP DE ; BC = length CLRSCRN: DI ; -MEMSW6: IF BUILD_MZ700+BUILD_MZ700_TZFS > 0 +MEMSW6: IF BUILD_MZ700+BUILD_MZ700_TZFS+BUILD_MZ1500+BUILD_MZ1500_TZFS > 0 LD A,TZMM_MZ700_0 ; Enable access to the hardware by paging out the upper bank. OUT (MMCFG),A ENDIF @@ -9094,7 +9167,7 @@ MEMSW6: IF BUILD_MZ700+BUILD_MZ700_TZFS > 0 LD (HL),A LDIR -MEMSW7: IF BUILD_MZ700+BUILD_MZ700_TZFS > 0 +MEMSW7: IF BUILD_MZ700+BUILD_MZ700_TZFS+BUILD_MZ1500+BUILD_MZ1500_TZFS > 0 LD A,TZMM_MZ700_2 ; Enable access to the hardware by paging out the upper bank. OUT (MMCFG),A ENDIF @@ -9278,7 +9351,7 @@ COLOUR EQU 0 REBOOT: DI -REBOOTTZ: IF BUILD_MZ700+BUILD_MZ700_TZFS > 0 +REBOOTTZ: IF BUILD_MZ700+BUILD_MZ700_TZFS+BUILD_MZ1500+BUILD_MZ1500_TZFS > 0 LD A,TZMM_TZFS OUT (MMCFG),A ENDIF @@ -9309,7 +9382,7 @@ REBOOT80A: IF BUILD_MZ80A = 1 ;-------------------------------------- BFREE: DB " Bytes free",CR,LF,0,0 -SIGNON: IF BUILD_MZ80A_TZFS + BUILD_MZ700_TZFS > 0 +SIGNON: IF BUILD_MZ80A_TZFS + BUILD_MZ700_TZFS + BUILD_MZ1500_TZFS > 0 DB "Microsoft Basic (TZFS) Ver 4.7b",CR,LF DB "Copyright ",40,"C",41 DB " 1978 by Microsoft",CR,LF,0,0 @@ -9319,6 +9392,11 @@ SIGNON: IF BUILD_MZ80A_TZFS + BUILD_MZ700_TZFS > 0 DB "Copyright ",40,"C",41 DB " 1978 by Microsoft",CR,LF,0,0 ENDIF + IF BUILD_MZ1500 = 1 + DB "Microsoft Basic (MZ-1500) Ver 4.7b",CR,LF + DB "Copyright ",40,"C",41 + DB " 1978 by Microsoft",CR,LF,0,0 + ENDIF IF BUILD_MZ80A = 1 DB "Microsoft Basic (MZ-80A) Ver 4.7b",CR,LF DB "Copyright ",40,"C",41 @@ -9521,12 +9599,12 @@ CODEEND: ; For TZFS builds the image needs to be relocated from 0x1200 to 0x0000 on startup after switching the memory mode. -RELOCSTART: IF BUILD_MZ700+BUILD_MZ700_TZFS > 0 +RELOCSTART: IF BUILD_MZ700+BUILD_MZ700_TZFS+BUILD_MZ1500_TZFS > 0 ORG $ + 1200H ENDIF ; Switch memory. -RELOC: IF BUILD_MZ700+BUILD_MZ700_TZFS > 0 +RELOC: IF BUILD_MZ700+BUILD_MZ700_TZFS+BUILD_MZ1500+BUILD_MZ1500_TZFS > 0 LD A, TZMM_MZ700_0 ; Switch to the MZ700 memory map where the lower 4K 0000:0FFF is in block 6, we therefore preserve the Monitor for exit. OUT (MMCFG),A diff --git a/asm/tzfs.asm b/asm/tzfs.asm index 03b20d7..ce53256 100644 --- a/asm/tzfs.asm +++ b/asm/tzfs.asm @@ -1322,6 +1322,9 @@ LOADBASIC: IF BUILD_MZ700 > 0 LD DE,BASICFNM700 ENDIF + IF BUILD_MZ1500 > 0 + LD DE,BASICFNM1500 + ENDIF JR LOADSDCARD ; Quick method to load CPM. So long as the filename doesnt change this method will load and boot CPM. @@ -1332,6 +1335,9 @@ LOADCPM: IF BUILD_MZ700 > 0 LD DE,CPMFNAME700 ENDIF + IF BUILD_MZ1500 > 0 + LD DE,CPMFNAME1500 + ENDIF JR LOADSDCARD ; Entry point when copying the SD file. Setup flags to indicate copying to effect any special processing. @@ -2375,7 +2381,9 @@ LOCALTEST: LD A,0 CPMFNAME80A:DB "CPM223 MZ-80A-80", 000H BASICFNM80A:DB "BASIC-SA-5510-TZ", 000H CPMFNAME700:DB "CPM223 MZ-700-80", 000H +CPMFNAME1500:DB "CPM223 MZ-1500-4", 000H BASICFNM700:DB "S-BASIC", 000H +BASICFNM1500:DB "S-BASIC", 000H DEFAULTFN: DB "DEFAULT" DEFAULTFNE: EQU $ diff --git a/asm/tzfs_bank3.asm b/asm/tzfs_bank3.asm index 8ca7369..5a53a00 100644 --- a/asm/tzfs_bank3.asm +++ b/asm/tzfs_bank3.asm @@ -631,7 +631,7 @@ SLPT: DB 01H ; TEXT ; (66 + (14 * x)) / 3540000 = delay ; MZ-700 - x = ((delay * 3540000) - 66) / 14 ; MZ-80A - x = ((delay * 2000000) - 66) / 14 -CMTSETDLY: IF BUILD_MZ700 > 0 +CMTSETDLY: IF BUILD_MZ700+BUILD_MZ1500 > 0 PUSH BC ; Store the compensation value in B to be added into fixed delay value. LD A,(CMTDLYCOMP) LD B,A diff --git a/hdr/cpm22_mz1500_40c.hdr b/hdr/cpm22_mz1500_40c.hdr new file mode 100644 index 0000000..df87334 Binary files /dev/null and b/hdr/cpm22_mz1500_40c.hdr differ diff --git a/roms/monitor_1Z-009B.rom b/roms/monitor_1Z-009B.rom new file mode 100755 index 0000000..5093802 Binary files /dev/null and b/roms/monitor_1Z-009B.rom differ diff --git a/roms/tzfs.rom b/roms/tzfs.rom index 68cde87..1d1416b 100644 Binary files a/roms/tzfs.rom and b/roms/tzfs.rom differ diff --git a/tools/assemble_cpm.sh b/tools/assemble_cpm.sh index b262498..b468fff 100755 --- a/tools/assemble_cpm.sh +++ b/tools/assemble_cpm.sh @@ -40,7 +40,7 @@ INCDIR=${ROOTDIR}/asm/include ROMDIR=${ROOTDIR}/roms # Compiled or source ROM files. HDRDIR=${ROOTDIR}/hdr # MZF headers directory. MZFDIR=${ROOTDIR}/MZF/Common # MZF Format source files. -CPMVERSIONS="mz700_80c:0 mz80a_80c:1 mz80a_40c:2 mz700_40c:3" +CPMVERSIONS="mz700_80c:0 mz80a_80c:1 mz80a_40c:2 mz700_40c:3 mz1500_40c:4" # As the tranZPUter project has eveolved different variants of CP/M are needed, so this loop along with the CPMVERSIONS string builds the versions as needed. for ver in ${CPMVERSIONS} diff --git a/tools/assemble_roms.sh b/tools/assemble_roms.sh index 870e1a4..e990780 100755 --- a/tools/assemble_roms.sh +++ b/tools/assemble_roms.sh @@ -38,7 +38,7 @@ ASM=glass-0.5.jar BUILDROMLIST="mz2000_ipl_original mz2000_ipl_tzpu mz800_1z_013b mz800_9z_504m mz800_iocs mz80afi monitor_sa1510 monitor_80c_sa1510 monitor_1z-013a monitor_80c_1z-013a monitor_1z-013a-km monitor_80c_1z-013a-km mz80b_ipl" #BUILDMZFLIST="hi-ramcheck sharpmz-test" #BUILDMZFLIST="basic_sp-5025 5z009-1b sa-5510_tzfs msbasic_mz80a msbasic_mz700 msbasic_tz40 msbasic_tz80 sharpmz-test" -BUILDMZFLIST="5z009-1b sa-5510_tzfs msbasic_mz80a msbasic_mz700 msbasic_tz40 msbasic_tz80 sharpmz-test" +BUILDMZFLIST="5z009-1b sa-5510_tzfs msbasic_mz80a msbasic_mz700 msbasic_mz1500 msbasic_tz40 msbasic_tz80 sharpmz-test" ASMDIR=${ROOTDIR}/asm ASMTMPDIR=${ROOTDIR}/tmp INCDIR=${ROOTDIR}/asm/include @@ -71,6 +71,9 @@ do elif [[ ${SRCNAME} = "msbasic_tz80" ]]; then ASMNAME="msbasic.asm" echo "BUILD_VERSION EQU 3" > ${INCDIR}/MSBASIC_BuildVersion.asm + elif [[ ${SRCNAME} = "msbasic_mz1500" ]]; then + ASMNAME="msbasic.asm" + echo "BUILD_VERSION EQU 4" > ${INCDIR}/MSBASIC_BuildVersion.asm fi # Assemble the source.