Browse Source

CF Card compatibility improvement

Older CF Cards did not reset IDE registers to defaults values when reset.  Implemented a work around.
pull/112/head
Wayne Warthen 6 years ago
parent
commit
7d022f709b
  1. 1
      Doc/ChangeLog.txt
  2. 80
      Readme.unix
  3. 62
      Source/HBIOS/ide.asm
  4. 21
      Source/HBIOS/ppide.asm
  5. BIN
      Source/Images/d_cpm22/u0/KERMIT.COM
  6. BIN
      Source/Images/d_cpm3/u0/KERMIT.COM
  7. BIN
      Source/Images/d_nzcom/u0/KERMIT.COM
  8. BIN
      Source/Images/d_zpm3/u15/kermit.com
  9. BIN
      Source/Images/d_zsdos/u0/KERMIT.COM
  10. 2
      Source/ver.inc
  11. 2
      Source/ver.lib

1
Doc/ChangeLog.txt

@ -7,6 +7,7 @@ Version 3.1
- WBW: Made .com images smaller (contain only Z-System now) - WBW: Made .com images smaller (contain only Z-System now)
- WBW: Support automatic clock hardware detection and fallback - WBW: Support automatic clock hardware detection and fallback
- WBW: Support use of CTC for SIO baud rate divisors - WBW: Support use of CTC for SIO baud rate divisors
- WBW: Updated IDE and PPIDE drivers to improve old CF Card compatibility
Version 3.0.1 Version 3.0.1
------------- -------------

80
Readme.unix

@ -1,41 +1,67 @@
this tree now contains makefiles and tools to build on Linux and MacosX
Linux is rather more thoroughly tested compared to os-x.
to get here, TASM and the propeller generation tools needed to be replaced,
and since the unix filesystem is usually case-sensitive, and CP/M and windows
are not, the cpm tools were made case-insensitive.
TASM was replaced with uz80as, which implements a subset of TASM and fixes some
bugs. however, I needed to add some functionality to make it build the sources
as they exist in this tree. in particular, one thing to be very careful of is
that TASM is not entirely consistent with respect to the .DS directive.
it's usually a bad idea to mix .DS, .FILL, .DB with .ORG.
This tree now contains makefiles and tools to build on Linux and
MacosX Linux is rather more thoroughly tested compared to os-x.
To get here, TASM and the propeller generation tools needed to be
replaced, and since the unix filesystem is usually case-sensitive,
and CP/M and windows are not, the cpm tools were made case-insensitive.
TASM was replaced with uz80as, which implements a subset of TASM and
fixes some bugs. however, I needed to add some functionality to make
it build the sources as they exist in this tree. in particular, one
thing to be very careful of is that TASM is not entirely consistent
with respect to the .DS directive. it's usually a bad idea to mix
.DS, .FILL, .DB with .ORG.
.DS n is best thought of as .ORG $ + n .DS n is best thought of as .ORG $ + n
.ORG changes the memory pointer, but does not change the file output point.
it works a lot more like M80, SLR* .phase
.ORG changes the memory pointer, but does not change the file
output point. It works a lot more like M80, SLR* .PHASE
It assumes that you have some standard system tools and libraries
installed specifically: gcc, gnu make, libncurses
To build:
cd to the top directory and type "make".
By default, this will generate all of the standard configurations of
RomWBW for all platforms. If you want to customize the process to
only build one (or a subset) of the configurations, edit the "makefile"
in the HBIOS directory. If you create your own, custom configuration,
you can add it there as well.
For MacOS users, you may encounter a failure reading or writing files.
This is caused by protection features in MacOS (at least, in Catalina)
that prevent programs built on your local system (unsigned) from
running. To disable this feature:
it assumes that you have some standard system tools and libraries installed
specifically: gcc, gnu make, libncurses
1) Make sure you exit System Preferences.
2) Open a terminal session and type the following. You will need to
authenticate with an admin account. sudo spctl --master-disable
3) Exit terminal
4) Go into System Preferences and choose Security and Privacy
5) Select the General tab if it isn't already selected
6) You should now see a third selection under
"Allow apps downloaded from:" of Anywhere - select this.
7) Now you can run the build successfully.
to build:
cd to the top directory and type make.
DISCLAIMER: You do this at your own risk. I highly recommend that you
return the settings back to normal immediately after doing a build.
heavy use is made of make's include facility and pattern rules.
the master rule set is in Tools/Makefile.inc. changes here will affect
almost every Makefile, and where exceptions are needed, the overrides are
applied in the lower Makefiles.
Heavy use is made of make's include facility and pattern rules. the
master rule set is in Tools/Makefile.inc. changes here will affect
almost every Makefile, and where exceptions are needed, the overrides
are applied in the lower Makefiles.
these tools can run a windows-linux regression test, where all the binaries are
compared to a baseline windows build.
These tools can run a windows-linux regression test, where all the
binaries are compared to a baseline windows build.
Credit: Credit:
uz80as was written by Jorge Giner Cordero, jorge.giner@hotmail.com, uz80as was written by Jorge Giner Cordero, jorge.giner@hotmail.com,
and the original source can be found at https://github.com/jorgicor/uz80as and the original source can be found at https://github.com/jorgicor/uz80as
the propeller tools use bstc and openspin, parallax tools from
the propeller tools use bstc and openspin, parallax tools from
http://www.fnarfbargle.com/bst.html https://github.com/parallaxinc/OpenSpin http://www.fnarfbargle.com/bst.html https://github.com/parallaxinc/OpenSpin
note that bst is not open source or even currently maintained, so I could
note that bst is not open source or even currently maintained, so I could
not generate a version for 64 bit osx. not generate a version for 64 bit osx.
cpmtools were the most current I could find, and it has been hacked to do cpmtools were the most current I could find, and it has been hacked to do
@ -45,5 +71,5 @@ Credit:
both zx and cpmtools ship with an overly complicated makefile generation system both zx and cpmtools ship with an overly complicated makefile generation system
and this is ignored. and this is ignored.
this whole linux build framework is the work of Curt Mayer, curt@zen-room.org.
This whole linux build framework is the work of Curt Mayer, curt@zen-room.org.
use it for whatever you like; this is not my day job. use it for whatever you like; this is not my day job.

