source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Inc/Controllers/XTCF.inc @ 491

Last change on this file since 491 was 491, checked in by krille_n_@…, 11 years ago

Changes:

  • Added a new define (USE_UNDOC_INTEL) that enables optimizations possible by using undocumented instructions available on all Intel processors and truly compatible clones. AFAIK the only exceptions are the NEC V-series and the Sony CXQ70108 processors so this option should be safe for use on the AT builds.
  • Building BIOSDRVS or the BIOS without MODULE_STRINGS_COMPRESSED would fail due to the recent code exclusions so I changed them a bit. Also fixed the mistaken change to Main.asm
  • Changed the Tandy specific info in Configuration_FullMode.txt so it matches the info in the Wiki.
  • Optimizations and fixes in general.
File size: 3.3 KB
Line 
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
25OFFSET_TO_CONTROL_BLOCK_REGISTERS   EQU     8
26DEFAULT_XTCF_SECTOR_WINDOW_SEGMENT  EQU     0D800h
27
28; XT-CF requires that block must be less than 128 sectors (64 kiB).
29; Instead of limiting block size to 64, we limit it to 32 (16 kiB).
30; Transferring more than 16 kiB with 8237 DMA controller block or demand
31; mode might interfere with DRAM refresh on XT systems.
32XTCF_DMA_MODE_MAX_BLOCK_SIZE        EQU     32      ; Sectors
33
34; Possible base addresses. Note that all XT-CF IDE registers are SHL 1 compared
35; to standard IDE registers.
36XTCF_BASE_PORT_DETECTION_SEED       EQU     140h    ; Not a valid base address but needed for autodetection
37XTCF_BASE_PORT_1                    EQU     200h
38XTCF_BASE_PORT_2                    EQU     240h
39XTCF_BASE_PORT_3                    EQU     300h    ; Default setting
40XTCF_BASE_PORT_4                    EQU     340h
41
42
43; XT-CF Control Register (do not SHL 1 these!)
44XTCF_CONTROL_REGISTER               EQU     1Fh
45XTCF_CONTROL_REGISTER_INVERTED_in   EQU     1Eh
46
47; Control Register contents:
48;
49; Control Register holds high byte from Sector Window segment if >= A0h
50; (First possible segment for Sector Window is A000h)
51;
52; 8-bit PIO transfers (port I/O) are used if Control Register is zero.
53; Any other value means DMA transfers (using DMA channel 3).
54XTCF_8BIT_PIO_MODE                      EQU     0
55XTCF_DMA_MODE                           EQU     10h
56XTCF_MEMORY_MAPPED_MODE                 EQU     0A0h
57RAISE_DRQ_AND_CLEAR_XTCF_XFER_COUNTER   EQU     40h
58
59
60
61; Subcommands for AH=1Eh, Lo-tech XT-CF features.
62; Return values common for all subcommands:
63;       AH:     RET_HD_SUCCESS if drive is XT-CF
64;               RET_HD_INVALID if drive is not XT-CF
65;       CF:     0 if successful, 1 if error
66
67;--------------------------------------------------------------------
68; IS_THIS_DRIVE_XTCF
69;   Parameters:
70;       DL:     Drive Number
71;--------------------------------------------------------------------
72IS_THIS_DRIVE_XTCF                  EQU     0
73
74;--------------------------------------------------------------------
75; READ_XTCF_CONTROL_REGISTER_TO_DH
76;   Parameters:
77;       DL:     Drive Number
78;   Returns:
79;       DH:     XT-CF Control Register contents
80;--------------------------------------------------------------------
81READ_XTCF_CONTROL_REGISTER_TO_DH    EQU     1
82
83;--------------------------------------------------------------------
84; WRITE_DH_TO_XTCF_CONTROL_REGISTER
85;   Parameters:
86;       DH:     Byte to write to XT-CF Control Register
87;       DL:     Drive Number
88;--------------------------------------------------------------------
89WRITE_DH_TO_XTCF_CONTROL_REGISTER   EQU     2
90
91
92%endif ; XTCF_INC
Note: See TracBrowser for help on using the repository browser.