Index: trunk/Assembly_Library/Inc/BiosFunctions.inc
===================================================================
--- trunk/Assembly_Library/Inc/BiosFunctions.inc	(revision 600)
+++ trunk/Assembly_Library/Inc/BiosFunctions.inc	(revision 601)
@@ -5,67 +5,66 @@
 
 ; BIOS interrupts
-BIOS_VIDEO_INTERRUPT_10h		EQU		10h
-BIOS_EQUIPMENT_INTERRUPT_11h	EQU		11h
-BIOS_DISK_INTERRUPT_13h			EQU		13h
-BIOS_SYSTEM_INTERRUPT_15h		EQU		15h
-BIOS_KEYBOARD_INTERRUPT_16h		EQU		16h
-BIOS_BOOT_FAILURE_INTERRUPT_18h	EQU		18h
-BIOS_BOOT_LOADER_INTERRUPT_19h	EQU		19h
-BIOS_TIME_PCI_PNP_1Ah			EQU		1Ah
-BIOS_DISKETTE_INTERRUPT_40h		EQU		40h
-HD0_DPT_POINTER_41h				EQU		41h
-HD1_DPT_POINTER_46h				EQU		46h
+BIOS_VIDEO_INTERRUPT_10h				EQU		10h
+BIOS_EQUIPMENT_INTERRUPT_11h			EQU		11h
+BIOS_DISK_INTERRUPT_13h					EQU		13h
+BIOS_SYSTEM_INTERRUPT_15h				EQU		15h
+BIOS_KEYBOARD_INTERRUPT_16h				EQU		16h
+BIOS_BOOT_FAILURE_INTERRUPT_18h			EQU		18h
+BIOS_BOOT_LOADER_INTERRUPT_19h			EQU		19h
+BIOS_TIME_PCI_PNP_INTERRUPT_1Ah			EQU		1Ah
+BIOS_SYSTEM_TIMER_TICK_INTERRUPT_1Ch	EQU		1Ch
+BIOS_DISKETTE_INTERRUPT_40h				EQU		40h
+HD0_DPT_POINTER_41h						EQU		41h
+HD1_DPT_POINTER_46h						EQU		46h
 
 ; Hardware interrupts
-HARDWARE_IRQ_0_INTERRUPT_08h	EQU		08h		; System timer
-HARDWARE_IRQ_1_INTERRUPT_09h	EQU		09h		; Keyboard
-HARDWARE_IRQ_2_INTERRUPT_0Ah	EQU		0Ah
-HARDWARE_IRQ_3_INTERRUPT_0Bh	EQU		0Bh
-HARDWARE_IRQ_4_INTERRUPT_0Ch	EQU		0Ch
-HARDWARE_IRQ_5_INTERRUPT_0Dh	EQU		0Dh
-HARDWARE_IRQ_6_INTERRUPT_0Eh	EQU		0Eh
-HARDWARE_IRQ_7_INTERRUPT_0Fh	EQU		0Fh
-HARDWARE_IRQ_8_INTERRUPT_70h	EQU		70h
-HARDWARE_IRQ_9_INTERRUPT_71h	EQU		71h
-HARDWARE_IRQ_10_INTERRUPT_72h	EQU		72h
-HARDWARE_IRQ_11_INTERRUPT_73h	EQU		73h
-HARDWARE_IRQ_12_INTERRUPT_74h	EQU		74h
-HARDWARE_IRQ_13_INTERRUPT_75h	EQU		75h
-HARDWARE_IRQ_14_INTERRUPT_76h	EQU		76h
-HARDWARE_IRQ_15_INTERRUPT_77h	EQU		77h
-
+HARDWARE_IRQ_0_INTERRUPT_08h			EQU		08h		; System timer
+HARDWARE_IRQ_1_INTERRUPT_09h			EQU		09h		; Keyboard
+HARDWARE_IRQ_2_INTERRUPT_0Ah			EQU		0Ah
+HARDWARE_IRQ_3_INTERRUPT_0Bh			EQU		0Bh
+HARDWARE_IRQ_4_INTERRUPT_0Ch			EQU		0Ch
+HARDWARE_IRQ_5_INTERRUPT_0Dh			EQU		0Dh
+HARDWARE_IRQ_6_INTERRUPT_0Eh			EQU		0Eh
+HARDWARE_IRQ_7_INTERRUPT_0Fh			EQU		0Fh
+HARDWARE_IRQ_8_INTERRUPT_70h			EQU		70h
+HARDWARE_IRQ_9_INTERRUPT_71h			EQU		71h
+HARDWARE_IRQ_10_INTERRUPT_72h			EQU		72h
+HARDWARE_IRQ_11_INTERRUPT_73h			EQU		73h
+HARDWARE_IRQ_12_INTERRUPT_74h			EQU		74h
+HARDWARE_IRQ_13_INTERRUPT_75h			EQU		75h
+HARDWARE_IRQ_14_INTERRUPT_76h			EQU		76h
+HARDWARE_IRQ_15_INTERRUPT_77h			EQU		77h
 
 ; BIOS video functions
-SET_VIDEO_MODE					EQU		00h
-SET_TEXT_MODE_CURSOR_SHAPE		EQU		01h
-SET_CURSOR_POSITION				EQU		02h
-GET_CURSOR_POSITION_AND_SIZE	EQU		03h
-SELECT_ACTIVE_DISPLAY_PAGE		EQU		05h
-TELETYPE_OUTPUT					EQU		0Eh
+SET_VIDEO_MODE							EQU		00h
+SET_TEXT_MODE_CURSOR_SHAPE				EQU		01h
+SET_CURSOR_POSITION						EQU		02h
+GET_CURSOR_POSITION_AND_SIZE			EQU		03h
+SELECT_ACTIVE_DISPLAY_PAGE				EQU		05h
+TELETYPE_OUTPUT							EQU		0Eh
 
 ; BIOS disk functions
-READ_SECTORS_INTO_MEMORY		EQU		02h
-GET_DRIVE_PARAMETERS			EQU		08h
-RESET_HARD_DISK					EQU		0Dh
-GET_DISK_TYPE					EQU		15h
-LOTECH_XTCF_FEATURES			EQU		1Eh
-GET_DRIVE_INFORMATION			EQU		25h
-CHECK_EXTENSIONS_PRESENT		EQU		41h
-GET_EXTENDED_DRIVE_INFORMATION	EQU		48h
+READ_SECTORS_INTO_MEMORY				EQU		02h
+GET_DRIVE_PARAMETERS					EQU		08h
+RESET_HARD_DISK							EQU		0Dh
+GET_DISK_TYPE							EQU		15h
+LOTECH_XTCF_FEATURES					EQU		1Eh
+GET_DRIVE_INFORMATION					EQU		25h
+CHECK_EXTENSIONS_PRESENT				EQU		41h
+GET_EXTENDED_DRIVE_INFORMATION			EQU		48h
 
 ; BIOS system functions
-OS_HOOK_DEVICE_BUSY				EQU		90h
-OS_HOOK_DEVICE_POST				EQU		91h
+OS_HOOK_DEVICE_BUSY						EQU		90h
+OS_HOOK_DEVICE_POST						EQU		91h
 
 ; BIOS keyboard functions
-GET_KEYSTROKE					EQU		00h
-CHECK_FOR_KEYSTROKE				EQU		01h
+GET_KEYSTROKE							EQU		00h
+CHECK_FOR_KEYSTROKE						EQU		01h
 
 ; BIOS system functions
-EVENT_WAIT						EQU		86h
+EVENT_WAIT								EQU		86h
 
-; BIOS PCI 2.0+ functions
-PCI_INSTALLATION_CHECK			EQU		0B101h
-
+; BIOS PCI 2.0c+ functions
+PCI_INSTALLATION_CHECK					EQU		0B101h
 
 %endif ; BIOS_FUNCTIONS_INC
Index: trunk/Assembly_Library/Inc/DosFunctions.inc
===================================================================
--- trunk/Assembly_Library/Inc/DosFunctions.inc	(revision 600)
+++ trunk/Assembly_Library/Inc/DosFunctions.inc	(revision 601)
@@ -36,5 +36,7 @@
 ; DOS errors
 ERR_DOS_FUNCTION_NUMBER_INVALID						EQU		01h
+ERR_DOS_PATH_NOT_FOUND								EQU		03h
 ERR_DOS_INVALID_DRIVE								EQU		0Fh
+ERR_DOS_NO_MORE_FILES								EQU		12h
 ERR_DOS_DRIVE_NOT_READY								EQU		15h
 
Index: trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm
===================================================================
--- trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm	(revision 600)
+++ trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm	(revision 601)
@@ -746,4 +746,6 @@
 	mov		ax, FIND_FIRST_MATCHING_FILE<<8
 	int		DOS_INTERRUPT_21h
+	; Returns ERR_DOS_NO_MORE_FILES only when the root directory is the current directory (at least under Windows XP).
+	cmp		al, ERR_DOS_PATH_NOT_FOUND
 	pop		ax
 	pop		ds
@@ -752,7 +754,8 @@
 
 	xchg	ah, [cs:bLastCriticalError]			; Zero bLastCriticalError and fetch error code to AH
+	je		SHORT .DriveIsNotReady				; A removable drive with no media (or possibly a drive that has not been formatted?)
 	cmp		ah, ERR_DOS_DRIVE_NOT_READY
 	jne		SHORT .DriveIsReady
-
+.DriveIsNotReady:
 	mov		bx, g_szDlgDriveNotReady
 	call	Dialogs_DisplayYesNoResponseDialogWithTitleStringInBX
Index: trunk/Assembly_Library/Src/Menu/MenuAttributes.asm
===================================================================
--- trunk/Assembly_Library/Src/Menu/MenuAttributes.asm	(revision 600)
+++ trunk/Assembly_Library/Src/Menu/MenuAttributes.asm	(revision 601)
@@ -68,6 +68,6 @@
 	cmp		al, 7
 	je		SHORT .LoadMonoAttribute
-	test	al, 1						; Even modes (0 and 2) are B/W
-	jnz		SHORT .LoadColorAttribute
+	shr		al, 1						; Even modes (0 and 2) are B/W
+	jc		SHORT .LoadColorAttribute
 
 .LoadBlackAndWhiteAttribute:
Index: trunk/Assembly_Library/Src/Serial/SerialServer.asm
===================================================================
--- trunk/Assembly_Library/Src/Serial/SerialServer.asm	(revision 600)
+++ trunk/Assembly_Library/Src/Serial/SerialServer.asm	(revision 601)
@@ -38,8 +38,7 @@
 ;--------------------------------------------------------------------
 SerialServer_SendReceive:
-
-		push	si
-		push	di
-		push	bp
+	push	si
+	push	di
+	push	bp
 
 ;
@@ -48,20 +47,20 @@
 ;		Baud in CH until UART initialization is complete
 ;
-		mov		ch,dh
-		xor		dh,dh
-		eSHL_IM	dx, 2			; shift from one byte to two
-
-		mov		al,[bp+SerialServer_Command.bSectorCount]
-		mov		ah,[bp+SerialServer_Command.bCommand]
+	mov		ch, dh
+	xor		dh, dh
+	eSHL_IM	dx, 2						; shift from one byte to two
+
+	mov		al, [bp+SerialServer_Command.bSectorCount]
+	mov		ah, [bp+SerialServer_Command.bCommand]
 
 ;
 ; Command byte and sector count live at the top of the stack, pop/push are used to access
 ;
-		push	ax				; save sector count for return value
-		push	ax				; working copy on the top of the stack
-
-%ifndef EXCLUDE_FROM_XUB		; DF already cleared in Int13h.asm
+	push	ax							; save sector count for return value
+	push	ax							; working copy on the top of the stack
+
+%ifndef EXCLUDE_FROM_XUB				; DF already cleared in Int13h.asm
 %ifdef CLD_NEEDED
-		cld
+	cld
 %endif
 %endif
@@ -74,45 +73,44 @@
 ; decided to reprogram the UART
 ;
-		mov		bl,dl			; setup BL with proper values for read/write loops (BH comes later)
-
-		mov		al,83h
-		add		dl, Serial_UART_lineControl	; Clears CF
-		out		dx,al
-
-		mov		al,ch
-		mov		dl,bl			; divisor low
-		out		dx,al
+	mov		bl, dl						; setup BL with proper values for read/write loops (BH comes later)
+	mov		al, 83h
+	add		dl, Serial_UART_lineControl	; Clears CF
+	out		dx, al
+
+	mov		al, ch
+	mov		dl, bl						; divisor low
+	out		dx, al
 
 %ifdef USE_UNDOC_INTEL
-		salc	; Clear AL using CF
+	salc								; Clear AL using CF
 %else
-		xor		al, al
-%endif
-		inc		dx				; divisor high
-		push	dx
-		out		dx,al
-
-		mov		al,047h
-		inc		dx				; fifo
-		out		dx,al
-
-		mov		al,03h
-		inc		dx				; linecontrol
-		out		dx,al
-
-		mov		al,0bh
-		inc		dx				; modemcontrol
-		out		dx,al
-
-		inc		dx				; linestatus (no output now, just setting up BH for later use)
-		mov		bh,dl
-
-		pop		dx				; base, interrupts disabled
+	xor		al, al
+%endif
+	inc		dx							; divisor high
+	push	dx
+	out		dx, al
+
+	mov		al, 47h
+	inc		dx							; fifo
+	out		dx, al
+
+	mov		al, 03h
+	inc		dx							; linecontrol
+	out		dx, al
+
+	mov		al, 0Bh
+	inc		dx							; modemcontrol
+	out		dx, al
+
+	inc		dx							; linestatus (no output now, just setting up BH for later use)
+	mov		bh, dl
+
+	pop		dx							; base, interrupts disabled
 %ifdef USE_UNDOC_INTEL
-		salc	; Clear AL using CF
+	salc								; Clear AL using CF
 %else
-		xor		al, al
-%endif
-		out		dx,al
+	xor		al, al
+%endif
+	out		dx, al
 
 ;----------------------------------------------------------------------
@@ -122,31 +120,31 @@
 ; Sends first six bytes of IDEREGS_AND_INTPACK as the command
 ;
