source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13hBiosInit.asm@ 611

Last change on this file since 611 was 595, checked in by Tomi Tilli, 6 years ago
  • Int 19h reset handler now tries to boot from drive A before warm reset. This should help to get INT 10h hooked before launching booter games (meaning system reset without reseting interrupt vector table).
  • Win 95 hack temporarily removed (module not included by default). Very limited testing shows that CMOS hack seems to work with AMI bios but locks on Award BIOS.
File size: 2.1 KB
RevLine 
[552]1; Project name : XTIDE Universal BIOS
2; Description : Int 13h handler that is used to initialize
3; XTIDE Universal BIOS when our INT 19h was not called.
4
5;
6; XTIDE Universal BIOS and Associated Tools
7; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
8;
9; This program is free software; you can redistribute it and/or modify
10; it under the terms of the GNU General Public License as published by
11; the Free Software Foundation; either version 2 of the License, or
12; (at your option) any later version.
13;
14; This program is distributed in the hope that it will be useful,
15; but WITHOUT ANY WARRANTY; without even the implied warranty of
16; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17; GNU General Public License for more details.
18; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19;
20
21; Section containing code
22SECTION .text
23
24
[560]25;--------------------------------------------------------------------
26; Int 13h software interrupt handler.
27; This handler captures boot sector read from foreign drive when our
[566]28; INT 19h is not called. This way we can force XTIDE Universal BIOS
[560]29; initialization even without INT 19h being called.
30;
31; Int13hBiosInit_Handler
32; Parameters:
33; AH: Bios function
34; READ_SECTORS_INTO_MEMORY will initialize XTIDE Universal BIOS
35;--------------------------------------------------------------------
[552]36Int13hBiosInit_Handler:
[560]37 ; Initialize XTIDE Universal BIOS only if Int13hBiosInit_Handler is still at
38 ; vector 13h. Otherwise some other BIOS has hooked us and our very late
39 ; initialization is not possible.
40 push ds
41 push ax
42 LOAD_BDA_SEGMENT_TO ds, ax
43 pop ax
44 cmp WORD [BIOS_DISK_INTERRUPT_13h*4], Int13hBiosInit_Handler
45 pop ds
46 jne SHORT .VeryLateInitFailed ; XTIDE Universal BIOS does not work
47
[559]48 ; Ignore all but read command (assumed to read boot sector)
49 cmp ah, READ_SECTORS_INTO_MEMORY
[560]50 je SHORT Int19h_BootLoaderHandler
[559]51
[560]52 ; Call system INT 13h since not trying to read boot sector
[559]53 int TEMPORARY_VECTOR_FOR_SYSTEM_INT13h
54 retf 2
[553]55
[560]56.VeryLateInitFailed:
57 mov ah, RET_HD_INVALID
58 stc
59 retf 2
Note: See TracBrowser for help on using the repository browser.