62
Source/HBIOS/ide.asm

@ -922,36 +922,15 @@ IDE_RESET:
PRTS(" RESET$") PRTS(" RESET$")
#ENDIF #ENDIF
; ;
;#IF (IDEMODE == IDEMODE_MK4)
;
LD A,(IY+IDE_MODE) ; GET MODE
CP IDEMODE_MK4 ; MK4?
JR NZ,IDE_RESET1 ; IF NOT, BYPASS
;
; USE HARDWARE RESET LINE
#IF (IDETRACE >= 3)
PRTS(" HARD$")
#ENDIF
LD A,$80 ; HIGH BIT OF XAR IS IDE RESET
;OUT (IDE_IO_XAR),A
CALL IDE_OUT
.DB IDE_REG_XAR
LD DE,2 ; DELAY 32US (SPEC IS >= 25US)
CALL VDELAY
XOR A ; CLEAR RESET BIT
;OUT (IDE_IO_XAR),A
CALL IDE_OUT
.DB IDE_REG_XAR
;
IDE_RESET1:
;
;#ENDIF
;
;#IF (IDEMODE == IDEMODE_RC) ;#IF (IDEMODE == IDEMODE_RC)
; ;
LD A,(IY+IDE_MODE) ; GET MODE
CP IDEMODE_RC ; RC2014?
JR NZ,IDE_RESET2 ; IF NOT, BYPASS
; OLDER CF CARDS DO NOT SEEM TO SET THE
; REGISTERS ON RESET, SO HERE WE FAKE THINGS BY
; SETTING THEM AS A RESET WOULD. SO WE ALWAYS
; DO THE FAKE.
;LD A,(IY+IDE_MODE) ; GET MODE
;CP IDEMODE_RC ; RC2014?
;JR NZ,IDE_RESET2 ; IF NOT, BYPASS
; ;
; RC2014 CANNOT ADDRESS THE DEVICE CONTROL PORT AND ; RC2014 CANNOT ADDRESS THE DEVICE CONTROL PORT AND
; HAS NO WAY TO PERFORM A HARD RESET FROM SOFTWARE, ; HAS NO WAY TO PERFORM A HARD RESET FROM SOFTWARE,
@ -979,6 +958,33 @@ IDE_RESET2:
; ;
;#ENDIF ;#ENDIF
; ;
;#IF (IDEMODE == IDEMODE_MK4)
;
LD A,(IY+IDE_MODE) ; GET MODE
CP IDEMODE_MK4 ; MK4?
JR NZ,IDE_RESET1 ; IF NOT, BYPASS
;
; USE HARDWARE RESET LINE
#IF (IDETRACE >= 3)
PRTS(" HARD$")
#ENDIF
LD A,$80 ; HIGH BIT OF XAR IS IDE RESET
;OUT (IDE_IO_XAR),A
CALL IDE_OUT
.DB IDE_REG_XAR
LD DE,20 ; DELAY 32US (SPEC IS >= 25US)
CALL VDELAY
XOR A ; CLEAR RESET BIT
;OUT (IDE_IO_XAR),A
CALL IDE_OUT
.DB IDE_REG_XAR
LD DE,20
CALL VDELAY
;
IDE_RESET1:
;
;#ENDIF
;
;#IF ((IDEMODE != IDEMODE_MK4) & (IDEMODE != IDEMODE_RC)) ;#IF ((IDEMODE != IDEMODE_MK4) & (IDEMODE != IDEMODE_RC))
; ;
LD A,(IY+IDE_MODE) ; GET MODE LD A,(IY+IDE_MODE) ; GET MODE