-		push	es				; save off real buffer location
-		push	si
-
-		mov		si,bp			; point to IDEREGS for command dispatch;
-		push	ss
-		pop		es
-
-		mov		di,0ffffh		; initialize checksum for write
-		mov		bp,di
-
-		mov		cx,4			; writing 3 words (plus 1)
-
-		cli						; interrupts off...
-
-		call	SerialServer_WriteProtocol.entry
-
-		pop		di				; restore real buffer location (note change from SI to DI)
-								; Buffer is primarily referenced through ES:DI throughout, since
-								; we need to store (read sector) faster than we read (write sector)
-		pop		es
-
-		pop		ax				; load command byte (done before call to .nextSector on subsequent iterations)
-		push	ax
+	push	es							; save off real buffer location
+	push	si
+
+	mov		si, bp						; point to IDEREGS for command dispatch;
+	push	ss
+	pop		es
+
+	mov		di, 0FFFFh					; initialize checksum for write
+	mov		bp, di
+
+	mov		cx, 4						; writing 3 words (plus 1)
+
+	cli									; interrupts off...
+
+	call	SerialServer_WriteProtocol.entry
+
+	pop		di							; restore real buffer location (note change from SI to DI)
+										; Buffer is primarily referenced through ES:DI throughout, since
+										; we need to store (read sector) faster than we read (write sector)
+	pop		es
+
+	pop		ax							; load command byte (done before call to .nextSector on subsequent iterations)
+	push	ax
 
 %ifndef SERIALSERVER_NO_ZERO_SECTOR_COUNTS
-		test	al,al			; if no sectors to be transferred, wait for the ACK checksum on the command
-		jz		.zeroSectors
+	test	al, al						; if no sectors to be transferred, wait for the ACK checksum on the command
+	jz		SHORT .zeroSectors
 %endif
 
@@ -155,18 +153,18 @@
 ;
 .nextSector:
-		mov		si,0ffffh		; initialize checksum for read or write
-		mov		bp,si
-
-		mov		cx,0101h		; writing 256 words (plus 1)
-
-		sahf					; command byte, are we doing a write?
-		jnc		.readEntry
-
-		xchg	si,di			; swap pointer and checksum, will be re-swap'ed in WriteProtocol
-		call	SerialServer_WriteProtocol.entry
+	mov		si, 0FFFFh					; initialize checksum for read or write
+	mov		bp, si
+
+	mov		cx, 0101h					; writing 256 words (plus 1)
+
+	sahf								; command byte, are we doing a write?
+	jnc		SHORT .readEntry
+
+	xchg	si, di						; swap pointer and checksum, will be re-swap'ed in WriteProtocol
+	call	SerialServer_WriteProtocol.entry
 
 .zeroSectors:
-		inc		cx				; CX = 1 now (0 out of WriteProtocol)
-		jmp		.readEntry
+	inc		cx							; CX = 1 now (0 out of WriteProtocol)
+	jmp		SHORT .readEntry
 
 ;----------------------------------------------------------------------
@@ -177,13 +175,13 @@
 ;
 .readTimeout:
-		push	ax				; not only does this push preserve AX (which we need), but it also
-								; means the stack has the same number of bytes on it as when we are
-								; sending a packet, important for error cleanup and exit
-		mov		ah,1
-		call	SerialServer_WaitAndPoll_Read
-		pop		ax
-		test	dl,1
-		jz		.readByte1Ready
-		jmp		.readByte2Ready
+	push	ax							; not only does this push preserve AX (which we need), but it also
+										; means the stack has the same number of bytes on it as when we are
+										; sending a packet, important for error cleanup and exit
+	mov		ah, 1
+	call	SerialServer_WaitAndPoll_Read
+	pop		ax
+	test	dl, 1
+	jz		SHORT .readByte1Ready
+	jmp		SHORT .readByte2Ready
 
 ;----------------------------------------------------------------------------
@@ -197,17 +195,17 @@
 ;
 .readLoop:
-		stosw					; store word in caller's data buffer
-
-		add		bp, ax			; update Fletcher's checksum
-		adc		bp, 0
-		add		si, bp
-		adc		si, 0
+	stosw								; store word in caller's data buffer
+
+	add		bp, ax						; update Fletcher's checksum
+	adc		bp, 0
+	add		si, bp
+	adc		si, 0
 
 .readEntry:
-		mov		dl,bh
-		in		al,dx
-		shr		al,1			; data ready (byte 1)?
-		mov		dl,bl			; get ready to read data
-		jnc		.readTimeout	; nope not ready, update timeouts
+	mov		dl, bh
+	in		al, dx
+	shr		al, 1						; data ready (byte 1)?
+	mov		dl, bl						; get ready to read data
+	jnc		SHORT .readTimeout			; nope not ready, update timeouts
 
 ;
@@ -216,7 +214,6 @@
 ;
 .readByte1Ready:
-		in		al, dx			; read data byte 1
-
-		mov		ah, al			; store byte in ah for now
+	in		al, dx						; read data byte 1
+	mov		ah, al						; store byte in ah for now
 
 ;
@@ -227,40 +224,36 @@
 ; .read_byte2_ready)
 ;
-		mov		dl,bh
-
-		in		al,dx
-		shr		al,1			; data ready (byte 2)?
-		jnc		.readTimeout
+	mov		dl, bh
+
+	in		al, dx
+	shr		al, 1						; data ready (byte 2)?
+	jnc		SHORT .readTimeout
 .readByte2Ready:
-		mov		dl,bl
-		in		al, dx			; read data byte 2
-
-		xchg	al, ah			; ah was holding byte 1, reverse byte order
-
-		loop	.readLoop
-
-		sti						; interrupts back on ASAP, between packets
+	mov		dl, bl
+	in		al, dx						; read data byte 2
+	xchg	al, ah						; ah was holding byte 1, reverse byte order
+	loop	.readLoop
+	sti									; interrupts back on ASAP, between packets
 
 ;
 ; Compare checksums
 ;
-		xchg	ax,bp
-		xor		ah,al
-		mov		cx,si
-		xor		cl,ch
-		mov		al,cl
-		cmp		ax,bp
-		jnz		SerialServer_OutputWithParameters_Error
-
-		pop		ax				; sector count and command byte
-		dec		al				; decrement sector count
-		push	ax				; save
-		jz		SerialServer_OutputWithParameters_ReturnCodeInAL
-
-		cli						; interrupts back off for ACK byte to host
-								; (host could start sending data immediately)
-		out		dx,al			; ACK with next sector number
-
-		jmp		short .nextSector
+	xchg	ax, bp
+	xor		ah, al
+	mov		cx, si
+	xor		cl, ch
+	mov		al, cl
+	cmp		ax, bp
+	jne		SHORT SerialServer_OutputWithParameters_Error
+
+	pop		ax							; sector count and command byte
+	dec		al							; decrement sector count
+	push	ax							; save
+	jz		SHORT SerialServer_OutputWithParameters_ReturnCodeInAL
+
+	cli									; interrupts back off for ACK byte to host
+										; (host could start sending data immediately)
+	out		dx, al						; ACK with next sector number
+	jmp		SHORT .nextSector
 
 ;---------------------------------------------------------------------------
@@ -274,5 +267,5 @@
 ALIGN JUMP_ALIGN
 SerialServer_OutputWithParameters_ErrorAndPop4Words:
-		add		sp,8
+	add		sp, 8
 ;;; fall-through
 
@@ -287,37 +280,37 @@
 ; taken care of this, but I have seen cases where this is not true.
 ;
-		xor		cx,cx			; timeout this clearing routine, in case the UART isn't there
+	xor		cx, cx						; timeout this clearing routine, in case the UART isn't there
 .clearBuffer:
-		mov		dl,bh
-		in		al,dx
-		mov		dl,bl
-		test	al,08fh
-		jz		.clearBufferComplete
-		test	al,1
-		in		al,dx
-		loopnz	.clearBuffer	; note ZF from test above
+	mov		dl, bh
+	in		al, dx
+	mov		dl, bl
+	test	al, 8Fh
+	jz		SHORT .clearBufferComplete
+	test	al, 1
+	in		al, dx
+	loopnz	.clearBuffer				; note ZF from test above
 
 .clearBufferComplete:
-		mov		al, 1			; error return code
+	mov		al, 1						; error return code
 
 ALIGN JUMP_ALIGN
 SerialServer_OutputWithParameters_ReturnCodeInAL:
 %if 0
-		sti						; all paths here will already have interrupts turned back on
-%endif
-		mov		ah, al			; for success, AL will already be zero
-
-		pop		bx				; recover "ax" (command and count) from stack
-		pop		cx				; recover saved sector count
-		xor		ch, ch
-		sub		cl, bl			; subtract off the number of sectors that remained
-
-		pop		bp
-		pop		di
-		pop		si
-
-		sahf					; error return code to CF
-
-		ret
+	sti									; all paths here will already have interrupts turned back on
+%endif
+	mov		ah, al						; for success, AL will already be zero
+
+	pop		bx							; recover "ax" (command and count) from stack
+	pop		cx							; recover saved sector count
+	xor		ch, ch
+	sub		cl, bl						; subtract off the number of sectors that remained
+
+	pop		bp
+	pop		di
+	pop		si
+
+	sahf								; error return code to CF
+	ret
+
 
 ;--------------------------------------------------------------------
@@ -345,55 +338,54 @@
 SerialServer_WriteProtocol:
 .writeLoop:
-		es lodsw				; fetch next word
-
-		out		dx,al			; output first byte
-
-		add		bp,ax			; update checksum
-		adc		bp,0
-		add		di,bp
-		adc		di,0
-
-		mov		dl,bh			; transmit buffer empty?
-		in		al,dx
-		test	al,20h
-		jz		.writeTimeout2	; nope, use our polling routine
+	es lodsw							; fetch next word
+
+	out		dx, al						; output first byte
+
+	add		bp, ax						; update checksum
+	adc		bp, 0
+	add		di, bp
+	adc		di, 0
+
+	mov		dl, bh						; transmit buffer empty?
+	in		al, dx
+	test	al, 20h
+	jz		SHORT .writeTimeout2		; nope, use our polling routine
 
 .writeByte2Ready:
-		mov		dl,bl
-		mov		al,ah			; output second byte
-		out		dx,al
+	mov		dl, bl
+	mov		al, ah						; output second byte
+	out		dx, al
 
 .entry:
-		mov		dl,bh			; transmit buffer empty?
-		in		al,dx
-		test	al,20h
-		mov		dl,bl
-		jz		.writeTimeout1	; nope, use our polling routine
+	mov		dl, bh						; transmit buffer empty?
+	in		al, dx
+	test	al, 20h
+	mov		dl, bl
+	jz		SHORT .writeTimeout1		; nope, use our polling routine
 
 .writeByte1Ready:
-		loop	.writeLoop
-
-		mov		ax,di			; fold Fletcher's checksum and output
-		xor		al,ah
-		out		dx,al			; byte 1
-
-		call	SerialServer_WaitAndPoll_Write
-
-		mov		ax,bp
-		xor		al,ah
-		out		dx,al			; byte 2
-
-		xchg	si,di			; preserve checksum word in si, move pointer back to di
-
-		ret
+	loop	.writeLoop
+
+	mov		ax, di						; fold Fletcher's checksum and output
+	xor		al, ah
+	out		dx, al						; byte 1
+
+	call	SerialServer_WaitAndPoll_Write
+
+	mov		ax, bp
+	xor		al, ah
+	out		dx, al						; byte 2
+
+	xchg	si, di						; preserve checksum word in si, move pointer back to di
+	ret
 
 .writeTimeout2:
-		mov		dl,ah			; need to preserve AH, but don't need DL (will be reset upon return)
-		call	SerialServer_WaitAndPoll_Write
-		mov		ah,dl
-		jmp		.writeByte2Ready
+	mov		dl, ah						; need to preserve AH, but don't need DL (will be reset upon return)
+	call	SerialServer_WaitAndPoll_Write
+	mov		ah, dl
+	jmp		SHORT .writeByte2Ready
 
 .writeTimeout1:
-		ePUSH_T	ax, .writeByte1Ready	; return address for ret at end of SC_writeTimeout2
+	ePUSH_T	ax, .writeByte1Ready		; return address for ret at end of SC_writeTimeout2
 ;;; fall-through
 
@@ -418,22 +410,22 @@
 ALIGN JUMP_ALIGN
 SerialServer_WaitAndPoll_Write:
-		mov		ah,20h
+	mov		ah, 20h
 ;;; fall-through
 
 ALIGN JUMP_ALIGN
 SerialServer_WaitAndPoll_Read:
-		push	cx
-		push	dx
+	push	cx
+	push	dx
 
 ;
 ; We first poll in a tight loop, interrupts off, for the next character to come in/be sent
 ;
-		xor		cx,cx
+	xor		cx, cx
 .readTimeoutLoop:
-		mov		dl,bh
-		in		al,dx
-		test	al,ah
-		jnz		.readTimeoutComplete
-		loop	.readTimeoutLoop
+	mov		dl, bh
+	in		al, dx
+	test	al, ah
+	jnz		SHORT .readTimeoutComplete
+	loop	.readTimeoutLoop
 
 ;
@@ -441,39 +433,38 @@
 ; and wait for a given number of timer ticks to pass.
 ;
-		sti
+	sti
 %ifndef SERIALSERVER_TIMER_LOCATION
-		mov		cl,SerialServer_WaitAndPoll_SoftDelayTicks
-		call	Timer_InitializeTimeoutWithTicksInCL
+	mov		cl, SerialServer_WaitAndPoll_SoftDelayTicks
+	call	Timer_InitializeTimeoutWithTicksInCL
 %else
-		push	ax
-		push	bx
-		mov		ax,SerialServer_WaitAndPoll_SoftDelayTicks
-		mov		bx,SERIALSERVER_TIMER_LOCATION
-		call	TimerTicks_InitializeTimeoutFromAX
-		pop		bx
-		pop		ax
+	push	ax
+	push	bx
+	mov		ax, SerialServer_WaitAndPoll_SoftDelayTicks
+	mov		bx, SERIALSERVER_TIMER_LOCATION
+	call	TimerTicks_InitializeTimeoutFromAX
+	pop		bx
+	pop		ax
 %endif
 
 .WaitAndPoll:
 %ifndef SERIALSERVER_TIMER_LOCATION
