[470] | 1 | ; Project name : XTIDE Universal BIOS
|
---|
| 2 | ; Description : Lo-tech XT-CFv2 board specifications.
|
---|
| 3 | ;
|
---|
| 4 | ; More information at http://www.lo-tech.co.uk/wiki/Lo-tech_XT-CFv2_Board
|
---|
| 5 |
|
---|
| 6 | ;
|
---|
| 7 | ; XTIDE Universal BIOS and Associated Tools
|
---|
| 8 | ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
|
---|
| 9 | ;
|
---|
| 10 | ; This program is free software; you can redistribute it and/or modify
|
---|
| 11 | ; it under the terms of the GNU General Public License as published by
|
---|
| 12 | ; the Free Software Foundation; either version 2 of the License, or
|
---|
| 13 | ; (at your option) any later version.
|
---|
| 14 | ;
|
---|
| 15 | ; This program is distributed in the hope that it will be useful,
|
---|
| 16 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 17 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 18 | ; GNU General Public License for more details.
|
---|
| 19 | ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
---|
| 20 | ;
|
---|
| 21 |
|
---|
| 22 | %ifndef XTCF_INC
|
---|
| 23 | %define XTCF_INC
|
---|
| 24 |
|
---|
| 25 | ; Possible base addresses. Note that all XT-CF IDE registers are SHL 1 compared
|
---|
| 26 | ; to standard IDE registers.
|
---|
| 27 | XTCF_BASE_PORT_1 EQU 200h
|
---|
| 28 | XTCF_BASE_PORT_2 EQU 240h
|
---|
| 29 | XTCF_BASE_PORT_3 EQU 300h ; Default setting
|
---|
[471] | 30 | XTCF_BASE_PORT_4 EQU 340h
|
---|
[470] | 31 |
|
---|
| 32 |
|
---|
| 33 | ; XT-CF Control Register (do not SHL 1 these!)
|
---|
| 34 | XTCF_CONTROL_REGISTER EQU 1Fh
|
---|
| 35 | XTCT_CONTROL_REGISTER_INVERTED_in EQU 1Eh
|
---|
| 36 |
|
---|
[471] | 37 | ; Control Register contents:
|
---|
| 38 | ;
|
---|
| 39 | ; Control Register holds high byte from Sector Window segment if >= A0h
|
---|
| 40 | ; (First possible segment for Sector Window is A000h)
|
---|
| 41 | ;
|
---|
| 42 | ; 8-bit PIO transfers (port I/O) are used if Control Register is zero.
|
---|
| 43 | ; Any other value means DMA transfers (using DMA channel 3).
|
---|
[470] | 44 |
|
---|
| 45 |
|
---|
[471] | 46 | ; Subcommands for AH=1Eh, Lo-tech XT-CF features.
|
---|
| 47 | ; Return values common for all subcommands:
|
---|
| 48 | ; AH: RET_HD_SUCCESS if drive is XT-CF
|
---|
| 49 | ; RET_HD_INVALID if drive is not XT-CF
|
---|
| 50 | ; CF: 0 if successful, 1 if error
|
---|
[470] | 51 |
|
---|
[471] | 52 | ;--------------------------------------------------------------------
|
---|
| 53 | ; IS_THIS_DRIVE_XTCF
|
---|
| 54 | ; Parameters:
|
---|
| 55 | ; DL: Drive Number
|
---|
| 56 | ;--------------------------------------------------------------------
|
---|
| 57 | IS_THIS_DRIVE_XTCF EQU 0
|
---|
| 58 |
|
---|
| 59 | ;--------------------------------------------------------------------
|
---|
| 60 | ; IS_XTCF_IN_PORT_CX
|
---|
| 61 | ; Parameters:
|
---|
| 62 | ; CX: Port to search XT-CF from (can be anything)
|
---|
| 63 | ; Returns:
|
---|
| 64 | ; AH: RET_HD_SUCCESS if XT-CF is found from port
|
---|
| 65 | ; RET_HD_INVALID if XT-CF is not found
|
---|
| 66 | ;--------------------------------------------------------------------
|
---|
| 67 | IS_XTCF_IN_PORT_CX EQU 1
|
---|
| 68 |
|
---|
| 69 | ;--------------------------------------------------------------------
|
---|
| 70 | ; READ_XTCF_CONTROL_REGISTER_TO_DH
|
---|
| 71 | ; Parameters:
|
---|
| 72 | ; DL: Drive Number
|
---|
| 73 | ; Returns:
|
---|
| 74 | ; DH: XT-CF Control Register contents
|
---|
| 75 | ;--------------------------------------------------------------------
|
---|
| 76 | READ_XTCF_CONTROL_REGISTER_TO_DH EQU 2
|
---|
| 77 |
|
---|
| 78 | ;--------------------------------------------------------------------
|
---|
| 79 | ; WRITE_DH_TO_XTCF_CONTROL_REGISTER
|
---|
| 80 | ; Parameters:
|
---|
| 81 | ; DH: Byte to write to XT-CF Control Register
|
---|
| 82 | ; DL: Drive Number
|
---|
| 83 | ;--------------------------------------------------------------------
|
---|
| 84 | WRITE_DH_TO_XTCF_CONTROL_REGISTER EQU 3
|
---|
| 85 |
|
---|
| 86 |
|
---|
[470] | 87 | %endif ; XTCF_INC
|
---|