21
Source/HBIOS/ppide.asm

@ -974,6 +974,27 @@ PPIDE_RESET:
CALL PPIDE_PRTPREFIX CALL PPIDE_PRTPREFIX
PRTS(" RESET$") PRTS(" RESET$")
#ENDIF #ENDIF
;
; OLDER CF CARDS DO NOT SEEM TO SET THE
; REGISTERS ON RESET, SO HERE WE FAKE THINGS BY
; SETTING THEM AS A RESET WOULD
#IF (IDETRACE >= 3)
PRTS(" FAKE$")
#ENDIF
XOR A
;OUT (IDE_IO_CYLLO),A
CALL PPIDE_OUT
.DB PPIDE_REG_CYLLO
;OUT (IDE_IO_CYLHI),A
CALL PPIDE_OUT
.DB PPIDE_REG_CYLHI
INC A
;OUT (IDE_IO_COUNT),A
CALL PPIDE_OUT
.DB PPIDE_REG_COUNT
;OUT (IDE_IO_SECT),A
CALL PPIDE_OUT
.DB PPIDE_REG_SECT
; ;
; SETUP PPI TO READ ; SETUP PPI TO READ
LD A,PPIDE_DIR_READ ; SET DATA BUS DIRECTION TO READ LD A,PPIDE_DIR_READ ; SET DATA BUS DIRECTION TO READ

BIN
Source/Images/d_cpm22/u0/KERMIT.COM

Binary file not shown.

BIN
Source/Images/d_cpm3/u0/KERMIT.COM

Binary file not shown.

BIN
Source/Images/d_nzcom/u0/KERMIT.COM

Binary file not shown.

BIN
Source/Images/d_zpm3/u15/kermit.com

Binary file not shown.

BIN
Source/Images/d_zsdos/u0/KERMIT.COM

Binary file not shown.

2
Source/ver.inc

@ -2,4 +2,4 @@
#DEFINE RMN 1 #DEFINE RMN 1
#DEFINE RUP 0 #DEFINE RUP 0
#DEFINE RTP 0 #DEFINE RTP 0
#DEFINE BIOSVER "3.1-pre.4"
#DEFINE BIOSVER "3.1-pre.5"

2
Source/ver.lib

@ -3,5 +3,5 @@ rmn equ 1
rup equ 0 rup equ 0
rtp equ 0 rtp equ 0
biosver macro biosver macro
db "3.1-pre.4"
db "3.1-pre.5"
endm endm

Loading…
Cancel
Save