-		call	Timer_SetCFifTimeout
+	call	Timer_SetCFifTimeout
 %else
-		push	ax
-		push	bx
-		mov		bx,SERIALSERVER_TIMER_LOCATION
-		call	TimerTicks_GetTimeoutTicksLeftToAXfromDSBX
-		pop		bx
-		pop		ax
-%endif
-		jc		SerialServer_OutputWithParameters_ErrorAndPop4Words
-		in		al,dx
-		test	al,ah
-		jz		.WaitAndPoll
-		cli
+	push	ax
+	push	bx
+	mov		bx, SERIALSERVER_TIMER_LOCATION
+	call	TimerTicks_GetTimeoutTicksLeftToAXfromDSBX
+	pop		bx
+	pop		ax
+%endif
+	jc		SerialServer_OutputWithParameters_ErrorAndPop4Words
+	in		al, dx
+	test	al, ah
+	jz		SHORT .WaitAndPoll
+	cli
 
 .readTimeoutComplete:
-		pop		dx
-		pop		cx
-		ret
-
-
+	pop		dx
+	pop		cx
+	ret
+
Index: trunk/Assembly_Library/Src/Serial/SerialServerScan.asm
===================================================================
--- trunk/Assembly_Library/Src/Serial/SerialServerScan.asm	(revision 600)
+++ trunk/Assembly_Library/Src/Serial/SerialServerScan.asm	(revision 601)
@@ -1,4 +1,5 @@
 ; Project name	:	Assembly Library
 ; Description	:	Serial Server Support, Scan for Server
+
 ;
 ; This functionality is broken out from SerialServer as it may only be needed during
@@ -43,36 +44,36 @@
 ;--------------------------------------------------------------------
 SerialServerScan_ScanForServer:
-		mov		cx, 1			; one sector, not scanning (default)
+	mov		cx, 1			; one sector, not scanning (default)
 
-		test	dx, dx
-		jnz		SHORT SerialServerScan_CheckForServer_PortAndBaudInDX
+	test	dx, dx
+	jnz		SHORT SerialServerScan_CheckForServer_PortAndBaudInDX
 
-		mov		di, .scanPortAddresses-1
-		mov		ch, 1			;  tell server that we are scanning
+	mov		di, .scanPortAddresses-1
+	mov		ch, 1			;  tell server that we are scanning
 
 .nextPort:
-		inc		di				; load next port address
-		mov		dh, 40h			; Clear DH and make sure CF is set if error
-		mov		dl, [cs:di]
-		eSHL_IM	dx, 2			; shift from one byte to two
-		jz		SHORT .error
+	inc		di				; load next port address
+	mov		dh, 40h			; Clear DH and make sure CF is set if error
+	mov		dl, [cs:di]
+	eSHL_IM	dx, 2			; shift from one byte to two
+	jz		SHORT .error
 
 ;
 ; Test for COM port presence, write to and read from registers
 ;
-		push	dx
-		add		dl, Serial_UART_lineControl
-		mov		al, 9Ah
-		out		dx, al
-		in		al, dx
-		pop		dx
-		cmp		al, 9Ah
-		jne		SHORT .nextPort
+	push	dx
+	add		dl, Serial_UART_lineControl
+	mov		al, 9Ah
+	out		dx, al
+	in		al, dx
+	pop		dx
+	cmp		al, 9Ah
+	jne		SHORT .nextPort
 
-		mov		al, 0Ch
-		out		dx, al
-		in		al, dx
-		cmp		al, 0Ch
-		jne		SHORT .nextPort
+	mov		al, 0Ch
+	out		dx, al
+	in		al, dx
+	cmp		al, 0Ch
+	jne		SHORT .nextPort
 
 ;
@@ -88,29 +89,30 @@
 ; Note: hardware baud multipliers (2x, 4x, 8x) will impact the final baud rate and are not known at this level
 ;
-		mov		dh, 30h * 2		; multiply by 2 since we are about to divide by 2
-		mov		dl, [cs:di]		; restore single byte port address for scan
+	mov		dh, 30h * 2		; multiply by 2 since we are about to divide by 2
+	mov		dl, [cs:di]		; restore single byte port address for scan
 
 .nextBaud:
-		shr		dh, 1
-		jz		SHORT .nextPort
-		cmp		dh, 6			; skip from 6 to 4, to move from the top of the 9600 baud range
-		jne		SHORT .testBaud	; to the bottom of the 115200 baud range
-		mov		dh, 4
+	shr		dh, 1
+	jz		SHORT .nextPort
+	cmp		dh, 6			; skip from 6 to 4, to move from the top of the 9600 baud range
+	jne		SHORT .testBaud	; to the bottom of the 115200 baud range
+	mov		dh, 4
 
 .testBaud:
-		call	SerialServerScan_CheckForServer_PortAndBaudInDX
-		jc		SHORT .nextBaud
+	call	SerialServerScan_CheckForServer_PortAndBaudInDX
+	jc		SHORT .nextBaud
 
 .error:
-		ret
+	ret
 
-.scanPortAddresses: db	SERIAL_COM7_IOADDRESS >> 2
-					db	SERIAL_COM6_IOADDRESS >> 2
-					db	SERIAL_COM5_IOADDRESS >> 2
-					db	SERIAL_COM4_IOADDRESS >> 2
-					db	SERIAL_COM3_IOADDRESS >> 2
-					db	SERIAL_COM2_IOADDRESS >> 2
-					db	SERIAL_COM1_IOADDRESS >> 2
-					db	0
+.scanPortAddresses:
+	db	SERIAL_COM7_IOADDRESS >> 2
+	db	SERIAL_COM6_IOADDRESS >> 2
+	db	SERIAL_COM5_IOADDRESS >> 2
+	db	SERIAL_COM4_IOADDRESS >> 2
+	db	SERIAL_COM3_IOADDRESS >> 2
+	db	SERIAL_COM2_IOADDRESS >> 2
+	db	SERIAL_COM1_IOADDRESS >> 2
+	db	0
 
 
@@ -133,19 +135,19 @@
 ;--------------------------------------------------------------------
 SerialServerScan_CheckForServer_PortAndBaudInDX:
-		push	bp				; setup fake SerialServer_Command
-		push	dx				; send port baud and rate, returned in inquire packet
-								; (and possibly returned in the drive identification string)
-		push	cx				; send number of sectors, and if it is on a scan or not
-		mov		bl, SerialServer_Command_Inquire		; protocol command onto stack with bh
-		push	bx
+	push	bp				; setup fake SerialServer_Command
+	push	dx				; send port baud and rate, returned in inquire packet
+							; (and possibly returned in the drive identification string)
+	push	cx				; send number of sectors, and if it is on a scan or not
+	mov		bl, SerialServer_Command_Inquire		; protocol command onto stack with bh
+	push	bx
 
-		mov		bp, sp
-		call	SerialServer_SendReceive
+	mov		bp, sp
+	call	SerialServer_SendReceive
 
-		pop		bx
-		pop		cx
-		pop		dx
-		pop		bp
+	pop		bx
+	pop		cx
+	pop		dx
+	pop		bp
 
-		ret
+	ret
 
Index: trunk/Assembly_Library/Src/Util/CMOS.asm
===================================================================
--- trunk/Assembly_Library/Src/Util/CMOS.asm	(revision 600)
+++ trunk/Assembly_Library/Src/Util/CMOS.asm	(revision 601)
@@ -131,12 +131,12 @@
 GetSumOfBytes10hto2DhtoCX:
 	xor		cx, cx			; Sum
-	mov		dx, 10h			; First index
+	mov		dl, 10h			; First index
+	xor		ah, ah
 
 .AddNextByte:
 	call	CMOS_ReadFromIndexInDLtoAL
-	xor		ah, ah
 	add		cx, ax
 	inc		dx
 	cmp		dl, 2Dh			; Last index
-	jbe		.AddNextByte
+	jbe		SHORT .AddNextByte
 	ret
Index: trunk/XTIDE_Universal_BIOS/Inc/BootVars.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/BootVars.inc	(revision 600)
+++ trunk/XTIDE_Universal_BIOS/Inc/BootVars.inc	(revision 601)
@@ -40,5 +40,5 @@
 
 struc HOTKEYVARS
-	.fpPrevTimerHandler	resb	4		; Previous 1Ch timer hander
+	.fpPrevTimerHandler	resb	4		; Previous 1Ch timer handler
 	.wTimeWhenDisplayed	resb	2		; System time (ticks) when Hotkey bar was first displayed
 	.wFddAndHddLetters:
@@ -79,5 +79,5 @@
 
 ; MAX_HARD_DISK_NAME_LENGTH must be defined ahead of the DRVDETECTINFO structure to avoid problems with NASM
-MAX_HARD_DISK_NAME_LENGTH	EQU		30		; Bytes reserved for drive name
+MAX_HARD_DISK_NAME_LENGTH	EQU		30	; Bytes reserved for drive name
 
 struc DRVDETECTINFO
Index: trunk/XTIDE_Universal_BIOS/Inc/HotkeyBar.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/HotkeyBar.inc	(revision 600)
+++ trunk/XTIDE_Universal_BIOS/Inc/HotkeyBar.inc	(revision 601)
@@ -23,5 +23,5 @@
 MIN_TIME_TO_DISPLAY_HOTKEY_BAR			EQU	(4000/55)	; 4000 ms
 
-ESC_SCANCODE							EQU	1	; ESC key		
+ESC_SCANCODE							EQU	1	; ESC key
 FIRST_FUNCTION_KEY_SCANCODE				EQU	3Bh	; F1 key
 
Index: trunk/XTIDE_Universal_BIOS/Inc/IDE_8bit.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/IDE_8bit.inc	(revision 600)
+++ trunk/XTIDE_Universal_BIOS/Inc/IDE_8bit.inc	(revision 601)
@@ -31,5 +31,5 @@
 ;		ES:DI:	Ptr to destination buffer
 ;	Returns:
-;		ES:DI:	Incremented/decremented for next word
+;		DI:		Incremented/Decremented for next word
 ;	Corrupts registers:
 ;		AL, FLAGS
@@ -61,5 +61,5 @@
 ;		DS:SI:	Ptr to source buffer
 ;	Returns:
-;		SI:		Incremented/decremented for next word
+;		SI:		Incremented/Decremented for next word
 ;	Corrupts registers:
 ;		AX, FLAGS
@@ -92,5 +92,5 @@
 ;		DS:SI:	Ptr to source buffer
 ;	Returns:
-;		SI:		Incremented/decremented for next word
+;		SI:		Incremented/Decremented for next word
 ;	Corrupts registers:
 ;		AX, FLAGS
@@ -115,3 +115,32 @@
 
 
+;--------------------------------------------------------------------
+; Emulates INSW for modified XTIDE for use on Olivetti M24 and derivatives.
+;
+; XTIDE_MOD_OLIVETTI_INSW
+;	Parameters:
+;		DX:		XTIDE Data Low Register address
+;		ES:DI:	Ptr to destination buffer
+;	Returns:
+;		DI:		Incremented/Decremented for next word
+;	Corrupts registers:
+;		AL, FLAGS
+;--------------------------------------------------------------------
+%macro XTIDE_MOD_OLIVETTI_INSW 0
+%ifdef USE_186	; INS instruction available
+	insb						; Load low byte from port DX to [ES:DI]
+	inc		dx					; IDE Data Reg to XTIDE Data High Reg
+	insb						; Load high byte from port DX to [ES:DI]
+	dec		dx					; Restore to IDE Data Register
+%else	; If 8088/8086
+	in		al, dx				; Load low byte from port
+	inc		dx					; IDE Data Reg to XTIDE Data High Reg
+	stosb						; Store byte to [ES:DI]
+	in		al, dx				; Load high byte from port
+	dec		dx					; Restore to IDE Data Register
+	stosb						; Store byte to [ES:DI]
+%endif
+%endmacro
+
+
 %endif ; IDE_8BIT_INC
Index: trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc	(revision 600)
+++ trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc	(revision 601)
@@ -111,5 +111,5 @@
 ; IDE Devices are grouped so device numbers cannot be changed without modifying code elsewhere!
 COUNT_OF_STANDARD_IDE_DEVICES			EQU	2	; 16- and 32-bit controllers
-COUNT_OF_8BIT_IDE_DEVICES				EQU	9
+COUNT_OF_8BIT_IDE_DEVICES				EQU	10
 COUNT_OF_ALL_IDE_DEVICES				EQU	(COUNT_OF_8BIT_IDE_DEVICES + COUNT_OF_STANDARD_IDE_DEVICES)
 ; Standard port mapped I/O
@@ -119,13 +119,14 @@
 DEVICE_8BIT_XTIDE_REV1					EQU	((COUNT_OF_STANDARD_IDE_DEVICES+1)<<1)
 ; Address lines A0 and A3 are swapped
-DEVICE_8BIT_XTIDE_REV2					EQU	((COUNT_OF_STANDARD_IDE_DEVICES+2)<<1)	; Or rev 1 with swapped A0 and A3
+DEVICE_8BIT_XTIDE_REV2					EQU	((COUNT_OF_STANDARD_IDE_DEVICES+2)<<1)	; Or rev 1 with swapped A0 and A3...
+DEVICE_8BIT_XTIDE_REV2_OLIVETTI			EQU	((COUNT_OF_STANDARD_IDE_DEVICES+3)<<1)	; ...in Olivetti M24 and derivatives
 ; IDE Register offsets are SHL 1
