source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Src/Device/Serial/SerialDPT.asm @ 601

Last change on this file since 601 was 601, checked in by krille_n_, 5 years ago

Changes:

  • Building the BIOS now works again.
  • Added a new IDE device type/transfer mode for use only with XT-IDE rev 2+ (or Chuck(G)-modded rev 1) cards installed in any of the following machines: Olivetti M24, AT&T PC6300, Xerox 6060 and Logabax Persona 1600. This new transfer mode is slightly faster than the regular XT-IDE rev 1 device type and requires that the card is configured for High Speed mode (or, in case of the card being a rev 1 card, has the Chuck(G) mod done). The new device type is called "XTIDE rev 2 (Olivetti M24)" in XTIDECFG.
  • Made some minor improvements to the library code that handles 'Drive Not Ready' errors in XTIDECFG.
  • Optimizations.
File size: 2.5 KB
Line 
1; Project name  :   XTIDE Universal BIOS
2; Description   :   Sets Serial Device specific parameters to DPT.
3
4;
5; XTIDE Universal BIOS and Associated Tools
6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
7;
8; This program is free software; you can redistribute it and/or modify
9; it under the terms of the GNU General Public License as published by
10; the Free Software Foundation; either version 2 of the License, or
11; (at your option) any later version.
12;
13; This program is distributed in the hope that it will be useful,
14; but WITHOUT ANY WARRANTY; without even the implied warranty of
15; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16; GNU General Public License for more details.
17; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
18;
19
20; Section containing code
21SECTION .text
22
23;--------------------------------------------------------------------
24; SerialDPT_Finalize
25;   Parameters:
26;       DS:DI:  Ptr to Disk Parameter Table
27;       ES:SI:  Ptr to 512-byte ATA information read from the drive
28;   Returns:
29;       CF:     Set, indicates that this is a floppy disk
30;               Clear, indicates that this is a hard disk
31;   Corrupts registers:
32;       AX
33;--------------------------------------------------------------------
34SerialDPT_Finalize:
35    mov     ax, [es:si+SerialServer_ATA_wPortAndBaud]
36    mov     [di+DPT_SERIAL.wSerialPortAndBaud], ax
37
38;
39; Note that this section is not under %ifdef MODULE_SERIAL_FLOPPY.  It is important to
40; distinguish floppy disks presented by the server and not treat them as hard disks, even
41; if the floppy support is disabled.
42;
43    mov     al, [es:si+SerialServer_ATA_wDriveFlags]
44    eSHL_IM al, 1
45    mov     BYTE [di+DPT.bFlagsHigh], al
46    ret
47
48%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
49    %ifdef MODULE_SERIAL_FLOPPY
50        %if FLGH_DPT_SERIAL_DEVICE != 0x4 || FLGH_DPT_SERIAL_FLOPPY != 0x10 || FLGH_DPT_SERIAL_FLOPPY_TYPE_FIELD_POSITION != 5
51            %error "The serial server passes FLGH values into SerialDPT_Finalize directly.  If the flag positions are changed, corresponding changes will need to be made in the serial server, and likely a version check put in to deal with servers talking to incompatible clients"
52        %endif
53    %else
54        %if FLGH_DPT_SERIAL_DEVICE != 0x4
55            %error "The serial server passes FLGH values into SerialDPT_Finalize directly.  If the flag positions are changed, corresponding changes will need to be made in the serial server, and likely a version check put in to deal with servers talking to incompatible clients"
56        %endif
57    %endif ; MODULE_SERIAL_FLOPPY
58%endif
Note: See TracBrowser for help on using the repository browser.