Index: /trunk/XTIDE_Universal_BIOS/Inc/RamVars.inc
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Inc/RamVars.inc	(revision 554)
+++ /trunk/XTIDE_Universal_BIOS/Inc/RamVars.inc	(revision 555)
@@ -37,26 +37,26 @@
 struc RAMVARS
 %ifdef RELOCATE_INT13H_STACK
-						resb	252
+							resb	252
 	.dwStackChangeDSDI:
-	.wStackChangeDI		resb	2	; Used during stack
-	.wStackChangeDS		resb	2	; switching only
-	.rgbTopOfStack:					; 256 bytes of stack
-	.fpInt13hEntryStack	resb	4
+	.wStackChangeDI			resb	2	; Used during stack
+	.wStackChangeDS			resb	2	; switching only
+	.rgbTopOfStack:						; 256 bytes of stack
+	.fpInt13hEntryStack		resb	4
 %endif
-	.wDrvDetectSignature:			; Signature when BIOS is in drive detection mode
-	.fpOldI13h			resb	4	; Far pointer to old INT 13h handler
-	.wSignature			resb	2	; Sign for finding stolen 1...64 kiB
-	.bTimeoutTicksLeft	resb	1
-	.bLastTimeoutUpdate	resb	1
+	.fpOldI13h				resb	4	; Far pointer to old INT 13h handler
+	.wDrvDetectSignature	resb	2	; Signature when BIOS is in drive detection mode
+	.wSignature				resb	2	; Sign for finding stolen 1...64 kiB
+	.bTimeoutTicksLeft		resb	1
+	.bLastTimeoutUpdate		resb	1
 
 	.wFirstDrvAndCount:
-	.bFirstDrv			resb	1	; Number of first drive for this BIOS
-	.wDrvCntAndFlopCnt:				; Both the hard disk and floppy counts in one word
-									; (yes, misaligned, but it is only used this way during initialization)
-	.bDrvCnt			resb	1	; Number of drives handled by this BIOS
+	.bFirstDrv				resb	1	; Number of first drive for this BIOS
+	.wDrvCntAndFlopCnt:					; Both the hard disk and floppy counts in one word
+										; (yes, misaligned, but it is only used this way during initialization)
+	.bDrvCnt				resb	1	; Number of drives handled by this BIOS
 
 	; Variables for drive number translation
 %ifdef NEED_XLATEVARS
-	.xlateVars			resb	XLATEVARS_size
+	.xlateVars				resb	XLATEVARS_size
 %endif
 endstruc
Index: /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm	(revision 554)
+++ /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm	(revision 555)
@@ -79,10 +79,9 @@
 
 ;--------------------------------------------------------------------
-; Int 13h software interrupt handler.
-; Jumps to specific function defined in AH.
-;
-; Note to developers: Do not make recursive INT 13h calls!
-;
-; Int13h_DiskFunctionsHandler
+; Int 13h (Hard Drive) to Int 40h (Floppy Drive)
+; We must not call previous INT 13h for floppy drives since it
+; does not work on Windows 98 (when using HSFLOP.PDR driver) for some reason.
+;
+; DirectCallToFloppyHandler40h
 ;	Parameters:
 ;		AH:		Bios function
@@ -92,9 +91,39 @@
 ;		Depends on function
 ;--------------------------------------------------------------------
+DirectCallToFloppyHandler40h:
+; With serial floppy support, we handle all traffic for function 08h,
+; as we need to wrap both hard disk and floppy drive counts.
+%ifdef MODULE_SERIAL_FLOPPY
+	cmp		ah, GET_DRIVE_PARAMETERS	; 08h
+	je		SHORT WeHandleTheFloppyFunction
+%endif
+
+	int		BIOS_DISKETTE_INTERRUPT_40h
+	retf	2			; Skip FLAGS from stack
+
+
+;--------------------------------------------------------------------
+; Int 13h software interrupt handler.
+; Jumps to specific function defined in AH.
+;
+; Note to developers: Do not make recursive INT 13h calls!
+;
+; Int13h_DiskFunctionsHandler
+;	Parameters:
+;		AH:		Bios function
+;		DL:		Drive number
+;		Other:	Depends on function
+;	Returns:
+;		Depends on function
+;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
 Int13h_DiskFunctionsHandler:
+	test	dl, dl						; Floppy Drive?
+	jns		SHORT DirectCallToFloppyHandler40h
+WeHandleTheFloppyFunction:
+
 %ifndef RELOCATE_INT13H_STACK
 	sti									; Enable interrupts