-DEVICE_8BIT_XTCF_PIO8					EQU	((COUNT_OF_STANDARD_IDE_DEVICES+3)<<1)	; XT-CF using 8-bit PIO mode
-DEVICE_8BIT_XTCF_PIO8_WITH_BIU_OFFLOAD	EQU	((COUNT_OF_STANDARD_IDE_DEVICES+4)<<1)	; XT-CF using 8-bit PIO mode, but with 16-bit instructions
-DEVICE_8BIT_XTCF_PIO16_WITH_BIU_OFFLOAD	EQU	((COUNT_OF_STANDARD_IDE_DEVICES+5)<<1)	; Lo-tech 8-bit IDE Adapter
-DEVICE_8BIT_XTCF_DMA					EQU	((COUNT_OF_STANDARD_IDE_DEVICES+6)<<1)	; XT-CFv3 using DMA
+DEVICE_8BIT_XTCF_PIO8					EQU	((COUNT_OF_STANDARD_IDE_DEVICES+4)<<1)	; XT-CF using 8-bit PIO mode
+DEVICE_8BIT_XTCF_PIO8_WITH_BIU_OFFLOAD	EQU	((COUNT_OF_STANDARD_IDE_DEVICES+5)<<1)	; XT-CF using 8-bit PIO mode, but with 16-bit instructions
+DEVICE_8BIT_XTCF_PIO16_WITH_BIU_OFFLOAD	EQU	((COUNT_OF_STANDARD_IDE_DEVICES+6)<<1)	; Lo-tech 8-bit IDE Adapter
+DEVICE_8BIT_XTCF_DMA					EQU	((COUNT_OF_STANDARD_IDE_DEVICES+7)<<1)	; XT-CFv3 using DMA
 ; Memory Mapped I/O
-DEVICE_8BIT_JRIDE_ISA					EQU	((COUNT_OF_STANDARD_IDE_DEVICES+7)<<1)	; JR-IDE/ISA (Memory Mapped I/O)
-DEVICE_8BIT_ADP50L						EQU	((COUNT_OF_STANDARD_IDE_DEVICES+8)<<1)	; SVC ADP50L (Memory Mapped I/O)
+DEVICE_8BIT_JRIDE_ISA					EQU	((COUNT_OF_STANDARD_IDE_DEVICES+8)<<1)	; JR-IDE/ISA (Memory Mapped I/O)
+DEVICE_8BIT_ADP50L						EQU	((COUNT_OF_STANDARD_IDE_DEVICES+9)<<1)	; SVC ADP50L (Memory Mapped I/O)
 ; Virtual devices
 DEVICE_SERIAL_PORT						EQU	(COUNT_OF_ALL_IDE_DEVICES<<1)
Index: trunk/XTIDE_Universal_BIOS/Inc/Version.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/Version.inc	(revision 600)
+++ trunk/XTIDE_Universal_BIOS/Inc/Version.inc	(revision 601)
@@ -20,4 +20,5 @@
 
 ; Flash signature revisions:
+; XTIDE207	Added device type DEVICE_8BIT_XTIDE_REV2_OLIVETTI
 ; XTIDE206	Added support for Color Themes
 ; XTIDE205	Added DEVICE_8BIT_XTCF_PIO16_WITH_BIU_OFFLOAD after other XT-CF
@@ -49,5 +50,5 @@
 %define	TITLE_STRING			TITLE_STRING_START, TITLE_STRING_END
 %define	ROM_VERSION_STRING		"v2.0.0",BETA,"3+ (",__DATE__,")",NULL
-%define	FLASH_SIGNATURE			"XTIDE206"	; Do not terminate with NULL
+%define	FLASH_SIGNATURE			"XTIDE207"	; Do not terminate with NULL
 
 
Index: trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIO.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIO.asm	(revision 600)
+++ trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIO.asm	(revision 601)
@@ -59,5 +59,6 @@
 
 %ifdef MODULE_8BIT_IDE_ADVANCED
-	je		SHORT .ReverseA0andA3fromRegisterIndexInDX
+	cmp		al, DEVICE_8BIT_XTIDE_REV2_OLIVETTI
+	jbe		SHORT .ReverseA0andA3fromRegisterIndexInDX
 
 	eSHL_IM	dx, 1	; ADP50L and XT-CF
@@ -99,5 +100,4 @@
 IdeIO_OutputALtoIdeControlBlockRegisterInDL:
 	xor		dh, dh	; IDE Register index now in DX
-
 	mov		bl, [di+DPT_ATA.bDevice]
 	cmp		bl, DEVICE_8BIT_XTIDE_REV2
@@ -105,5 +105,6 @@
 
 %ifdef MODULE_8BIT_IDE_ADVANCED
-	je		SHORT .ReverseA0andA3fromRegisterIndexInDX
+	cmp		bl, DEVICE_8BIT_XTIDE_REV2_OLIVETTI
+	jbe		SHORT .ReverseA0andA3fromRegisterIndexInDX
 
 	; At this point remaining controllers (JRIDE, XTCF and ADP50L) all have a control
@@ -154,5 +155,4 @@
 IdeIO_OutputALtoIdeRegisterInDL:
 	xor		dh, dh	; IDE Register index now in DX
-
 	mov		bl, [di+DPT_ATA.bDevice]
 	cmp		bl, DEVICE_8BIT_XTIDE_REV2
@@ -160,5 +160,6 @@
 
 %ifdef MODULE_8BIT_IDE_ADVANCED
-	je		SHORT .ReverseA0andA3fromRegisterIndexInDX
+	cmp		bl, DEVICE_8BIT_XTIDE_REV2_OLIVETTI
+	jbe		SHORT .ReverseA0andA3fromRegisterIndexInDX
 
 	cmp		bl, DEVICE_8BIT_JRIDE_ISA
Index: trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdePioBlock.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdePioBlock.asm	(revision 600)
+++ trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdePioBlock.asm	(revision 601)
@@ -55,4 +55,27 @@
 
 ;--------------------------------------------------------------------
+; IdePioBlock_ReadFromXtideRev2_Olivetti
+;	Parameters:
+;		CX:		Block size in 512 byte sectors
+;		DX:		IDE Data port address
+;		ES:DI:	Normalized ptr to buffer to receive data
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, CX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+IdePioBlock_ReadFromXtideRev2_Olivetti:
+	UNROLL_SECTORS_IN_CX_TO_OWORDS
+ALIGN JUMP_ALIGN
+.InswLoop:
+	%rep 8	; WORDs
+		XTIDE_MOD_OLIVETTI_INSW
+	%endrep
+	loop	.InswLoop
+	ret
+
+
+;--------------------------------------------------------------------
 ; 8-bit PIO from a single data port.
 ;
Index: trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm	(revision 600)
+++ trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm	(revision 601)
@@ -328,19 +328,20 @@
 ALIGN WORD_ALIGN
 g_rgfnPioRead:
-		dw		IdePioBlock_ReadFrom16bitDataPort	; 0, DEVICE_16BIT_ATA
+		dw		IdePioBlock_ReadFrom16bitDataPort		; 0, DEVICE_16BIT_ATA
 %ifdef MODULE_ADVANCED_ATA
-		dw		IdePioBlock_ReadFrom32bitDataPort	; 1, DEVICE_32BIT_ATA
+		dw		IdePioBlock_ReadFrom32bitDataPort		; 1, DEVICE_32BIT_ATA
 %elifdef MODULE_8BIT_IDE
 		dw		NULL
 %endif ; MODULE_ADVANCED_ATA
 %ifdef MODULE_8BIT_IDE
-		dw		IdePioBlock_ReadFrom8bitDataPort	; 2, DEVICE_8BIT_ATA
-		dw		IdePioBlock_ReadFromXtideRev1		; 3, DEVICE_8BIT_XTIDE_REV1
-		dw		IdePioBlock_ReadFrom16bitDataPort	; 4, DEVICE_8BIT_XTIDE_REV2
+		dw		IdePioBlock_ReadFrom8bitDataPort		; 2, DEVICE_8BIT_ATA
+		dw		IdePioBlock_ReadFromXtideRev1			; 3, DEVICE_8BIT_XTIDE_REV1
+		dw		IdePioBlock_ReadFrom16bitDataPort		; 4, DEVICE_8BIT_XTIDE_REV2
+		dw		IdePioBlock_ReadFromXtideRev2_Olivetti	; 5, DEVICE_8BIT_XTIDE_REV2_OLIVETTI
 %ifdef MODULE_8BIT_IDE_ADVANCED
-		dw		IdePioBlock_ReadFrom8bitDataPort	; 5, DEVICE_8BIT_XTCF_PIO8
-		dw		IdePioBlock_ReadFrom16bitDataPort	; 6, DEVICE_8BIT_XTCF_PIO8_WITH_BIU_OFFLOAD
-		dw		IdePioBlock_ReadFrom16bitDataPort	; 7, DEVICE_8BIT_XTCF_PIO16_WITH_BIU_OFFLOAD
-		dw		IdeDmaBlock_ReadFromXTCF			; 8, DEVICE_8BIT_XTCF_DMA
+		dw		IdePioBlock_ReadFrom8bitDataPort		; 6, DEVICE_8BIT_XTCF_PIO8
+		dw		IdePioBlock_ReadFrom16bitDataPort		; 7, DEVICE_8BIT_XTCF_PIO8_WITH_BIU_OFFLOAD
+		dw		IdePioBlock_ReadFrom16bitDataPort		; 8, DEVICE_8BIT_XTCF_PIO16_WITH_BIU_OFFLOAD
+		dw		IdeDmaBlock_ReadFromXTCF				; 9, DEVICE_8BIT_XTCF_DMA
 %endif ; MODULE_8BIT_IDE_ADVANCED
 %endif ; MODULE_8BIT_IDE
@@ -348,19 +349,20 @@
 
 g_rgfnPioWrite:
-		dw		IdePioBlock_WriteTo16bitDataPort	; 0, DEVICE_16BIT_ATA
+		dw		IdePioBlock_WriteTo16bitDataPort		; 0, DEVICE_16BIT_ATA
 %ifdef MODULE_ADVANCED_ATA
-		dw		IdePioBlock_WriteTo32bitDataPort	; 1, DEVICE_32BIT_ATA
+		dw		IdePioBlock_WriteTo32bitDataPort		; 1, DEVICE_32BIT_ATA
 %elifdef MODULE_8BIT_IDE
 		dw		NULL
 %endif ; MODULE_ADVANCED_ATA
 %ifdef MODULE_8BIT_IDE
-		dw		IdePioBlock_WriteTo8bitDataPort		; 2, DEVICE_8BIT_ATA
-		dw		IdePioBlock_WriteToXtideRev1		; 3, DEVICE_8BIT_XTIDE_REV1
-		dw		IdePioBlock_WriteToXtideRev2		; 4, DEVICE_8BIT_XTIDE_REV2
+		dw		IdePioBlock_WriteTo8bitDataPort			; 2, DEVICE_8BIT_ATA
+		dw		IdePioBlock_WriteToXtideRev1			; 3, DEVICE_8BIT_XTIDE_REV1
+		dw		IdePioBlock_WriteToXtideRev2			; 4, DEVICE_8BIT_XTIDE_REV2
+		dw		IdePioBlock_WriteToXtideRev2			; 5, DEVICE_8BIT_XTIDE_REV2_OLIVETTI
 %ifdef MODULE_8BIT_IDE_ADVANCED
-		dw		IdePioBlock_WriteTo8bitDataPort		; 5, DEVICE_8BIT_XTCF_PIO8
-		dw		IdePioBlock_WriteTo16bitDataPort	; 6, DEVICE_8BIT_XTCF_PIO8_WITH_BIU_OFFLOAD
-		dw		IdePioBlock_WriteTo16bitDataPort	; 7, DEVICE_8BIT_XTCF_PIO16_WITH_BIU_OFFLOAD
-		dw		IdeDmaBlock_WriteToXTCF				; 8, DEVICE_8BIT_XTCF_DMA
+		dw		IdePioBlock_WriteTo8bitDataPort			; 6, DEVICE_8BIT_XTCF_PIO8
+		dw		IdePioBlock_WriteTo16bitDataPort		; 7, DEVICE_8BIT_XTCF_PIO8_WITH_BIU_OFFLOAD
+		dw		IdePioBlock_WriteTo16bitDataPort		; 8, DEVICE_8BIT_XTCF_PIO16_WITH_BIU_OFFLOAD
+		dw		IdeDmaBlock_WriteToXTCF					; 9, DEVICE_8BIT_XTCF_DMA
 %endif ; MODULE_8BIT_IDE_ADVANCED
 %endif ; MODULE_8BIT_IDE
Index: trunk/XTIDE_Universal_BIOS/Src/Device/IDE/JrIdeTransfer.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Device/IDE/JrIdeTransfer.asm	(revision 600)
+++ trunk/XTIDE_Universal_BIOS/Src/Device/IDE/JrIdeTransfer.asm	(revision 601)
@@ -100,6 +100,6 @@
 	jc		SHORT ReturnWithMemoryIOtransferErrorInAH
 
-	mov		cx, [bp+MEMPIOVARS.wSectorsInBlock]	; Clears CH
-	cmp		[bp+MEMPIOVARS.bSectorsLeft], cl
+	mov		dx, [bp+MEMPIOVARS.wSectorsInBlock]	; Clears DH
+	cmp		[bp+MEMPIOVARS.bSectorsLeft], dl
 	jbe		SHORT .ReadLastBlockFromDrive
 
@@ -119,14 +119,14 @@
 	; transferred, there will be a wait for next block but DRQ is never
 	; set since all is transferred! Then we get timeout error.
-	mov		cx, [bp+MEMPIOVARS.wSectorsInBlock]
-	sub		[bp+MEMPIOVARS.bSectorsLeft], cl
-	add		[bp+MEMPIOVARS.bSectorsDone], cl
-	cmp		[bp+MEMPIOVARS.bSectorsLeft], cl
+	mov		dx, [bp+MEMPIOVARS.wSectorsInBlock]
+	sub		[bp+MEMPIOVARS.bSectorsLeft], dl
+	add		[bp+MEMPIOVARS.bSectorsDone], dl
+	cmp		[bp+MEMPIOVARS.bSectorsLeft], dl
 	ja		SHORT .ReadNextBlockFromDrive
 
 ALIGN JUMP_ALIGN
 .ReadLastBlockFromDrive:
-	mov		cl, [bp+MEMPIOVARS.bSectorsLeft]
-	push	cx
+	mov		dl, [bp+MEMPIOVARS.bSectorsLeft]
+	push	dx
 	call	ReadSingleBlockFromSectorAccessWindowInDSSItoESDI
 
@@ -181,6 +181,6 @@
 	jc		SHORT ReturnWithMemoryIOtransferErrorInAH
 
