Changeset 545 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Inc/Controllers
- Timestamp:
- Apr 19, 2013, 11:44:35 AM (12 years ago)
- google:author:
- aitotat@gmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Inc/Controllers/XTCF.inc
r526 r545 2 2 ; Description : Lo-tech XT-CFv2 board specifications. 3 3 ; 4 ; More information at http://www.lo-tech.co.uk/wiki/Lo-tech_XT-CFv2_Board4 ; More information at http://www.lo-tech.co.uk/XT-CF 5 5 6 6 ; … … 20 20 ; 21 21 22 ; Modified by JJP for XT-CFv3 support, Mar-13 23 24 22 25 %ifndef XTCF_INC 23 26 %define XTCF_INC 24 27 25 DEFAULT_XTCF_SECTOR_WINDOW_SEGMENT EQU 0D800h 26 27 ; XT-CF requires that block must be less than 128 sectors (64 kiB).28 ; Instead of limiting block size to 64, we limit it to 32 (16 kiB).29 ; Transferring more than 16 kiB with 8237 DMA controller block or demand30 ; mode might interfere with DRAM refresh on XT systems.31 XTCF_DMA_MODE_MAX_BLOCK_SIZE EQU 32; Sectors28 ; XT-CF requires that block must be less than 128 sectors (64 kiB) for DMA 29 ; transfers. 30 ; 31 ; Note: XT-CFv3 DMA will not interfere with PC & PC/XT memory refresh, 32 ; since the XT-CFv3 detaches itself from the bus every 16 bytes transferred. 33 ; 34 XTCF_DMA_MODE_MAX_BLOCK_SIZE EQU 64 ; Sectors 32 35 33 36 ; Possible base addresses. Note that all XT-CF IDE registers are SHL 1 compared 34 37 ; to standard IDE registers. 35 XTCF_BASE_PORT_DETECTION_SEED EQU 140h ; Not a valid base address but needed for autodetection36 38 XTCF_BASE_PORT_1 EQU 200h 37 39 XTCF_BASE_PORT_2 EQU 240h … … 41 43 42 44 ; XT-CF Control Register (do not SHL 1 these!) 43 XTCF_CONTROL_REGISTER EQU 1Fh 44 XTCF_CONTROL_REGISTER_INVERTED_in EQU 1Eh 45 ; Note: XT-CFv3 control register is used *only* to raise DRQ. The register cannot be read. 46 ; 47 XTCF_CONTROL_REGISTER EQU 1Eh 45 48 46 ; Control Register contents:49 ; Transfer Mode Constants 47 50 ; 48 ; Control Register holds high byte from Sector Window segment if >= A0h 49 ; (First possible segment for Sector Window is A000h) 51 ; Available transfer modes depend on the controller. All XT-CF controllers 52 ; support 8-bit PIO, either with 8-bit or 16-bit instructions (i.e., data 53 ; can be fetched from the controller with REP INSW or REP INSB since A0 is 54 ; not decoded). However, errors in the implementation of the BIU on some 55 ; machines will prevent 16-bit instructions delivering data correctly. 50 56 ; 51 ; 8-bit PIO transfers (port I/O) are used if Control Register is zero.52 ; Any other value means DMA transfers (using DMA channel 3).53 XTCF_8BIT_PIO_MODE EQU 0 54 XTCF_DMA_MODE EQU 10h 55 XTCF_MEMORY_MAPPED_MODE EQU 0A0h 56 RAISE_DRQ_AND_CLEAR_XTCF_XFER_COUNTER EQU 40h57 58 57 ; For XT-CFv3 adapter, DMA transfers are also supported via channel 3. 58 ; 59 ; XT-CFv3 cannot be distinguised by software, so user must decide and set 60 ; the mode via a call to Int 13h function 1Eh accordingly (see AH1E_XTCF.asm). 61 ;; 62 XTCF_8BIT_PIO_MODE EQU 00h 63 XTCF_8BIT_PIO_MODE_WITH_BIU_OFFLOAD EQU 01h 64 XTCF_DMA_MODE EQU 02h 59 65 60 66 ; Subcommands for AH=1Eh, Lo-tech XT-CF features. … … 72 78 73 79 ;-------------------------------------------------------------------- 74 ; READ_XTCF_CONTROL_REGISTER_TO_DH 80 ; SET_XTCF_TRANSFER_MODE 81 ; Parameters: 82 ; DH: Mode to select, 83 ; i.e. XTCF_8BIT_PIO_MODE 84 ; Note there's no way to know if an 85 ; XT-CF adapter supports DMA, so the 86 ; user should enable DMA only if a 87 ; DMA-enabled XT-CFv3 is fitted. 88 ; DL: Drive Number 89 ;-------------------------------------------------------------------- 90 SET_XTCF_TRANSFER_MODE EQU 1 91 92 ;-------------------------------------------------------------------- 93 ; GET_XTCF_TRANSFER_MODE 75 94 ; Parameters: 76 95 ; DL: Drive Number 77 96 ; Returns: 78 ; DH: XT-CF Control Register contents 97 ; DL: Block mode sectors per block 98 ; configured 99 ; DH: One of the mode values listed above, 100 ; i.e. XTCF_8BIT_PIO_MODE 79 101 ;-------------------------------------------------------------------- 80 READ_XTCF_CONTROL_REGISTER_TO_DH EQU 1 81 82 ;-------------------------------------------------------------------- 83 ; WRITE_DH_TO_XTCF_CONTROL_REGISTER 84 ; Parameters: 85 ; DH: Byte to write to XT-CF Control Register 86 ; DL: Drive Number 87 ;-------------------------------------------------------------------- 88 WRITE_DH_TO_XTCF_CONTROL_REGISTER EQU 2 102 GET_XTCF_TRANSFER_MODE EQU 2 89 103 90 104
Note:
See TracChangeset
for help on using the changeset viewer.