-%endif
+%endif	
 	cld									; String instructions to increment pointers
 	CREATE_FRAME_INTPACK_TO_SSBP	SIZE_OF_IDEPACK_WITHOUT_INTPACK
@@ -138,11 +167,6 @@
 	jz		SHORT .OurFunction			; We handle all function 0h requests (resets)
 
-%ifndef MODULE_SERIAL_FLOPPY
-; Without floppy support, we handle only hard disk traffic for function 08h.
-	test	dl, dl
-	jns		SHORT Int13h_DirectCallToAnotherBios
-%endif
-; With floppy support, we handle all traffic for function 08h, as we need to wrap both hard disk and floppy drive counts.
-	cmp		ah, 8
+; We handle all traffic for function 08h, as we need to wrap both hard disk and floppy drive counts.
+	cmp		ah, GET_DRIVE_PARAMETERS	; 08h
 	je		SHORT .OurFunction
 	; Fall to Int13h_DirectCallToAnotherBios
Index: /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm	(revision 554)
+++ /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm	(revision 555)
@@ -97,8 +97,4 @@
 
 
-
-; This defines what is called when resetting our drives at the end of drive detection.
-AH0h_ResetAllOurHardDisksAtTheEndOfDriveInitialization equ ResetHardDisksHandledByOurBIOS.ErrorCodeNotUsed
-
 ;--------------------------------------------------------------------
 ; ResetHardDisksHandledByOurBIOS
Index: /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm	(revision 554)
+++ /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm	(revision 555)
@@ -79,4 +79,5 @@
 ;		DS:		RAMVARS segment
 ;--------------------------------------------------------------------
+.InitializeBiosAndDetectDrives:
 %ifdef MODULE_HOTKEYS
 	call	TimerTicks_ReadFromBdaToAX
@@ -97,4 +98,21 @@
 	jb		SHORT .WaitUntilTimeToCloseHotkeyBar
 %endif
+	; Fall to .ResetAllDrives
+
+
+;--------------------------------------------------------------------
+; .ResetAllDrives
+;	Parameters:
+;		DS:		RAMVARS segment
+;		ES:		BDA and interrupt vector segment (zero)
+;	Returns:
+;		Nothing
+;--------------------------------------------------------------------
+.ResetAllDrives:
+	; Reset all drives in the system, not just our drives.
+	xor		ax, ax		; Disk Controller Reset
+	mov		dl, 80h		; Reset all hard drives and floppy drives
+	int		BIOS_DISK_INTERRUPT_13h
+	;call	ResetHardDisksHandledByOurBIOS.ErrorCodeNotUsed	; Our drives only
 	; Fall to SelectDriveToBootFrom
 
Index: /trunk/XTIDE_Universal_BIOS/Src/Initialization/Initialize.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Initialization/Initialize.asm	(revision 554)
+++ /trunk/XTIDE_Universal_BIOS/Src/Initialization/Initialize.asm	(revision 555)
@@ -88,8 +88,7 @@
 	call	Interrupts_InitializeInterruptVectors	; HotkeyBar requires INT 40h so install handlers before drive detection
 	call	DetectDrives_FromAllIDEControllers
+	mov		[RAMVARS.wDrvDetectSignature], es		; No longer in drive detection mode (set normal timeouts)
 	; Fall to .StoreDptPointersToIntVectors
 
-
-%ifdef MODULE_COMPATIBLE_TABLES
 ;--------------------------------------------------------------------
 ; .StoreDptPointersToIntVectors
@@ -102,4 +101,5 @@
 ;		AX, CX, DX, SI, DI
 ;--------------------------------------------------------------------
+%ifdef MODULE_COMPATIBLE_TABLES
 .StoreDptPointersToIntVectors:
 %ifndef USE_AT
@@ -125,21 +125,4 @@
 	mov		[es:HD1_DPT_POINTER_46h*4+2], ax
 .CompatibleDPTsCreated:
-	; Fall to .ResetDetectedDrives
 %endif ; MODULE_COMPATIBLE_TABLES
-
-
-;--------------------------------------------------------------------
-; .ResetDetectedDrives
-;	Parameters:
-;		DS:		RAMVARS segment
-;		ES:		BDA and interrupt vector segment (zero)
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		All, except DS and ES
-;--------------------------------------------------------------------
-.ResetDetectedDrives:
-	call	Idepack_FakeToSSBP
-	call	AH0h_ResetAllOurHardDisksAtTheEndOfDriveInitialization
-	add		sp, BYTE SIZE_OF_IDEPACK_WITHOUT_INTPACK
 	ret