-	mov		cx, [bp+MEMPIOVARS.wSectorsInBlock]
-	cmp		[bp+MEMPIOVARS.bSectorsLeft], cl
+	mov		dx, [bp+MEMPIOVARS.wSectorsInBlock]
+	cmp		[bp+MEMPIOVARS.bSectorsLeft], dl
 	jbe		SHORT .WriteLastBlockToDrive
 
@@ -192,14 +192,14 @@
 
 	; Increment number of successfully written WORDs
-	mov		cx, [bp+MEMPIOVARS.wSectorsInBlock]
-	sub		[bp+MEMPIOVARS.bSectorsLeft], cl
-	add		[bp+MEMPIOVARS.bSectorsDone], cl
-	cmp		[bp+MEMPIOVARS.bSectorsLeft], cl
+	mov		dx, [bp+MEMPIOVARS.wSectorsInBlock]
+	sub		[bp+MEMPIOVARS.bSectorsLeft], dl
+	add		[bp+MEMPIOVARS.bSectorsDone], dl
+	cmp		[bp+MEMPIOVARS.bSectorsLeft], dl
 	ja		SHORT .WriteNextBlockToDrive
 
 ALIGN JUMP_ALIGN
 .WriteLastBlockToDrive:
-	mov		cl, [bp+MEMPIOVARS.bSectorsLeft]
-	push	cx
+	mov		dl, [bp+MEMPIOVARS.bSectorsLeft]
+	push	dx
 	ePUSH_T	bx, CheckErrorsAfterTransferringLastMemoryMappedBlock
 	; Fall to WriteSingleBlockFromDSSIToSectorAccessWindowInESDI
@@ -208,5 +208,5 @@
 ; WriteSingleBlockFromDSSIToSectorAccessWindowInESDI
 ;	Parameters:
-;		CX:		Number of sectors in block
+;		DX:		Number of sectors in block
 ;		DS:SI:	Normalized ptr to source buffer
 ;		ES:DI:	Ptr to Sector Access Window
@@ -220,5 +220,4 @@
 WriteSingleBlockFromDSSIToSectorAccessWindowInESDI:
 	mov		bx, di
-	mov		dx, cx
 	xor		cx, cx
 ALIGN JUMP_ALIGN
@@ -235,7 +234,7 @@
 ; ReadSingleBlockFromSectorAccessWindowInDSSItoESDI
 ;	Parameters:
-;		CX		Number of sectors in full block or sectors in last partial block
-;		ES:DI:	Normalized ptr to buffer to receive data (destination)
-;		DS:SI:	Ptr to Sector Access Window (source)
+;		DX:		Number of sectors in block
+;		ES:DI:	Normalized ptr to destination buffer
+;		DS:SI:	Ptr to Sector Access Window
 ;	Returns:
 ;		CX, DX:	Zero
@@ -247,5 +246,4 @@
 ReadSingleBlockFromSectorAccessWindowInDSSItoESDI:
 	mov		bx, si
-	mov		dx, cx
 	xor		cx, cx
 ALIGN JUMP_ALIGN
Index: trunk/XTIDE_Universal_BIOS/Src/Device/Serial/SerialCommand.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Device/Serial/SerialCommand.asm	(revision 600)
+++ trunk/XTIDE_Universal_BIOS/Src/Device/Serial/SerialCommand.asm	(revision 601)
@@ -43,44 +43,39 @@
 ALIGN JUMP_ALIGN
 SerialCommand_OutputWithParameters:
+	mov		ah, SerialServer_Command_Read
+	mov		al, [bp+IDEPACK.bCommand]
 
-		mov		ah,SerialServer_Command_Read
-
-		mov		al,[bp+IDEPACK.bCommand]
-
-		cmp		al,20h			; Read Sectors IDE command
-		jz		.readOrWrite
-		inc		ah				; now SerialServer_Protocol_Write
-		cmp		al,30h			; Write Sectors IDE command
-		jz		.readOrWrite
+	cmp		al, 20h							; Read Sectors IDE command
+	je		SHORT .readOrWrite
+	inc		ah								; now SerialServer_Protocol_Write
+	cmp		al, 30h							; Write Sectors IDE command
+	je		SHORT .readOrWrite
 
 ;  all other commands return success
 ;  including function 0ech which should return drive information, this is handled with the identify functions
 ;
-		xor		ah,ah			;  also clears carry
-		ret
+	xor		ah, ah							;  also clears carry
+	ret
 
 .readOrWrite:
-		mov		[bp+IDEPACK.bFeatures],ah		; store protocol command
+	mov		[bp+IDEPACK.bFeatures], ah		; store protocol command
 %ifdef USE_AT
-		mov		dh, [bp+IDEPACK.bSectorCount]
+	mov		dh, [bp+IDEPACK.bSectorCount]
 %endif
-		call	IdeTransfer_NormalizePointerInESSI
+	call	IdeTransfer_NormalizePointerInESSI
 %ifdef USE_AT
-		jnc		SHORT .PointerNormalizationWasSuccessful
-		xor		cx, cx			; Nothing transferred
-		stc
-		ret
+	jnc		SHORT .PointerNormalizationWasSuccessful
+	xor		cx, cx							; Nothing transferred
+	stc
+	ret
 .PointerNormalizationWasSuccessful:
 %endif
 
-		mov		dx, [di+DPT_SERIAL.wSerialPortAndBaud]
-
+	mov		dx, [di+DPT_SERIAL.wSerialPortAndBaud]
 ; fall through to SerialCommand_FallThroughToSerialServer_SendReceive
 
 ALIGN JUMP_ALIGN
 SerialCommand_FallThroughToSerialServer_SendReceive:
-
 ; fall through to SerialServer_SendReceive
-
 %include "SerialServer.asm"
 
@@ -93,6 +88,6 @@
 ALIGN JUMP_ALIGN
 SerialCommand_ReturnError:
-		stc
-		ret
+	stc
+	ret
 
 ;--------------------------------------------------------------------
@@ -155,47 +150,43 @@
 ;     master scan.
 ;
-		mov		dx,[cs:bp+IDEVARS.wSerialPortAndBaud]
-		xor		ax,ax
+	mov		dx, [cs:bp+IDEVARS.wSerialPortAndBaud]
+	xor		ax, ax
 
-		push	si
-		call	FindDPT_ToDSDIforSerialDevice
-		pop		si
+	push	si
+	call	FindDPT_ToDSDIforSerialDevice
+	pop		si
 %ifdef MODULE_SERIAL_FLOPPY
-		jnc		.founddpt
+	jnc		SHORT .founddpt
 ;
 ; If not found above with FindDPT_ToDSDIforSerialDevice, DI will point to the DPT after the last hard disk DPT
 ; So, if there was a previously found floppy disk, DI will point to that DPT and we use that value for the slave.
 ;
-		cmp		byte [RAMVARS.xlateVars+XLATEVARS.bFlopCntAndFirst], 0
-		jz		.notfounddpt
+	cmp		BYTE [RAMVARS.xlateVars+XLATEVARS.bFlopCntAndFirst], 0
+	je		SHORT .notfounddpt
 .founddpt:
 %else
-		jc		.notfounddpt
+	jc		SHORT .notfounddpt
 %endif
-		mov		ax, [di+DPT_SERIAL.wSerialPortAndBaud]
+	mov		ax, [di+DPT_SERIAL.wSerialPortAndBaud]
 .notfounddpt:
+	test	bh, FLG_DRVNHEAD_DRV
+	jz		SHORT .master
 
-		test	bh, FLG_DRVNHEAD_DRV
-		jz		.master
-
-		test	ax,ax			; Take care of the case that is different between master and slave.
-		jz		SerialCommand_ReturnError
+	test	ax, ax							; Take care of the case that is different between master and slave.
+	jz		SHORT SerialCommand_ReturnError
 
 ; fall-through
 .master:
-		test	dx,dx
-		jnz		.identifyDeviceInDX
+	test	dx, dx
+	jnz		SHORT .identifyDeviceInDX
 
-		xchg	dx, ax			;  move ax to dx (move previously found serial drive to dx, could be zero)
+	xchg	dx, ax							;  move ax to dx (move previously found serial drive to dx, could be zero)
 
 .identifyDeviceInDX:
-
 ; fall through to SerialCommand_FallThroughToSerialServerScan_ScanForServer
 
 ALIGN JUMP_ALIGN
 SerialCommand_FallThroughToSerialServerScan_ScanForServer:
-
 ; fall through to SerialServerScan_ScanForServer
-
 %include "SerialServerScan.asm"
 
@@ -206,3 +197,2 @@
 %endif
 
-
Index: trunk/XTIDE_Universal_BIOS/Src/Device/Serial/SerialDPT.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Device/Serial/SerialDPT.asm	(revision 600)
+++ trunk/XTIDE_Universal_BIOS/Src/Device/Serial/SerialDPT.asm	(revision 601)
@@ -33,6 +33,6 @@
 ;--------------------------------------------------------------------
 SerialDPT_Finalize:
-		mov		ax, [es:si+SerialServer_ATA_wPortAndBaud]
-		mov		[di+DPT_SERIAL.wSerialPortAndBaud], ax
+	mov		ax, [es:si+SerialServer_ATA_wPortAndBaud]
+	mov		[di+DPT_SERIAL.wSerialPortAndBaud], ax
 
 ;
@@ -41,9 +41,8 @@
 ; if the floppy support is disabled.
 ;
-		mov		al, [es:si+SerialServer_ATA_wDriveFlags]
-		eSHL_IM	al, 1
-		mov		byte [di+DPT.bFlagsHigh], al
-
-		ret
+	mov		al, [es:si+SerialServer_ATA_wDriveFlags]
+	eSHL_IM	al, 1
+	mov		BYTE [di+DPT.bFlagsHigh], al
+	ret
 
 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm	(revision 600)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm	(revision 601)
@@ -106,7 +106,7 @@
 	cli
 	mov		ax, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.fpPrevTimerHandler]
-	mov		[es:SYSTEM_TIMER_TICK*4], ax
+	mov		[es:BIOS_SYSTEM_TIMER_TICK_INTERRUPT_1Ch*4], ax
 	mov		ax, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.fpPrevTimerHandler+2]
-	mov		[es:SYSTEM_TIMER_TICK*4+2], ax
+	mov		[es:BIOS_SYSTEM_TIMER_TICK_INTERRUPT_1Ch*4+2], ax
 	sti
 %endif
@@ -214,5 +214,5 @@
 ; Switches back to the POST stack, clears the DS and ES registers,
 ; and either jumps to the MBR (Master Boot Record) that was just read,
-; or calls the ROM's boot routine on interrupt 18.
+; or calls the ROM's boot routine on interrupt 18h.
 ;
 ;	Parameters:
Index: trunk/XTIDE_Universal_BIOS/Src/Initialization/AdvancedAta/AdvAtaInit.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Initialization/AdvancedAta/AdvAtaInit.asm	(revision 600)
+++ trunk/XTIDE_Universal_BIOS/Src/Initialization/AdvancedAta/AdvAtaInit.asm	(revision 601)
@@ -36,5 +36,5 @@
 ;--------------------------------------------------------------------
 AdvAtaInit_DetectControllerForIdeBaseInBX:
-	; Detect if system has PCI bus. If it does, we can skip VLB detection. This is
+	; Detect if system has PCI bus. If it does, we can skip VLB detection. This is a
 	; good thing since detecting Vision QD6580 is dangerous since Intel PIIX4 south bridge
 	; mirrors Interrupt Controller registers from Axh to Bxh. This can lead to faulty
@@ -45,7 +45,9 @@
 	push	bx
 	push	di
-	xor		edi, edi		; Some BIOSes require this to be set to zero
-	mov		ax, PCI_INSTALLATION_CHECK
-	int		BIOS_TIME_PCI_PNP_1Ah
+;	xor		edi, edi		; Some BIOSes require this to be set to zero
+	; *FIXME* The above instruction is commented away since RBIL says that this
+	; only applies to software looking for the protected-mode entry point.
+	mov		ax, PCI_INSTALLATION_CHECK	; May corrupt EAX, EBX, ECX, EDX, EDI
+	int		BIOS_TIME_PCI_PNP_INTERRUPT_1Ah
 	pop		di
 	pop		bx
Index: trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm	(revision 600)
+++ trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm	(revision 601)
@@ -98,5 +98,5 @@
 ; Here we might want to replace BIOS configured drives with the ones we detected.
 ; Primary reason is to support dynamic overlay feature in the future. Second reason
-; is a hack to get Windows 95 load proper IDE drivers.
+; is a hack to get Windows 95 to load its built-in protected mode IDE driver.
 ;
 ; The Windows hack has two parts. First part is to try to alter CMOS address 12h as that
@@ -109,56 +109,55 @@
 
 %ifdef USE_AT	; FLG_ROMVARS_IGNORE_MOTHERBOARD_DRIVES is for AT builds only
