Index: trunk/XTIDE_Universal_BIOS/Src/Main.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Main.asm	(revision 624)
+++ trunk/XTIDE_Universal_BIOS/Src/Main.asm	(revision 625)
@@ -15,5 +15,5 @@
 ;
 ; XTIDE Universal BIOS and Associated Tools
-; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
+; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team.
 ;
 ; This program is free software; you can redistribute it and/or modify
@@ -64,14 +64,17 @@
 
 ; ROM variables (must start at offset 0)
-CNT_ROM_BLOCKS		EQU		BIOS_SIZE / 512		; number of 512B blocks, 16 = 8kB BIOS
+CNT_ROM_BLOCKS		EQU		BIOS_SIZE / 512					; number of 512B blocks, 16 = 8kB BIOS
 istruc ROMVARS
-	at	ROMVARS.wRomSign,	dw	0AA55h			; PC ROM signature
-	at	ROMVARS.bRomSize,	db	CNT_ROM_BLOCKS	; ROM size in 512B blocks
-	at	ROMVARS.rgbJump,	jmp	Initialize_FromMainBiosRomSearch
-	at	ROMVARS.rgbSign,	db	FLASH_SIGNATURE
-	at	ROMVARS.szTitle,	db	TITLE_STRING
-	at	ROMVARS.szVersion,	db	"r"
-							db	ROM_VERSION_STRING
-							db	BUILD_DATE_STRING,NULL
+	at	ROMVARS.wRomSign,		dw	0AA55h					; PC ROM signature
+	at	ROMVARS.bRomSize,		db	CNT_ROM_BLOCKS			; ROM size in 512B blocks
+	at	ROMVARS.rgbJump,		jmp	Initialize_FromMainBiosRomSearch
+	at	ROMVARS.rgbSign,		db	FLASH_SIGNATURE
+	at	ROMVARS.szTitle,		db	TITLE_STRING
+	at	ROMVARS.szVersion,		db	"r"
+								db	ROM_VERSION_STRING
+								db	BUILD_DATE_STRING,NULL
+%ifdef MODULE_BOOT_MENU
+	at	ROMVARS.pColorTheme,	dw	ColorTheme				; Offset to the ATTRIBUTE_CHARS struc that holds the color theme
+%endif
 
 ;---------------------------;
@@ -84,10 +87,14 @@
 	at	ROMVARS.wFlags,			dw	FLG_ROMVARS_FULLMODE | MASK_ROMVARS_INCLUDED_MODULES
 %endif
+	at	ROMVARS.wRamVars,		dw	NULL					; Use 'stolen' top of conventional memory by default in Full mode
 	at	ROMVARS.wDisplayMode,	dw	DEFAULT_TEXT_MODE
 %ifdef MODULE_BOOT_MENU
 	at	ROMVARS.wBootTimeout,	dw	BOOT_MENU_DEFAULT_TIMEOUT
-	at	ROMVARS.pColorTheme,	dw	ColorTheme				; Offset to the ATTRIBUTE_CHARS struc that holds the color theme
-%endif
+%endif
+%ifdef USE_PS2
+	at	ROMVARS.bIdeCnt,		db	4						; Number of supported controllers with two McIDE adapters
+%else
 	at	ROMVARS.bIdeCnt,		db	2						; Number of supported controllers
+%endif
 	at	ROMVARS.bBootDrv,		db	80h						; Boot Menu default drive
 	at	ROMVARS.bMinFddCnt, 	db	0						; Do not force minimum number of floppy drives
@@ -99,5 +106,9 @@
 	at	ROMVARS.ideVars0+IDEVARS.bDevice,			db	DEVICE_16BIT_ATA
 %ifdef MODULE_IRQ
+%ifdef USE_PS2
+	at	ROMVARS.ideVars0+IDEVARS.bIRQ,				db	0
+%else
 	at	ROMVARS.ideVars0+IDEVARS.bIRQ,				db	14
+%endif
 %endif
 	at	ROMVARS.ideVars0+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,	dw	DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
@@ -108,5 +119,9 @@
 	at	ROMVARS.ideVars1+IDEVARS.bDevice,			db	DEVICE_16BIT_ATA
 %ifdef MODULE_IRQ
+%ifdef USE_PS2
+	at	ROMVARS.ideVars1+IDEVARS.bIRQ,				db	0
+%else
 	at	ROMVARS.ideVars1+IDEVARS.bIRQ,				db	15
+%endif
 %endif
 	at	ROMVARS.ideVars1+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,	dw	DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
@@ -117,5 +132,9 @@
 	at	ROMVARS.ideVars2+IDEVARS.bDevice,			db	DEVICE_16BIT_ATA
 %ifdef MODULE_IRQ
+%ifdef USE_PS2
+	at	ROMVARS.ideVars2+IDEVARS.bIRQ,				db	0
+%else
 	at	ROMVARS.ideVars2+IDEVARS.bIRQ,				db	0	; Should be 11 on the GSI Inc. Model 2C
+%endif
 %endif
 	at	ROMVARS.ideVars2+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,	dw	DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
@@ -126,5 +145,9 @@
 	at	ROMVARS.ideVars3+IDEVARS.bDevice,			db	DEVICE_16BIT_ATA
 %ifdef MODULE_IRQ
+%ifdef USE_PS2
+	at	ROMVARS.ideVars3+IDEVARS.bIRQ,				db	0
+%else
 	at	ROMVARS.ideVars3+IDEVARS.bIRQ,				db	0	; Should be 10 on the GSI Inc. Model 2C
+%endif
 %endif
 	at	ROMVARS.ideVars3+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,	dw	DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
@@ -139,8 +162,8 @@
 ;-----------------------------------;
 	at	ROMVARS.wFlags,			dw	MASK_ROMVARS_INCLUDED_MODULES
+	at	ROMVARS.wRamVars,		dw	LITE_MODE_RAMVARS_SEGMENT
 	at	ROMVARS.wDisplayMode,	dw	DEFAULT_TEXT_MODE
 %ifdef MODULE_BOOT_MENU
 	at	ROMVARS.wBootTimeout,	dw	BOOT_MENU_DEFAULT_TIMEOUT
-	at	ROMVARS.pColorTheme,	dw	ColorTheme				; Offset to the ATTRIBUTE_CHARS struc that holds the color theme
 %endif
 	at	ROMVARS.bIdeCnt,		db	1
