diff --git a/Doc/ChangeLog.txt b/Doc/ChangeLog.txt index 6d2056fc..e5c11a9e 100644 --- a/Doc/ChangeLog.txt +++ b/Doc/ChangeLog.txt @@ -26,6 +26,7 @@ Version 3.1.1 - WBW: Add config to allow swapping logical order of MT011 SPI ports - WBW: COPY.COM updated from v1.72 -> v1.73 throughout distribution - D?M: CP/NET for CP/M 2.2 and CP/M 3 (requires MT011) +- D?M: SD driver fixes for MT011 Version 3.1 ----------- diff --git a/Source/HBIOS/sd.asm b/Source/HBIOS/sd.asm index 39a29bae..7b76ef33 100644 --- a/Source/HBIOS/sd.asm +++ b/Source/HBIOS/sd.asm @@ -233,6 +233,15 @@ RTCDEF .SET SD_OPRDEF ; SET DEFAULT IN HBIOS MAINLINE ; WIZNET W5500 AND IS NOT USED HERE. CHANNEL 1 (CD0 & CS0) & 2 (CD1 & CS1) ; ARE ASSUMED TO BE CONNECTED TO SD CARDS. ; +; NOTE THAT DOING AN "IN RDTR" WILL RETURN THE *EXISTING* CONTENTS +; OF THE SHIFT REGISTER, THEN INITIATE AN SPI READ. SO THE "IN" WILL BE +; RETURNING THE DATA RECEIVED FROM THE PRIOR "IN RDTR", OR "OUT WRTR". +; "IN RDNTR" WILL RETURN THE EXISTING SHIFT REGISTER CONTENTS WITHOUT +; INITIATING A NEW SPI READ. +; +; THANKS TO DOUGLAS MILLER FOR BRINGING THIS BEHAVIOR TO MY ATTENTION +; AND SUPPLYING ASSOCIATED FIXES. +; SD_BASE .EQU $5C ; Module base address SD_DEVMAX .EQU 2 ; NUMBER OF PHYSICAL UNITS (SOCKETS) SD_WRTR .EQU SD_BASE + 0 ; Write data and transfer @@ -1428,6 +1437,10 @@ SD_EXECCMD1: ; ; GET RESULT LD E,0 ; INIT TIMEOUT LOOP COUNTER +#IF (SDMODE == SDMODE_MT) + CALL SD_GET ; DISCARD STALE DATA FROM PUT +#ENDIF +; SD_EXECCMD2: CALL SD_GET ; GET A BYTE FROM THE CARD OR A ; SET FLAGS @@ -1555,6 +1568,7 @@ SD_PUTDATA1: OUT (SD_WRTR),A ; SEND IT TWICE LD DE,$7FFF ; LOOP MAX (TIMEOUT) + IN A,(SD_RDTR) ; DISCARD STALE DATA FROM OUT SD_PUTDATA2: IN A,(SD_RDTR) #ELSE @@ -1604,6 +1618,9 @@ SD_PUTDATA3: ; SD_WAITRDY: LD DE,$FFFF ; LOOP MAX (TIMEOUT) +#IF (SDMODE == SDMODE_MT) + CALL SD_GET ; DISCARD STALE DATA - UNKNOWN CONTEXT +#ENDIF SD_WAITRDY1: CALL SD_GET INC A ; $FF -> $00 diff --git a/Source/Images/d_cpm22/u4/readme.txt b/Source/Images/d_cpm22/u4/readme.txt new file mode 100644 index 00000000..49c9006a --- /dev/null +++ b/Source/Images/d_cpm22/u4/readme.txt @@ -0,0 +1,17 @@ +*********************************************************************** +*** *** +*** R o m W B W *** +*** *** +*** Z80/Z180 System Software *** +*** *** +*********************************************************************** + +This directory contains the CP/M 2.2 client tools for CP/NET. These +tools work only with the MT011 RC2014 module. + +All of these files come from Douglas Miller. Please refer to +https://github.com/durgadas311/cpnet-z80 for more information and +the latest source code. + +In general, to use CP/NET on RomWBW, it is intended that you will +copy all of these files into your user 0 directory. \ No newline at end of file diff --git a/Source/Images/d_cpm3/u4/readme.txt b/Source/Images/d_cpm3/u4/readme.txt new file mode 100644 index 00000000..520a8f94 --- /dev/null +++ b/Source/Images/d_cpm3/u4/readme.txt @@ -0,0 +1,17 @@ +*********************************************************************** +*** *** +*** R o m W B W *** +*** *** +*** Z80/Z180 System Software *** +*** *** +*********************************************************************** + +This directory contains the CP/M 3 client tools for CP/NET. These +tools work only with the MT011 RC2014 module. + +All of these files come from Douglas Miller. Please refer to +https://github.com/durgadas311/cpnet-z80 for more information and +the latest source code. + +In general, to use CP/NET on RomWBW, it is intended that you will +copy all of these files into your user 0 directory. \ No newline at end of file diff --git a/Source/Images/d_zsdos/u4/readme.txt b/Source/Images/d_zsdos/u4/readme.txt new file mode 100644 index 00000000..49c9006a --- /dev/null +++ b/Source/Images/d_zsdos/u4/readme.txt @@ -0,0 +1,17 @@ +*********************************************************************** +*** *** +*** R o m W B W *** +*** *** +*** Z80/Z180 System Software *** +*** *** +*********************************************************************** + +This directory contains the CP/M 2.2 client tools for CP/NET. These +tools work only with the MT011 RC2014 module. + +All of these files come from Douglas Miller. Please refer to +https://github.com/durgadas311/cpnet-z80 for more information and +the latest source code. + +In general, to use CP/NET on RomWBW, it is intended that you will +copy all of these files into your user 0 directory. \ No newline at end of file diff --git a/Source/ver.inc b/Source/ver.inc index 9db46fd9..aa2a5657 100644 --- a/Source/ver.inc +++ b/Source/ver.inc @@ -2,4 +2,4 @@ #DEFINE RMN 1 #DEFINE RUP 1 #DEFINE RTP 0 -#DEFINE BIOSVER "3.1.1-pre.74" +#DEFINE BIOSVER "3.1.1-pre.75" diff --git a/Source/ver.lib b/Source/ver.lib index 88f15b0b..c3fcb525 100644 --- a/Source/ver.lib +++ b/Source/ver.lib @@ -3,5 +3,5 @@ rmn equ 1 rup equ 1 rtp equ 0 biosver macro - db "3.1.1-pre.74" + db "3.1.1-pre.75" endm