-
-	%ifdef MODULE_WIN95_CMOS_HACK
-		mov		dl, HARD_DISK_TYPES
-		call	CMOS_ReadFromIndexInDLtoAL
-		test	al, 0F0h
-		jnz		SHORT .ClearBdaDriveCount		; CMOS byte 12h is ready for Windows 95
-		call	CMOS_Verify10hTo2Dh				; Can we modify CMOS?
-		jnz		SHORT .ClearBdaDriveCount		; Unsupported BIOS, use plan B
-
-		; Now we can alter CMOS location 12h. Award BIOS locks if we set drive 0 type to Fh
-		; (but accept changes to drive type 1). Windows 95 requires that the drive 0 type is
-		; non zero and ignores drive 1 type. So if we only set drive 1, then Award BIOS
-		; won't give problems but Windows 95 stays in MS-DOS compatibility mode.
-		;
-		; For Award BIOSes we could set the Drive 0 type to 1 and then clear the BDA drive count.
-		; So essentially we could automatically do what user needs to do manually to get Windows 95
-		; working on Award BIOSes. However, I think that should be left to do manually since
-		; there may be SCSI drives on the system or FLG_ROMVARS_IGNORE_MOTHERBOARD_DRIVES could
-		; be intentionally cleared and forcing the dummy drive might cause only trouble.
-
-		; Try to detect Award BIOS (Seems to work on a tested 128k BIOS so hopefully
-		; there will be no need to scan E000h segment)
-		mov		cx, 65536 - 4
-		mov		eax, 'Awar'		; Four characters should be enough
-		mov		di, 0F000h		; Scan 64k starting from segment F000h
-		mov		fs, di			; No need to preserve FS since we set it to zero soon when we boot
-		xor		di, di
-	.ScanNextCharacters:
-		cmp		[fs:di], eax
-		je		SHORT .ClearBdaDriveCount	; Award detected, cannot modify CMOS
-		inc		di				; Increment offset by one character (not four)
-		loop	.ScanNextCharacters
-
-		; Now it should be safe to write
-		mov		dl, HARD_DISK_TYPES
-		mov		al, 0F0h	; Drive 0 type 16...47 (supposed to be defined elsewhere in the CMOS)
-		call	CMOS_WriteALtoIndexInDL
-		call	CMOS_StoreNewChecksumFor10hto2Dh
+%ifdef MODULE_WIN95_CMOS_HACK
+	mov		dl, HARD_DISK_TYPES
+	call	CMOS_ReadFromIndexInDLtoAL
+	test	al, 0F0h
+	jnz		SHORT .ClearBdaDriveCount		; CMOS byte 12h is ready for Windows 95
+	call	CMOS_Verify10hTo2Dh				; Can we modify CMOS?
+	jnz		SHORT .ClearBdaDriveCount		; Unsupported BIOS, use plan B
+
+	; Now we can alter CMOS location 12h. Award BIOS locks if we set drive 0 type to Fh
+	; (but accept changes to drive type 1). Windows 95 requires that the drive 0 type is
+	; non zero and ignores drive 1 type. So if we only set drive 1, then Award BIOS
+	; won't give problems but Windows 95 stays in MS-DOS compatibility mode.
+	;
+	; For Award BIOSes we could set the Drive 0 type to 1 and then clear the BDA drive count.
+	; So essentially we could automatically do what user needs to do manually to get Windows 95
+	; working on Award BIOSes. However, I think that should be left to do manually since
+	; there may be SCSI drives on the system or FLG_ROMVARS_IGNORE_MOTHERBOARD_DRIVES could
+	; be intentionally cleared and forcing the dummy drive might cause only trouble.
+
+	; Try to detect Award BIOS (Seems to work on a tested 128k BIOS so hopefully
+	; there will be no need to scan E000h segment)
+	mov		cx, 65536 - 4
+	mov		eax, 'Awar'						; Four characters should be enough
+	mov		di, 0F000h						; Scan 64k starting from segment F000h
+	mov		fs, di							; No need to preserve FS since we set it to zero soon when we boot
+	xor		di, di
+.ScanNextCharacters:
+	cmp		[fs:di], eax
+	je		SHORT .ClearBdaDriveCount		; Award detected, cannot modify CMOS
+	inc		di								; Increment offset by one character (not four)
+	loop	.ScanNextCharacters
+
+	; Now it should be safe to write
+	mov		dl, HARD_DISK_TYPES
+	mov		al, 0F0h						; Drive 0 type 16...47 (supposed to be defined elsewhere in the CMOS)
+	call	CMOS_WriteALtoIndexInDL
+	call	CMOS_StoreNewChecksumFor10hto2Dh
 .ClearBdaDriveCount:
-	%endif	; MODULE_WIN95_CMOS_HACK
+%endif ; MODULE_WIN95_CMOS_HACK
 
 	test	BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_IGNORE_MOTHERBOARD_DRIVES
 	jz		SHORT .ContinueInitialization
-	mov		BYTE [es:BDA.bHDCount], 0	; Set hard disk count to zero
+	mov		BYTE [es:BDA.bHDCount], 0		; Set hard disk count to zero
 .ContinueInitialization:
-%endif
-
-	mov		cx, [RAMVARS.wDrvCntAndFlopCnt]		; Our count of hard disks
+%endif ; USE_AT
+
+	mov		cx, [RAMVARS.wDrvCntAndFlopCnt]	; Our count of hard disks
 	mov		al, [es:BDA.bHDCount]
-	add		[es:BDA.bHDCount], cl		; Add our drives to the system count
-	or		al, 80h						; Or in hard disk flag
-	mov		[RAMVARS.bFirstDrv], al		; Store first drive number
+	add		[es:BDA.bHDCount], cl			; Add our drives to the system count
+	or		al, 80h							; Or in hard disk flag
+	mov		[RAMVARS.bFirstDrv], al			; Store first drive number
 
 .AddFloppies:
@@ -170,5 +169,5 @@
 	dec		ch
 	mov		al, ch
-	js		.NoFloppies						; if no drives are present, we store 0ffh
+	js		SHORT .NoFloppies				; If no drives are present, we store 0FFh
 
 	call	FloppyDrive_GetCountFromBIOS_or_BDA
@@ -242,5 +241,5 @@
 ;--------------------------------------------------------------------
 .ReadAtaInfoFromHardDisk:
-	mov		si, BOOTVARS.rgbAtaInfo		; ES:SI now points to ATA info location
+	mov		si, BOOTVARS.rgbAtaInfo			; ES:SI now points to ATA info location
 	push	es
 	push	si
@@ -255,6 +254,6 @@
 	; Fall to .ReadAtapiInfoFromDrive
 
-.ReadAtapiInfoFromDrive:				; Not yet implemented
-	;call	ReadAtapiInfoFromDrive		; Assume CD-ROM
+.ReadAtapiInfoFromDrive:					; Not yet implemented
+	;call	ReadAtapiInfoFromDrive			; Assume CD-ROM
 	;jnc	SHORT _CreateBiosTablesForCDROM
 
Index: trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrintCfg.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrintCfg.asm	(revision 600)
+++ trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrintCfg.asm	(revision 601)
@@ -4,5 +4,5 @@
 ;
 ; Included by BootMenuPrint.asm, this routine is to be inserted into
-; BootMenuPrint_HardDiskRefreshInformation.
+; BootMenuPrint_RefreshInformation.
 ;
 
@@ -26,5 +26,5 @@
 SECTION .text
 
-;;; fall-into from BootMenuPrint_HardDiskRefreshInformation.
+;;; fall-into from BootMenuPrint_RefreshInformation.
 
 ;--------------------------------------------------------------------
@@ -32,5 +32,5 @@
 ; Cursor is set to configuration header string position.
 ;
-; BootMenuPrintCfg_ForOurDrive
+; .BootMenuPrintCfg_ForOurDrive
 ;	Parameters:
 ;		DS:DI:		Pointer to DPT
@@ -38,9 +38,7 @@
 ;		Nothing
 ;	Corrupts registers:
-;		AX, BX, CX, DX
+;		AX, BX, DX
 ;--------------------------------------------------------------------
 .BootMenuPrintCfg_ForOurDrive:
-	eMOVZX	ax, [di+DPT.bIdevarsOffset]
-	xchg	bx, ax						; CS:BX now points to IDEVARS
 	; Fall to .PushAddressingMode
 
@@ -49,9 +47,8 @@
 ;	Parameters:
 ;		DS:DI:	Ptr to DPT
-;		CS:BX:	Ptr to IDEVARS
 ;	Returns:
 ;		Nothing (falls to next push below)
 ;	Corrupts registers:
-;		AX, CX, DX
+;		AX, BX, DX
 ;--------------------------------------------------------------------
 .PushAddressingMode:
@@ -66,6 +63,6 @@
 	imul	ax, g_szAddressingModes_Displacement << (8-TRANSLATEMODE_FIELD_POSITION)
 %else
-	mov		cx, g_szAddressingModes_Displacement << (8-TRANSLATEMODE_FIELD_POSITION)
-	mul		cx
+	mov		bx, g_szAddressingModes_Displacement << (8-TRANSLATEMODE_FIELD_POSITION)
+	mul		bx
 %endif
 	xchg	al, ah		; AL = always zero after above multiplication
@@ -78,5 +75,4 @@
 ;	Parameters:
 ;		DS:DI:	Ptr to DPT
-;		CS:BX:	Ptr to IDEVARS
 ;	Returns:
 ;		Nothing (falls to next push below)
@@ -97,11 +93,11 @@
 ;	Parameters:
 ;		DS:DI:	Ptr to DPT
-;		CS:BX:	Ptr to IDEVARS
 ;	Returns:
 ;		Nothing (falls to next push below)
 ;	Corrupts registers:
-;		AX
+;		AX, BX
 ;--------------------------------------------------------------------
 .PushDeviceType:
+	call	AccessDPT_GetIdevarsToCSBX
 %ifndef MODULE_SERIAL
 	mov		al, g_szDeviceTypeValues_Displacement
@@ -155,5 +151,5 @@
 ;		Nothing (falls to next push below)
 ;	Corrupts registers:
-;		AX, BX, DX, ES
+;		AL
 ;--------------------------------------------------------------------
 .PushResetStatus:
@@ -161,3 +157,3 @@
 	push	ax
 
-;;; fall-out to BootMenuPrint_HardDiskRefreshInformation.
+;;; fall-out to BootMenuPrint_RefreshInformation.
Index: trunk/XTIDE_Universal_BIOS/Src/Menus/HotkeyBar.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Menus/HotkeyBar.asm	(revision 600)
+++ trunk/XTIDE_Universal_BIOS/Src/Menus/HotkeyBar.asm	(revision 601)
@@ -33,6 +33,7 @@
 ;		Nothing
 ;	Corrupts registers:
-;		AX, CX, DX, SI, DI
-;--------------------------------------------------------------------
+;		Nothing
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
 HotkeyBar_TimerTickHandler:
 	push	es
@@ -56,5 +57,5 @@
 	; Call previous handler
 	pushf
-	call far [es:BOOTVARS.hotkeyVars+HOTKEYVARS.fpPrevTimerHandler]
+	call	FAR [es:BOOTVARS.hotkeyVars+HOTKEYVARS.fpPrevTimerHandler]
 
 	; Update Hotkeybar (process key input and draw) every fourth tick
@@ -98,5 +99,4 @@
 	mov		BYTE [RAMVARS.bTimeoutTicksLeft], 0
 .ContinueDrawing:
-	
 	; Fall to HotkeyBar_DrawToTopOfScreen
 
@@ -141,6 +141,10 @@
 
 	; Clear CH if floppy drive is selected for boot
+%if 0 ; Not needed until more flags added
+	mov		ch, FLG_HOTKEY_HD_FIRST
+	and		ch, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bFlags]
+%else
 	mov		ch, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bFlags]
-	;and		ch, FLG_HOTKEY_HD_FIRST; Not needed until more flags added
+%endif
 	call	FormatDriveHotkeyString
 
@@ -428,9 +432,9 @@
 
 	; Store system 1Ch Timer Tick handler and install our hotkeybar handler
-	mov		ax, [SYSTEM_TIMER_TICK*4]
+	mov		ax, [BIOS_SYSTEM_TIMER_TICK_INTERRUPT_1Ch*4]
 	mov		[BOOTVARS.hotkeyVars+HOTKEYVARS.fpPrevTimerHandler], ax
-	mov		ax, [SYSTEM_TIMER_TICK*4+2]
+	mov		ax, [BIOS_SYSTEM_TIMER_TICK_INTERRUPT_1Ch*4+2]
 	mov		[BOOTVARS.hotkeyVars+HOTKEYVARS.fpPrevTimerHandler+2], ax
-	mov		al, SYSTEM_TIMER_TICK
+	mov		al, BIOS_SYSTEM_TIMER_TICK_INTERRUPT_1Ch
 	mov		si, HotkeyBar_TimerTickHandler
 	call	Interrupts_InstallHandlerToVectorInALFromCSSI
Index: trunk/XTIDE_Universal_BIOS/Src/Strings.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Strings.asm	(revision 600)
+++ trunk/XTIDE_Universal_BIOS/Src/Strings.asm	(revision 601)
@@ -135,20 +135,21 @@
 
 g_szDeviceTypeValues:
-g_szDeviceTypeValues_16bit:			db	" 16",NULL
+g_szDeviceTypeValues_16bit:				db	" 16",NULL
 %ifdef MODULE_ADVANCED_ATA OR MODULE_8BIT_IDE OR MODULE_8BIT_IDE_ADVANCED OR MODULE_SERIAL
-g_szDeviceTypeValues_32bit:			db	" 32",NULL
+g_szDeviceTypeValues_32bit:				db	" 32",NULL
 %ifdef MODULE_8BIT_IDE OR MODULE_8BIT_IDE_ADVANCED OR MODULE_SERIAL
-g_szDeviceTypeValues_8bit:			db	"  8",NULL
-g_szDeviceTypeValues_XTIDEr1:		db	"D8 ",NULL	; Dual 8-bit
-g_szDeviceTypeValues_XTIDEr2:		db	"X8 ",NULL	; A0<->A3 swapped 8-bit
+g_szDeviceTypeValues_8bit:				db	"  8",NULL
+g_szDeviceTypeValues_XTIDEr1:			db	"D8 ",NULL	; Dual 8-bit
+g_szDeviceTypeValues_XTIDEr2:			db	"X8 ",NULL	; A0<->A3 swapped 8-bit
+g_szDeviceTypeValues_XTIDEr2_Olivetti:	db	"X8O",NULL	; Same as above but in Olivetti M24 and derivatives
 %ifdef MODULE_8BIT_IDE_ADVANCED OR MODULE_SERIAL
-g_szDeviceTypeValues_XTCFpio8:		db	"T8 ",NULL	; True 8-bit
-g_szDeviceTypeValues_XTCFpio8BIU:	db	"T8B",NULL
-g_szDeviceTypeValues_XTCFpio16BIU:	db	"16B",NULL
-g_szDeviceTypeValues_XTCFdma:		db	"8MA",NULL	; DMA 8-bit
-g_szDeviceTypeValues_JrIde:			db	"M8 ",NULL	; Memory Mapped 8-bit
-g_szDeviceTypeValues_ADP50L:		db	"M8 ",NULL	; Memory Mapped 8-bit
+g_szDeviceTypeValues_XTCFpio8:			db	"T8 ",NULL	; True 8-bit
+g_szDeviceTypeValues_XTCFpio8BIU:		db	"T8B",NULL
+g_szDeviceTypeValues_XTCFpio16BIU:		db	"16B",NULL
+g_szDeviceTypeValues_XTCFdma:			db	"8MA",NULL	; DMA 8-bit
+g_szDeviceTypeValues_JrIde:				db	"M8 ",NULL	; Memory Mapped 8-bit
+g_szDeviceTypeValues_ADP50L:			db	"M8 ",NULL	; Memory Mapped 8-bit
 %ifdef MODULE_SERIAL
