Changeset 204 in xtideuniversalbios
- Timestamp:
- Dec 5, 2011, 11:23:22 AM (13 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS_Configurator_v2/Src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Buffers.asm
r145 r204 229 229 230 230 ;-------------------------------------------------------------------- 231 ; Buffers_GetIdeControllerCountToCX 232 ; Parameters: 233 ; SS:BP: Menu handle 234 ; Returns: 235 ; CX: Number of IDE controllers to configure 236 ; ES:DI: Ptr to file buffer 237 ; Corrupts registers: 238 ; AX 239 ;-------------------------------------------------------------------- 240 ALIGN JUMP_ALIGN 241 Buffers_GetIdeControllerCountToCX: 242 call Buffers_GetFileBufferToESDI 243 mov al, [es:di+ROMVARS.bIdeCnt] 244 245 ; Limit controller count for lite mode 246 test BYTE [es:di+ROMVARS.wFlags], FLG_ROMVARS_FULLMODE 247 jnz SHORT .ReturnControllerCountInCX 248 MIN_U al, MAX_LITE_MODE_CONTROLLERS 249 250 .ReturnControllerCountInCX: 251 cbw ; A maximum of 127 controllers should be sufficient 252 xchg cx, ax 253 ret 254 255 256 ;-------------------------------------------------------------------- 231 257 ; Buffers_GetFileBufferToESDI 232 258 ; Buffers_GetFlashComparisonBufferToESDI -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/ConfigurationMenu.asm
r181 r204 106 106 g_MenuitemConfigurationIdeControllers: 107 107 istruc MENUITEM 108 at MENUITEM.fnActivate, dw Menuitem_ActivateUnsignedInputForMenuitemInDSSI108 at MENUITEM.fnActivate, dw ActivateInputForNumberOfIdeControllersMenuitemInDSSI 109 109 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteUnsignedValueStringToBufferInESDIfromItemInDSSI 110 110 at MENUITEM.szName, dw g_szItemCfgIdeCnt 111 111 at MENUITEM.szQuickInfo, dw g_szNfoCfgIdeCnt 112 112 at MENUITEM.szHelp, dw g_szNfoCfgIdeCnt 113 at MENUITEM.bFlags, db FLG_MENUITEM_ MODIFY_MENU| FLG_MENUITEM_BYTEVALUE113 at MENUITEM.bFlags, db FLG_MENUITEM_VISIBLE | FLG_MENUITEM_BYTEVALUE 114 114 at MENUITEM.bType, db TYPE_MENUITEM_UNSIGNED 115 115 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw ROMVARS.bIdeCnt 116 116 at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgCfgIdeCnt 117 117 at MENUITEM.itemValue + ITEM_VALUE.wMinValue, dw 1 118 at MENUITEM.itemValue + ITEM_VALUE.wMaxValue, dw 4118 at MENUITEM.itemValue + ITEM_VALUE.wMaxValue, dw MAX_ALLOWED_IDE_CONTROLLERS 119 119 iend 120 120 … … 139 139 call .EnableIdeControllerMenuitemsBasedOnConfiguration 140 140 call .EnableOrDisableKiBtoStealFromRAM 141 call .EnableOrDisableIdeControllerCount141 call LimitIdeControllersForLiteMode 142 142 mov si, g_MenupageForConfigurationMenu 143 143 jmp Menupage_ChangeToNewMenupageInDSSI … … 151 151 ; Nothing 152 152 ; Corrupts registers: 153 ; AX, BX, CX 153 ; AX, BX, CX, DI, ES 154 154 ;-------------------------------------------------------------------- 155 155 ALIGN JUMP_ALIGN … … 166 166 ALIGN JUMP_ALIGN 167 167 .EnableIdeControllerMenuitemsBasedOnConfiguration: 168 call .GetIdeControllerCountToCX168 call Buffers_GetIdeControllerCountToCX 169 169 dec cx ; Primary always enabled 170 jz .PrimaryControllerAlreadyEnabled170 jz SHORT .PrimaryControllerAlreadyEnabled 171 171 mov bx, g_MenuitemConfigurationSecondaryIdeController 172 172 ALIGN JUMP_ALIGN … … 178 178 ret 179 179 180 ;--------------------------------------------------------------------181 ; .GetIdeControllerCountToCX182 ; Parameters:183 ; SS:BP: Menu handle184 ; Returns:185 ; CX: Number of IDE controllers to configure186 ; Corrupts registers:187 ; AX, BX188 ;--------------------------------------------------------------------189 ALIGN JUMP_ALIGN190 .GetIdeControllerCountToCX:191 call Buffers_GetRomvarsFlagsToAX192 test ax, FLG_ROMVARS_FULLMODE193 mov al, 1 ; Assume lite mode194 jz SHORT .AllowOnlyOneIdeControllerInLiteMode195 196 mov bx, ROMVARS.bIdeCnt197 call Buffers_GetRomvarsValueToAXfromOffsetInBX198 ALIGN JUMP_ALIGN199 .AllowOnlyOneIdeControllerInLiteMode:200 cbw ; A maximum of 127 controllers should be sufficient201 xchg cx, ax202 ret203 180 204 181 ;-------------------------------------------------------------------- … … 217 194 test ax, FLG_ROMVARS_FULLMODE 218 195 jz SHORT .DisableMenuitemFromCSBX 219 jmp SHORT .EnableMenuitemFromCSBX 220 221 ;-------------------------------------------------------------------- 222 ; .EnableOrDisableKiBtoStealFromRAM 223 ; Parameters: 224 ; SS:BP: Menu handle 225 ; Returns: 226 ; Nothing 227 ; Corrupts registers: 228 ; AX, BX 229 ;-------------------------------------------------------------------- 230 ALIGN JUMP_ALIGN 231 .EnableOrDisableIdeControllerCount: 232 call Buffers_GetRomvarsFlagsToAX 233 mov bx, g_MenuitemConfigurationIdeControllers 234 test ax, FLG_ROMVARS_FULLMODE 235 jnz SHORT .EnableMenuitemFromCSBX 236 237 ; Limit controller count for lite mode 238 call Buffers_GetFileBufferToESDI 239 mov BYTE [es:di+ROMVARS.bIdeCnt], MAX_LITE_MODE_CONTROLLERS 240 jmp SHORT .DisableMenuitemFromCSBX 196 ; Fall to .EnableMenuitemFromCSBX 197 241 198 242 199 ;-------------------------------------------------------------------- … … 295 252 call IdeControllerMenu_InitializeToIdevarsOffsetInBX 296 253 jmp IdeControllerMenu_EnterMenuOrModifyItemVisibility 254 255 256 ALIGN JUMP_ALIGN 257 ActivateInputForNumberOfIdeControllersMenuitemInDSSI: 258 call Menuitem_ActivateUnsignedInputForMenuitemInDSSI 259 ; Fall to LimitIdeControllersForLiteMode 260 261 ;-------------------------------------------------------------------- 262 ; LimitIdeControllersForLiteMode 263 ; Parameters: 264 ; SS:BP: Menu handle 265 ; Returns: 266 ; Nothing 267 ; Corrupts registers: 268 ; AX, CX, DI 269 ;-------------------------------------------------------------------- 270 ALIGN JUMP_ALIGN 271 LimitIdeControllersForLiteMode: 272 push es 273 call Buffers_GetIdeControllerCountToCX 274 mov [es:di+ROMVARS.bIdeCnt], cl 275 CALL_MENU_LIBRARY GetHighlightedItemToAX 276 CALL_MENU_LIBRARY RefreshItemFromAX 277 pop es 278 ret
Note:
See TracChangeset
for help on using the changeset viewer.