Updates and bug fixes. DASM fix still outstanding
This commit is contained in:
10
.gitignore
vendored
10
.gitignore
vendored
@@ -204,4 +204,12 @@ MZ800_IOCS.ref
|
|||||||
asm/c2
|
asm/c2
|
||||||
asm/sa1510.asm.prekuma
|
asm/sa1510.asm.prekuma
|
||||||
roms/test.rom
|
roms/test.rom
|
||||||
|
tools/cpmchattr
|
||||||
|
tools/cpmchmod
|
||||||
|
tools/cpmcp
|
||||||
|
tools/cpmls
|
||||||
|
tools/cpmrm
|
||||||
|
tools/fsck.cpm
|
||||||
|
tools/fsed.cpm
|
||||||
|
tools/mkfs.cpm
|
||||||
|
tools/share/
|
||||||
|
|||||||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "cpmtools"]
|
||||||
|
path = cpmtools
|
||||||
|
url = https://github.com/lipro-cpm4l/cpmtools.git
|
||||||
@@ -46,13 +46,21 @@ HWSEL1: LD A,(BNKCTRLRST)
|
|||||||
LD (BNKSELUSER),A ; and start up - ie. SA1510 Monitor - this occurs as User Bank 0 is enabled and the jmp to 0 is coded in it.
|
LD (BNKSELUSER),A ; and start up - ie. SA1510 Monitor - this occurs as User Bank 0 is enabled and the jmp to 0 is coded in it.
|
||||||
ENDIF ; 22 bytes.
|
ENDIF ; 22 bytes.
|
||||||
|
|
||||||
|
; MODE_MZ1200 0
|
||||||
|
; MODE_MZ80A 0
|
||||||
|
; MODE_MZ700 1
|
||||||
|
; MODE_MZ80B 2
|
||||||
|
; MODE_MZ800 3
|
||||||
|
; MODE_MZ1500 4
|
||||||
|
; MODE_MZ2000 5
|
||||||
|
; MODE_MZ2200 6
|
||||||
IF BUILD_SFD700 = 1
|
IF BUILD_SFD700 = 1
|
||||||
IN A,(SFD700_MODE)
|
IN A,(SFD700_MODE)
|
||||||
OR A
|
OR A
|
||||||
LD A,BNKDEFMROM_MZ80A ; Setup default MROM for an MZ80A, this is a 4K Window into the UROM at F000.
|
LD A,BNKDEFMROM_MZ80A ; Setup default MROM for an MZ80A, this is a 4K Window into the UROM at F000.
|
||||||
JR HWSEL11
|
JR Z, HWSEL11
|
||||||
HWSEL11: LD A,BNKDEFMROM_MZ700 ; Setup default MROM for an MZ700, this is a 4K Window into the UROM at F000.
|
LD A,BNKDEFMROM_MZ700 ; Setup default MROM for an MZ700, this is a 4K Window into the UROM at F000.
|
||||||
OUT (REG_FXXX),A
|
HWSEL11: OUT (REG_FXXX),A
|
||||||
LD (ROMBK1),A
|
LD (ROMBK1),A
|
||||||
LD A,BNKDEFUROM ; Setup default UROM, this is a 2K Window into the UROM at E800 and contains the RFS.
|
LD A,BNKDEFUROM ; Setup default UROM, this is a 2K Window into the UROM at E800 and contains the RFS.
|
||||||
OUT (REG_EXXX),A
|
OUT (REG_EXXX),A
|
||||||
@@ -60,6 +68,7 @@ HWSEL11: LD A,BNKDEFMROM_MZ700 ; Setup default MROM
|
|||||||
NOP
|
NOP
|
||||||
ENDIF
|
ENDIF
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
HWSELROM2: MACRO
|
HWSELROM2: MACRO
|
||||||
IF BUILD_ROMDISK = 1
|
IF BUILD_ROMDISK = 1
|
||||||
LD B,16 ; If we read the bank control reset register 15 times then this will enable bank control and then the 16th read will reset all bank control registers to default.
|
LD B,16 ; If we read the bank control reset register 15 times then this will enable bank control and then the 16th read will reset all bank control registers to default.
|
||||||
@@ -81,7 +90,7 @@ HWSEL2: LD A,(BNKCTRLRST)
|
|||||||
IN A,(SFD700_MODE)
|
IN A,(SFD700_MODE)
|
||||||
OR A
|
OR A
|
||||||
LD A,BNKDEFMROM_MZ80A ; Setup default MROM for an MZ80A, this is a 4K Window into the UROM at F000.
|
LD A,BNKDEFMROM_MZ80A ; Setup default MROM for an MZ80A, this is a 4K Window into the UROM at F000.
|
||||||
JR HWSEL21
|
JR Z,HWSEL21
|
||||||
LD A,BNKDEFMROM_MZ700 ; Setup default MROM for an MZ700, this is a 4K Window into the UROM at F000.
|
LD A,BNKDEFMROM_MZ700 ; Setup default MROM for an MZ700, this is a 4K Window into the UROM at F000.
|
||||||
HWSEL21: OUT (REG_FXXX),A
|
HWSEL21: OUT (REG_FXXX),A
|
||||||
LD A,BNKDEFUROM ; Setup default UROM, this is a 2K Window into the UROM at E800 and contains the RFS.
|
LD A,BNKDEFUROM ; Setup default UROM, this is a 2K Window into the UROM at E800 and contains the RFS.
|
||||||
@@ -118,10 +127,10 @@ BNKSWSEL: MACRO
|
|||||||
LD (BNKSELUSER),A
|
LD (BNKSELUSER),A
|
||||||
ENDIF
|
ENDIF
|
||||||
IF BUILD_SFD700 = 1
|
IF BUILD_SFD700 = 1
|
||||||
OUT (REG_EXXX),A ; Execute active bank switch.
|
OUT (REG_EXXX),A ; Execute active bank switch for E000:EFFF.
|
||||||
CP ROMBANK6 ; ROMBANK6/7 page in ROM from E300:FFFF
|
CP ROMBANK6 ; ROMBANK6/7 page in ROM from E300:FFFF
|
||||||
JR C,BNKSWJMP
|
JR C,BNKSWJMP
|
||||||
INC A
|
INC A ; FXXX are 4K banks, EXXX are 2K banks.
|
||||||
JR BNKSWJMP2
|
JR BNKSWJMP2
|
||||||
BNKSWJMP: LD A,(ROMBK1) ; All other banks place the current active ROM into F000:FXXX space.
|
BNKSWJMP: LD A,(ROMBK1) ; All other banks place the current active ROM into F000:FXXX space.
|
||||||
BNKSWJMP2: OUT (REG_FXXX),A
|
BNKSWJMP2: OUT (REG_FXXX),A
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
; BASIC_build.asm which configures the equates below for the correct build.
|
; BASIC_build.asm which configures the equates below for the correct build.
|
||||||
BUILD_KUMA EQU 1 ; Enable support for Kuma 40/80 column upgrade.
|
BUILD_KUMA EQU 1 ; Enable support for Kuma 40/80 column upgrade.
|
||||||
|
|
||||||
; NZ-80A Build
|
; MZ-80A Build
|
||||||
IF BUILD_VERSION = 0
|
IF BUILD_VERSION = 0
|
||||||
BUILD_MZ80A EQU 1 ; Build for the standard Sharp MZ80A, no lower memory. Manually change MAXMEM above.
|
BUILD_MZ80A EQU 1 ; Build for the standard Sharp MZ80A, no lower memory. Manually change MAXMEM above.
|
||||||
BUILD_RFS EQU 0 ; Build for standard RFS with SD enhancements.
|
BUILD_RFS EQU 0 ; Build for standard RFS with SD enhancements.
|
||||||
@@ -124,6 +124,11 @@ CTAPESAVE EQU 4
|
|||||||
; Debugging
|
; Debugging
|
||||||
ENADEBUG EQU 0 ; Enable debugging logic, 1 = enable, 0 = disable
|
ENADEBUG EQU 0 ; Enable debugging logic, 1 = enable, 0 = disable
|
||||||
|
|
||||||
|
; RFS ROM addresses.
|
||||||
|
UROMADDR EQU 0E800H ; Start of User ROM Address space.
|
||||||
|
UROMBSTBL EQU UROMADDR + 020H ; Entry point to the bank switching table.
|
||||||
|
RFSJMPTABLE EQU UROMADDR + 000B0H ; Start of jump table.
|
||||||
|
|
||||||
;-----------------------------------------------
|
;-----------------------------------------------
|
||||||
; CMT Object types.
|
; CMT Object types.
|
||||||
;-----------------------------------------------
|
;-----------------------------------------------
|
||||||
@@ -151,13 +156,13 @@ QVRFY EQU 0002Dh
|
|||||||
;-------------------------------------------------------
|
;-------------------------------------------------------
|
||||||
; Function entry points in the RFS ROM.
|
; Function entry points in the RFS ROM.
|
||||||
;-------------------------------------------------------
|
;-------------------------------------------------------
|
||||||
CMT_RDINF EQU 0E886H ; UROMADDR+86H - Tape/SD intercept handler - Read Header
|
CMT_RDINF EQU RFSJMPTABLE + 06H ; UROMADDR+86H - Tape/SD intercept handler - Read Header
|
||||||
CMT_RDDATA EQU 0E889H ; UROMADDR+89H - Tape/SD intercept handler - Read Data
|
CMT_RDDATA EQU RFSJMPTABLE + 09H ; UROMADDR+89H - Tape/SD intercept handler - Read Data
|
||||||
CMT_WRINF EQU 0E88CH ; UROMADDR+80H - Tape/SD intercept handler - Write Header
|
CMT_WRINF EQU RFSJMPTABLE + 0CH ; UROMADDR+80H - Tape/SD intercept handler - Write Header
|
||||||
CMT_WRDATA EQU 0E88FH ; UROMADDR+8FH - Tape/SD intercept handler - Write Data
|
CMT_WRDATA EQU RFSJMPTABLE + 0FH ; UROMADDR+8FH - Tape/SD intercept handler - Write Data
|
||||||
CMT_VERIFY EQU 0E892H ; UROMADDR+92H - Tape/SD intercept handler - Verify Data
|
CMT_VERIFY EQU RFSJMPTABLE + 12H ; UROMADDR+92H - Tape/SD intercept handler - Verify Data
|
||||||
CMT_DIR EQU 0E895H ; UROMADDR+95H - SD directory command.
|
CMT_DIR EQU RFSJMPTABLE + 15H ; UROMADDR+95H - SD directory command.
|
||||||
CNV_ATOS EQU 0E898H ; UROMADDR+98H - Convert an ASCII string into Sharp ASCII
|
CNV_ATOS EQU RFSJMPTABLE + 18H ; UROMADDR+98H - Convert an ASCII string into Sharp ASCII
|
||||||
|
|
||||||
;-----------------------------------------------
|
;-----------------------------------------------
|
||||||
; BASIC ERROR CODE VALUES
|
; BASIC ERROR CODE VALUES
|
||||||
|
|||||||
@@ -19,6 +19,9 @@
|
|||||||
;- March 2021- Updates to accommodate the RFS v2.1 board along with back porting TZFS
|
;- March 2021- Updates to accommodate the RFS v2.1 board along with back porting TZFS
|
||||||
;- developments.
|
;- developments.
|
||||||
;- May 2023 - Updates to accommodate RFS use on a FusionX board.
|
;- May 2023 - Updates to accommodate RFS use on a FusionX board.
|
||||||
|
;- Aug 2023 - Updates to make RFS run under the SFD700 Floppy Disk Interface board.
|
||||||
|
;- UROM remains the same, a 2K paged ROM, MROM is located at F000 when
|
||||||
|
;- RFS is built for the SFD700.
|
||||||
;-
|
;-
|
||||||
;--------------------------------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------------------------------
|
||||||
;- This source file is free software: you can redistribute it and-or modify
|
;- This source file is free software: you can redistribute it and-or modify
|
||||||
@@ -62,7 +65,7 @@ FDCROMADDR EQU 0F000H
|
|||||||
|
|
||||||
IF BUILD_SFD700 = 1
|
IF BUILD_SFD700 = 1
|
||||||
BNKDEFMROM_MZ80A EQU 0 ; Default MROM (FDC) selected, 1st 4k slot..
|
BNKDEFMROM_MZ80A EQU 0 ; Default MROM (FDC) selected, 1st 4k slot..
|
||||||
BNKDEFMROM_MZ700 EQU 1 ; Default MROM (FDC) selected, 1st 4k slot..
|
BNKDEFMROM_MZ700 EQU 1 ; Default MROM (FDC) selected, 2nd 4k slot..
|
||||||
BNKDEFUROM EQU 2 ; Default UROM (RFS) selected, starts at 8K.
|
BNKDEFUROM EQU 2 ; Default UROM (RFS) selected, starts at 8K.
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
@@ -373,7 +376,12 @@ MROMLOAD: EQU MROMJMPTBL + 00006H
|
|||||||
; 8-15 are reserved for CPM code in
|
; 8-15 are reserved for CPM code in
|
||||||
; the User ROM bank.
|
; the User ROM bank.
|
||||||
;-----------------------------------------------
|
;-----------------------------------------------
|
||||||
MROMPAGES EQU 8
|
IF BUILD_ROMDISK = 1
|
||||||
|
MROMPAGES EQU 8
|
||||||
|
ENDIF
|
||||||
|
IF BUILD_SFD700 = 1
|
||||||
|
MROMPAGES EQU 12 ; 10 Pages (8 but Bank6/7 are 2 pages) + 2 pages for ROMs
|
||||||
|
ENDIF
|
||||||
USRROMPAGES EQU 12 ; Monitor ROM : User ROM
|
USRROMPAGES EQU 12 ; Monitor ROM : User ROM
|
||||||
IF BUILD_ROMDISK = 1
|
IF BUILD_ROMDISK = 1
|
||||||
ROMBANK0 EQU 0 ; MROM SA1510 40 Char : RFS Bank 0 - Main RFS Entry point and functions.
|
ROMBANK0 EQU 0 ; MROM SA1510 40 Char : RFS Bank 0 - Main RFS Entry point and functions.
|
||||||
@@ -398,7 +406,7 @@ ROMBANK4 EQU 4 + BNKDEFUROM ;
|
|||||||
ROMBANK5 EQU 5 + BNKDEFUROM ; : RFS Bank 5
|
ROMBANK5 EQU 5 + BNKDEFUROM ; : RFS Bank 5
|
||||||
ROMBANK6 EQU 6 + BNKDEFUROM ; : RFS Bank 6
|
ROMBANK6 EQU 6 + BNKDEFUROM ; : RFS Bank 6
|
||||||
ROMBANK7 EQU 8 + BNKDEFUROM ; : RFS Bank 7 - Memory and timer test utilities.
|
ROMBANK7 EQU 8 + BNKDEFUROM ; : RFS Bank 7 - Memory and timer test utilities.
|
||||||
ROMBANK8 EQU 10 + BNKDEFUROM ; : CBIOS Bank 1 - Utilities
|
ROMBANK8 EQU 10 + BNKDEFUROM ; : CBIOS Bank 1 - Utilities
|
||||||
ROMBANK9 EQU 11 + BNKDEFUROM ; : CBIOS Bank 2 - Screen / ANSI Terminal
|
ROMBANK9 EQU 11 + BNKDEFUROM ; : CBIOS Bank 2 - Screen / ANSI Terminal
|
||||||
ROMBANK10 EQU 12 + BNKDEFUROM ; : CBIOS Bank 3 - SD Card
|
ROMBANK10 EQU 12 + BNKDEFUROM ; : CBIOS Bank 3 - SD Card
|
||||||
ROMBANK11 EQU 13 + BNKDEFUROM ; : CBIOS Bank 4 - Floppy disk controller.
|
ROMBANK11 EQU 13 + BNKDEFUROM ; : CBIOS Bank 4 - Floppy disk controller.
|
||||||
|
|||||||
534
asm/mz-1e05.asm
Normal file
534
asm/mz-1e05.asm
Normal file
@@ -0,0 +1,534 @@
|
|||||||
|
; V1.10
|
||||||
|
;
|
||||||
|
; To compile use:
|
||||||
|
;
|
||||||
|
; AS80 [1.31] - Assembler for 8080/8085/Z80 microprocessor.
|
||||||
|
;
|
||||||
|
; Available from:
|
||||||
|
; - http://www.falstaff.demon.co.uk/cross.html
|
||||||
|
; - ftp://ftp.simtel.net/pub/simtelnet/msdos/crossasm/as80_131.zip
|
||||||
|
; - and many Simtel mirrors.
|
||||||
|
;
|
||||||
|
; as80 -i -l -n -x2 -v -z mz-1e05.asm
|
||||||
|
|
||||||
|
; Bring in additional resources.
|
||||||
|
INCLUDE "rfs_definitions.asm"
|
||||||
|
INCLUDE "macros.asm"
|
||||||
|
|
||||||
|
;
|
||||||
|
;----< MFM Minifloppy control >----
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; Call condition
|
||||||
|
;
|
||||||
|
; Case of disk initialize
|
||||||
|
; Drive N = IX+0 (0 - 3)
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; Case of sequential read & write
|
||||||
|
; Drive N = IX+0 (0 - 3)
|
||||||
|
;
|
||||||
|
; Sector addrs = IX+1,2 (0 - $045F) H C S
|
||||||
|
; (0 - 1119) -> 70 x 16 sectors -> 2 x 35 x 16
|
||||||
|
; Byte size = IX+3,4
|
||||||
|
; Address = IX+5,6
|
||||||
|
; Next track = IX+7
|
||||||
|
; Next sector = IX+8
|
||||||
|
; Start track = IX+9
|
||||||
|
; Start sector = IX+10
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; I/O Port address
|
||||||
|
;
|
||||||
|
|
||||||
|
;
|
||||||
|
; Subroutine work
|
||||||
|
;
|
||||||
|
BPRO EQU 0CF00H
|
||||||
|
BUF EQU 011A3H
|
||||||
|
BPARA EQU BPRO - 23 ; BootPARAmeter
|
||||||
|
CMD EQU BPARA + 11 ; CoMmanD
|
||||||
|
MTFG EQU CMD + 1 ; MoTorFlaG
|
||||||
|
CLBF0 EQU MTFG + 1
|
||||||
|
CLBF1 EQU CLBF0 + 1
|
||||||
|
CLBF2 EQU CLBF1 + 1
|
||||||
|
CLBF3 EQU CLBF2 + 1
|
||||||
|
VRFCNT EQU CLBF3 + 1 ; VeRiFyCouNT
|
||||||
|
STAFG EQU VRFCNT + 1 ; STAtusFlaG
|
||||||
|
|
||||||
|
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;--------< Ercode map >--------
|
||||||
|
;
|
||||||
|
; 50 : Not ready
|
||||||
|
; 41 : Data error
|
||||||
|
; Track 80 err
|
||||||
|
; Write protect err
|
||||||
|
; Seek err
|
||||||
|
; CRC err
|
||||||
|
; Lost data
|
||||||
|
; 54 : Unformat
|
||||||
|
; Recode not found
|
||||||
|
; 56 : Invalid data
|
||||||
|
;
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
ORG 0F000H
|
||||||
|
|
||||||
|
|
||||||
|
MZ_1E05: NOP
|
||||||
|
LD HL,000ADH
|
||||||
|
JR L_F007
|
||||||
|
FDX: EX (SP),HL
|
||||||
|
L_F007: LD (BPARA + 21),HL
|
||||||
|
XOR A
|
||||||
|
LD DE,0
|
||||||
|
CALL ?TMST
|
||||||
|
CALL FDCC ; FD i/o check
|
||||||
|
JP NZ,NOTIO
|
||||||
|
LD DE,BPARA ; destination address
|
||||||
|
LD HL,BOOT ; source address
|
||||||
|
LD BC,11 ; 11 bytes
|
||||||
|
LDIR ; copy
|
||||||
|
SJP: LD IX,BPARA
|
||||||
|
CALL BREAD ; read from drive 0, sector 0,
|
||||||
|
;
|
||||||
|
LD HL,BPRO ; compare this address
|
||||||
|
LD DE,IPLMC ; with the IPL MasterCode
|
||||||
|
LD B,7 ; this are 7 bytes : 3,'IPLPRO'
|
||||||
|
MCHECK: LD C,(HL)
|
||||||
|
LD A,(DE)
|
||||||
|
CP C
|
||||||
|
JP NZ,MASTE ; not equal than MasterError
|
||||||
|
INC HL
|
||||||
|
INC DE
|
||||||
|
DJNZ MCHECK
|
||||||
|
; else Master was found
|
||||||
|
LD DE,IPLM0 ; 'IPL IS LOADING'
|
||||||
|
RST 018H
|
||||||
|
LD DE,BPRO + 7 ; NAME
|
||||||
|
RST 018H
|
||||||
|
LD HL,(BPRO + 016H) ; TARGETADDRESS from BootBlock
|
||||||
|
LD A,H
|
||||||
|
OR L
|
||||||
|
JR NZ,L_F051 ; if it is != 0 than normal file
|
||||||
|
LD HL,(BPRO + 018H) ; TARGETADDRESS from BootBlock
|
||||||
|
LD A,H
|
||||||
|
OR L
|
||||||
|
JR Z,L_F057 ; if it is also 0 than ROM replace file
|
||||||
|
L_F051: XOR A ; else normal file,
|
||||||
|
LD HL,(BPRO + 018H) ; TARGETADDRESS from BootBlock
|
||||||
|
JR L_F05C
|
||||||
|
L_F057: LD A,0FFH ; target is at $0000, bankswitching is needed
|
||||||
|
LD HL,01200H ; for now use temporary buffer at $1200
|
||||||
|
L_F05C: LD (0CEFDH),A
|
||||||
|
|
||||||
|
LD (IX + 5),L ; set the TargetAddress
|
||||||
|
LD (IX + 6),H
|
||||||
|
|
||||||
|
LD HL,(BPRO + 014H) ; BYTE SIZE from BootBlock
|
||||||
|
LD (IX + 3),L
|
||||||
|
LD (IX + 4),H
|
||||||
|
|
||||||
|
LD HL,(BPRO + 01EH) ; START SECTOR from BootBlock
|
||||||
|
LD (IX + 1),L
|
||||||
|
LD (IX + 2),H
|
||||||
|
;
|
||||||
|
CALL BREAD
|
||||||
|
CALL MOFF
|
||||||
|
|
||||||
|
LD A,(0CEFDH)
|
||||||
|
CP 0FFH
|
||||||
|
JR NZ,L_F093
|
||||||
|
OUT (0E0H),A
|
||||||
|
LD HL,01200H ; SourceAddress
|
||||||
|
LD DE,(BPRO + 016H) ; TargetAddress
|
||||||
|
LD BC,(BPRO + 014H) ; ByteCounter
|
||||||
|
LDIR ; copy
|
||||||
|
L_F093: LD BC,00200H ; Default code
|
||||||
|
LD HL,(BPRO + 018H) ; TARGET/EXECUTION ADDRESS from BootBlock
|
||||||
|
JP (HL)
|
||||||
|
|
||||||
|
MASTE: CALL MOFF
|
||||||
|
LD DE,ERRM1 ; 'NOT MASTER'
|
||||||
|
JR ERRTR1
|
||||||
|
ERRTRT: CP 50
|
||||||
|
NOTIO: LD DE,IPLM3 ; 'MAKE READY FD'
|
||||||
|
JR Z,ERRTR1
|
||||||
|
LD DE,ERRM0 ; 'FD:LOADING ERROR'
|
||||||
|
ERRTR1: CALL 00009H
|
||||||
|
RST 018H
|
||||||
|
LD SP,010EEH
|
||||||
|
LD HL,(BPARA + 21)
|
||||||
|
EX (SP),HL
|
||||||
|
RET
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; PARAMETER SETTING
|
||||||
|
;
|
||||||
|
IPLMC: DB 003H ; IPL MASTER FLAG
|
||||||
|
DB "IPLPRO"
|
||||||
|
|
||||||
|
BOOT: DB 000H ; DRIVE NO.
|
||||||
|
DW 00000H ; SECTOR ADDR.
|
||||||
|
DW 00100H ; IFM BYTE SIZE
|
||||||
|
DW BPRO ; IFM LOADING ADDR.
|
||||||
|
DW 00000H ; IX+7,8 (track 0, sector 0)
|
||||||
|
|
||||||
|
ERRM1: DB "FD:NOT MASTER",00DH
|
||||||
|
IPLM0: DB "IPL IS LOADING ",00DH
|
||||||
|
IPLM3: DB "MAKE READY FD",00DH
|
||||||
|
ERRM0: DB "FD:LOADING ERROR",00DH
|
||||||
|
|
||||||
|
FDCC: LD A,0A5H
|
||||||
|
LD B,A
|
||||||
|
OUT (FDC_TRACK),A
|
||||||
|
CALL DLY80U
|
||||||
|
IN A,(FDC_TRACK)
|
||||||
|
CP B
|
||||||
|
RET
|
||||||
|
|
||||||
|
L_F111: DB 000H, 000H
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; READY CHECK
|
||||||
|
;
|
||||||
|
READY: LD A,(MTFG)
|
||||||
|
RRCA
|
||||||
|
CALL NC,MTON
|
||||||
|
LD A,(IX + 0) ; DRIVE NO SET
|
||||||
|
OR 084H
|
||||||
|
OUT (FDC_DRIVE),A ; DRIVE SELECT MOTON
|
||||||
|
XOR A
|
||||||
|
LD (CMD),A
|
||||||
|
CALL DLY60M
|
||||||
|
LD HL,0
|
||||||
|
REDY0: DEC HL
|
||||||
|
LD A,H
|
||||||
|
OR L
|
||||||
|
JR Z,REDY1
|
||||||
|
IN A,(FDC_CMD) ; STATUS GET
|
||||||
|
CPL
|
||||||
|
RLCA
|
||||||
|
JR C,REDY0
|
||||||
|
LD C,(IX + 0)
|
||||||
|
LD HL,CLBF0
|
||||||
|
LD B,000H
|
||||||
|
ADD HL,BC
|
||||||
|
BIT 0,(HL)
|
||||||
|
JR NZ,REDY2
|
||||||
|
CALL RCLB
|
||||||
|
SET 0,(HL)
|
||||||
|
REDY2: RET
|
||||||
|
|
||||||
|
REDY1: LD A,032H
|
||||||
|
JP ERJMP
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; MOTOR ON
|
||||||
|
;
|
||||||
|
MTON: LD A,080H
|
||||||
|
OUT (FDC_DRIVE),A
|
||||||
|
LD B,16
|
||||||
|
MTD1: CALL DLY60M
|
||||||
|
DJNZ MTD1
|
||||||
|
LD A,1
|
||||||
|
LD (MTFG),A
|
||||||
|
RET
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; SEEK TREATMENT
|
||||||
|
;
|
||||||
|
SEEK: LD A,01BH ; 1x = SEEK,
|
||||||
|
CALL CMDOT1 ; load head, no verify, max stepping rate
|
||||||
|
AND 099H
|
||||||
|
RET
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; MOTOR OFF
|
||||||
|
;
|
||||||
|
MOFF: PUSH AF
|
||||||
|
CALL DLY1M ; 1000 US DELAY
|
||||||
|
XOR A
|
||||||
|
OUT (FDC_DRIVE),A
|
||||||
|
LD (CLBF0),A
|
||||||
|
LD (CLBF1),A
|
||||||
|
LD (CLBF2),A
|
||||||
|
LD (CLBF3),A
|
||||||
|
LD (MTFG),A
|
||||||
|
POP AF
|
||||||
|
RET
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; RECALIBRATION
|
||||||
|
;
|
||||||
|
RCLB: LD A,00BH ; 0x = RESTORE (seek track 0)
|
||||||
|
CALL CMDOT1 ; load head, no verify, max stepping rate
|
||||||
|
AND 085H
|
||||||
|
XOR 004H
|
||||||
|
RET Z
|
||||||
|
|
||||||
|
L_F189: JP ERRORX
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; COMMAND OUT ROUTINE
|
||||||
|
;
|
||||||
|
CMDOT1: LD (CMD),A
|
||||||
|
CPL
|
||||||
|
OUT (FDC_CMD),A
|
||||||
|
CALL BSYON
|
||||||
|
CALL DLY60M
|
||||||
|
IN A,(FDC_CMD)
|
||||||
|
CPL
|
||||||
|
LD (STAFG),A
|
||||||
|
RET
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; BUSY AND WAIT
|
||||||
|
;
|
||||||
|
BSYON: PUSH DE
|
||||||
|
PUSH HL
|
||||||
|
CALL BSY0
|
||||||
|
BSYON2: LD HL,00000H
|
||||||
|
BSYON0: DEC HL
|
||||||
|
LD A,H
|
||||||
|
OR L
|
||||||
|
JR Z,BSYON1
|
||||||
|
IN A,(FDC_CMD)
|
||||||
|
RRCA
|
||||||
|
JR NC,BSYON0
|
||||||
|
POP HL
|
||||||
|
POP DE
|
||||||
|
RET
|
||||||
|
;
|
||||||
|
BSYON1: DEC E
|
||||||
|
JR NZ,BSYON2
|
||||||
|
BSYONE: LD A,029H
|
||||||
|
POP HL
|
||||||
|
POP DE
|
||||||
|
JP ERJMP
|
||||||
|
;
|
||||||
|
BSYOFF: PUSH DE
|
||||||
|
PUSH HL
|
||||||
|
CALL BSY0
|
||||||
|
BSYOF2: LD HL,00000H
|
||||||
|
BSYOF0: DEC HL
|
||||||
|
LD A,H
|
||||||
|
OR L
|
||||||
|
JR Z,BSYOF1
|
||||||
|
IN A,(FDC_CMD) ; Status Register
|
||||||
|
RRCA
|
||||||
|
JR C,BSYOF0
|
||||||
|
POP HL
|
||||||
|
POP DE
|
||||||
|
RET
|
||||||
|
;
|
||||||
|
BSYOF1: DEC E
|
||||||
|
JR NZ,BSYOF2
|
||||||
|
JR BSYONE
|
||||||
|
;
|
||||||
|
BSY0: CALL DLY80U
|
||||||
|
LD E,007H
|
||||||
|
RET
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; SEQUENTIAL READ
|
||||||
|
;
|
||||||
|
BREAD: CALL CNVRT
|
||||||
|
CALL PARST1 ; HL = IX + 5,6 (TargetAddress)
|
||||||
|
RE8: CALL SIDST
|
||||||
|
CALL SEEK
|
||||||
|
JP NZ,ERJMP
|
||||||
|
CALL PARST2 ; C = DataRegister
|
||||||
|
DI ; disable interrupts
|
||||||
|
LD A,094H ; 9x = READ SECTOR, multiple records
|
||||||
|
CALL CMDOT2 ; compare for side 0, 15ms delay,
|
||||||
|
RE6: ; disable side select compare
|
||||||
|
LD B,0 ; ByteCounter = 0, to load 256 bytes of the sector
|
||||||
|
RE4: IN A,(FDC_CMD)
|
||||||
|
RRCA
|
||||||
|
JR C,RE3
|
||||||
|
RRCA
|
||||||
|
JR C,RE4
|
||||||
|
INI ; (HL) = in(C), B = B - 1 , HL = HL + 1
|
||||||
|
JR NZ,RE4
|
||||||
|
|
||||||
|
INC (IX + 8) ; NextSector = NextSector + 1
|
||||||
|
LD A,(IX + 8)
|
||||||
|
CP 011H ; if NextSector = 17
|
||||||
|
JR Z,L_F213 ; than end
|
||||||
|
DEC D ; else SectorCounter = SectorCounter - 1
|
||||||
|
JR NZ,RE6 ; if SectorCounter = 0
|
||||||
|
JR L_F214 ; than end
|
||||||
|
L_F213: DEC D
|
||||||
|
L_F214: CALL INTER
|
||||||
|
RE3: EI ; enable interrupts
|
||||||
|
IN A,(FDC_CMD)
|
||||||
|
CPL
|
||||||
|
LD (STAFG),A
|
||||||
|
AND 0FFH
|
||||||
|
JR NZ,ERRORX
|
||||||
|
CALL ADJ ; adjust sector and track
|
||||||
|
JP Z,REND
|
||||||
|
LD A,(IX + 7) ; track
|
||||||
|
JR RE8
|
||||||
|
REND: LD A,080H
|
||||||
|
OUT (FDC_DRIVE),A ; motor on
|
||||||
|
RET
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; PARAMETER SET
|
||||||
|
;
|
||||||
|
;
|
||||||
|
PARST1: CALL READY
|
||||||
|
LD D,(IX + 4) ; D = bytes to read (highbyte) (256 bytes)
|
||||||
|
LD A,(IX + 3) ; A = bytes to read (lowbyte)
|
||||||
|
OR A ; if A = 0
|
||||||
|
JR Z,L_F23F ; than it's ok
|
||||||
|
INC D ; else read 256 bytes more (1 sector)
|
||||||
|
L_F23F: LD A,(IX + 10) ; NextSector = StartSector
|
||||||
|
LD (IX + 8),A
|
||||||
|
|
||||||
|
LD A,(IX + 9) ; NextTrack = StartTrack
|
||||||
|
LD (IX + 7),A
|
||||||
|
|
||||||
|
LD L,(IX + 5) ; HL = TargetAddress
|
||||||
|
LD H,(IX + 6)
|
||||||
|
RET
|
||||||
|
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; SIZE SEEK SET
|
||||||
|
;
|
||||||
|
SIDST: SRL A
|
||||||
|
CPL
|
||||||
|
OUT (FDC_DATA),A
|
||||||
|
JR NC,L_F25D ; NC than Head 0
|
||||||
|
LD A,1 ; else Head 1
|
||||||
|
JR L_F25E
|
||||||
|
L_F25D: XOR A
|
||||||
|
L_F25E: CPL
|
||||||
|
OUT (FDC_SIDE),A ; set HeadSelect
|
||||||
|
RET
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; TRACK & SECTOR SET
|
||||||
|
;
|
||||||
|
PARST2: LD C,FDC_DATA
|
||||||
|
LD A,(IX + 7) ; A = NextTrack
|
||||||
|
SRL A
|
||||||
|
CPL
|
||||||
|
OUT (FDC_TRACK),A
|
||||||
|
LD A,(IX + 8) ; A = NextSector
|
||||||
|
CPL
|
||||||
|
OUT (FDC_SECTOR),A
|
||||||
|
RET
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; ADJUST SECT & TRACK
|
||||||
|
;
|
||||||
|
ADJ: LD A,(IX + 8) ; A = NextSector
|
||||||
|
CP 17 ; if NextSector = 17
|
||||||
|
JR NZ,L_F282 ; than the border is not reached
|
||||||
|
LD A,001H ; else
|
||||||
|
LD (IX + 8),A ; NextSector = 1
|
||||||
|
INC (IX + 7) ; NextTrack = NextTrack + 1
|
||||||
|
L_F282: LD A,D
|
||||||
|
OR A
|
||||||
|
RET
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; COMMAND OUT & WAIT
|
||||||
|
;
|
||||||
|
CMDOT2: LD (CMD),A
|
||||||
|
CPL
|
||||||
|
OUT (FDC_CMD),A
|
||||||
|
CALL BSYOFF
|
||||||
|
RET
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; FORCE INTERRUPT
|
||||||
|
;
|
||||||
|
INTER: LD A,0D8H
|
||||||
|
CPL
|
||||||
|
OUT (FDC_CMD),A
|
||||||
|
CALL BSYON
|
||||||
|
RET
|
||||||
|
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; STATUS CHECK
|
||||||
|
;
|
||||||
|
ERRORX: LD A,(CMD)
|
||||||
|
CP 00BH ; Restore (seek track 0)
|
||||||
|
JR Z,ERCK1
|
||||||
|
CP 01BH ; Seek
|
||||||
|
JR Z,ERCK1
|
||||||
|
CP 0F4H ; Write track
|
||||||
|
JR Z,ERCK1
|
||||||
|
LD A,(STAFG)
|
||||||
|
BIT 7,A
|
||||||
|
JR NZ,ERRET
|
||||||
|
BIT 6,A
|
||||||
|
JR NZ,ERRET1
|
||||||
|
BIT 4,A
|
||||||
|
LD A,54
|
||||||
|
JR NZ,ERJMP
|
||||||
|
JR ERRET1
|
||||||
|
ERCK1: LD A,(STAFG)
|
||||||
|
BIT 7,A
|
||||||
|
JR NZ,ERRET
|
||||||
|
ERRET1: LD A,41
|
||||||
|
JR ERJMP
|
||||||
|
ERRET: LD A,50
|
||||||
|
ERJMP: CALL MOFF
|
||||||
|
JP ERRTRT
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; SECTOR TO TRACK & SECTOR CONVERT
|
||||||
|
;
|
||||||
|
CNVRT: LD B,0 ; TrackCounter = 0
|
||||||
|
LD DE,16 ; 16 sectors per track
|
||||||
|
LD L,(IX + 1) ; HL = SectorAddress
|
||||||
|
LD H,(IX + 2)
|
||||||
|
XOR A
|
||||||
|
TRANS0: SBC HL,DE ; SectorAddress - SectorPerTrack
|
||||||
|
JR C,TRANS1 ; if < 0 than ready
|
||||||
|
INC B ; else TrackCounter = TrackCounter + 1
|
||||||
|
JR TRANS0 ; next try
|
||||||
|
|
||||||
|
TRANS1: ADD HL,DE ; undo the last substraction
|
||||||
|
LD H,B
|
||||||
|
INC L ; adjust sector (sector is 1..16 and not 0..15)
|
||||||
|
LD (IX + 9),H ; set StartTrack
|
||||||
|
LD (IX + 10),L ; set StartSector
|
||||||
|
RET
|
||||||
|
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; TIME DELAY ( 1m & 60m & 80u )
|
||||||
|
;
|
||||||
|
DLY80U: PUSH DE
|
||||||
|
LD DE,15
|
||||||
|
JP DLYT
|
||||||
|
|
||||||
|
DLY1M: PUSH DE
|
||||||
|
LD DE,160
|
||||||
|
JP DLYT
|
||||||
|
|
||||||
|
DLY60M: PUSH DE
|
||||||
|
LD DE,8230
|
||||||
|
DLYT: DEC DE
|
||||||
|
LD A,E
|
||||||
|
OR D
|
||||||
|
JR NZ,DLYT
|
||||||
|
POP DE
|
||||||
|
RET
|
||||||
|
|
||||||
|
|
||||||
|
ALIGN 0FFF0H
|
||||||
|
ORG 0FFF0H
|
||||||
|
|
||||||
|
DB " 84.03.14 V1.0A"
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
;
|
;
|
||||||
; on Thursday, 06 of February 2020 at 01:38 PM
|
; on Thursday, 06 of February 2020 at 01:38 PM
|
||||||
;
|
;
|
||||||
i ; Bring in additional resources.
|
; Bring in additional resources.
|
||||||
INCLUDE "rfs_definitions.asm"
|
INCLUDE "rfs_definitions.asm"
|
||||||
INCLUDE "macros.asm"
|
INCLUDE "macros.asm"
|
||||||
SS: EQU 00089h
|
SS: EQU 00089h
|
||||||
|
|||||||
77
asm/rfs.asm
77
asm/rfs.asm
@@ -11,20 +11,22 @@
|
|||||||
;- Copyright: (c) 2018-2023 Philip Smart <philip.smart@net2net.org>
|
;- Copyright: (c) 2018-2023 Philip Smart <philip.smart@net2net.org>
|
||||||
;-
|
;-
|
||||||
;- History: v1.0 July 2019 - Merged 2 utilities to create this compilation.
|
;- History: v1.0 July 2019 - Merged 2 utilities to create this compilation.
|
||||||
; v2.0 May 2020 - Bank switch changes with release of v2 pcb with coded latch. The coded
|
;- v2.0 May 2020 - Bank switch changes with release of v2 pcb with coded latch. The coded
|
||||||
; latch adds additional instruction overhead as the control latches share
|
;- latch adds additional instruction overhead as the control latches share
|
||||||
; the same address space as the Flash RAMS thus the extra hardware to
|
;- the same address space as the Flash RAMS thus the extra hardware to
|
||||||
; only enable the control registers if a fixed number of reads is made
|
;- only enable the control registers if a fixed number of reads is made
|
||||||
; into the upper 8 bytes which normally wouldnt occur. Caveat - ensure
|
;- into the upper 8 bytes which normally wouldnt occur. Caveat - ensure
|
||||||
; that no loop instruction is ever placed into EFF8H - EFFFH.
|
;- that no loop instruction is ever placed into EFF8H - EFFFH.
|
||||||
; v2.0 July 2020 - Updated for the v2.1 hardware. RFS can run with a tranZPUter board with
|
;- v2.0 July 2020 - Updated for the v2.1 hardware. RFS can run with a tranZPUter board with
|
||||||
; or without the K64 I/O processor. RFS wont use the K64 processor all
|
;- or without the K64 I/O processor. RFS wont use the K64 processor all
|
||||||
; operations are done by the Z80 under RFS.
|
;- operations are done by the Z80 under RFS.
|
||||||
;- v2.1 April 2021- Updates for the v2.1 RFS board.
|
;- v2.1 April 2021- Updates for the v2.1 RFS board.
|
||||||
;- v2.2 June 2023 - Updates for the Kuma 40/80 upgrade and FusionX.
|
;- v2.2 June 2023 - Updates for the Kuma 40/80 upgrade and FusionX.
|
||||||
;- v2.3 Aug 2023 - Updates to make RFS run under the SFD700 Floppy Disk Interface board.
|
;- v2.3 Aug 2023 - Updates to make RFS run under the SFD700 Floppy Disk Interface board.
|
||||||
;- UROM remains the same, a 2K paged ROM, MROM is located at F000 when
|
;- UROM remains the same, a 2K paged ROM, MROM is located at F000 when
|
||||||
;- RFS is built for the SFD700.
|
;- RFS is built for the SFD700.
|
||||||
|
;- v2.31 Dec 2025 - Bug fixes. Disabled internal floppy control logic for SFD700 as it is not
|
||||||
|
;- needed, AFI ROM always needs to be present, especially for MZ-80A.
|
||||||
;-
|
;-
|
||||||
;--------------------------------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------------------------------
|
||||||
;- This source file is free software: you can redistribute it and-or modify
|
;- This source file is free software: you can redistribute it and-or modify
|
||||||
@@ -49,7 +51,7 @@
|
|||||||
ALIGN 0E300H
|
ALIGN 0E300H
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
; Monitor command table. This table contains the list of recognised commands along with the
|
; Monitor command table (SFD700). This table contains the list of recognised commands along with the
|
||||||
; handler function and bank in which it is located.
|
; handler function and bank in which it is located.
|
||||||
;
|
;
|
||||||
; 7 6 5:3 2:0
|
; 7 6 5:3 2:0
|
||||||
@@ -80,10 +82,7 @@ CMDTABLE2: IF BUILD_SFD700 = 1
|
|||||||
DB 'D' ; Dump Memory.
|
DB 'D' ; Dump Memory.
|
||||||
DW DUMPX
|
DW DUMPX
|
||||||
DB 000H | 000H | 008H | 001H
|
DB 000H | 000H | 008H | 001H
|
||||||
DB 'F' ; RFS Floppy boot code.
|
DB 'F' ; 'F' RFS Floppy boot code.
|
||||||
DW FLOPPY
|
|
||||||
DB 000H | 000H | 008H | 001H
|
|
||||||
DB 0AAH ; Original Floppy boot code.
|
|
||||||
DW FDCK
|
DW FDCK
|
||||||
DB 000H | 000H | 030H | 001H
|
DB 000H | 000H | 030H | 001H
|
||||||
DB 'H' ; Help screen.
|
DB 'H' ; Help screen.
|
||||||
@@ -388,7 +387,7 @@ CMDCMP: XOR A ; Clear
|
|||||||
LD HL,CMDTABLE
|
LD HL,CMDTABLE
|
||||||
ENDIF
|
ENDIF
|
||||||
IF BUILD_SFD700 = 1
|
IF BUILD_SFD700 = 1
|
||||||
LD HL,CMDTABLE2
|
LD HL,CMDTABLE2 ; SFD700 Command table located in lower location.
|
||||||
ENDIF
|
ENDIF
|
||||||
CMDCMP0: LD DE,BUFER+1 ; First command byte after the * prompt.
|
CMDCMP0: LD DE,BUFER+1 ; First command byte after the * prompt.
|
||||||
LD A,(HL)
|
LD A,(HL)
|
||||||
@@ -419,9 +418,9 @@ CMDCMP3: LD A,(HL) ; Comma
|
|||||||
INC HL
|
INC HL
|
||||||
LD H,(HL)
|
LD H,(HL)
|
||||||
LD L,A
|
LD L,A
|
||||||
PUSH HL
|
PUSH HL ; Push the address of the function to be called.
|
||||||
LD (TMPADR),DE ; Store the key buffer location where arguments start.
|
LD (TMPADR),DE ; Store the key buffer location where arguments start.
|
||||||
LD A,C
|
LD A,C ; Get back command properties, ie. bank number
|
||||||
SRL A
|
SRL A
|
||||||
SRL A
|
SRL A
|
||||||
SRL A
|
SRL A
|
||||||
@@ -433,7 +432,7 @@ CMDCMP3: LD A,(HL) ; Comma
|
|||||||
LD DE,BKSW0to1 - BKSW0to0 ; DE is the number of bytes between bank switch calls.
|
LD DE,BKSW0to1 - BKSW0to0 ; DE is the number of bytes between bank switch calls.
|
||||||
OR A
|
OR A
|
||||||
JR Z,CMDCMP5
|
JR Z,CMDCMP5
|
||||||
CMDCMP4: ADD HL,DE
|
CMDCMP4: ADD HL,DE ; Basically adding the bank size to the address to get ROM location.
|
||||||
DJNZ CMDCMP4
|
DJNZ CMDCMP4
|
||||||
CMDCMP5: EX DE,HL ; Address of bank switch function into DE.
|
CMDCMP5: EX DE,HL ; Address of bank switch function into DE.
|
||||||
POP HL ; Get address of command into HL.
|
POP HL ; Get address of command into HL.
|
||||||
@@ -441,7 +440,7 @@ CMDCMP5: EX DE,HL ; Addre
|
|||||||
PUSH BC ; Address to return to after command is executed.
|
PUSH BC ; Address to return to after command is executed.
|
||||||
PUSH DE ; Now jump to DE which will switch to the correct bank and execute function at HL.
|
PUSH DE ; Now jump to DE which will switch to the correct bank and execute function at HL.
|
||||||
LD DE,(TMPADR)
|
LD DE,(TMPADR)
|
||||||
RET
|
RET ; Return to address in DE, which is the required bank.
|
||||||
CMDCMP6: LD DE,CMDCMPEND ; Put return address onto stack.
|
CMDCMP6: LD DE,CMDCMPEND ; Put return address onto stack.
|
||||||
PUSH DE
|
PUSH DE
|
||||||
LD DE,(TMPADR) ; For the current bank, just jump to the function.
|
LD DE,(TMPADR) ; For the current bank, just jump to the function.
|
||||||
@@ -461,7 +460,7 @@ CMDCMPEND: LD A,(RESULT)
|
|||||||
LD HL,(EXADR)
|
LD HL,(EXADR)
|
||||||
JP (HL)
|
JP (HL)
|
||||||
|
|
||||||
; Monitor command table. This table contains the list of recognised commands along with the
|
; Monitor command table (ROMDISK). This table contains the list of recognised commands along with the
|
||||||
; handler function and bank in which it is located.
|
; handler function and bank in which it is located.
|
||||||
;
|
;
|
||||||
; 7 6 5:3 2:0
|
; 7 6 5:3 2:0
|
||||||
@@ -501,10 +500,10 @@ CMDTABLE: IF BUILD_ROMDISK = 1
|
|||||||
DB "EC" ; Erase file.
|
DB "EC" ; Erase file.
|
||||||
DW ERASESD
|
DW ERASESD
|
||||||
DB 000H | 000H | 008H | 001H
|
DB 000H | 000H | 008H | 001H
|
||||||
DB 'F' ; RFS Floppy boot code.
|
DB 'F' ; 'F' RFS Floppy boot code.
|
||||||
DW FLOPPY
|
DW FLOPPY
|
||||||
DB 000H | 000H | 008H | 001H
|
DB 000H | 000H | 008H | 001H
|
||||||
DB 0AAH ; Original Floppy boot code.
|
DB 0AAH ; 'f' Original Floppy boot code.
|
||||||
DW FDCK
|
DW FDCK
|
||||||
DB 000H | 000H | 030H | 001H
|
DB 000H | 000H | 030H | 001H
|
||||||
DB 'H' ; Help screen.
|
DB 'H' ; Help screen.
|
||||||
@@ -617,7 +616,7 @@ HIROM: IF BUILD_ROMDISK = 1
|
|||||||
LD A, (MEMSW) ; Swap ROM into high range slot.
|
LD A, (MEMSW) ; Swap ROM into high range slot.
|
||||||
LD A, ROMBANK2
|
LD A, ROMBANK2
|
||||||
LD (ROMBK1),A ; Save bank being enabled.
|
LD (ROMBK1),A ; Save bank being enabled.
|
||||||
HWSELMROM ; Switch to the hiload rom in bank 2.
|
HWSELMROM ; Switch to the hiload rom in bank 2.
|
||||||
JP 0C000H
|
JP 0C000H
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
@@ -874,7 +873,6 @@ PRTMZF4: OR A
|
|||||||
POP BC
|
POP BC
|
||||||
RET
|
RET
|
||||||
|
|
||||||
|
|
||||||
; Method to list the directory of the ROM devices.
|
; Method to list the directory of the ROM devices.
|
||||||
;
|
;
|
||||||
DIRROM: ;DI ; Disable interrupts as we are switching out the main rom.
|
DIRROM: ;DI ; Disable interrupts as we are switching out the main rom.
|
||||||
@@ -903,7 +901,7 @@ DIRROM: ;DI ; Disab
|
|||||||
; B = Bank Page
|
; B = Bank Page
|
||||||
; C = Block in page
|
; C = Block in page
|
||||||
;
|
;
|
||||||
LD B,MROMPAGES ; First 8 pages are reserved in MROM bank.
|
LD B,MROMPAGES ; First set of pages are reserved in MROM bank.
|
||||||
LD C,0 ; Block in page.
|
LD C,0 ; Block in page.
|
||||||
;
|
;
|
||||||
DIRNXTPG: LD A,B
|
DIRNXTPG: LD A,B
|
||||||
@@ -970,7 +968,7 @@ FINDMZF: PUSH DE
|
|||||||
; C = Block in page
|
; C = Block in page
|
||||||
;
|
;
|
||||||
FINDMZF0: POP DE ; Get file sequence number in D.
|
FINDMZF0: POP DE ; Get file sequence number in D.
|
||||||
LD B,MROMPAGES ; First 4 pages are reserved in User ROM bank.
|
LD B,MROMPAGES ; First set of pages are reserved in User ROM bank.
|
||||||
LD C,0 ; Block in page.
|
LD C,0 ; Block in page.
|
||||||
FINDMZF1: LD A,B
|
FINDMZF1: LD A,B
|
||||||
LD (WRKROMBK1), A
|
LD (WRKROMBK1), A
|
||||||
@@ -1051,17 +1049,18 @@ LOADROM1: ;DI
|
|||||||
PUSH HL ; Preserve execute flag.
|
PUSH HL ; Preserve execute flag.
|
||||||
EX DE,HL ; User ROM expects HL to have the filename pointer.
|
EX DE,HL ; User ROM expects HL to have the filename pointer.
|
||||||
|
|
||||||
PUSH HL ; Save pointer to filename for FINDMZF in Monitor ROM.
|
|
||||||
|
|
||||||
; D = File sequence number.
|
; D = File sequence number.
|
||||||
LD D,0 ; File numbering start.
|
LD D,0 ; File numbering start.
|
||||||
;
|
;
|
||||||
LD A,ROMBANK3 ; Activate the RFS Utilities MROM bank.
|
IF BUILD_ROMDISK = 1
|
||||||
LD (WRKROMBK1), A
|
PUSH HL ; Save pointer to filename for FINDMZF in Monitor ROM.
|
||||||
HWSELMROM
|
LD A,ROMBANK3 ; Activate the RFS Utilities MROM bank.
|
||||||
CALL MFINDMZF ; Try and find the file in User ROM via MROM utility.
|
LD (WRKROMBK1), A
|
||||||
POP HL
|
HWSELMROM
|
||||||
JR Z,MROMLOAD0
|
CALL MFINDMZF ; Try and find the file in User ROM via MROM utility.
|
||||||
|
POP HL
|
||||||
|
JR Z,MROMLOAD0
|
||||||
|
ENDIF
|
||||||
;
|
;
|
||||||
CALL FINDMZF ; Find the bank and block where the file resides. HL = filename.
|
CALL FINDMZF ; Find the bank and block where the file resides. HL = filename.
|
||||||
JR Z, LROMLOAD
|
JR Z, LROMLOAD
|
||||||
@@ -1098,7 +1097,7 @@ LOADROMEND:;EI
|
|||||||
;
|
;
|
||||||
LROMLOAD: PUSH BC
|
LROMLOAD: PUSH BC
|
||||||
;
|
;
|
||||||
PUSH BC
|
PUSH BC ; Print Loading <file>
|
||||||
LD DE,MSGLOAD+1
|
LD DE,MSGLOAD+1
|
||||||
LD BC,NAME
|
LD BC,NAME
|
||||||
LD HL,PRINTMSG
|
LD HL,PRINTMSG
|
||||||
@@ -1110,7 +1109,7 @@ LROMLOAD: PUSH BC
|
|||||||
HWSELMROM
|
HWSELMROM
|
||||||
;
|
;
|
||||||
LD DE, IBUFE ; Copy the header into the work area.
|
LD DE, IBUFE ; Copy the header into the work area.
|
||||||
LD HL, 00000h ; Add block offset to get the valid block.
|
LD HL, MROMSTART ; Add block offset to get the valid block.
|
||||||
LD A,C
|
LD A,C
|
||||||
IF RFSSECTSZ >= 512
|
IF RFSSECTSZ >= 512
|
||||||
RLCA
|
RLCA
|
||||||
@@ -1141,7 +1140,7 @@ LROMLOAD2: LD A, B
|
|||||||
HWSELMROM
|
HWSELMROM
|
||||||
|
|
||||||
LROMLOAD3: PUSH BC
|
LROMLOAD3: PUSH BC
|
||||||
LD HL, 00000h
|
LD HL, MROMSTART
|
||||||
LD A, C
|
LD A, C
|
||||||
IF RFSSECTSZ >= 512
|
IF RFSSECTSZ >= 512
|
||||||
RLCA
|
RLCA
|
||||||
@@ -1483,6 +1482,10 @@ DEFAULTFNE: EQU $
|
|||||||
ORG 0EFF8h
|
ORG 0EFF8h
|
||||||
DB 0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0AAh
|
DB 0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0AAh
|
||||||
|
|
||||||
|
IF BUILD_SFD700 = 1
|
||||||
|
ALIGN 0F000H
|
||||||
|
ENDIF
|
||||||
|
|
||||||
MEND:
|
MEND:
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -11,13 +11,16 @@
|
|||||||
;- Copyright: (c) 2018-2023 Philip Smart <philip.smart@net2net.org>
|
;- Copyright: (c) 2018-2023 Philip Smart <philip.smart@net2net.org>
|
||||||
;-
|
;-
|
||||||
;- History: July 2019 - Merged 2 utilities to create this compilation.
|
;- History: July 2019 - Merged 2 utilities to create this compilation.
|
||||||
; May 2020 - Bank switch changes with release of v2 pcb with coded latch. The coded
|
;- May 2020 - Bank switch changes with release of v2 pcb with coded latch. The coded
|
||||||
; latch adds additional instruction overhead as the control latches share
|
;- latch adds additional instruction overhead as the control latches share
|
||||||
; the same address space as the Flash RAMS thus the extra hardware to
|
;- the same address space as the Flash RAMS thus the extra hardware to
|
||||||
; only enable the control registers if a fixed number of reads is made
|
;- only enable the control registers if a fixed number of reads is made
|
||||||
; into the upper 8 bytes which normally wouldnt occur. Caveat - ensure
|
;- into the upper 8 bytes which normally wouldnt occur. Caveat - ensure
|
||||||
; that no loop instruction is ever placed into EFF8H - EFFFH.
|
;- that no loop instruction is ever placed into EFF8H - EFFFH.
|
||||||
; Mar 2023 - Fixed Floppy bug where the driver letter entered wasnt recognised.
|
;- Mar 2023 - Fixed Floppy bug where the driver letter entered wasnt recognised.
|
||||||
|
;- Aug 2023 - Updates to make RFS run under the SFD700 Floppy Disk Interface board.
|
||||||
|
;- UROM remains the same, a 2K paged ROM, MROM is located at F000 when
|
||||||
|
;- RFS is built for the SFD700.
|
||||||
;-
|
;-
|
||||||
;--------------------------------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------------------------------
|
||||||
;- This source file is free software: you can redistribute it and-or modify
|
;- This source file is free software: you can redistribute it and-or modify
|
||||||
@@ -34,19 +37,19 @@
|
|||||||
;- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
;- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
;--------------------------------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
IF BUILD_SFD700 = 1
|
IF BUILD_SFD700 = 1
|
||||||
ORG 0E000H
|
ORG 0E000H
|
||||||
|
ALIGN 0E300H
|
||||||
|
DB "BANK1"
|
||||||
ALIGN UROMADDR
|
ALIGN UROMADDR
|
||||||
|
ENDIF
|
||||||
|
|
||||||
ENDIF
|
|
||||||
|
|
||||||
;============================================================
|
;============================================================
|
||||||
;
|
;
|
||||||
; USER ROM BANK 1 - Floppy Disk Controller functions.
|
; USER ROM BANK 1 - Floppy Disk Controller functions.
|
||||||
;
|
;
|
||||||
;============================================================
|
;============================================================
|
||||||
ORG UROMADDR
|
ORG UROMADDR
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
; Common code spanning all banks.
|
; Common code spanning all banks.
|
||||||
@@ -136,369 +139,371 @@ FDCKROM: LD A,(0F000h)
|
|||||||
OR A
|
OR A
|
||||||
RET
|
RET
|
||||||
|
|
||||||
FLOPPY: PUSH DE ; Preserve pointer to input buffer.
|
FLOPPY: IF BUILD_ROMDISK = 1
|
||||||
LD DE,BPARA ; Copy disk parameter block into RAM work area. (From)
|
PUSH DE ; Preserve pointer to input buffer.
|
||||||
LD HL,PRMBLK ; (To)
|
LD DE,BPARA ; Copy disk parameter block into RAM work area. (From)
|
||||||
LD BC,0000BH ; 11 bytes of config data.
|
LD HL,PRMBLK ; (To)
|
||||||
LDIR ; BC=0, HL=F0E8, DE=1013
|
LD BC,0000BH ; 11 bytes of config data.
|
||||||
POP DE ; init 1001-1005, port $DC mit $00
|
LDIR ; BC=0, HL=F0E8, DE=1013
|
||||||
LD A,(DE) ; If not at the end of the line, then process as the boot disk number.
|
POP DE ; init 1001-1005, port $DC mit $00
|
||||||
CP 00Dh ;
|
LD A,(DE) ; If not at the end of the line, then process as the boot disk number.
|
||||||
JR NZ,GETBOOTDSK ;
|
CP 00Dh ;
|
||||||
CALL DSKINIT ; Initialise disk and flags.
|
JR NZ,GETBOOTDSK ;
|
||||||
L000F: LD DE,MSGBOOTDRV ;
|
CALL DSKINIT ; Initialise disk and flags.
|
||||||
LD HL,PRINTMSG
|
L000F: LD DE,MSGBOOTDRV ;
|
||||||
CALL BKSW1to6
|
LD HL,PRINTMSG
|
||||||
LD DE,011A3H ;
|
CALL BKSW1to6
|
||||||
CALL GETL ;
|
LD DE,011A3H ;
|
||||||
LD A,(DE) ;
|
CALL GETL ;
|
||||||
CP 01BH ; BREAK pressed?
|
LD A,(DE) ;
|
||||||
JP Z,ST1X ;
|
CP 01BH ; BREAK pressed?
|
||||||
LD HL,19 ; Check input value is in range 1-4.
|
JP Z,ST1X ;
|
||||||
ADD HL,DE ;
|
LD HL,19 ; Check input value is in range 1-4.
|
||||||
LD A,(HL) ;
|
ADD HL,DE ;
|
||||||
CP 00DH ;
|
LD A,(HL) ;
|
||||||
JR Z,L003A ;
|
CP 00DH ;
|
||||||
GETBOOTDSK:CALL HEX ; Convert number to binary
|
JR Z,L003A ;
|
||||||
JR C,L000F ; If illegal, loop back and re-prompt.
|
GETBOOTDSK: CALL HEX ; Convert number to binary
|
||||||
DEC A ;
|
JR C,L000F ; If illegal, loop back and re-prompt.
|
||||||
CP 004H ; Check in range, if not loop back.
|
DEC A ;
|
||||||
JR NC,L000F ;
|
CP 004H ; Check in range, if not loop back.
|
||||||
LD (BPARA),A ; Store in parameter block.
|
JR NC,L000F ;
|
||||||
L003A: LD IX,BPARA ; Point to drive number.,
|
LD (BPARA),A ; Store in parameter block.
|
||||||
CALL DSKREAD ; Read sector 1 of trk 0
|
L003A: LD IX,BPARA ; Point to drive number.,
|
||||||
LD HL,0CE00H ; Now compare the first 7 bytes of what was read to see if this is a bootable disk.
|
CALL DSKREAD ; Read sector 1 of trk 0
|
||||||
LD DE,DSKID ;
|
LD HL,0CE00H ; Now compare the first 7 bytes of what was read to see if this is a bootable disk.
|
||||||
LD B,007H ;
|
LD DE,DSKID ;
|
||||||
L0049: LD C,(HL) ;
|
LD B,007H ;
|
||||||
LD A,(DE) ;
|
L0049: LD C,(HL) ;
|
||||||
CP C ;
|
LD A,(DE) ;
|
||||||
JP NZ,L008C ; If NZ then this is not a master disk, ie not bootable, so error exit with message.
|
CP C ;
|
||||||
INC HL ;
|
JP NZ,L008C ; If NZ then this is not a master disk, ie not bootable, so error exit with message.
|
||||||
INC DE ;
|
INC HL ;
|
||||||
DJNZ L0049 ;
|
INC DE ;
|
||||||
LD DE,MSGIPLLOAD ;
|
DJNZ L0049 ;
|
||||||
LD HL,PRINTMSG
|
LD DE,MSGIPLLOAD ;
|
||||||
CALL BKSW1to6
|
LD HL,PRINTMSG
|
||||||
LD DE,0CE07H ; Program name stored at 8th byte in boot sector.
|
CALL BKSW1to6
|
||||||
LD HL,PRTFN
|
LD DE,0CE07H ; Program name stored at 8th byte in boot sector.
|
||||||
CALL BKSW1to6
|
LD HL,PRTFN
|
||||||
LD HL,(0CE16H) ; Get the load address
|
CALL BKSW1to6
|
||||||
LD (IX+005H),L ; And store in parameter block at 100D/100E
|
LD HL,(0CE16H) ; Get the load address
|
||||||
LD (IX+006H),H ;
|
LD (IX+005H),L ; And store in parameter block at 100D/100E
|
||||||
INC HL
|
LD (IX+006H),H ;
|
||||||
DEC HL
|
INC HL
|
||||||
JR NZ, NOTCPM ; If load address is 0 then where loading CPM.
|
DEC HL
|
||||||
; LD A,(MEMSW) ; Page out ROM.
|
JR NZ, NOTCPM ; If load address is 0 then where loading CPM.
|
||||||
NOTCPM: LD HL,(0CE14H) ; Get the size
|
;LD A,(MEMSW) ; Page out ROM.
|
||||||
LD (IX+003H),L ; And store in parameter block at 100B/100C
|
NOTCPM: LD HL,(0CE14H) ; Get the size
|
||||||
LD (IX+004H),H ;
|
LD (IX+003H),L ; And store in parameter block at 100B/100C
|
||||||
LD HL,(0CE1EH) ; Get logical sector number
|
LD (IX+004H),H ;
|
||||||
LD (IX+001H),L ; And store in parameter block at 1009/100A
|
LD HL,(0CE1EH) ; Get logical sector number
|
||||||
LD (IX+002H),H ;
|
LD (IX+001H),L ; And store in parameter block at 1009/100A
|
||||||
CALL DSKREAD ; Read the required data and store in memory.
|
LD (IX+002H),H ;
|
||||||
CALL DSKINIT ; Reset the disk ready for next operation.
|
CALL DSKREAD ; Read the required data and store in memory.
|
||||||
LD HL,(0CE18H) ; Get the execution address
|
CALL DSKINIT ; Reset the disk ready for next operation.
|
||||||
JP (HL) ; And execute.
|
LD HL,(0CE18H) ; Get the execution address
|
||||||
|
JP (HL) ; And execute.
|
||||||
|
|
||||||
DSKLOADERR:LD DE,MSGLOADERR ; Loading error message
|
DSKLOADERR: LD DE,MSGLOADERR ; Loading error message
|
||||||
JR L008F ; (+003h)
|
JR L008F ; (+003h)
|
||||||
|
|
||||||
L008C: LD DE,MSGDSKNOTMST ; This is not a boot/master disk message.
|
L008C: LD DE,MSGDSKNOTMST ; This is not a boot/master disk message.
|
||||||
L008F: LD HL,PRINTMSG
|
L008F: LD HL,PRINTMSG
|
||||||
CALL BKSW1to6
|
CALL BKSW1to6
|
||||||
LD DE,ERRTONE ; Play error tone.
|
LD DE,ERRTONE ; Play error tone.
|
||||||
CALL MELDY
|
CALL MELDY
|
||||||
;
|
;
|
||||||
LD SP,(TMPSTACKP) ; Recover the correct stack pointer before exit.
|
LD SP,(TMPSTACKP) ; Recover the correct stack pointer before exit.
|
||||||
RET ; JP SS
|
RET ; JP SS
|
||||||
|
|
||||||
L0104: LD A,(MOTON) ; motor on flag
|
L0104: LD A,(MOTON) ; motor on flag
|
||||||
RRCA ; motor off?
|
RRCA ; motor off?
|
||||||
CALL NC,DSKMOTORON ; yes, set motor on and wait
|
CALL NC,DSKMOTORON ; yes, set motor on and wait
|
||||||
LD A,(IX+000H) ;drive no
|
LD A,(IX+000H) ;drive no
|
||||||
OR 084H ;
|
OR 084H ;
|
||||||
OUT (0DCH),A ; Motor on for drive 0-3
|
OUT (0DCH),A ; Motor on for drive 0-3
|
||||||
XOR A ;
|
XOR A ;
|
||||||
LD (FDCCMD),A ; clr latest FDC command byte
|
LD (FDCCMD),A ; clr latest FDC command byte
|
||||||
LD HL,00000H ;
|
LD HL,00000H ;
|
||||||
L0119: DEC HL ;
|
L0119: DEC HL ;
|
||||||
LD A,H ;
|
LD A,H ;
|
||||||
OR L ;
|
OR L ;
|
||||||
JP Z,DSKERR ; Reset and print message that this is not a bootable disk.
|
JP Z,DSKERR ; Reset and print message that this is not a bootable disk.
|
||||||
IN A,(0D8H) ; Status register.
|
IN A,(0D8H) ; Status register.
|
||||||
CPL ;
|
CPL ;
|
||||||
RLCA ;
|
RLCA ;
|
||||||
JR C,L0119 ; Wait on motor off (bit 7)
|
JR C,L0119 ; Wait on motor off (bit 7)
|
||||||
LD C,(IX+000H) ; Drive number
|
LD C,(IX+000H) ; Drive number
|
||||||
LD HL,TRK0FD1 ; 1 track 0 flag for each drive
|
LD HL,TRK0FD1 ; 1 track 0 flag for each drive
|
||||||
LD B,000H ;
|
LD B,000H ;
|
||||||
ADD HL,BC ; Compute related flag 1002/1003/1004/1005
|
ADD HL,BC ; Compute related flag 1002/1003/1004/1005
|
||||||
BIT 0,(HL) ;
|
BIT 0,(HL) ;
|
||||||
JR NZ,L0137 ;
|
JR NZ,L0137 ;
|
||||||
CALL DSKSEEKTK0 ; Seek track 0.
|
CALL DSKSEEKTK0 ; Seek track 0.
|
||||||
SET 0,(HL) ; Set bit 0 of trk 0 flag
|
SET 0,(HL) ; Set bit 0 of trk 0 flag
|
||||||
L0137: RET
|
L0137: RET
|
||||||
|
|
||||||
; Turn disk motor on.
|
; Turn disk motor on.
|
||||||
DSKMOTORON:LD A,080H
|
DSKMOTORON: LD A,080H
|
||||||
OUT (0DCH),A ; Motor on
|
OUT (0DCH),A ; Motor on
|
||||||
LD B,010H ;
|
LD B,010H ;
|
||||||
L013E: CALL L02C7 ;
|
L013E: CALL L02C7 ;
|
||||||
DJNZ L013E ; Wait until becomes ready.
|
DJNZ L013E ; Wait until becomes ready.
|
||||||
LD A,001H ; Set motor on flag.
|
LD A,001H ; Set motor on flag.
|
||||||
LD (MOTON),A ;
|
LD (MOTON),A ;
|
||||||
RET
|
RET
|
||||||
|
|
||||||
L0149: LD A,01BH
|
L0149: LD A,01BH
|
||||||
CALL DSKCMD
|
CALL DSKCMD
|
||||||
AND 099H
|
AND 099H
|
||||||
RET
|
RET
|
||||||
|
|
||||||
; Initialise drive and reset flags, Set motor off
|
; Initialise drive and reset flags, Set motor off
|
||||||
DSKINIT: XOR A
|
DSKINIT: XOR A
|
||||||
OUT (0DCH),A ; Motor on/off
|
OUT (0DCH),A ; Motor on/off
|
||||||
LD (TRK0FD1),A ; Track 0 flag drive 1
|
LD (TRK0FD1),A ; Track 0 flag drive 1
|
||||||
LD (TRK0FD2),A ; Track 0 flag drive 2
|
LD (TRK0FD2),A ; Track 0 flag drive 2
|
||||||
LD (TRK0FD3),A ; Track 0 flag drive 3
|
LD (TRK0FD3),A ; Track 0 flag drive 3
|
||||||
LD (TRK0FD4),A ; Track 0 flag drive 4
|
LD (TRK0FD4),A ; Track 0 flag drive 4
|
||||||
LD (MOTON),A ; Motor on flag
|
LD (MOTON),A ; Motor on flag
|
||||||
RET
|
RET
|
||||||
|
|
||||||
DSKSEEKTK0:LD A,00BH ; Restore command, seek track 0.
|
DSKSEEKTK0: LD A,00BH ; Restore command, seek track 0.
|
||||||
CALL DSKCMD ; Send command to FDC.
|
CALL DSKCMD ; Send command to FDC.
|
||||||
AND 085H ; Process result.
|
AND 085H ; Process result.
|
||||||
XOR 004H
|
XOR 004H
|
||||||
RET Z
|
RET Z
|
||||||
JP DSKERR
|
JP DSKERR
|
||||||
|
|
||||||
DSKCMD: LD (FDCCMD),A ; Store latest FDC command.
|
DSKCMD: LD (FDCCMD),A ; Store latest FDC command.
|
||||||
CPL ; Compliment it (FDC bit value is reversed).
|
CPL ; Compliment it (FDC bit value is reversed).
|
||||||
OUT (0D8H),A ; Send command to FDC.
|
OUT (0D8H),A ; Send command to FDC.
|
||||||
CALL L017E ; Wait to become ready.
|
CALL L017E ; Wait to become ready.
|
||||||
IN A,(0D8H) ; Get status register.
|
IN A,(0D8H) ; Get status register.
|
||||||
CPL ; Inverse (FDC is reverse bit logic).
|
CPL ; Inverse (FDC is reverse bit logic).
|
||||||
RET
|
RET
|
||||||
|
|
||||||
L017E: PUSH DE
|
L017E: PUSH DE
|
||||||
PUSH HL
|
PUSH HL
|
||||||
CALL L02C0
|
CALL L02C0
|
||||||
LD E,007H
|
LD E,007H
|
||||||
L0185: LD HL,00000H
|
L0185: LD HL,00000H
|
||||||
L0188: DEC HL
|
L0188: DEC HL
|
||||||
LD A,H
|
LD A,H
|
||||||
OR L
|
OR L
|
||||||
JR Z,L0196 ; (+009h)
|
JR Z,L0196 ; (+009h)
|
||||||
IN A,(0D8H)
|
IN A,(0D8H)
|
||||||
CPL
|
CPL
|
||||||
RRCA
|
RRCA
|
||||||
JR C,L0188 ; (-00bh)
|
JR C,L0188 ; (-00bh)
|
||||||
POP HL
|
POP HL
|
||||||
POP DE
|
POP DE
|
||||||
RET
|
RET
|
||||||
|
|
||||||
L0196: DEC E
|
L0196: DEC E
|
||||||
JR NZ,L0185 ; (-014h)
|
JR NZ,L0185 ; (-014h)
|
||||||
JP DSKERR
|
JP DSKERR
|
||||||
|
|
||||||
L019C: PUSH DE
|
L019C: PUSH DE
|
||||||
PUSH HL
|
PUSH HL
|
||||||
CALL L02C0
|
CALL L02C0
|
||||||
LD E,007H
|
LD E,007H
|
||||||
L01A3: LD HL,00000H
|
L01A3: LD HL,00000H
|
||||||
L01A6: DEC HL
|
L01A6: DEC HL
|
||||||
LD A,H
|
LD A,H
|
||||||
OR L
|
OR L
|
||||||
JR Z,L01B4 ; (+009h)
|
JR Z,L01B4 ; (+009h)
|
||||||
IN A,(0D8H)
|
IN A,(0D8H)
|
||||||
CPL
|
CPL
|
||||||
RRCA
|
RRCA
|
||||||
JR NC,L01A6 ; (-00bh)
|
JR NC,L01A6 ; (-00bh)
|
||||||
POP HL
|
POP HL
|
||||||
POP DE
|
POP DE
|
||||||
RET
|
RET
|
||||||
|
|
||||||
L01B4: DEC E
|
L01B4: DEC E
|
||||||
JR NZ,L01A3 ; (-014h)
|
JR NZ,L01A3 ; (-014h)
|
||||||
JP DSKERR
|
JP DSKERR
|
||||||
|
|
||||||
; Read disk starting at the first logical sector in param block 1009/100A
|
; Read disk starting at the first logical sector in param block 1009/100A
|
||||||
; Continue reading for the given size 100B/100C and store in the location
|
; Continue reading for the given size 100B/100C and store in the location
|
||||||
; Pointed to by the address stored in the parameter block. 100D/100E
|
; Pointed to by the address stored in the parameter block. 100D/100E
|
||||||
DSKREAD: CALL L0220 ; Compute logical sector-no to track-no & sector-no, retries=10
|
DSKREAD: CALL L0220 ; Compute logical sector-no to track-no & sector-no, retries=10
|
||||||
L01BD: CALL L0229 ; Set current track & sector, get load address to HL
|
L01BD: CALL L0229 ; Set current track & sector, get load address to HL
|
||||||
L01C0: CALL L0249 ; Set side reg
|
L01C0: CALL L0249 ; Set side reg
|
||||||
CALL L0149 ; Command 1b output (seek)
|
CALL L0149 ; Command 1b output (seek)
|
||||||
JR NZ,L0216 ;
|
JR NZ,L0216 ;
|
||||||
CALL L0259 ; Set track & sector reg
|
CALL L0259 ; Set track & sector reg
|
||||||
PUSH IX ; Save 1008H
|
PUSH IX ; Save 1008H
|
||||||
LD IX, 0F3FEH ; As below. L03FE
|
LD IX, 0F3FEH ; As below. L03FE
|
||||||
LD IY,L01DF ; Read sector into memory.
|
LD IY,L01DF ; Read sector into memory.
|
||||||
;DI
|
;DI
|
||||||
LD A,094H ; Latest FDC command byte
|
LD A,094H ; Latest FDC command byte
|
||||||
CALL L028A
|
CALL L028A
|
||||||
L01DB: LD B,000H
|
L01DB: LD B,000H
|
||||||
JP (IX)
|
JP (IX)
|
||||||
|
|
||||||
; Get data from disk sector to staging area (CE00).
|
; Get data from disk sector to staging area (CE00).
|
||||||
L01DF: INI
|
L01DF: INI
|
||||||
LD A,(DE) ; If not at the end of the line, then process as the boot disk number.
|
LD A,(DE) ; If not at the end of the line, then process as the boot disk number.
|
||||||
JP NZ, 0F3FEH ; This is crucial, as the Z80 is running at 2MHz it is not fast enough so needs
|
JP NZ, 0F3FEH ; This is crucial, as the Z80 is running at 2MHz it is not fast enough so needs
|
||||||
; hardware acceleration in the form of a banked ROM, if disk not ready jumps to IX, if
|
; hardware acceleration in the form of a banked ROM, if disk not ready jumps to IX, if
|
||||||
; data ready, jumps to IY. L03FE
|
; data ready, jumps to IY. L03FE
|
||||||
POP IX
|
POP IX
|
||||||
INC (IX+008H) ; Increment current sector number
|
INC (IX+008H) ; Increment current sector number
|
||||||
LD A,(IX+008H) ; Load current sector number
|
LD A,(IX+008H) ; Load current sector number
|
||||||
PUSH IX ; Save 1008H
|
PUSH IX ; Save 1008H
|
||||||
LD IX, 0F3FEH ; As above. L03FE
|
LD IX, 0F3FEH ; As above. L03FE
|
||||||
CP 011H ; Sector 17? Need to loop to next track.
|
CP 011H ; Sector 17? Need to loop to next track.
|
||||||
JR Z,L01FB
|
JR Z,L01FB
|
||||||
DEC D
|
DEC D
|
||||||
JR NZ,L01DB
|
JR NZ,L01DB
|
||||||
JR L01FC ; (+001h)
|
JR L01FC ; (+001h)
|
||||||
|
|
||||||
L01FB: DEC D
|
L01FB: DEC D
|
||||||
L01FC: CALL L0294
|
L01FC: CALL L0294
|
||||||
CALL L02D2
|
CALL L02D2
|
||||||
POP IX
|
POP IX
|
||||||
IN A,(0D8H)
|
IN A,(0D8H)
|
||||||
CPL
|
CPL
|
||||||
AND 0FFH
|
AND 0FFH
|
||||||
JR NZ,L0216 ; (+00bh)
|
JR NZ,L0216 ; (+00bh)
|
||||||
CALL L0278
|
CALL L0278
|
||||||
JP Z,L021B
|
JP Z,L021B
|
||||||
LD A,(IX+007H)
|
LD A,(IX+007H)
|
||||||
JR L01C0 ; (-056h)
|
JR L01C0 ; (-056h)
|
||||||
|
|
||||||
L0216: CALL L026A
|
L0216: CALL L026A
|
||||||
JR L01BD ; (-05eh)
|
JR L01BD ; (-05eh)
|
||||||
|
|
||||||
L021B: LD A,080H
|
L021B: LD A,080H
|
||||||
OUT (0DCH),A ; Motor on
|
OUT (0DCH),A ; Motor on
|
||||||
RET
|
RET
|
||||||
|
|
||||||
L0220: CALL L02A3 ; compute logical sector no to track no & sector no
|
L0220: CALL L02A3 ; compute logical sector no to track no & sector no
|
||||||
LD A,00AH ; 10 retries
|
LD A,00AH ; 10 retries
|
||||||
LD (RETRIES),A
|
LD (RETRIES),A
|
||||||
RET
|
RET
|
||||||
|
|
||||||
; Set current track & sector, get load address to HL
|
; Set current track & sector, get load address to HL
|
||||||
L0229: CALL L0104
|
L0229: CALL L0104
|
||||||
LD D,(IX+004H) ; Number of sectors to read
|
LD D,(IX+004H) ; Number of sectors to read
|
||||||
LD A,(IX+003H) ; Bytes to read
|
LD A,(IX+003H) ; Bytes to read
|
||||||
OR A ; 0?
|
OR A ; 0?
|
||||||
JR Z,L0236 ; Yes
|
JR Z,L0236 ; Yes
|
||||||
INC D ; Number of sectors to read + 1
|
INC D ; Number of sectors to read + 1
|
||||||
L0236: LD A,(IX+00AH) ; Start sector number
|
L0236: LD A,(IX+00AH) ; Start sector number
|
||||||
LD (IX+008H),A ; To current sector number
|
LD (IX+008H),A ; To current sector number
|
||||||
LD A,(IX+009H) ; Start track number
|
LD A,(IX+009H) ; Start track number
|
||||||
LD (IX+007H),A ; To current track number
|
LD (IX+007H),A ; To current track number
|
||||||
LD L,(IX+005H) ; Load address low byte
|
LD L,(IX+005H) ; Load address low byte
|
||||||
LD H,(IX+006H) ; Load address high byte
|
LD H,(IX+006H) ; Load address high byte
|
||||||
RET
|
RET
|
||||||
|
|
||||||
; Compute side/head.
|
; Compute side/head.
|
||||||
L0249: SRL A ; Track number even?
|
L0249: SRL A ; Track number even?
|
||||||
CPL ;
|
CPL ;
|
||||||
OUT (0DBH),A ; Output track no.
|
OUT (0DBH),A ; Output track no.
|
||||||
JR NC,L0254 ; Yes, even, set side/head 1
|
JR NC,L0254 ; Yes, even, set side/head 1
|
||||||
LD A,001H ; No, odd, set side/head 0
|
LD A,001H ; No, odd, set side/head 0
|
||||||
JR L0255
|
JR L0255
|
||||||
|
|
||||||
; Set side/head register.
|
; Set side/head register.
|
||||||
L0254: XOR A ; Side 0
|
L0254: XOR A ; Side 0
|
||||||
L0255: CPL ; Side 1
|
L0255: CPL ; Side 1
|
||||||
OUT (0DDH),A ; Side/head register.
|
OUT (0DDH),A ; Side/head register.
|
||||||
RET
|
RET
|
||||||
|
|
||||||
; Set track and sector register.
|
; Set track and sector register.
|
||||||
L0259: LD C,0DBH
|
L0259: LD C,0DBH
|
||||||
LD A,(IX+007H) ; Current track number
|
LD A,(IX+007H) ; Current track number
|
||||||
SRL A
|
SRL A
|
||||||
CPL
|
CPL
|
||||||
OUT (0D9H),A ; Track reg
|
OUT (0D9H),A ; Track reg
|
||||||
LD A,(IX+008H) ; Current sector number
|
LD A,(IX+008H) ; Current sector number
|
||||||
CPL
|
CPL
|
||||||
OUT (0DAH),A ; Sector reg
|
OUT (0DAH),A ; Sector reg
|
||||||
RET
|
RET
|
||||||
|
|
||||||
L026A: LD A,(RETRIES)
|
L026A: LD A,(RETRIES)
|
||||||
DEC A
|
DEC A
|
||||||
LD (RETRIES),A
|
LD (RETRIES),A
|
||||||
JP Z,DSKERR
|
JP Z,DSKERR
|
||||||
CALL DSKSEEKTK0
|
CALL DSKSEEKTK0
|
||||||
RET
|
RET
|
||||||
|
|
||||||
L0278: LD A,(IX+008H)
|
L0278: LD A,(IX+008H)
|
||||||
CP 011H
|
CP 011H
|
||||||
JR NZ,L0287 ; (+008h)
|
JR NZ,L0287 ; (+008h)
|
||||||
LD A,001H
|
LD A,001H
|
||||||
LD (IX+008H),A
|
LD (IX+008H),A
|
||||||
INC (IX+007H)
|
INC (IX+007H)
|
||||||
L0287: LD A,D
|
L0287: LD A,D
|
||||||
OR A
|
OR A
|
||||||
RET
|
RET
|
||||||
|
|
||||||
L028A: LD (FDCCMD),A
|
L028A: LD (FDCCMD),A
|
||||||
CPL
|
CPL
|
||||||
OUT (0D8H),A
|
OUT (0D8H),A
|
||||||
CALL L019C
|
CALL L019C
|
||||||
RET
|
RET
|
||||||
|
|
||||||
L0294: LD A,0D8H
|
L0294: LD A,0D8H
|
||||||
CPL
|
CPL
|
||||||
OUT (0D8H),A
|
OUT (0D8H),A
|
||||||
CALL L017E
|
CALL L017E
|
||||||
RET
|
RET
|
||||||
|
|
||||||
DSKERR: CALL DSKINIT
|
DSKERR: CALL DSKINIT
|
||||||
JP DSKLOADERR
|
JP DSKLOADERR
|
||||||
|
|
||||||
; Logical sector number to physical track and sector.
|
; Logical sector number to physical track and sector.
|
||||||
L02A3: LD B,000H
|
L02A3: LD B,000H
|
||||||
LD DE,00010H ; No of sectors per trk (16)
|
LD DE,00010H ; No of sectors per trk (16)
|
||||||
LD L,(IX+001H) ; Logical sector number
|
LD L,(IX+001H) ; Logical sector number
|
||||||
LD H,(IX+002H) ; 2 bytes in length
|
LD H,(IX+002H) ; 2 bytes in length
|
||||||
XOR A
|
XOR A
|
||||||
L02AF: SBC HL,DE ; Subtract 16 sectors/trk
|
L02AF: SBC HL,DE ; Subtract 16 sectors/trk
|
||||||
JR C,L02B6 ; Yes, negative value
|
JR C,L02B6 ; Yes, negative value
|
||||||
INC B ; Count track
|
INC B ; Count track
|
||||||
JR L02AF ; Loop
|
JR L02AF ; Loop
|
||||||
L02B6: ADD HL,DE ; Reset HL to the previous
|
L02B6: ADD HL,DE ; Reset HL to the previous
|
||||||
LD H,B ; Track
|
LD H,B ; Track
|
||||||
INC L ; Correction +1
|
INC L ; Correction +1
|
||||||
LD (IX+009H),H ; Start track no
|
LD (IX+009H),H ; Start track no
|
||||||
LD (IX+00AH),L ; Start sector no
|
LD (IX+00AH),L ; Start sector no
|
||||||
RET
|
RET
|
||||||
|
|
||||||
L02C0: PUSH DE
|
L02C0: PUSH DE
|
||||||
LD DE,00007H
|
LD DE,00007H
|
||||||
JP L02CB
|
JP L02CB
|
||||||
|
|
||||||
L02C7: PUSH DE
|
L02C7: PUSH DE
|
||||||
LD DE,01013H
|
LD DE,01013H
|
||||||
L02CB: DEC DE
|
L02CB: DEC DE
|
||||||
LD A,E
|
LD A,E
|
||||||
OR D
|
OR D
|
||||||
JR NZ,L02CB ; (-005h)
|
JR NZ,L02CB ; (-005h)
|
||||||
POP DE
|
POP DE
|
||||||
RET
|
RET
|
||||||
|
|
||||||
L02D2: PUSH AF
|
L02D2: PUSH AF
|
||||||
LD A,(0119CH)
|
LD A,(0119CH)
|
||||||
CP 0F0H
|
CP 0F0H
|
||||||
JR NZ,L02DB ; (+001h)
|
JR NZ,L02DB ; (+001h)
|
||||||
;EI
|
;EI
|
||||||
L02DB: POP AF
|
L02DB: POP AF
|
||||||
RET
|
RET
|
||||||
|
|
||||||
;wait on bit 0 and bit 1 = 0 of state reg
|
;wait on bit 0 and bit 1 = 0 of state reg
|
||||||
L0300: IN A,(0D8H) ; State reg
|
L0300: IN A,(0D8H) ; State reg
|
||||||
RRCA
|
RRCA
|
||||||
JR C,L0300 ; Wait on not busy
|
JR C,L0300 ; Wait on not busy
|
||||||
RRCA
|
RRCA
|
||||||
JR C,L0300 ; Wait on data reg ready
|
JR C,L0300 ; Wait on data reg ready
|
||||||
JP (IY) ; to f1df
|
JP (IY) ; to f1df
|
||||||
|
ENDIF
|
||||||
|
|
||||||
;-------------------------------------------------------------------------------
|
;-------------------------------------------------------------------------------
|
||||||
; END OF FLOPPY DISK CONTROLLER FUNCTIONALITY
|
; END OF FLOPPY DISK CONTROLLER FUNCTIONALITY
|
||||||
|
|||||||
@@ -11,16 +11,19 @@
|
|||||||
;- Copyright: (c) 2018-2023 Philip Smart <philip.smart@net2net.org>
|
;- Copyright: (c) 2018-2023 Philip Smart <philip.smart@net2net.org>
|
||||||
;-
|
;-
|
||||||
;- History: July 2019 - Merged 2 utilities to create this compilation.
|
;- History: July 2019 - Merged 2 utilities to create this compilation.
|
||||||
; May 2020 - Bank switch changes with release of v2 pcb with coded latch. The coded
|
;- May 2020 - Bank switch changes with release of v2 pcb with coded latch. The coded
|
||||||
; latch adds additional instruction overhead as the control latches share
|
;- latch adds additional instruction overhead as the control latches share
|
||||||
; the same address space as the Flash RAMS thus the extra hardware to
|
;- the same address space as the Flash RAMS thus the extra hardware to
|
||||||
; only enable the control registers if a fixed number of reads is made
|
;- only enable the control registers if a fixed number of reads is made
|
||||||
; into the upper 8 bytes which normally wouldnt occur. Caveat - ensure
|
;- into the upper 8 bytes which normally wouldnt occur. Caveat - ensure
|
||||||
; that no loop instruction is ever placed into EFF8H - EFFFH.
|
;- that no loop instruction is ever placed into EFF8H - EFFFH.
|
||||||
; July 2020 - Bug fixes and additions.
|
;- July 2020 - Bug fixes and additions.
|
||||||
; July 2020 - Updated for the v2.1 hardware. RFS can run with a tranZPUter board with
|
;- July 2020 - Updated for the v2.1 hardware. RFS can run with a tranZPUter board with
|
||||||
; or without the K64 I/O processor. RFS wont use the K64 processor all
|
;- or without the K64 I/O processor. RFS wont use the K64 processor all
|
||||||
; operations are done by the Z80 under RFS.
|
;- operations are done by the Z80 under RFS.
|
||||||
|
;- Aug 2023 - Updates to make RFS run under the SFD700 Floppy Disk Interface board.
|
||||||
|
;- UROM remains the same, a 2K paged ROM, MROM is located at F000 when
|
||||||
|
;- RFS is built for the SFD700.
|
||||||
;-
|
;-
|
||||||
;--------------------------------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------------------------------
|
||||||
;- This source file is free software: you can redistribute it and-or modify
|
;- This source file is free software: you can redistribute it and-or modify
|
||||||
@@ -37,9 +40,11 @@
|
|||||||
;- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
;- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
;--------------------------------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
IF BUILD_SFD700 = 1
|
IF BUILD_SFD700 = 1
|
||||||
ORG 0E000H
|
ORG 0E000H
|
||||||
ALIGN UROMADDR
|
ALIGN 0E300H
|
||||||
|
DB "BANK2"
|
||||||
|
ALIGN UROMADDR
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
;===========================================================
|
;===========================================================
|
||||||
@@ -1591,5 +1596,5 @@ SAVESD9: LD DE,MSGSVFAIL ; Fail,
|
|||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IF BUILD_SFD700 = 1
|
IF BUILD_SFD700 = 1
|
||||||
ALIGN 0F000H
|
ALIGN 0F000H
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|||||||
@@ -11,12 +11,15 @@
|
|||||||
;- Copyright: (c) 2018-2023 Philip Smart <philip.smart@net2net.org>
|
;- Copyright: (c) 2018-2023 Philip Smart <philip.smart@net2net.org>
|
||||||
;-
|
;-
|
||||||
;- History: July 2019 - Merged 2 utilities to create this compilation.
|
;- History: July 2019 - Merged 2 utilities to create this compilation.
|
||||||
; May 2020 - Bank switch changes with release of v2 pcb with coded latch. The coded
|
;- May 2020 - Bank switch changes with release of v2 pcb with coded latch. The coded
|
||||||
; latch adds additional instruction overhead as the control latches share
|
;- latch adds additional instruction overhead as the control latches share
|
||||||
; the same address space as the Flash RAMS thus the extra hardware to
|
;- the same address space as the Flash RAMS thus the extra hardware to
|
||||||
; only enable the control registers if a fixed number of reads is made
|
;- only enable the control registers if a fixed number of reads is made
|
||||||
; into the upper 8 bytes which normally wouldnt occur. Caveat - ensure
|
;- into the upper 8 bytes which normally wouldnt occur. Caveat - ensure
|
||||||
; that no loop instruction is ever placed into EFF8H - EFFFH.
|
;- that no loop instruction is ever placed into EFF8H - EFFFH.
|
||||||
|
;- Aug 2023 - Updates to make RFS run under the SFD700 Floppy Disk Interface board.
|
||||||
|
;- UROM remains the same, a 2K paged ROM, MROM is located at F000 when
|
||||||
|
;- RFS is built for the SFD700.
|
||||||
;-
|
;-
|
||||||
;--------------------------------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------------------------------
|
||||||
;- This source file is free software: you can redistribute it and-or modify
|
;- This source file is free software: you can redistribute it and-or modify
|
||||||
@@ -38,11 +41,11 @@ COLW EQU 40
|
|||||||
SCRNSZ EQU COLW * ROW
|
SCRNSZ EQU COLW * ROW
|
||||||
MODE80C EQU 0
|
MODE80C EQU 0
|
||||||
|
|
||||||
IF BUILD_SFD700 = 1
|
IF BUILD_SFD700 = 1
|
||||||
ORG 0E000H
|
ORG 0E000H
|
||||||
ALIGN UROMADDR
|
ALIGN 0E300H
|
||||||
|
DB "BANK3"
|
||||||
|
ALIGN UROMADDR
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
;===========================================================
|
;===========================================================
|
||||||
|
|||||||
@@ -11,12 +11,15 @@
|
|||||||
;- Copyright: (c) 2018-2023 Philip Smart <philip.smart@net2net.org>
|
;- Copyright: (c) 2018-2023 Philip Smart <philip.smart@net2net.org>
|
||||||
;-
|
;-
|
||||||
;- History: July 2019 - Merged 2 utilities to create this compilation.
|
;- History: July 2019 - Merged 2 utilities to create this compilation.
|
||||||
; May 2020 - Bank switch changes with release of v2 pcb with coded latch. The coded
|
;- May 2020 - Bank switch changes with release of v2 pcb with coded latch. The coded
|
||||||
; latch adds additional instruction overhead as the control latches share
|
;- latch adds additional instruction overhead as the control latches share
|
||||||
; the same address space as the Flash RAMS thus the extra hardware to
|
;- the same address space as the Flash RAMS thus the extra hardware to
|
||||||
; only enable the control registers if a fixed number of reads is made
|
;- only enable the control registers if a fixed number of reads is made
|
||||||
; into the upper 8 bytes which normally wouldnt occur. Caveat - ensure
|
;- into the upper 8 bytes which normally wouldnt occur. Caveat - ensure
|
||||||
; that no loop instruction is ever placed into EFF8H - EFFFH.
|
;- that no loop instruction is ever placed into EFF8H - EFFFH.
|
||||||
|
;- Aug 2023 - Updates to make RFS run under the SFD700 Floppy Disk Interface board.
|
||||||
|
;- UROM remains the same, a 2K paged ROM, MROM is located at F000 when
|
||||||
|
;- RFS is built for the SFD700.
|
||||||
;-
|
;-
|
||||||
;--------------------------------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------------------------------
|
||||||
;- This source file is free software: you can redistribute it and-or modify
|
;- This source file is free software: you can redistribute it and-or modify
|
||||||
@@ -33,11 +36,11 @@
|
|||||||
;- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
;- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
;--------------------------------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
IF BUILD_SFD700 = 1
|
IF BUILD_SFD700 = 1
|
||||||
ORG 0E000H
|
ORG 0E000H
|
||||||
ALIGN UROMADDR
|
ALIGN 0E300H
|
||||||
|
DB "BANK4"
|
||||||
|
ALIGN UROMADDR
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
;===========================================================
|
;===========================================================
|
||||||
|
|||||||
@@ -11,13 +11,16 @@
|
|||||||
;- Copyright: (c) 2018-2023 Philip Smart <philip.smart@net2net.org>
|
;- Copyright: (c) 2018-2023 Philip Smart <philip.smart@net2net.org>
|
||||||
;-
|
;-
|
||||||
;- History: July 2019 - Merged 2 utilities to create this compilation.
|
;- History: July 2019 - Merged 2 utilities to create this compilation.
|
||||||
; May 2020 - Bank switch changes with release of v2 pcb with coded latch. The coded
|
;- May 2020 - Bank switch changes with release of v2 pcb with coded latch. The coded
|
||||||
; latch adds additional instruction overhead as the control latches share
|
;- latch adds additional instruction overhead as the control latches share
|
||||||
; the same address space as the Flash RAMS thus the extra hardware to
|
;- the same address space as the Flash RAMS thus the extra hardware to
|
||||||
; only enable the control registers if a fixed number of reads is made
|
;- only enable the control registers if a fixed number of reads is made
|
||||||
; into the upper 8 bytes which normally wouldnt occur. Caveat - ensure
|
;- into the upper 8 bytes which normally wouldnt occur. Caveat - ensure
|
||||||
; that no loop instruction is ever placed into EFF8H - EFFFH.
|
;- that no loop instruction is ever placed into EFF8H - EFFFH.
|
||||||
; Mar 2021 - Add mapping utilities for Sharp<->ASCII conversion.
|
;- Mar 2021 - Add mapping utilities for Sharp<->ASCII conversion.
|
||||||
|
;- Aug 2023 - Updates to make RFS run under the SFD700 Floppy Disk Interface board.
|
||||||
|
;- UROM remains the same, a 2K paged ROM, MROM is located at F000 when
|
||||||
|
;- RFS is built for the SFD700.
|
||||||
;-
|
;-
|
||||||
;--------------------------------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------------------------------
|
||||||
;- This source file is free software: you can redistribute it and-or modify
|
;- This source file is free software: you can redistribute it and-or modify
|
||||||
@@ -34,11 +37,11 @@
|
|||||||
;- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
;- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
;--------------------------------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
IF BUILD_SFD700 = 1
|
IF BUILD_SFD700 = 1
|
||||||
ORG 0E000H
|
ORG 0E000H
|
||||||
ALIGN UROMADDR
|
ALIGN 0E300H
|
||||||
|
DB "BANK5"
|
||||||
|
ALIGN UROMADDR
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
;======================================
|
;======================================
|
||||||
|
|||||||
@@ -11,15 +11,18 @@
|
|||||||
;- Copyright: (c) 2018-2023 Philip Smart <philip.smart@net2net.org>
|
;- Copyright: (c) 2018-2023 Philip Smart <philip.smart@net2net.org>
|
||||||
;-
|
;-
|
||||||
;- History: July 2019 - Merged 2 utilities to create this compilation.
|
;- History: July 2019 - Merged 2 utilities to create this compilation.
|
||||||
; May 2020 - Bank switch changes with release of v2 pcb with coded latch. The coded
|
;- May 2020 - Bank switch changes with release of v2 pcb with coded latch. The coded
|
||||||
; latch adds additional instruction overhead as the control latches share
|
;- latch adds additional instruction overhead as the control latches share
|
||||||
; the same address space as the Flash RAMS thus the extra hardware to
|
;- the same address space as the Flash RAMS thus the extra hardware to
|
||||||
; only enable the control registers if a fixed number of reads is made
|
;- only enable the control registers if a fixed number of reads is made
|
||||||
; into the upper 8 bytes which normally wouldnt occur. Caveat - ensure
|
;- into the upper 8 bytes which normally wouldnt occur. Caveat - ensure
|
||||||
; that no loop instruction is ever placed into EFF8H - EFFFH.
|
;- that no loop instruction is ever placed into EFF8H - EFFFH.
|
||||||
; July 2020 - Updated for the v2.1 hardware. RFS can run with a tranZPUter board with
|
;- July 2020 - Updated for the v2.1 hardware. RFS can run with a tranZPUter board with
|
||||||
; or without the K64 I/O processor. RFS wont use the K64 processor all
|
;- or without the K64 I/O processor. RFS wont use the K64 processor all
|
||||||
; operations are done by the Z80 under RFS.
|
;- operations are done by the Z80 under RFS.
|
||||||
|
;- Aug 2023 - Updates to make RFS run under the SFD700 Floppy Disk Interface board.
|
||||||
|
;- UROM remains the same, a 2K paged ROM, MROM is located at F000 when
|
||||||
|
;- RFS is built for the SFD700.
|
||||||
;-
|
;-
|
||||||
;--------------------------------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------------------------------
|
||||||
;- This source file is free software: you can redistribute it and-or modify
|
;- This source file is free software: you can redistribute it and-or modify
|
||||||
@@ -36,11 +39,11 @@
|
|||||||
;- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
;- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
;--------------------------------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
IF BUILD_SFD700 = 1
|
IF BUILD_SFD700 = 1
|
||||||
ORG 0E000H
|
ORG 0E000H
|
||||||
ALIGN UROMADDR
|
ALIGN 0E300H
|
||||||
|
DB "BANK6"
|
||||||
|
ALIGN UROMADDR
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
;======================================
|
;======================================
|
||||||
@@ -319,8 +322,7 @@ HELPSCR: IF BUILD_ROMDISK = 1
|
|||||||
DB "DXXXX[YYYY] - dump mem XXXX to YYYY.", 00DH
|
DB "DXXXX[YYYY] - dump mem XXXX to YYYY.", 00DH
|
||||||
DB "DASMXXXX[YYYY]", 00DH
|
DB "DASMXXXX[YYYY]", 00DH
|
||||||
DB " disassemble XXXX to YYYY", 00DH
|
DB " disassemble XXXX to YYYY", 00DH
|
||||||
DB "F[X] - boot fd drive X.", 00DH
|
DB "F - boot fd.", 00DH
|
||||||
DB "f - boot fd original rom.", 00DH
|
|
||||||
DB "H - this help screen.", 00DH
|
DB "H - this help screen.", 00DH
|
||||||
DB "IR - rfs rom dir listing.", 00DH
|
DB "IR - rfs rom dir listing.", 00DH
|
||||||
DB "JXXXX - jump to location XXXX.", 00DH
|
DB "JXXXX - jump to location XXXX.", 00DH
|
||||||
@@ -478,7 +480,7 @@ ATBL: DB 0CCH ; NUL '\0' (null character)
|
|||||||
;
|
;
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
MSGSONTZ: DB "+ TZ" ; Version 2.x with version 2.1+ of tranZPUter board installed.
|
MSGSONTZ: DB "+ TZ" ; Version 2.x with version 2.1+ of tranZPUter board installed.
|
||||||
MSGSON: DB "+ RFS ", 0ABh, "2.3 **", 00DH, 000H ; Version 2.x-> as we are now using the v2.x PCB with 4 devices on-board
|
MSGSON: DB "+ RFS ", 0ABh, "2.31a **", 00DH, 000H ; Version 2.x-> as we are now using the v2.x PCB with 4 devices on-board
|
||||||
MSGNOTFND: DB "Not Found", 00DH, 000H
|
MSGNOTFND: DB "Not Found", 00DH, 000H
|
||||||
MSGRDIRLST: DB "ROM Directory:", 00DH, 000H
|
MSGRDIRLST: DB "ROM Directory:", 00DH, 000H
|
||||||
MSGTRM: DB 00DH, 000H
|
MSGTRM: DB 00DH, 000H
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
;--------------------------------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------------------------------
|
||||||
;-
|
;-
|
||||||
;- Name: rfs_bank4.asm
|
;- Name: rfs_bank7.asm
|
||||||
;- Created: July 2019
|
;- Created: July 2019
|
||||||
;- Author(s): Philip Smart
|
;- Author(s): Philip Smart
|
||||||
;- Description: Sharp MZ series Rom Filing System.
|
;- Description: Sharp MZ series Rom Filing System.
|
||||||
@@ -11,12 +11,15 @@
|
|||||||
;- Copyright: (c) 2018-2023 Philip Smart <philip.smart@net2net.org>
|
;- Copyright: (c) 2018-2023 Philip Smart <philip.smart@net2net.org>
|
||||||
;-
|
;-
|
||||||
;- History: July 2019 - Merged 2 utilities to create this compilation.
|
;- History: July 2019 - Merged 2 utilities to create this compilation.
|
||||||
; May 2020 - Bank switch changes with release of v2 pcb with coded latch. The coded
|
;- May 2020 - Bank switch changes with release of v2 pcb with coded latch. The coded
|
||||||
; latch adds additional instruction overhead as the control latches share
|
;- latch adds additional instruction overhead as the control latches share
|
||||||
; the same address space as the Flash RAMS thus the extra hardware to
|
;- the same address space as the Flash RAMS thus the extra hardware to
|
||||||
; only enable the control registers if a fixed number of reads is made
|
;- only enable the control registers if a fixed number of reads is made
|
||||||
; into the upper 8 bytes which normally wouldnt occur. Caveat - ensure
|
;- into the upper 8 bytes which normally wouldnt occur. Caveat - ensure
|
||||||
; that no loop instruction is ever placed into EFF8H - EFFFH.
|
;- that no loop instruction is ever placed into EFF8H - EFFFH.
|
||||||
|
;- Aug 2023 - Updates to make RFS run under the SFD700 Floppy Disk Interface board.
|
||||||
|
;- UROM remains the same, a 2K paged ROM, MROM is located at F000 when
|
||||||
|
;- RFS is built for the SFD700.
|
||||||
;-
|
;-
|
||||||
;--------------------------------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------------------------------
|
||||||
;- This source file is free software: you can redistribute it and-or modify
|
;- This source file is free software: you can redistribute it and-or modify
|
||||||
@@ -40,11 +43,11 @@ ADDR:
|
|||||||
ADDR_LO: DS virtual 1
|
ADDR_LO: DS virtual 1
|
||||||
ADDR_HI: DS virtual 1
|
ADDR_HI: DS virtual 1
|
||||||
ASM_ADDR: DS virtual 8 ; Assembler Destination address
|
ASM_ADDR: DS virtual 8 ; Assembler Destination address
|
||||||
ASM_BUF: DS virtual 16 ; 16 byte ASM Input Buffer
|
ASM_BUF: DS virtual 12 ; 16 byte ASM Input Buffer
|
||||||
OUT_BUF: DS virtual 4 ; 4 byte test buffer(last part of ASM_BUF)
|
OUT_BUF: DS virtual 4 ; 4 byte test buffer(last part of ASM_BUF)
|
||||||
INS_BUF: DS virtual 4 ; 4 Byte Instruction Buffer
|
INS_BUF: DS virtual 4 ; 4 Byte Instruction Buffer
|
||||||
PARM_BUF: DS virtual 7 ; 7 Byte Parm Buffer
|
PARM_BUF: DS virtual 7 ; 7 Byte Parm Buffer
|
||||||
VAL_BUF: ; 5 Byte Value Buffer
|
VAL_BUF: ;DS virtual 5 ; 5 Byte Value Buffer
|
||||||
VAL_BUF_HI: DS virtual 2 ; 2 Hi Bytes in Value Buffer
|
VAL_BUF_HI: DS virtual 2 ; 2 Hi Bytes in Value Buffer
|
||||||
VAL_BUF_LO: DS virtual 2 ; 2 Lo Bytes in Value Buffer
|
VAL_BUF_LO: DS virtual 2 ; 2 Lo Bytes in Value Buffer
|
||||||
DS virtual 1
|
DS virtual 1
|
||||||
@@ -59,6 +62,7 @@ ML_BUF: DS virtual 2 ; 3 byte ML buffer
|
|||||||
ML_BTCOUNT: DS virtual 1 ; Last byte of ML buffer(byte count)
|
ML_BTCOUNT: DS virtual 1 ; Last byte of ML buffer(byte count)
|
||||||
VAL_LO: DS virtual 1 ; Converted value LO
|
VAL_LO: DS virtual 1 ; Converted value LO
|
||||||
VAL_HI: DS virtual 1 ; Converted value Hi
|
VAL_HI: DS virtual 1 ; Converted value Hi
|
||||||
|
BUF_END:
|
||||||
|
|
||||||
|
|
||||||
ORG 0E000H
|
ORG 0E000H
|
||||||
@@ -117,7 +121,7 @@ DASM_LOOP1: CALL NL ; Print CR & LF
|
|||||||
|
|
||||||
LD HL,ASM_BUF ; Clear ASM_BUF, INS_BUF, PARM_BUF & VAL_BUF
|
LD HL,ASM_BUF ; Clear ASM_BUF, INS_BUF, PARM_BUF & VAL_BUF
|
||||||
LD A,020H
|
LD A,020H
|
||||||
LD B,26 ; (Set to all spaces)
|
LD B,BUF_END-ASM_BUF; (Set to all spaces)
|
||||||
DASM_FILL: LD (HL),A
|
DASM_FILL: LD (HL),A
|
||||||
INC HL
|
INC HL
|
||||||
DEC B
|
DEC B
|
||||||
|
|||||||
@@ -13,12 +13,15 @@
|
|||||||
;- Copyright: (c) 2018-2023 Philip Smart <philip.smart@net2net.org>
|
;- Copyright: (c) 2018-2023 Philip Smart <philip.smart@net2net.org>
|
||||||
;-
|
;-
|
||||||
;- History: Sep 2019 - Initial version.
|
;- History: Sep 2019 - Initial version.
|
||||||
; May 2020 - Bank switch changes with release of v2 pcb with coded latch. The coded
|
;- May 2020 - Bank switch changes with release of v2 pcb with coded latch. The coded
|
||||||
; latch adds additional instruction overhead as the control latches share
|
;- latch adds additional instruction overhead as the control latches share
|
||||||
; the same address space as the Flash RAMS thus the extra hardware to
|
;- the same address space as the Flash RAMS thus the extra hardware to
|
||||||
; only enable the control registers if a fixed number of reads is made
|
;- only enable the control registers if a fixed number of reads is made
|
||||||
; into the upper 8 bytes which normally wouldnt occur. Caveat - ensure
|
;- into the upper 8 bytes which normally wouldnt occur. Caveat - ensure
|
||||||
; that no loop instruction is ever placed into EFF8H - EFFFH.
|
;- that no loop instruction is ever placed into EFF8H - EFFFH.
|
||||||
|
;- Aug 2023 - Updates to make RFS run under the SFD700 Floppy Disk Interface board.
|
||||||
|
;- UROM remains the same, a 2K paged ROM, MROM is located at F000 when
|
||||||
|
;- RFS is built for the SFD700.
|
||||||
;-
|
;-
|
||||||
;--------------------------------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------------------------------
|
||||||
;- This source file is free software: you can redistribute it and-or modify
|
;- This source file is free software: you can redistribute it and-or modify
|
||||||
|
|||||||
@@ -96,13 +96,23 @@ ONTYO EQU 0119FH
|
|||||||
OCTV EQU 011A0H
|
OCTV EQU 011A0H
|
||||||
RATIO EQU 011A1H
|
RATIO EQU 011A1H
|
||||||
BUFER EQU 011A3H
|
BUFER EQU 011A3H
|
||||||
CMT_RDINF EQU 0E886H ; UROMADDR+86H - Tape/SD intercept handler - Read Header
|
|
||||||
CMT_RDDATA EQU 0E889H ; UROMADDR+89H - Tape/SD intercept handler - Read Data
|
; RFS ROM addresses.
|
||||||
CMT_WRINF EQU 0E88CH ; UROMADDR+80H - Tape/SD intercept handler - Write Header
|
UROMADDR EQU 0E800H ; Start of User ROM Address space.
|
||||||
CMT_WRDATA EQU 0E88FH ; UROMADDR+8FH - Tape/SD intercept handler - Write Data
|
UROMBSTBL EQU UROMADDR + 020H ; Entry point to the bank switching table.
|
||||||
CMT_VERIFY EQU 0E892H ; UROMADDR+92H - Tape/SD intercept handler - Verify Data
|
RFSJMPTABLE EQU UROMADDR + 000B0H ; Start of jump table.
|
||||||
CMT_DIR EQU 0E895H ; UROMADDR+95H - SD directory command.
|
|
||||||
PRGSTART EQU 011FDH ; Build includes the tape copy code under original build.
|
;-------------------------------------------------------
|
||||||
|
; Function entry points in the RFS ROM.
|
||||||
|
;-------------------------------------------------------
|
||||||
|
CMT_RDINF EQU RFSJMPTABLE + 06H ; UROMADDR+86H - Tape/SD intercept handler - Read Header
|
||||||
|
CMT_RDDATA EQU RFSJMPTABLE + 09H ; UROMADDR+89H - Tape/SD intercept handler - Read Data
|
||||||
|
CMT_WRINF EQU RFSJMPTABLE + 0CH ; UROMADDR+80H - Tape/SD intercept handler - Write Header
|
||||||
|
CMT_WRDATA EQU RFSJMPTABLE + 0FH ; UROMADDR+8FH - Tape/SD intercept handler - Write Data
|
||||||
|
CMT_VERIFY EQU RFSJMPTABLE + 12H ; UROMADDR+92H - Tape/SD intercept handler - Verify Data
|
||||||
|
CMT_DIR EQU RFSJMPTABLE + 15H ; UROMADDR+95H - SD directory command.
|
||||||
|
CNV_ATOS EQU RFSJMPTABLE + 18H ; UROMADDR+98H - Convert an ASCII string into Sharp ASCII
|
||||||
|
PRGSTART EQU 011FDH ; Build includes the tape copy code under original build.
|
||||||
|
|
||||||
; Original build set the tape handlers to original.
|
; Original build set the tape handlers to original.
|
||||||
IF BUILD_ORIG = 1
|
IF BUILD_ORIG = 1
|
||||||
|
|||||||
99
build.sh
99
build.sh
@@ -3,54 +3,71 @@
|
|||||||
ROOT_DIR=`pwd`
|
ROOT_DIR=`pwd`
|
||||||
SW_DIR=${ROOT_DIR}/
|
SW_DIR=${ROOT_DIR}/
|
||||||
PROCESS_MZF_FILES=0
|
PROCESS_MZF_FILES=0
|
||||||
if [ "x$1" = '-m' ]; then
|
if [ "$1" = '-m' ]; then
|
||||||
PROCESS_MZF_FILES=1
|
PROCESS_MZF_FILES=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Make sure cpmtools is compiled and available in the tools directory.
|
||||||
|
if [[ ! -f ${ROOT_DIR}/tools/cpmcp ]]; then
|
||||||
|
cd ${ROOT_DIR}/cpmtools
|
||||||
|
./configure -prefix=${ROOT_DIR}/tools -libdir=${ROOT_DIR}/tools/lib -bindir=${ROOT_DIR}/tools
|
||||||
|
make all
|
||||||
|
make install
|
||||||
|
cp ${ROOT_DIR}/config/diskdefs ${ROOT_DIR}/tools/share/
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Update path to ensure we use our locally compiled tools.
|
||||||
|
export PATH=${ROOT_DIR}/tools:${PATH}
|
||||||
|
|
||||||
(
|
(
|
||||||
cd $SW_DIR
|
cd $SW_DIR
|
||||||
tools/assemble_rfs.sh
|
tools/assemble_rfs.sh
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
echo "RFS assembly failed..."
|
echo "RFS assembly failed..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
tools/assemble_cpm.sh
|
tools/assemble_cpm.sh
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
echo "CPM assembly failed..."
|
echo "CPM assembly failed..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
tools/assemble_roms.sh
|
tools/assemble_roms.sh
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
echo "ROMS assembly failed..."
|
echo "ROMS assembly failed..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Only needed if the program source tree changes, takes too long to run on every build!
|
||||||
|
if [[ ${PROCESS_MZF_FILES} -eq 1 ]]; then
|
||||||
|
tools/processMZFfiles.sh
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
echo "Failed to process MZF files into sectored variants...."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Only needed if the program source tree changes, takes too long to run on every build!
|
tools/make_roms.sh
|
||||||
if [[ ${PROCESS_MFZ_FILES} -eq 1 ]]; then
|
if [ $? != 0 ]; then
|
||||||
tools/processMZFfiles.sh
|
echo "ROM disk assembly failed..."
|
||||||
if [ $? != 0 ]; then
|
exit 1
|
||||||
echo "Failed to process MZF files into sectored variants...."
|
fi
|
||||||
exit 1
|
tools/make_cpmdisks.sh
|
||||||
fi
|
if [ $? != 0 ]; then
|
||||||
fi
|
echo "CPM disks assembly failed..."
|
||||||
tools/make_roms.sh
|
exit 1
|
||||||
if [ $? != 0 ]; then
|
fi
|
||||||
echo "ROM disk assembly failed..."
|
tools/make_sdcard.sh
|
||||||
exit 1
|
if [ $? != 0 ]; then
|
||||||
fi
|
echo "SD card assembly failed..."
|
||||||
tools/make_cpmdisks.sh
|
exit 1
|
||||||
if [ $? != 0 ]; then
|
fi
|
||||||
echo "CPM disks assembly failed..."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
tools/make_sdcard.sh
|
|
||||||
if [ $? != 0 ]; then
|
|
||||||
echo "SD card assembly failed..."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
)
|
)
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "Program ROMS via TL866 or similar using command:"
|
||||||
|
echo " minipro --infoic /dvlp/Projects/minipro/infoic.xml -p SST39SF040 -s -w roms/SFD700_256.bin"
|
||||||
|
echo ""
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|||||||
2
config/diskdefs
vendored
2
config/diskdefs
vendored
@@ -55,7 +55,7 @@ diskdef MZ80A-RFS-320
|
|||||||
tracks 20
|
tracks 20
|
||||||
sectrk 128
|
sectrk 128
|
||||||
blocksize 2048
|
blocksize 2048
|
||||||
maxdir 32
|
maxdir 64
|
||||||
skew 0
|
skew 0
|
||||||
boottrk 0
|
boottrk 0
|
||||||
os 2.2
|
os 2.2
|
||||||
|
|||||||
1
cpmtools
vendored
Submodule
1
cpmtools
vendored
Submodule
Submodule cpmtools added at e534e20c15
BIN
roms/SHARP_MZ80A_RFS_IMAGE_0.img
vendored
BIN
roms/SHARP_MZ80A_RFS_IMAGE_0.img
vendored
Binary file not shown.
BIN
roms/SHARP_MZ80A_RFS_IMAGE_2.img
vendored
BIN
roms/SHARP_MZ80A_RFS_IMAGE_2.img
vendored
Binary file not shown.
BIN
roms/SHARP_MZ80A_RFS_IMAGE_6.img
vendored
BIN
roms/SHARP_MZ80A_RFS_IMAGE_6.img
vendored
Binary file not shown.
BIN
roms/mz80afi_sfd700.rom
vendored
Normal file
BIN
roms/mz80afi_sfd700.rom
vendored
Normal file
Binary file not shown.
BIN
roms/rfs.rom
vendored
BIN
roms/rfs.rom
vendored
Binary file not shown.
@@ -33,6 +33,11 @@
|
|||||||
## along with this program. If not, see <http://www.gnu.org/licenses/>.
|
## along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#########################################################################################################
|
#########################################################################################################
|
||||||
|
|
||||||
|
echo "--------------------------------------------------------------------------------"
|
||||||
|
echo "cpmtool package contains a bug. If cpmcp aborts with malloc issue,"
|
||||||
|
echo "obtain and compile cpmtools locally and update path to point to your local copy."
|
||||||
|
echo "--------------------------------------------------------------------------------"
|
||||||
|
|
||||||
# These two variables configure which CPM images and disks to build. If only 1 CPM_RFS ROM Drive is needed,
|
# These two variables configure which CPM images and disks to build. If only 1 CPM_RFS ROM Drive is needed,
|
||||||
# remove it fro the lists.
|
# remove it fro the lists.
|
||||||
#BUILDCPMLIST="cpm22 CPM_RFS_1"
|
#BUILDCPMLIST="cpm22 CPM_RFS_1"
|
||||||
@@ -125,10 +130,11 @@ echo "Creating CPM Disks from all the directories in:$CPM_PATH} matching this fi
|
|||||||
# Build the SD Card images, these images differ as they are larger and combine more programs in one disk under different user numbers.
|
# Build the SD Card images, these images differ as they are larger and combine more programs in one disk under different user numbers.
|
||||||
|
|
||||||
# Copy a blank image to create the new disk.
|
# Copy a blank image to create the new disk.
|
||||||
cp ${CPM_PATH}/BLANKFD/BLANK_16M.RAW ${SDC16M_PATH}/RAW/SDCDISK1.RAW;
|
# cp ${CPM_PATH}/BLANKFD/BLANK_16M.RAW ${SDC16M_PATH}/RAW/SDCDISK1.RAW;
|
||||||
|
|
||||||
# Copy the CPM files from the linux filesystem into the CPM Disk under the CPM filesystem.
|
# Copy the CPM files from the linux filesystem into the CPM Disk under the CPM filesystem.
|
||||||
cp ${CPM_PATH}/BLANKFD/BLANK_16M.RAW ${SDC16M_PATH}/RAW/SDCDISK0.RAW;
|
cp ${CPM_PATH}/BLANKFD/BLANK_16M.RAW ${SDC16M_PATH}/RAW/SDCDISK0.RAW;
|
||||||
|
echo "SDCDISK0.RAW..."
|
||||||
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK0.RAW ${CPM_PATH}/CPM00_SYSTEM/*.* 0:
|
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK0.RAW ${CPM_PATH}/CPM00_SYSTEM/*.* 0:
|
||||||
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK0.RAW ${CPM_PATH}/CPM01_TURBOP/*.* 1:
|
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK0.RAW ${CPM_PATH}/CPM01_TURBOP/*.* 1:
|
||||||
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK0.RAW ${CPM_PATH}/CPM02_HI_C/*.* 2:
|
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK0.RAW ${CPM_PATH}/CPM02_HI_C/*.* 2:
|
||||||
@@ -146,6 +152,7 @@ echo "Creating CPM Disks from all the directories in:$CPM_PATH} matching this fi
|
|||||||
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK0.RAW ${CPM_PATH}/CPM33_ZCPR3_COMMON/*.* 14:
|
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK0.RAW ${CPM_PATH}/CPM33_ZCPR3_COMMON/*.* 14:
|
||||||
|
|
||||||
cp ${CPM_PATH}/BLANKFD/BLANK_16M.RAW ${SDC16M_PATH}/RAW/SDCDISK1.RAW;
|
cp ${CPM_PATH}/BLANKFD/BLANK_16M.RAW ${SDC16M_PATH}/RAW/SDCDISK1.RAW;
|
||||||
|
echo "SDCDISK1.RAW..."
|
||||||
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK1.RAW ${CPM_PATH}/CPM12_PASCALMTP_v561/*.* 0:
|
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK1.RAW ${CPM_PATH}/CPM12_PASCALMTP_v561/*.* 0:
|
||||||
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK1.RAW ${CPM_PATH}/CPM26_TPASCAL_v300a/*.* 1:
|
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK1.RAW ${CPM_PATH}/CPM26_TPASCAL_v300a/*.* 1:
|
||||||
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK1.RAW ${CPM_PATH}/CPM13_MTPUG_01/*.* 2:
|
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK1.RAW ${CPM_PATH}/CPM13_MTPUG_01/*.* 2:
|
||||||
@@ -160,6 +167,7 @@ echo "Creating CPM Disks from all the directories in:$CPM_PATH} matching this fi
|
|||||||
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK1.RAW ${CPM_PATH}/CPM22_MTPUG_10/*.* 11:
|
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK1.RAW ${CPM_PATH}/CPM22_MTPUG_10/*.* 11:
|
||||||
|
|
||||||
cp ${CPM_PATH}/BLANKFD/BLANK_16M.RAW ${SDC16M_PATH}/RAW/SDCDISK2.RAW;
|
cp ${CPM_PATH}/BLANKFD/BLANK_16M.RAW ${SDC16M_PATH}/RAW/SDCDISK2.RAW;
|
||||||
|
echo "SDCDISK2.RAW..."
|
||||||
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK2.RAW ${CPM_PATH}/CPM23_PLI/*.* 0:
|
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK2.RAW ${CPM_PATH}/CPM23_PLI/*.* 0:
|
||||||
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK2.RAW ${CPM_PATH}/CPM24_PLI80_v13/*.* 1:
|
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK2.RAW ${CPM_PATH}/CPM24_PLI80_v13/*.* 1:
|
||||||
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK2.RAW ${CPM_PATH}/CPM25_PLI80_v14/*.* 2:
|
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK2.RAW ${CPM_PATH}/CPM25_PLI80_v14/*.* 2:
|
||||||
@@ -169,6 +177,7 @@ echo "Creating CPM Disks from all the directories in:$CPM_PATH} matching this fi
|
|||||||
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK2.RAW ${CPM_PATH}/CPM30_WORDSTAR_v400/*.* 6:
|
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK2.RAW ${CPM_PATH}/CPM30_WORDSTAR_v400/*.* 6:
|
||||||
|
|
||||||
cp ${CPM_PATH}/BLANKFD/BLANK_16M.RAW ${SDC16M_PATH}/RAW/SDCDISK3.RAW;
|
cp ${CPM_PATH}/BLANKFD/BLANK_16M.RAW ${SDC16M_PATH}/RAW/SDCDISK3.RAW;
|
||||||
|
echo "SDCDISK3.RAW..."
|
||||||
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK3.RAW ${CPM_PATH}/CPM_MC_C0/*.* 0:
|
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK3.RAW ${CPM_PATH}/CPM_MC_C0/*.* 0:
|
||||||
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK3.RAW ${CPM_PATH}/CPM_MC_C1/*.* 1:
|
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK3.RAW ${CPM_PATH}/CPM_MC_C1/*.* 1:
|
||||||
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK3.RAW ${CPM_PATH}/CPM_MC_C2/*.* 2:
|
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK3.RAW ${CPM_PATH}/CPM_MC_C2/*.* 2:
|
||||||
@@ -181,6 +190,7 @@ echo "Creating CPM Disks from all the directories in:$CPM_PATH} matching this fi
|
|||||||
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK3.RAW ${CPM_PATH}/CPM_MC_C9/*.* 9:
|
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK3.RAW ${CPM_PATH}/CPM_MC_C9/*.* 9:
|
||||||
|
|
||||||
cp ${CPM_PATH}/BLANKFD/BLANK_16M.RAW ${SDC16M_PATH}/RAW/SDCDISK4.RAW;
|
cp ${CPM_PATH}/BLANKFD/BLANK_16M.RAW ${SDC16M_PATH}/RAW/SDCDISK4.RAW;
|
||||||
|
echo "SDCDISK4.RAW..."
|
||||||
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK4.RAW ${CPM_PATH}/CPM_MC_D0/*.* 0:
|
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK4.RAW ${CPM_PATH}/CPM_MC_D0/*.* 0:
|
||||||
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK4.RAW ${CPM_PATH}/CPM_MC_D1/*.* 1:
|
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK4.RAW ${CPM_PATH}/CPM_MC_D1/*.* 1:
|
||||||
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK4.RAW ${CPM_PATH}/CPM_MC_D2/*.* 2:
|
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK4.RAW ${CPM_PATH}/CPM_MC_D2/*.* 2:
|
||||||
@@ -194,6 +204,7 @@ echo "Creating CPM Disks from all the directories in:$CPM_PATH} matching this fi
|
|||||||
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK4.RAW ${CPM_PATH}/CPM_MC_D9/*.* 9:
|
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK4.RAW ${CPM_PATH}/CPM_MC_D9/*.* 9:
|
||||||
|
|
||||||
cp ${CPM_PATH}/BLANKFD/BLANK_16M.RAW ${SDC16M_PATH}/RAW/SDCDISK5.RAW;
|
cp ${CPM_PATH}/BLANKFD/BLANK_16M.RAW ${SDC16M_PATH}/RAW/SDCDISK5.RAW;
|
||||||
|
echo "SDCDISK5.RAW..."
|
||||||
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK5.RAW ${CPM_PATH}/CPM_MC_E0/*.* 0:
|
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK5.RAW ${CPM_PATH}/CPM_MC_E0/*.* 0:
|
||||||
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK5.RAW ${CPM_PATH}/CPM_MC_E1/*.* 1:
|
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK5.RAW ${CPM_PATH}/CPM_MC_E1/*.* 1:
|
||||||
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK5.RAW ${CPM_PATH}/CPM_MC_E2/*.* 2:
|
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK5.RAW ${CPM_PATH}/CPM_MC_E2/*.* 2:
|
||||||
@@ -206,6 +217,7 @@ echo "Creating CPM Disks from all the directories in:$CPM_PATH} matching this fi
|
|||||||
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK5.RAW ${CPM_PATH}/CPM_MC_E9/*.* 9:
|
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK5.RAW ${CPM_PATH}/CPM_MC_E9/*.* 9:
|
||||||
|
|
||||||
cp ${CPM_PATH}/BLANKFD/BLANK_16M.RAW ${SDC16M_PATH}/RAW/SDCDISK6.RAW;
|
cp ${CPM_PATH}/BLANKFD/BLANK_16M.RAW ${SDC16M_PATH}/RAW/SDCDISK6.RAW;
|
||||||
|
echo "SDCDISK6.RAW..."
|
||||||
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK6.RAW ${CPM_PATH}/CPM_MC_F0/*.* 0:
|
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK6.RAW ${CPM_PATH}/CPM_MC_F0/*.* 0:
|
||||||
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK6.RAW ${CPM_PATH}/CPM_MC_F1/*.* 1:
|
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK6.RAW ${CPM_PATH}/CPM_MC_F1/*.* 1:
|
||||||
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK6.RAW ${CPM_PATH}/CPM_MC_F2/*.* 2:
|
cpmcp -f MZ80A-SDC16M ${SDC16M_PATH}/RAW/SDCDISK6.RAW ${CPM_PATH}/CPM_MC_F2/*.* 2:
|
||||||
|
|||||||
1247
tools/make_roms.sh
1247
tools/make_roms.sh
File diff suppressed because it is too large
Load Diff
@@ -39,7 +39,8 @@ MZBDIR=${ROOTDIR}/MZB
|
|||||||
BLOCKSIZELIST="128 256"
|
BLOCKSIZELIST="128 256"
|
||||||
|
|
||||||
# Build list of files to process.
|
# Build list of files to process.
|
||||||
for SUBDIR in Common MZ-80A MZ-80K MZ-700 MZ-800 MZ-1500 MZ-2000 MZ-80B
|
# for SUBDIR in Common MZ-80A MZ-80K MZ-700 MZ-800 MZ-1500 MZ-2000 MZ-80B
|
||||||
|
for SUBDIR in Common MZ-1200 MZ-1500 MZ-2000 MZ-2200 MZ-2500 MZ-2800 MZ-700 MZ-700-2 MZ-800 MZ-80A MZ-80B MZ-80C MZ-80K
|
||||||
do
|
do
|
||||||
cd ${MZFDIR}
|
cd ${MZFDIR}
|
||||||
ls -l ${SUBDIR}/*.MZF ${SUBDIR}/*.mzf 2>/dev/null |\
|
ls -l ${SUBDIR}/*.MZF ${SUBDIR}/*.mzf 2>/dev/null |\
|
||||||
@@ -82,4 +83,9 @@ do
|
|||||||
done
|
done
|
||||||
done
|
done
|
||||||
done </tmp/filelist
|
done </tmp/filelist
|
||||||
|
|
||||||
|
if [[ "${SUBDIR}" = "MZ-700-2" ]]; then
|
||||||
|
cp ${MZBDIR}/${SUBDIR}/* ${MZBDIR}/MZ-700/
|
||||||
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user