-g_szDeviceTypeValues_Serial:		db	"SER",NULL
+g_szDeviceTypeValues_Serial:			db	"SER",NULL
 %endif ; MODULE_SERIAL
 %endif ; MODULE_8BIT_IDE_ADVANCED OR MODULE_SERIAL
@@ -183,24 +184,27 @@
 		%error "g_szDeviceTypeValues Displacement Incorrect 5"
 	%endif
+	%if g_szDeviceTypeValues_XTIDEr2_Olivetti <> g_szDeviceTypeValues_XTIDEr2 + g_szDeviceTypeValues_Displacement
+		%error "g_szDeviceTypeValues Displacement Incorrect 6"
+	%endif
 
 	%ifdef MODULE_8BIT_IDE_ADVANCED OR MODULE_SERIAL
 
-	%if g_szDeviceTypeValues_XTCFpio8 <> g_szDeviceTypeValues_XTIDEr2 + g_szDeviceTypeValues_Displacement
-		%error "g_szDeviceTypeValues Displacement Incorrect 6"
+	%if g_szDeviceTypeValues_XTCFpio8 <> g_szDeviceTypeValues_XTIDEr2_Olivetti + g_szDeviceTypeValues_Displacement
+		%error "g_szDeviceTypeValues Displacement Incorrect 7"
 	%endif
 	%if g_szDeviceTypeValues_XTCFpio8BIU <> g_szDeviceTypeValues_XTCFpio8 + g_szDeviceTypeValues_Displacement
-		%error "g_szDeviceTypeValues Displacement Incorrect 7"
+		%error "g_szDeviceTypeValues Displacement Incorrect 8"
 	%endif
 	%if g_szDeviceTypeValues_XTCFpio16BIU <> g_szDeviceTypeValues_XTCFpio8BIU + g_szDeviceTypeValues_Displacement
-		%error "g_szDeviceTypeValues Displacement Incorrect 8"
+		%error "g_szDeviceTypeValues Displacement Incorrect 9"
 	%endif
 	%if g_szDeviceTypeValues_XTCFdma <> g_szDeviceTypeValues_XTCFpio16BIU + g_szDeviceTypeValues_Displacement
-		%error "g_szDeviceTypeValues Displacement Incorrect 9"
+		%error "g_szDeviceTypeValues Displacement Incorrect 10"
 	%endif
 	%if g_szDeviceTypeValues_JrIde <> g_szDeviceTypeValues_XTCFdma + g_szDeviceTypeValues_Displacement
-		%error "g_szDeviceTypeValues Displacement Incorrect 10"
+		%error "g_szDeviceTypeValues Displacement Incorrect 11"
 	%endif
 	%if g_szDeviceTypeValues_ADP50L <> g_szDeviceTypeValues_JrIde + g_szDeviceTypeValues_Displacement
-		%error "g_szDeviceTypeValues Displacement Incorrect 11"
+		%error "g_szDeviceTypeValues Displacement Incorrect 12"
 	%endif
 
@@ -208,5 +212,5 @@
 
 	%if g_szDeviceTypeValues_Serial <> g_szDeviceTypeValues_ADP50L + g_szDeviceTypeValues_Displacement
-		%error "g_szDeviceTypeValues Displacement Incorrect 12"
+		%error "g_szDeviceTypeValues Displacement Incorrect 13"
 	%endif
 
Index: trunk/XTIDE_Universal_BIOS/Src/StringsCompressed.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/StringsCompressed.asm	(revision 600)
+++ trunk/XTIDE_Universal_BIOS/Src/StringsCompressed.asm	(revision 601)
@@ -253,55 +253,59 @@
 
 g_szDeviceTypeValues:
-g_szDeviceTypeValues_16bit:			; db	" 16",NULL
-                           			; db	 20h,  31h,  36h,  00h    ; uncompressed
-                           			  db	 20h,  2bh,  0fh          ; compressed
+g_szDeviceTypeValues_16bit:				; db	" 16",NULL
+                           				; db	 20h,  31h,  36h,  00h    ; uncompressed
+                           				  db	 20h,  2bh,  0fh          ; compressed
 
 %ifdef MODULE_ADVANCED_ATA OR MODULE_8BIT_IDE OR MODULE_8BIT_IDE_ADVANCED OR MODULE_SERIAL
-g_szDeviceTypeValues_32bit:			; db	" 32",NULL
-                           			; db	 20h,  33h,  32h,  00h    ; uncompressed
-                           			  db	 20h,  2dh,  0ch          ; compressed
+g_szDeviceTypeValues_32bit:				; db	" 32",NULL
+                           				; db	 20h,  33h,  32h,  00h    ; uncompressed
+                           				  db	 20h,  2dh,  0ch          ; compressed
 
 %ifdef MODULE_8BIT_IDE OR MODULE_8BIT_IDE_ADVANCED OR MODULE_SERIAL
-g_szDeviceTypeValues_8bit:			; db	"  8",NULL
-                          			; db	 20h,  20h,  38h,  00h    ; uncompressed
-                          			  db	 20h,  20h,  10h          ; compressed
-
-g_szDeviceTypeValues_XTIDEr1:		; db	"D8 ",NULL	; Dual 8-bit
-                             		; db	 44h,  38h,  20h,  00h    ; uncompressed
-                             		  db	 4ah,  30h,  00h          ; compressed
-
-g_szDeviceTypeValues_XTIDEr2:		; db	"X8 ",NULL	; A0<->A3 swapped 8-bit
-                             		; db	 58h,  38h,  20h,  00h    ; uncompressed
-                             		  db	 5eh,  30h,  00h          ; compressed
+g_szDeviceTypeValues_8bit:				; db	"  8",NULL
+                          				; db	 20h,  20h,  38h,  00h    ; uncompressed
+                          				  db	 20h,  20h,  10h          ; compressed
+
+g_szDeviceTypeValues_XTIDEr1:			; db	"D8 ",NULL	; Dual 8-bit
+                             			; db	 44h,  38h,  20h,  00h    ; uncompressed
+                             			  db	 4ah,  30h,  00h          ; compressed
+
+g_szDeviceTypeValues_XTIDEr2:			; db	"X8 ",NULL	; A0<->A3 swapped 8-bit
+                             			; db	 58h,  38h,  20h,  00h    ; uncompressed
+                             			  db	 5eh,  30h,  00h          ; compressed
+
+g_szDeviceTypeValues_XTIDEr2_Olivetti:	; db	"X8O",NULL	; Same as above but in Olivetti M24 and derivatives
+                                      	; db	 58h,  38h,  4fh,  00h    ; uncompressed
+                                      	  db	 5eh,  30h,  95h          ; compressed
 
 %ifdef MODULE_8BIT_IDE_ADVANCED OR MODULE_SERIAL
-g_szDeviceTypeValues_XTCFpio8:		; db	"T8 ",NULL	; True 8-bit
-                              		; db	 54h,  38h,  20h,  00h    ; uncompressed
-                              		  db	 5ah,  30h,  00h          ; compressed
-
-g_szDeviceTypeValues_XTCFpio8BIU:	; db	"T8B",NULL
-                                 	; db	 54h,  38h,  42h,  00h    ; uncompressed
-                                 	  db	 5ah,  30h,  88h          ; compressed
-
-g_szDeviceTypeValues_XTCFpio16BIU:	; db	"16B",NULL
-                                  	; db	 31h,  36h,  42h,  00h    ; uncompressed
-                                  	  db	 2bh,  2fh,  88h          ; compressed
-
-g_szDeviceTypeValues_XTCFdma:		; db	"8MA",NULL	; DMA 8-bit
-                             		; db	 38h,  4dh,  41h,  00h    ; uncompressed
-                             		  db	 30h,  53h,  87h          ; compressed
-
-g_szDeviceTypeValues_JrIde:			; db	"M8 ",NULL	; Memory Mapped 8-bit
-                           			; db	 4dh,  38h,  20h,  00h    ; uncompressed
-                           			  db	 53h,  30h,  00h          ; compressed
-
-g_szDeviceTypeValues_ADP50L:		; db	"M8 ",NULL	; Memory Mapped 8-bit
-                            		; db	 4dh,  38h,  20h,  00h    ; uncompressed
-                            		  db	 53h,  30h,  00h          ; compressed
+g_szDeviceTypeValues_XTCFpio8:			; db	"T8 ",NULL	; True 8-bit
+                              			; db	 54h,  38h,  20h,  00h    ; uncompressed
+                              			  db	 5ah,  30h,  00h          ; compressed
+
+g_szDeviceTypeValues_XTCFpio8BIU:		; db	"T8B",NULL
+                                 		; db	 54h,  38h,  42h,  00h    ; uncompressed
+                                 		  db	 5ah,  30h,  88h          ; compressed
+
+g_szDeviceTypeValues_XTCFpio16BIU:		; db	"16B",NULL
+                                  		; db	 31h,  36h,  42h,  00h    ; uncompressed
+                                  		  db	 2bh,  2fh,  88h          ; compressed
+
+g_szDeviceTypeValues_XTCFdma:			; db	"8MA",NULL	; DMA 8-bit
+                             			; db	 38h,  4dh,  41h,  00h    ; uncompressed
+                             			  db	 30h,  53h,  87h          ; compressed
+
+g_szDeviceTypeValues_JrIde:				; db	"M8 ",NULL	; Memory Mapped 8-bit
+                           				; db	 4dh,  38h,  20h,  00h    ; uncompressed
+                           				  db	 53h,  30h,  00h          ; compressed
+
+g_szDeviceTypeValues_ADP50L:			; db	"M8 ",NULL	; Memory Mapped 8-bit
+                            			; db	 4dh,  38h,  20h,  00h    ; uncompressed
+                            			  db	 53h,  30h,  00h          ; compressed
 
 %ifdef MODULE_SERIAL
-g_szDeviceTypeValues_Serial:		; db	"SER",NULL
-                            		; db	 53h,  45h,  52h,  00h    ; uncompressed
-                            		  db	 59h,  4bh,  98h          ; compressed
+g_szDeviceTypeValues_Serial:			; db	"SER",NULL
+                            			; db	 53h,  45h,  52h,  00h    ; uncompressed
+                            			  db	 59h,  4bh,  98h          ; compressed
 
 %endif ; MODULE_SERIAL
@@ -337,24 +341,27 @@
 %error "g_szDeviceTypeValues Displacement Incorrect 5"
 %endif
+%if g_szDeviceTypeValues_XTIDEr2_Olivetti <> g_szDeviceTypeValues_XTIDEr2 + g_szDeviceTypeValues_Displacement
+%error "g_szDeviceTypeValues Displacement Incorrect 6"
+%endif
 
 %ifdef MODULE_8BIT_IDE_ADVANCED OR MODULE_SERIAL
 
-%if g_szDeviceTypeValues_XTCFpio8 <> g_szDeviceTypeValues_XTIDEr2 + g_szDeviceTypeValues_Displacement
-%error "g_szDeviceTypeValues Displacement Incorrect 6"
+%if g_szDeviceTypeValues_XTCFpio8 <> g_szDeviceTypeValues_XTIDEr2_Olivetti + g_szDeviceTypeValues_Displacement
+%error "g_szDeviceTypeValues Displacement Incorrect 7"
 %endif
 %if g_szDeviceTypeValues_XTCFpio8BIU <> g_szDeviceTypeValues_XTCFpio8 + g_szDeviceTypeValues_Displacement
-%error "g_szDeviceTypeValues Displacement Incorrect 7"
+%error "g_szDeviceTypeValues Displacement Incorrect 8"
 %endif
 %if g_szDeviceTypeValues_XTCFpio16BIU <> g_szDeviceTypeValues_XTCFpio8BIU + g_szDeviceTypeValues_Displacement
-%error "g_szDeviceTypeValues Displacement Incorrect 8"
+%error "g_szDeviceTypeValues Displacement Incorrect 9"
 %endif
 %if g_szDeviceTypeValues_XTCFdma <> g_szDeviceTypeValues_XTCFpio16BIU + g_szDeviceTypeValues_Displacement
-%error "g_szDeviceTypeValues Displacement Incorrect 9"
+%error "g_szDeviceTypeValues Displacement Incorrect 10"
 %endif
 %if g_szDeviceTypeValues_JrIde <> g_szDeviceTypeValues_XTCFdma + g_szDeviceTypeValues_Displacement
-%error "g_szDeviceTypeValues Displacement Incorrect 10"
+%error "g_szDeviceTypeValues Displacement Incorrect 11"
 %endif
 %if g_szDeviceTypeValues_ADP50L <> g_szDeviceTypeValues_JrIde + g_szDeviceTypeValues_Displacement
-%error "g_szDeviceTypeValues Displacement Incorrect 11"
+%error "g_szDeviceTypeValues Displacement Incorrect 12"
 %endif
 
@@ -362,5 +369,5 @@
 
 %if g_szDeviceTypeValues_Serial <> g_szDeviceTypeValues_ADP50L + g_szDeviceTypeValues_Displacement
-%error "g_szDeviceTypeValues Displacement Incorrect 12"
+%error "g_szDeviceTypeValues Displacement Incorrect 13"
 %endif
 
@@ -594,36 +601,36 @@
 
 ;; translated usage stats
-;; 34:3
+;; 54:2
+;; 172:2
+;; 171:2
+;; 47:2
+;; 53:2
+;; 175:1
+;; 56:9
+;; 45:2
+;; 50:2
+;; 200:1
+;; 33:1
+;; 51:3
 ;; 179:8
 ;; 46:3
+;; 48:2
+;; 34:3
+;; 49:2
+;; 181:1
 ;; 44:1
