Changeset 286 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages
- Timestamp:
- Mar 1, 2012, 8:52:08 PM (13 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/IdeControllerMenu.asm
r280 r286 178 178 dw DEVICE_32BIT_ATA 179 179 dw DEVICE_SERIAL_PORT 180 dw DEVICE_JRIDE_ISA 180 181 g_rgszValueToStringLookupForDevice: 181 182 dw g_szValueCfgDeviceDual8b … … 185 186 dw g_szValueCfgDevice32b 186 187 dw g_szValueCfgDeviceSerial 188 dw g_szValueCfgDeviceJrIdeIsa 187 189 188 190 g_rgbChoiceToValueLookupForCOM: -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/MasterSlaveMenu.asm
r108 r286 10 10 at MENUPAGE.fnEnter, dw MasterSlaveMenu_EnterMenuOrModifyItemVisibility 11 11 at MENUPAGE.fnBack, dw IdeControllerMenu_EnterMenuOrModifyItemVisibility 12 at MENUPAGE.wMenuitems, dw 612 at MENUPAGE.wMenuitems, dw 9 13 13 iend 14 14 … … 39 39 iend 40 40 41 g_MenuitemMasterSlaveWriteCache: 42 istruc MENUITEM 43 at MENUITEM.fnActivate, dw Menuitem_ActivateMultichoiceSelectionForMenuitemInDSSI 44 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteLookupValueStringToBufferInESDIfromUnshiftedItemInDSSI 45 at MENUITEM.szName, dw g_szItemDrvWriteCache 46 at MENUITEM.szQuickInfo, dw g_szNfoDrvWriteCache 47 at MENUITEM.szHelp, dw g_szHelpDrvWriteCache 48 at MENUITEM.bFlags, db FLG_MENUITEM_VISIBLE | FLG_MENUITEM_MASKVALUE 49 at MENUITEM.bType, db TYPE_MENUITEM_MULTICHOICE 50 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw NULL 51 at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgDrvWriteCache 52 at MENUITEM.itemValue + ITEM_VALUE.szMultichoice, dw g_szMultichoiseWrCache 53 at MENUITEM.itemValue + ITEM_VALUE.rgwChoiceToValueLookup, dw g_rgwChoiceToValueLookupForWriteCache 54 at MENUITEM.itemValue + ITEM_VALUE.rgszChoiceToStringLookup, dw g_rgszChoiceToStringLookupForWriteCache 55 at MENUITEM.itemValue + ITEM_VALUE.wValueBitmask, dw MASK_DRVPARAMS_WRITECACHE 56 iend 57 41 58 g_MenuitemMasterSlaveUserCHS: 42 59 istruc MENUITEM … … 100 117 iend 101 118 119 g_MenuitemMasterSlaveUserLBA: 120 istruc MENUITEM 121 at MENUITEM.fnActivate, dw Menuitem_ActivateMultichoiceSelectionForMenuitemInDSSI 122 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI 123 at MENUITEM.szName, dw g_szItemDrvUserLBA 124 at MENUITEM.szQuickInfo, dw g_szNfoDrvUserLBA 125 at MENUITEM.szHelp, dw g_szHelpDrvUserLBA 126 at MENUITEM.bFlags, db FLG_MENUITEM_VISIBLE | FLG_MENUITEM_MODIFY_MENU | FLG_MENUITEM_FLAGVALUE 127 at MENUITEM.bType, db TYPE_MENUITEM_MULTICHOICE 128 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw NULL 129 at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgDrvUserLBA 130 at MENUITEM.itemValue + ITEM_VALUE.szMultichoice, dw g_szMultichoiceBooleanFlag 131 at MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup, dw g_rgszValueToStringLookupForFlagBooleans 132 at MENUITEM.itemValue + ITEM_VALUE.wValueBitmask, dw FLG_DRVPARAMS_USERLBA 133 iend 134 135 g_MenuitemMasterSlaveUserLbaValue: 136 istruc MENUITEM 137 at MENUITEM.fnActivate, dw Menuitem_ActivateUnsignedInputForMenuitemInDSSI 138 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteUnsignedValueStringToBufferInESDIfromItemInDSSI 139 at MENUITEM.szName, dw g_szItemDrvLbaSectors 140 at MENUITEM.szQuickInfo, dw g_szNfoDrvLbaSectors 141 at MENUITEM.szHelp, dw g_szNfoDrvLbaSectors 142 at MENUITEM.bFlags, db NULL 143 at MENUITEM.bType, db TYPE_MENUITEM_UNSIGNED 144 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw NULL 145 at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgDrvLbaSectors 146 at MENUITEM.itemValue + ITEM_VALUE.wMinValue, dw ((16383*16*63) / (1024 * 1024)) + 1 ; One sector over 8.4 GB 147 at MENUITEM.itemValue + ITEM_VALUE.wMaxValue, dw 10000000h / (1024 * 1024) ; Limit to 28-bit LBA 148 at MENUITEM.itemValue + ITEM_VALUE.fnValueReader, dw ValueReaderForUserLbaValue 149 at MENUITEM.itemValue + ITEM_VALUE.fnValueWriter, dw ValueWriterForUserLbaValue 150 iend 151 152 153 g_rgwChoiceToValueLookupForWriteCache: 154 dw DEFAULT_WRITE_CACHE 155 dw DISABLE_WRITE_CACHE 156 dw ENABLE_WRITE_CACHE 157 158 g_rgszChoiceToStringLookupForWriteCache: 159 dw g_szValueBootDispModeDefault 160 dw g_szValueDrvWrCaDis 161 dw g_szValueDrvWrCaEn 162 102 163 103 164 ; Section containing code … … 117 178 lea ax, [bx+DRVPARAMS.wFlags] 118 179 mov [cs:g_MenuitemMasterSlaveBlockModeTransfers+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax 180 mov [cs:g_MenuitemMasterSlaveWriteCache+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax 119 181 mov [cs:g_MenuitemMasterSlaveUserCHS+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax 182 mov [cs:g_MenuitemMasterSlaveUserLBA+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax 120 183 121 184 lea ax, [bx+DRVPARAMS.wCylinders] … … 127 190 lea ax, [bx+DRVPARAMS.bSect] 128 191 mov [cs:g_MenuitemMasterSlaveSectors+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax 192 193 lea ax, [bx+DRVPARAMS.dwMaximumLBA] 194 mov [cs:g_MenuitemMasterSlaveUserLbaValue+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax 129 195 ret 130 196 … … 143 209 push cs 144 210 pop ds 211 call .EnableOrDisableUserCHSandLBA 145 212 call .EnableOrDisableCHandS 213 call .EnableOrDisableUserLbaValue 146 214 mov si, g_MenupageForMasterSlaveMenu 147 215 jmp Menupage_ChangeToNewMenupageInDSSI 216 217 218 ;-------------------------------------------------------------------- 219 ; .EnableOrDisableUserCHSandLBA 220 ; Parameters: 221 ; SS:BP: Menu handle 222 ; Returns: 223 ; Nothing 224 ; Corrupts registers: 225 ; AX, BX 226 ;-------------------------------------------------------------------- 227 ALIGN JUMP_ALIGN 228 .EnableOrDisableUserCHSandLBA: 229 mov bx, [g_MenuitemMasterSlaveUserLBA+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset] 230 call Buffers_GetRomvarsValueToAXfromOffsetInBX 231 test ax, FLG_DRVPARAMS_USERLBA 232 jnz SHORT .DisableCHSandEnableLBA 233 test ax, FLG_DRVPARAMS_USERCHS 234 jnz SHORT .EnableCHSandDisableLBA 235 236 ; Enable both 237 mov bx, g_MenuitemMasterSlaveUserCHS 238 call .EnableMenuitemFromCSBX 239 mov bx, g_MenuitemMasterSlaveUserLBA 240 jmp .EnableMenuitemFromCSBX 241 242 ALIGN JUMP_ALIGN 243 .EnableCHSandDisableLBA: 244 mov bx, g_MenuitemMasterSlaveUserCHS 245 call .EnableMenuitemFromCSBX 246 mov bx, g_MenuitemMasterSlaveUserLBA 247 jmp .DisableMenuitemFromCSBX 248 249 ALIGN JUMP_ALIGN 250 .DisableCHSandEnableLBA: 251 mov bx, g_MenuitemMasterSlaveUserLBA 252 call .EnableMenuitemFromCSBX 253 mov bx, g_MenuitemMasterSlaveUserCHS 254 jmp .DisableMenuitemFromCSBX 255 148 256 149 257 ;-------------------------------------------------------------------- … … 162 270 test ax, FLG_DRVPARAMS_USERCHS 163 271 jz SHORT .DisableCHandS 272 test ax, FLG_DRVPARAMS_USERLBA 273 jnz SHORT .DisableCHandS 164 274 165 275 mov bx, g_MenuitemMasterSlaveCylinders … … 168 278 call .EnableMenuitemFromCSBX 169 279 mov bx, g_MenuitemMasterSlaveSectors 170 call .EnableMenuitemFromCSBX 171 ret 280 jmp SHORT .EnableMenuitemFromCSBX 172 281 173 282 ALIGN JUMP_ALIGN … … 178 287 call .DisableMenuitemFromCSBX 179 288 mov bx, g_MenuitemMasterSlaveSectors 180 call .DisableMenuitemFromCSBX 181 ret 289 jmp SHORT .DisableMenuitemFromCSBX 290 291 292 ;-------------------------------------------------------------------- 293 ; .EnableOrDisableUserLbaValue 294 ; Parameters: 295 ; SS:BP: Menu handle 296 ; Returns: 297 ; Nothing 298 ; Corrupts registers: 299 ; AX, BX 300 ;-------------------------------------------------------------------- 301 ALIGN JUMP_ALIGN 302 .EnableOrDisableUserLbaValue: 303 mov bx, [cs:g_MenuitemMasterSlaveUserLBA+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset] 304 call Buffers_GetRomvarsValueToAXfromOffsetInBX 305 mov bx, g_MenuitemMasterSlaveUserLbaValue 306 test ax, FLG_DRVPARAMS_USERCHS 307 jnz SHORT .DisableMenuitemFromCSBX 308 test ax, FLG_DRVPARAMS_USERLBA 309 jz SHORT .DisableMenuitemFromCSBX 310 jmp SHORT .EnableMenuitemFromCSBX 311 182 312 183 313 ;-------------------------------------------------------------------- … … 200 330 and BYTE [cs:bx+MENUITEM.bFlags], ~FLG_MENUITEM_VISIBLE 201 331 ret 332 333 334 ;-------------------------------------------------------------------- 335 ; MENUITEM value reader functions 336 ; Parameters: 337 ; AX: Value from MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset 338 ; DS:SI: Ptr to MENUITEM 339 ; ES:DI: Ptr to value variable 340 ; Returns: 341 ; AX: Value with possible modifications 342 ; Corrupts registers: 343 ; Nothing 344 ;-------------------------------------------------------------------- 345 ALIGN JUMP_ALIGN 346 ValueReaderForUserLbaValue: 347 mov ax, [es:di+2] ; SHR 16 348 eSHIFT_IM ax, 4, shr ; SHR 16 + 4 = 20 349 ret 350 351 352 ;-------------------------------------------------------------------- 353 ; MENUITEM value writer functions 354 ; Parameters: 355 ; AX: Value to be written to MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset 356 ; DS:SI: Ptr to MENUITEM 357 ; ES:DI: Ptr to value variable 358 ; Returns: 359 ; AX: Value to be stored 360 ; Corrupts registers: 361 ; Nothing 362 ;-------------------------------------------------------------------- 363 ALIGN JUMP_ALIGN 364 ValueWriterForUserLbaValue: 365 eSHIFT_IM ax, 4, shl 366 mov [es:di+2], ax 367 xor ax, ax ; Store zero to [es:di] 368 ret
Note:
See TracChangeset
for help on using the changeset viewer.