Browse Source

Fixes for MT011 in SD driver

Credit to Douglas Miller for these.
patch
Wayne Warthen 5 years ago
parent
commit
12fea8a1d0
  1. 1
      Doc/ChangeLog.txt
  2. 17
      Source/HBIOS/sd.asm
  3. 17
      Source/Images/d_cpm22/u4/readme.txt
  4. 17
      Source/Images/d_cpm3/u4/readme.txt
  5. 17
      Source/Images/d_zsdos/u4/readme.txt
  6. 2
      Source/ver.inc
  7. 2
      Source/ver.lib

1
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
-----------

17
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

17
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.

17
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.

17
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.

2
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"

2
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

Loading…
Cancel
Save