Changeset 286 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS_Configurator_v2/Src
- Timestamp:
- Mar 1, 2012, 8:52:08 PM (13 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS_Configurator_v2/Src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menuitem.asm
r233 r286 76 76 ; DS:SI: Ptr to MENUITEM 77 77 ; Returns: 78 ; Nothing 78 ; CF: Cleared if value inputted 79 ; Set if user cancellation 79 80 ; Corrupts registers: 80 81 ; AX, BX, CX, SI, DI, ES … … 97 98 pop di 98 99 99 cmp BYTE [si+WORD_DIALOG_IO.bUserCancellation], TRUE 100 mov cl, [si+WORD_DIALOG_IO.bUserCancellation] 101 cmp cl, TRUE 100 102 je SHORT .NothingToChange 101 103 mov ax, [si+WORD_DIALOG_IO.wReturnWord] … … 104 106 .NothingToChange: 105 107 add sp, BYTE WORD_DIALOG_IO_size 108 shr cl, 1 106 109 ret 107 110 … … 150 153 add di, [si+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset] 151 154 jmp [cs:bx+.rgfnJumpToStoreValueBasedOnItemType] 155 .InvalidItemType: 156 ret 152 157 153 158 ALIGN WORD_ALIGN … … 174 179 ALIGN JUMP_ALIGN 175 180 .StoreMultichoiceValueFromAXtoESDIwithItemInDSSI: 181 test BYTE [si+MENUITEM.bFlags], FLG_MENUITEM_MASKVALUE 182 jnz SHORT .ClearBitsUsingMask 176 183 test BYTE [si+MENUITEM.bFlags], FLG_MENUITEM_FLAGVALUE 177 184 jz SHORT .TranslateChoiceToValueUsingLookupTable … … 187 194 or [es:di], ax 188 195 jmp SHORT .SetUnsavedChanges 196 197 ALIGN JUMP_ALIGN 198 .ClearBitsUsingMask: 199 mov bx, [si+MENUITEM.itemValue+ITEM_VALUE.wValueBitmask] 200 not bx 201 and [es:di], bx 202 ; Fall to .TranslateChoiceToValueUsingLookupTable 203 189 204 190 205 ALIGN JUMP_ALIGN … … 225 240 .NoWriter: 226 241 pop bx 242 test BYTE [si+MENUITEM.bFlags], FLG_MENUITEM_MASKVALUE 243 jz SHORT .StoreByteOrWord 244 or [es:di], ax 245 jmp SHORT .SetUnsavedChanges 246 247 .StoreByteOrWord: 227 248 test BYTE [si+MENUITEM.bFlags], FLG_MENUITEM_BYTEVALUE 228 249 jnz SHORT .StoreByteFromAL 229 250 230 251 mov [es:di+1], ah 231 252 ALIGN JUMP_ALIGN … … 255 276 CALL_MENU_LIBRARY GetHighlightedItemToAX 256 277 CALL_MENU_LIBRARY RefreshItemFromAX 257 .InvalidItemType:258 278 ret 259 279 … … 306 326 pop es 307 327 328 test BYTE [si+MENUITEM.bFlags], FLG_MENUITEM_MASKVALUE 329 jz SHORT .TestIfFlagValue 330 and ax, [si+MENUITEM.itemValue+ITEM_VALUE.wValueBitmask] 331 ret 332 333 .TestIfFlagValue: 308 334 test BYTE [si+MENUITEM.bFlags], FLG_MENUITEM_FLAGVALUE 309 335 jz SHORT .Return -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/MenuitemPrint.asm
r233 r286 233 233 mov bx, 10 234 234 CALL_DISPLAY_LIBRARY PrintWordFromAXwithBaseInBX 235 jmp SHORT FinishPrintingUnsignedOrHexValue235 jmp SHORT MenuitemPrint_FinishPrintingUnsignedOrHexValue 236 236 237 237 ;-------------------------------------------------------------------- … … 258 258 CALL_DISPLAY_LIBRARY PrintCharacterFromAL 259 259 ALIGN JUMP_ALIGN 260 FinishPrintingUnsignedOrHexValue:260 MenuitemPrint_FinishPrintingUnsignedOrHexValue: 261 261 CALL_DISPLAY_LIBRARY GetCharacterPointerToBXAX 262 262 xchg bx, ax -
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 -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm
r282 r286 155 155 g_szMultichoiceCfgDevice: 156 156 db "8-bit dual port (XTIDE)",LF 157 db "XTIDE mod by Chuck(G)",LF157 db "XTIDE mod (A0<->A3)",LF 158 158 db "8-bit single port",LF 159 159 db "16-bit standard IDE",LF 160 160 db "32-bit generic IDE",LF 161 db "Serial port virtual device",NULL 161 db "Serial port virtual device",LF 162 db "JR-IDE/ISA",NULL 162 163 163 164 g_szSerialCOMChoice: … … 211 212 212 213 g_szValueCfgDeviceDual8b: db "XTIDE",NULL 213 g_szValueCfgDeviceMod: db " Chuck(G)",NULL214 g_szValueCfgDeviceMod: db "XTIDEmod",NULL 214 215 g_szValueCfgDeviceSingle8b: db "8-bit",NULL 215 216 g_szValueCfgDevice16b: db "16-bit",NULL 216 217 g_szValueCfgDevice32b: db "32-bit",NULL 217 218 g_szValueCfgDeviceSerial: db "Serial",NULL 219 g_szValueCfgDeviceJrIdeIsa: db "JR-ISA",NULL 218 220 219 221 … … 221 223 g_szItemDrvBackToIde: db "Back to IDE Controller Menu",NULL 222 224 g_szItemDrvBlockMode: db "Block Mode Transfers",NULL 225 g_szItemDrvWriteCache: db "Internal Write Cache",NULL 223 226 g_szItemDrvUserCHS: db "User specified CHS",NULL 224 227 g_szItemDrvCyls: db "Cylinders",NULL 225 228 g_szItemDrvHeads: db "Heads",NULL 226 229 g_szItemDrvSect: db "Sectors per track",NULL 230 g_szItemDrvUserLBA: db "User specified LBA",NULL 231 g_szItemDrvLbaSectors: db "Millions of sectors",NULL 227 232 228 233 g_szDlgDrvBlockMode: db "Enable Block Mode Transfers?",NULL 234 g_szDlgDrvWriteCache: db "Select hard drive internal write cache settings.",NULL 229 235 g_szDlgDrvUserCHS: db "Specify (P-)CHS parameters manually?",NULL 230 236 g_szDlgDrvCyls: db "Enter number of P-CHS cylinders (1...16383).",NULL 231 237 g_szDlgDrvHeads: db "Enter number of P-CHS heads (1...16).",NULL 232 238 g_szDlgDrvSect: db "Enter number of sectors per track (1...63).",NULL 239 g_szDlgDrvUserLBA: db "Limit drive capacity?",NULL 240 g_szDlgDrvLbaSectors: db "Enter maximum capacity in millions of sectors (16...256).",NULL 233 241 234 242 g_szNfoDrvBlockMode: db "Transfer multiple sectors per data request.",NULL 243 g_szNfoDrvWriteCache: db "Hard Drive Internal Write Cache settings (WARNING!).",NULL 235 244 g_szNfoDrvUserCHS: db "Specify (P-)CHS parameters manually instead of autodetecting them.",NULL 236 245 g_szNfoDrvCyls: db "Number of user specified P-CHS cylinders.",NULL 237 246 g_szNfoDrvHeads: db "Number of user specified P-CHS heads.",NULL 238 247 g_szNfoDrvSect: db "Number of user specified P-CHS sectors per track.",NULL 248 g_szNfoDrvUserLBA: db "Limit drive capacity to X million sectors.",NULL 249 g_szNfoDrvLbaSectors: db "Millions of sectors (1024*1024). 1M sectors = 512 MiB.",NULL 239 250 240 251 g_szHelpDrvBlockMode: incbin "Drive_BlockMode.txt" 241 252 db NULL 253 g_szHelpDrvWriteCache: incbin "Drive_WriteCache.txt" 254 db NULL 242 255 g_szHelpDrvUserCHS: incbin "Drive_UserCHS.txt" 243 256 db NULL 257 g_szHelpDrvUserLBA: incbin "Drive_UserLBA.txt" 258 db NULL 259 260 g_szMultichoiseWrCache: db "Drive Default",LF 261 db "Disable Write Cache",LF 262 db "Enable Write Cache",NULL 263 264 g_szValueDrvWrCaDis: db "Disabled",NULL 265 g_szValueDrvWrCaEn: db "Enabled",NULL 244 266 245 267
Note:
See TracChangeset
for help on using the changeset viewer.