Index: /trunk/XTIDE_Universal_BIOS/Inc/BootVars.inc
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Inc/BootVars.inc	(revision 594)
+++ /trunk/XTIDE_Universal_BIOS/Inc/BootVars.inc	(revision 595)
@@ -21,4 +21,11 @@
 %ifndef BOOTVARS_INC
 %define BOOTVARS_INC
+
+
+; Temporary locations for system interrupt handlers. Stored during ROM initialization
+; and needed when we do full initialization and drive detection on INT 19h
+TEMPORARY_VECTOR_FOR_SYSTEM_INT13h		EQU		32h	; Unused by BIOS (reserved for DOS)
+TEMPORARY_VECTOR_FOR_SYSTEM_INT19h		EQU		33h	; Unused by BIOS (reserved for DOS)
+
 
 ; Default drives
Index: /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13hBiosInit.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13hBiosInit.asm	(revision 594)
+++ /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13hBiosInit.asm	(revision 595)
@@ -21,6 +21,4 @@
 ; Section containing code
 SECTION .text
-
-TEMPORARY_VECTOR_FOR_SYSTEM_INT13h		EQU		32h	; Unused by BIOS
 
 
Index: /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm	(revision 594)
+++ /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm	(revision 595)
@@ -200,8 +200,8 @@
 %endif
 	clc
-	;; fall through to Int19_JumpToBootSectorOrRomBoot
-
-;--------------------------------------------------------------------
-; Int19_JumpToBootSectorOrRomBoot
+	;; fall through to Int19h_JumpToBootSectorOrRomBoot
+
+;--------------------------------------------------------------------
+; Int19h_JumpToBootSectorOrRomBoot
 ;
 ; Switches back to the POST stack, clears the DS and ES registers,
@@ -213,17 +213,16 @@
 ;		CF:		Set for Boot Sector Boot
 ;				Clear for ROM Boot
-;		ES:BX:	(if CF set) Ptr to boot sector
+;		ES:BX:	(if CF set) Ptr to boot sector (ES = zero)
 ;
 ;	Returns:
 ;		Never returns
 ;--------------------------------------------------------------------
-Int19_JumpToBootSectorOrRomBoot:
-	mov		cx, es		; Preserve MBR segment (can't push because of stack change)
-	mov		ax, 0		; NOTE: can't use XOR (LOAD_BDA_SEGMENT_TO) as it impacts CF
+Int19h_JumpToBootSectorOrRomBoot:
+	mov		ax, es		; Preserve MBR segment (can't push because of stack change)
+						; NOTE: can't use XOR (LOAD_BDA_SEGMENT_TO) as it impacts CF
 	SWITCH_BACK_TO_POST_STACK
 
 ; clear segment registers before boot sector or rom call
 	mov		ds, ax
-	mov		es, ax
 %ifdef USE_386
 	mov		fs, ax
@@ -233,5 +232,5 @@
 
 ; jump to boot sector
-	push	cx			; sgment address for MBR
+	push	ax			; sgment address for MBR
 	push	bx			; offset address for MBR
 	retf				; NOTE:	DL is set to the drive number
Index: /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h/BootSector.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h/BootSector.asm	(revision 594)
+++ /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h/BootSector.asm	(revision 595)
@@ -35,5 +35,5 @@
 BootSector_TryToLoadFromDriveDL_AndBoot:
 	call	DetectPrint_TryToBootFromDL
-	call	LoadFirstSectorFromDriveDL
+	call	BootSector_LoadFirstSectorFromDriveDL
 	jnc		SHORT .FirstSectorLoadedToESBX
 
@@ -60,5 +60,5 @@
 .AlwaysBootFromFloppyDriveForBooterGames:
 	stc		; Boot Sector loaded successfully
-	jmp		SHORT Int19_JumpToBootSectorOrRomBoot
+	jmp		SHORT Int19h_JumpToBootSectorOrRomBoot
 
 .FirstHardDiskSectorNotBootable:
@@ -71,5 +71,5 @@
 
 ;--------------------------------------------------------------------
-; LoadFirstSectorFromDriveDL
+; BootSector_LoadFirstSectorFromDriveDL
 ;	Parameters:
 ;		DL:		Drive to boot from (translated, 00h or 80h)
@@ -82,5 +82,5 @@
 ;		AL, CX, DH, DI
 ;--------------------------------------------------------------------
-LoadFirstSectorFromDriveDL:
+BootSector_LoadFirstSectorFromDriveDL:
 	LOAD_BDA_SEGMENT_TO	es, bx				; ES:BX now points to...
 	mov		bx, BOOTVARS.rgbBootSect		; ...boot sector location
Index: /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h/Int19hReset.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h/Int19hReset.asm	(revision 594)
+++ /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h/Int19hReset.asm	(revision 595)
@@ -32,4 +32,25 @@
 ;--------------------------------------------------------------------
 Int19hReset_Handler:
+	; Try to boot from drive A.
+	; This is needed if INT 19h is used to launch booter games while
+	; preserving interrupt vector table (for example to hook interrupt 10h)
+	xor		dx, dx		; Drive 00h
+	call	BootSector_LoadFirstSectorFromDriveDL
+	jc		SHORT .Reboot
+
+	xor		ax, ax
+	mov		ds, ax
+%ifdef USE_386
+	mov		fs, ax
+	mov		gs, ax
+%endif
+	cmp		WORD [bx+510], 0AA55h	; Valid boot sector?
+	jne		SHORT .Reboot
+	push	es						; Zero
+	push	bx
+	retf
+
+	; Do warm reset since boot from floppy drive failed
+.Reboot:
 	mov		ax, BOOT_FLAG_WARM				; Skip memory tests
 	jmp		Reboot_ComputerWithBootFlagInAX
Index: /trunk/XTIDE_Universal_BIOS/makefile
===================================================================
--- /trunk/XTIDE_Universal_BIOS/makefile	(revision 594)
+++ /trunk/XTIDE_Universal_BIOS/makefile	(revision 595)
@@ -119,6 +119,6 @@
 
 DEFINES_XT_TINY = MODULE_STRINGS_COMPRESSED MODULE_8BIT_IDE NO_ATAID_VALIDATION CLD_NEEDED
-DEFINES_386 = $(DEFINES_AT) USE_386 MODULE_ADVANCED_ATA MODULE_WIN95_CMOS_HACK
-DEFINES_386_LARGE = $(DEFINES_AT_LARGE) USE_386 MODULE_ADVANCED_ATA MODULE_WIN95_CMOS_HACK
+DEFINES_386 = $(DEFINES_AT) USE_386 MODULE_ADVANCED_ATA
+DEFINES_386_LARGE = $(DEFINES_AT_LARGE) USE_386 MODULE_ADVANCED_ATA
 
 DEFINES_ALL_FEATURES = MODULE_8BIT_IDE MODULE_8BIT_IDE_ADVANCED MODULE_ADVANCED_ATA MODULE_EBIOS MODULE_BOOT_MENU MODULE_HOTKEYS MODULE_IRQ MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_STRINGS_COMPRESSED MODULE_POWER_MANAGEMENT MODULE_COMPATIBLE_TABLES
