diff --git a/.gitignore b/.gitignore index 2a2cb66..90a5406 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,14 @@ software/roms/MZ80AFI.rom software/roms/bios.rom software/roms/cpm22.rom software/tmp/ +software/src/FatFS +software/src/sav +software/asm/cbios.asm.bak +software/asm/sav/ +software/rfs_bank2.asm.1703.2200 +software/roms/cbios_bank5.rom +software/roms/cbios_bank6.rom +software/roms/cbios_bank7.rom +software/roms/cbios_bank8.rom +software/src/sdtest.c + diff --git a/software/asm/include/RFS_Definitions.asm b/software/asm/include/RFS_Definitions.asm index 11e6f3a..1e368dc 100644 --- a/software/asm/include/RFS_Definitions.asm +++ b/software/asm/include/RFS_Definitions.asm @@ -67,6 +67,9 @@ DLY12: EQU 00DA7h DLY12A: EQU 00DAAh ?RSTR1: EQU 00EE6h +; Debugging +ENADEBUG EQU 0 ; Enable debugging logic, 1 = enable, 0 = disable + ;----------------------------------------------- ; Memory mapped ports in hardware. ;----------------------------------------------- diff --git a/software/asm/rfs.asm b/software/asm/rfs.asm index cfb0ec6..4237cec 100644 --- a/software/asm/rfs.asm +++ b/software/asm/rfs.asm @@ -762,7 +762,9 @@ ISMZFNOT: POP HL POP BC RET -PRTDBG: PUSH HL + +PRTDBG: IF ENADEBUG = 1 + PUSH HL PUSH DE PUSH BC PUSH AF @@ -797,6 +799,7 @@ PRTDBG: PUSH HL POP DE POP HL RET + ENDIF _PRTMZF: PUSH DE PUSH HL @@ -806,9 +809,9 @@ _PRTMZF: PUSH DE ; LD A,(SCRNMODE) CP 0 - LD H,46 + LD H,47 JR Z,PRTMZF0 - LD H,92 + LD H,93 PRTMZF0: LD A,(TMPLINECNT) ; Pause if we fill the screen. LD E,A INC E @@ -1033,6 +1036,18 @@ LOADROM1: DI LD (RFSBK1), A CALL MFINDMZF ; Try and find the file in User ROM via MROM utility. JR NZ, LROMNTFND + ; + LD A,(ROMBK1) + LD (RFSBK1), A + LD DE,MSGLDROM + RST 018H + LD DE,NAME + RST 018H + CALL NL + LD A,(WRKROMBK1) + LD (RFSBK1), A + + ; CALL MROMLOAD ; Load the file from User ROM via MROM utility. JP Z, LROMLOAD5 @@ -1049,6 +1064,13 @@ LOADROMEND: EI ; Load program from RFS Bank 1 (MROM Bank) ; LROMLOAD: PUSH BC + ; + LD DE,MSGLDROM + RST 018H + LD DE,NAME + RST 018H + CALL NL + ; LD A,B LD (WRKROMBK1),A LD (RFSBK1), A @@ -1169,14 +1191,15 @@ LOADSDCARD2:RET ; ;====================================== ; -MSGSON: DB "+ RFS ", 0ABh, "1.1 **",00Dh -MSGOK: DB "OK!" -MSGNOTFND: DB "NOT FOUND", 00Dh -MSGRDIRLST: DB "ROM DIRECTORY:", 00Dh -MSGTRM: DB 00Dh -MSGSV: DB "FILENAME? ", 0DH -MSG_INITM: DB "INIT MEMORY", 0Dh -MSGBADCMD: DB "???", 0DH +MSGSON: DB "+ RFS ", 0ABh, "1.1 **",00DH +MSGOK: DB "OK!", 00DH +MSGNOTFND: DB "NOT FOUND", 00DH +MSGRDIRLST: DB "ROM DIRECTORY:", 00DH +MSGTRM: DB 00DH +MSGSV: DB "FILENAME? ", 00DH +MSG_INITM: DB "INIT MEMORY", 00DH +MSGBADCMD: DB "???", 00DH +MSGLDROM: DB "LOADING ", 00DH ; Bring in additional resources. USE_CMPSTRING: EQU 1 diff --git a/software/asm/rfs_bank2.asm b/software/asm/rfs_bank2.asm index 3b546f9..261832a 100644 --- a/software/asm/rfs_bank2.asm +++ b/software/asm/rfs_bank2.asm @@ -1167,11 +1167,6 @@ DIRSD2: LD A,(HL) INC D DIRSD3: INC E ; Onto next directory entry number. DJNZ DIRSD1 - - LD DE,MSGSDRERR - RST 018H - CALL NL - RET ; diff --git a/software/roms/USER_ROM_256.bin b/software/roms/USER_ROM_256.bin index 6d6ddd8..ff1002c 100644 Binary files a/software/roms/USER_ROM_256.bin and b/software/roms/USER_ROM_256.bin differ diff --git a/software/roms/rfs.rom b/software/roms/rfs.rom index b9f8c83..6aefd6e 100644 Binary files a/software/roms/rfs.rom and b/software/roms/rfs.rom differ