-;; 200:1
-;; 48:2
-;; 175:1
-;; 171:2
-;; 51:3
-;; 50:2
-;; 33:1
-;; 53:2
-;; 45:2
-;; 47:2
-;; 172:2
-;; 56:8
 ;; 32:34
-;; 181:1
-;; 54:2
-;; 49:2
 ;; total translated: 20
 
 ;; format usage stats
-;; 5-x:1
+;; 5-u:2
+;; z:2
+;; nl:12
+;; x:5
+;; A:4
 ;; 2-u:1
 ;; s:14
-;; nl:12
-;; A:4
-;; 5-u:2
-;; x:5
 ;; 2-I:1
-;; z:2
+;; 5-x:1
 ;; u:6
 ;; c:13
@@ -652,5 +659,5 @@
 ;; 77,M:7
 ;; 78,N:2
-;; 79,O:2
+;; 79,O:3
 ;; 80,P:1
 ;; 81,Q:1
@@ -661,5 +668,5 @@
 ;; 86,V:
 ;; 87,W:
-;; 88,X:1
+;; 88,X:2
 ;; 89,Y:
 ;; 90,Z:
Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/.project
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/.project	(revision 600)
+++ 	(revision )
@@ -1,21 +1,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>XTIDE_Universal_BIOS_Configurator_v2</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
-			<triggers>full,incremental,</triggers>
-			<arguments>
-				<dictionary>
-					<key>LaunchConfigHandle</key>
-					<value>&lt;project&gt;/.externalToolBuilders/Build Configurator v2.launch</value>
-				</dictionary>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-	</natures>
-</projectDescription>
Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/IdeControllerMenu.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/IdeControllerMenu.asm	(revision 600)
+++ trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/IdeControllerMenu.asm	(revision 601)
@@ -193,4 +193,5 @@
 	dw	DEVICE_8BIT_XTIDE_REV1
 	dw	DEVICE_8BIT_XTIDE_REV2
+	dw	DEVICE_8BIT_XTIDE_REV2_OLIVETTI
 	dw	DEVICE_8BIT_XTCF_PIO8
 	dw	DEVICE_8BIT_XTCF_PIO8_WITH_BIU_OFFLOAD
@@ -206,4 +207,5 @@
 	dw	g_szValueCfgDeviceRev1
 	dw	g_szValueCfgDeviceRev2
+	dw	g_szValueCfgDeviceRev2Olivetti
 	dw	g_szValueCfgDeviceXTCFPio8
 	dw	g_szValueCfgDeviceXTCFPio8WithBIUOffload
@@ -631,5 +633,5 @@
 	; We know MODULE_8BIT_IDE is included
 	lahf	; Save the PF
-	cmp		al, DEVICE_8BIT_XTIDE_REV2
+	cmp		al, DEVICE_8BIT_XTIDE_REV2_OLIVETTI
 	jbe		SHORT .ChangingToXTIDEorXTCF
 	sahf	; Restore the PF
Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm	(revision 600)
+++ trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm	(revision 601)
@@ -92,10 +92,10 @@
 g_szNfoMainFlash:		db	"Flash loaded BIOS image to EEPROM.",NULL
 g_szNfoMainSave:		db	"Save BIOS changes back to original file from which it was loaded.",NULL
-g_szNfoMainLicense:		db	"XTIDE Universal BIOS and XTIDECFG Copyright (C) 2009-2010 by Tomi Tilli, 2011-2018 by XTIDE Universal BIOS Team."
+g_szNfoMainLicense:		db	"XTIDE Universal BIOS and XTIDECFG Copyright (C) 2009-2010 by Tomi Tilli, 2011-2019 by XTIDE Universal BIOS Team."
 						db	" Released under GNU GPL v2, with ABSOLUTELY NO WARRANTY. Press ENTER for more details...",NULL
 g_szNfoMainHomePage:	db	"Visit http://xtideuniversalbios.org (home page) and http://vcfed.org/forum (support)",NULL
 
 g_szHelpMainLicense:	db	"XTIDE Universal BIOS and XTIDECFG Configuration program are Copyright 2009-2010 by Tomi Tilli,"
-						db	" 2011-2018 by XTIDE Universal BIOS Team. Released under GNU GPL v2. This software comes with ABSOLUTELY NO WARRANTY."
+						db	" 2011-2019 by XTIDE Universal BIOS Team. Released under GNU GPL v2. This software comes with ABSOLUTELY NO WARRANTY."
 						db	" This is free software, and you are welcome to redistribute it under certain conditions."
 						db	" See the LICENSE.TXT file that was included with this distribution,"
@@ -280,4 +280,5 @@
 							db	"XTIDE rev 1",LF
 							db	"XTIDE rev 2 or modded rev 1",LF
+							db	"XTIDE rev 2 (Olivetti M24)",LF
 							db	"XT-CF PIO8",LF
 							db	"XT-CF PIO8 (BIU offload)",LF
@@ -293,4 +294,5 @@
 g_szValueCfgDeviceRev1:						db	"XTIDE r1",NULL
 g_szValueCfgDeviceRev2:						db	"XTIDE r2",NULL
+g_szValueCfgDeviceRev2Olivetti:				db	"XTIDE r2",NULL
 g_szValueCfgDeviceXTCFPio8:					db	"XTCF PIO",NULL
 g_szValueCfgDeviceXTCFPio8WithBIUOffload:	db	"BIU 8",NULL
@@ -381,6 +383,6 @@
 
 g_szHelpDrvBlockMode:	db	"Block Mode will speed up transfers since multiple sectors can be transferred before waiting next data request."
-						db	" Normally Block Mode should always be kept enabled but there is at"
-						db	" least one drive with buggy Block Mode implementation.",NULL
+						db	" Normally Block Mode should always be kept enabled but there is at least one"
+						db	" drive with buggy Block Mode implementation (Quantum ProDrive LPS 340A).",NULL
 
 g_szHelpDrvWriteCache:	db	"Modern Hard Drives have a large amount of internal write cache."
@@ -420,49 +422,49 @@
 
 ; Strings for boot settings menu
-g_szItemBootTimeout:	db	"Selection timeout",NULL
-g_szItemBootDrive:		db	"Default boot drive",NULL
-g_szItemBootDispMode:	db	"Display Mode",NULL
-g_szItemColorTheme:		db	"Color Theme",NULL
-g_szItemBootFloppyDrvs:	db	"Number of Floppy Drives",NULL
-g_szItemSerialDetect:	db	"Scan for Serial Drives",NULL
-g_szItemClearBdaDriveCount:	db  "Remove other hard drives",NULL
-
-g_szDlgBootTimeout:		db	"Enter Boot Menu selection timeout in BIOS timer ticks (2...1092).",NULL
-g_szDlgBootDrive:		db	"Enter default drive number (0xh for Floppy Drives, 8xh for Hard Disks).",NULL
-g_szDlgBootDispMode:	db	"Select display mode.",NULL
-g_szDlgColorTheme:		db	"Select color theme.",NULL
-g_szDlgBootFloppyDrvs:	db	"Select number of Floppy Drives in system.",NULL
-g_szDlgSerialDetect:	db	"Scan for serial drives?",NULL
-g_szDlgClearBdaDriveCount:	db  "Remove existing INT 13h hard drives during drive detection?",NULL
-
-g_szNfoBootTimeout:		db	"Menu item selection timeout in BIOS timer ticks. 1 tick = 54.9 ms.",NULL
-g_szNfoBootDrive:		db	"Default boot drive.",NULL
-g_szNfoDispMode:		db	"Display mode to set when booting.",NULL
-g_szNfoColorTheme:		db	"Color theme used by the boot menu and the hotkey bar.",NULL
-g_szNfoBootFloppyDrvs:	db	"Number of Floppy Drives in system.",NULL
-g_szNfoSerialDetect:	db	"Scans all standard COM ports for serial drives."
-						db	" This can also be invoked by holding down ALT at the end of normal drive detection.",NULL
-g_szNfoClearBdaDriveCount:	db  "Can be used to remove duplicate hard drives.",NULL
-
-g_szHelpBootTimeout:	db	"Boot Menu selection timeout in BIOS timer ticks (1 second = 18.2 ticks)."
-						db	" When timer goes to zero, currently selected drive will be booted automatically."
-						db	" Timeout can be disabled by setting this to 0.",NULL
-g_szHelpBootDrive:		db	"Drive to be set selected by default when Boot Menu is displayed.",NULL
-g_szHelpColorTheme:		db	"Pick a theme from a list of several pre-defined themes to customize the colors used by the boot menu and, if"
-						db	" available, the hotkey bar. Selecting a theme or loading a BIOS, or its settings, from file or from ROM will"
-						db	" make XTIDECFG apply the theme to itself for easy preview. The ability to preview themes requires that"
-						db	" XTIDECFG is running in a display mode that can display colors. In other words, you may configure the"
-						db	" BIOS on a machine with a monochrome graphics adapter and not be able to preview the theme but the BIOS will"
-						db	" still use the selected theme when installed in a machine with a color graphics adapter.",NULL
-g_szHelpBootFloppyDrvs:	db	"Detecting the correct number of floppy drives might fail when using a floppy controller with its own BIOS."
-						db	" A minimum number of floppy drives can be specified to force non-detected drives to appear on boot menu.",NULL
-g_szHelpSerialDetect:	db	"Set to Yes, at the end of normal drive detection, COM ports 1-7 (in reverse order) will be scanned for a connection"
-						db	" to a serial drive server. This option provides flexibility with the COM port and baud rate to be used,"
-						db	" it need not be configured ahead of time, but at the expense of a slower boot process."
-						db	" Even when this option is set to No, this functionality can still be invoked by holding down the ALT key at the end"
-						db	" of normal drive detection. Note that if any serial drives are detected during the normal drive detection,"
-						db	" no scan will take place (to avoid finding the same drive twice).",NULL
-g_szHelpClearBdaDriveCount:	db  "Set to NO for normal operation. Set to YES to get Windows 95 drivers to work when "
-							db  "MODULE_WIN95_CMOS_HACK is not included (dummy drive needs to be defined in system BIOS setup).",NULL
+g_szItemBootTimeout:		db	"Selection timeout",NULL
+g_szItemBootDrive:			db	"Default boot drive",NULL
+g_szItemBootDispMode:		db	"Display Mode",NULL
+g_szItemColorTheme:			db	"Color Theme",NULL
+g_szItemBootFloppyDrvs:		db	"Number of Floppy Drives",NULL
+g_szItemSerialDetect:		db	"Scan for Serial Drives",NULL
+g_szItemClearBdaDriveCount:	db	"Remove other hard drives",NULL
+
+g_szDlgBootTimeout:			db	"Enter Boot Menu selection timeout in BIOS timer ticks (2...1092).",NULL
+g_szDlgBootDrive:			db	"Enter default drive number (0xh for Floppy Drives, 8xh for Hard Disks).",NULL
+g_szDlgBootDispMode:		db	"Select display mode.",NULL
+g_szDlgColorTheme:			db	"Select color theme.",NULL
+g_szDlgBootFloppyDrvs:		db	"Select number of Floppy Drives in system.",NULL
+g_szDlgSerialDetect:		db	"Scan for serial drives?",NULL
+g_szDlgClearBdaDriveCount:	db	"Remove existing INT 13h hard drives during drive detection?",NULL
+
+g_szNfoBootTimeout:			db	"Menu item selection timeout in BIOS timer ticks. 1 tick = 54.9 ms.",NULL
+g_szNfoBootDrive:			db	"Default boot drive.",NULL
+g_szNfoDispMode:			db	"Display mode to set when booting.",NULL
+g_szNfoColorTheme:			db	"Color theme used by the boot menu and the hotkey bar.",NULL
+g_szNfoBootFloppyDrvs:		db	"Number of Floppy Drives in system.",NULL
+g_szNfoSerialDetect:		db	"Scans all standard COM ports for serial drives."
+							db	" This can also be invoked by holding down ALT at the end of normal drive detection.",NULL
+g_szNfoClearBdaDriveCount:	db	"Can be used to remove duplicate hard drives.",NULL
+
+g_szHelpBootTimeout:		db	"Boot Menu selection timeout in BIOS timer ticks (1 second = 18.2 ticks)."
+							db	" When timer goes to zero, currently selected drive will be booted automatically."
+							db	" Timeout can be disabled by setting this to 0.",NULL
+g_szHelpBootDrive:			db	"Drive to be set selected by default when Boot Menu is displayed.",NULL
+g_szHelpColorTheme:			db	"Pick a theme from a list of several pre-defined themes to customize the colors used by the boot menu and, if"
+							db	" available, the hotkey bar. Selecting a theme or loading a BIOS, or its settings, from file or from ROM will"
+							db	" make XTIDECFG apply the theme to itself for easy preview. The ability to preview themes requires that"
+							db	" XTIDECFG is running in a display mode that can display colors. In other words, you may configure the"
+							db	" BIOS on a machine with a monochrome graphics adapter and not be able to preview the theme but the BIOS will"
+							db	" still use the selected theme when installed in a machine with a color graphics adapter.",NULL
+g_szHelpBootFloppyDrvs:		db	"Detecting the correct number of floppy drives might fail when using a floppy controller with its own BIOS."
+							db	" A minimum number of floppy drives can be specified to force non-detected drives to appear on boot menu.",NULL
+g_szHelpSerialDetect:		db	"Set to Yes, at the end of normal drive detection, COM ports 1-7 (in reverse order) will be scanned for a connection"
+							db	" to a serial drive server. This option provides flexibility with the COM port and baud rate to be used,"
+							db	" it need not be configured ahead of time, but at the expense of a slower boot process."
+							db	" Even when this option is set to No, this functionality can still be invoked by holding down the ALT key at the end"
+							db	" of normal drive detection. Note that if any serial drives are detected during the normal drive detection,"
+							db	" no scan will take place (to avoid finding the same drive twice).",NULL
+g_szHelpClearBdaDriveCount:	db	"Set to NO for normal operation. Set to YES to get Windows 95 drivers to work when"
+							db	" MODULE_WIN95_CMOS_HACK is not included (dummy drive needs to be defined in system BIOS setup).",NULL
 
 g_szMultichoiceBootDispMode:	db	"Default",LF
