- Timestamp:
- Nov 19, 2010, 10:59:52 AM (14 years ago)
- google:author:
- aitotat
- Location:
- trunk/XTIDE_Universal_BIOS_Configurator_v2
- Files:
-
- 2 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/MenuCfg.inc
r57 r59 2 2 ; Project name : XTIDE Universal BIOS Configurator v2 3 3 ; Created date : 5.10.2010 4 ; Last update : 5.10.20104 ; Last update : 18.10.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Menu configuration. … … 14 14 15 15 16 KEY_BACK_TO_PREVIOUS_MENU EQU ESC 16 17 KEY_DISPLAY_ITEM_HELP EQU 3Bh ; F1 17 18 -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/MenuStructs.inc
r57 r59 2 2 ; Project name : XTIDE Universal BIOS Configurator v2 3 3 ; Created date : 5.10.2010 4 ; Last update : 2.11.20104 ; Last update : 18.11.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Menu page and item structs. … … 10 10 struc MENUPAGE 11 11 .fnEnter resb 2 ; Function to initialize MENUPAGE 12 .fnBack resb 2 ; Function to initialize previous MENUPAGE 12 13 .wMenuitems resb 2 ; Number of MENUITEM structs 13 14 .rgMenuitem: ; All MENUITEM structs in this MENUPAGE … … 32 33 FLG_MENUITEM_FLAGVALUE EQU (1<<2) ; Item value is single bit 33 34 FLG_MENUITEM_BYTEVALUE EQU (1<<3) ; Item value is single byte 35 FLG_MENUITEM_PROGRAMVAR EQU (1<<4) ; Item is for configuring program, not BIOS 34 36 35 37 ; Values for MENUITEM.bType -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/Variables.inc
r57 r59 2 2 ; Project name : XTIDE Univeral BIOS Configurator v2 3 3 ; Created date : 5.10.2010 4 ; Last update : 1 .11.20104 ; Last update : 19.11.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Global variables for configuration program. … … 22 22 .wImageSize resb 2 ; Size in bytes for BIOS image to be flashed (0=65536) 23 23 .wEepromSegment resb 2 ; Segment where EEPROM is located 24 .bPageSize resb 1 ; EEPROM page size in bytes 24 .bEepromType resb 1 ; EEPROM type 25 .bEepromPageSize resb 1 ; EEPROM page size in bytes 25 26 .bSdpCommand resb 1 ; Command for Software Data Protection 27 resb 1 26 28 .szOpenedFile resb FILENAME_BUFFER_SIZE 27 29 .flashVars resb FLASHVARS_size … … 34 36 FLG_CFGVARS_CHECKSUM EQU (1<<3) ; Generate checksum byte 35 37 36 ; SDP command for CFGVARS.bSdpCommand 37 CMD_SDP_NONE EQU (0<<1) ; Do not use any SDP command 38 CMD_SDP_ENABLE EQU (1<<1) ; Flash with SDP enable command 39 CMD_SDP_DISABLE EQU (2<<1) ; Flash with SDP disable command 38 ; EEPROM types 39 struc EEPROM_TYPE 40 .2816_2kiB resb 2 41 .2832_4kiB resb 2 42 .2864_8kiB resb 2 43 .28128_16kiB resb 2 44 .28256_32kiB resb 2 45 .28512_64kiB resb 2 46 endstruc 47 48 ; Software Data Protection commands 49 struc SDP_COMMAND 50 .none resb 2 ; Do not use any SDP command 51 .enable resb 2 ; Flash with SDP enable command 52 .disable resb 2 ; Flash with SDP disable command 53 endstruc 54 55 ; Page sizes 56 struc EEPROM_PAGE_SIZE 57 .1_byte resb 2 58 .2_bytes resb 2 59 .4_bytes resb 2 60 .8_bytes resb 2 61 .16_bytes resb 2 62 .32_bytes resb 2 63 .64_bytes resb 2 64 endstruc 40 65 41 66 ; Default CFGVARS settings 42 67 DEFAULT_CFGVARS_FLAGS EQU FLG_CFGVARS_CHECKSUM 43 68 DEFAULT_EEPROM_SEGMENT EQU 0D000h 44 DEFAULT_PAGE_SIZE EQU 145 DEFAULT_SDP_COMMAND EQU CMD_SDP_ENABLE69 DEFAULT_PAGE_SIZE EQU EEPROM_PAGE_SIZE.1_byte 70 DEFAULT_SDP_COMMAND EQU SDP_COMMAND.enable 46 71 47 72 -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Buffers.asm
r57 r59 2 2 ; Project name : XTIDE Universal BIOS Configurator v2 3 3 ; Created date : 6.10.2010 4 ; Last update : 1 0.10.20104 ; Last update : 19.11.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Functions for accessing file and flash buffers. … … 181 181 182 182 ;-------------------------------------------------------------------- 183 ; Buffers_SaveChangesIfFileLoaded 184 ; Parameters: 185 ; Nothing 186 ; Returns: 187 ; Nothing 188 ; Corrupts registers: 189 ; AX, BX, CX, SI, DI 190 ;-------------------------------------------------------------------- 191 ALIGN JUMP_ALIGN 192 Buffers_SaveChangesIfFileLoaded: 193 mov ax, [cs:g_cfgVars+CFGVARS.wFlags] 194 and ax, BYTE (FLG_CFGVARS_FILELOADED | FLG_CFGVARS_UNSAVED) 195 cmp ax, BYTE (FLG_CFGVARS_FILELOADED | FLG_CFGVARS_UNSAVED) 196 jne SHORT .NothingToSave 197 call Dialogs_DisplaySaveChangesDialog 198 jnz SHORT .NothingToSave 199 jmp BiosFile_SaveUnsavedChanges 200 ALIGN JUMP_ALIGN 201 .NothingToSave: 202 ret 203 204 205 ;-------------------------------------------------------------------- 183 206 ; Buffers_GenerateChecksum 184 207 ; Parameters: … … 210 233 211 234 ;-------------------------------------------------------------------- 235 ; Buffers_GetRomvarsFlagsToAX 236 ; Parameters: 237 ; Nothing 238 ; Returns: 239 ; AX: ROMVARS.wFlags 240 ; Corrupts registers: 241 ; BX 242 ;-------------------------------------------------------------------- 243 ALIGN JUMP_ALIGN 244 Buffers_GetRomvarsFlagsToAX: 245 mov bx, ROMVARS.wFlags 246 ; Fall to Buffers_GetRomvarsValueToAXfromOffsetInBX 247 248 ;-------------------------------------------------------------------- 212 249 ; Buffers_GetRomvarsValueToAXfromOffsetInBX 213 250 ; Parameters: … … 241 278 ALIGN JUMP_ALIGN 242 279 Buffers_GetFileDialogItemBufferToESDI: 280 call Buffers_GetFileBufferToESDI 281 push di 282 mov di, es 283 add di, 1000h ; Third 64k page 284 mov es, di 285 pop di 286 ret 243 287 Buffers_GetFileBufferToESDI: 244 288 mov di, cs -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Dialogs.asm
r57 r59 2 2 ; Project name : XTIDE Univeral BIOS Configurator v2 3 3 ; Created date : 10.10.2010 4 ; Last update : 1 0.10.20104 ; Last update : 19.11.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Functions for displaying dialogs. … … 80 80 ret 81 81 82 ;--------------------------------------------------------------------83 ; InitializeDialogInputFromDSSI84 ; Parameters:85 ; DS:SI: Ptr to DIALOG_INPUT86 ; Returns:87 ; Nothing88 ; Corrupts registers:89 ; Nothing90 ;--------------------------------------------------------------------91 ALIGN JUMP_ALIGN92 InitializeDialogInputFromDSSI:93 mov [si+DIALOG_INPUT.fszTitle+2], cs94 mov [si+DIALOG_INPUT.fszItems+2], cs95 mov WORD [si+DIALOG_INPUT.fszInfo], g_szGenericDialogInfo96 mov [si+DIALOG_INPUT.fszInfo+2], cs97 ret98 99 82 100 83 ;-------------------------------------------------------------------- … … 124 107 pop es 125 108 ret 109 110 111 ;-------------------------------------------------------------------- 112 ; Dialogs_DisplayQuitDialog 113 ; Dialogs_DisplaySaveChangesDialog 114 ; Parameters: 115 ; Nothing 116 ; Returns: 117 ; ZF: Set if user wants to do the action 118 ; Cleared if user wants to cancel 119 ; Corrupts registers: 120 ; AX, CX 121 ;-------------------------------------------------------------------- 122 ALIGN JUMP_ALIGN 123 Dialogs_DisplayQuitDialog: 124 push ds 125 126 mov cx, DIALOG_INPUT_size 127 call Memory_ReserveCXbytesFromStackToDSSI 128 call InitializeDialogInputFromDSSI 129 mov WORD [si+DIALOG_INPUT.fszTitle], g_szDlgExitToDos 130 mov WORD [si+DIALOG_INPUT.fszItems], g_szMultichoiseBooleanFlag 131 CALL_MENU_LIBRARY GetSelectionToAXwithInputInDSSI 132 add sp, BYTE DIALOG_INPUT_size 133 cmp ax, BYTE 1 ; 1 = YES 134 135 pop ds 136 ret 137 138 139 ALIGN JUMP_ALIGN 140 Dialogs_DisplaySaveChangesDialog: 141 push ds 142 143 mov cx, DIALOG_INPUT_size 144 call Memory_ReserveCXbytesFromStackToDSSI 145 call InitializeDialogInputFromDSSI 146 mov WORD [si+DIALOG_INPUT.fszTitle], g_szDlgSaveChanges 147 mov WORD [si+DIALOG_INPUT.fszItems], g_szMultichoiseBooleanFlag 148 CALL_MENU_LIBRARY GetSelectionToAXwithInputInDSSI 149 add sp, BYTE DIALOG_INPUT_size 150 cmp ax, BYTE 1 ; 1 = YES 151 152 pop ds 153 ret 154 155 156 ;-------------------------------------------------------------------- 157 ; InitializeDialogInputFromDSSI 158 ; Parameters: 159 ; DS:SI: Ptr to DIALOG_INPUT 160 ; Returns: 161 ; Nothing 162 ; Corrupts registers: 163 ; Nothing 164 ;-------------------------------------------------------------------- 165 ALIGN JUMP_ALIGN 166 InitializeDialogInputFromDSSI: 167 mov [si+DIALOG_INPUT.fszTitle+2], cs 168 mov [si+DIALOG_INPUT.fszItems+2], cs 169 mov WORD [si+DIALOG_INPUT.fszInfo], g_szGenericDialogInfo 170 mov [si+DIALOG_INPUT.fszInfo+2], cs 171 ret -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Main.asm
r57 r59 2 2 ; Project name : XTIDE Univeral BIOS Configurator v2 3 3 ; Created date : 5.10.2010 4 ; Last update : 3.11.20104 ; Last update : 19.11.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Program start and exit. … … 39 39 %include "Strings.asm" 40 40 41 %include "BootMenuSettingsMenu.asm" 41 42 %include "ConfigurationMenu.asm" 43 %include "FlashMenu.asm" 42 44 %include "IdeControllerMenu.asm" 43 45 %include "MainMenu.asm" … … 91 93 g_cfgVars: 92 94 istruc CFGVARS 93 at CFGVARS.pMenupage, dw g_MenupageForMainMenu94 at CFGVARS.wFlags, dw DEFAULT_CFGVARS_FLAGS95 at CFGVARS.wEepromSegment, dw DEFAULT_EEPROM_SEGMENT96 at CFGVARS.b PageSize,db DEFAULT_PAGE_SIZE97 at CFGVARS.bSdpCommand, db DEFAULT_SDP_COMMAND95 at CFGVARS.pMenupage, dw g_MenupageForMainMenu 96 at CFGVARS.wFlags, dw DEFAULT_CFGVARS_FLAGS 97 at CFGVARS.wEepromSegment, dw DEFAULT_EEPROM_SEGMENT 98 at CFGVARS.bEepromPageSize, db DEFAULT_PAGE_SIZE 99 at CFGVARS.bSdpCommand, db DEFAULT_SDP_COMMAND 98 100 iend 99 101 -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/MenuEvents.asm
r57 r59 2 2 ; Project name : XTIDE Universal BIOS Configurator v2 3 3 ; Created date : 5.10.2010 4 ; Last update : 6.10.20104 ; Last update : 18.10.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Menu event handling. … … 20 20 ALIGN JUMP_ALIGN 21 21 MenuEvents_DisplayMenu: 22 mov ax, g_MenupageForMainMenu23 mov dx, ds24 22 mov bx, MenuEventHandler 25 23 CALL_MENU_LIBRARY DisplayWithHandlerInBXandUserDataInDXAX … … 88 86 ; Parameters: 89 87 ; None 88 ; Returns: 89 ; CF: Set to exit menu 90 ; Clear to cancel exit 90 91 ALIGN JUMP_ALIGN 91 92 .ExitMenu: 93 call Menupage_GetActiveMenupageToDSDI 94 mov si, [di+MENUPAGE.fnBack] 95 cmp si, ExitToDos 96 je SHORT .QuitProgram 97 call si ; Back to previous menu 98 clc 99 ret 100 101 ALIGN JUMP_ALIGN 102 .QuitProgram: 103 call Dialogs_DisplayQuitDialog 104 jz SHORT .ExitToDOS 105 clc 106 ret 107 .ExitToDOS: 108 call Buffers_SaveChangesIfFileLoaded 92 109 stc 93 110 ret … … 122 139 .KeyStrokeInAX: 123 140 cmp ah, KEY_DISPLAY_ITEM_HELP 124 jne SHORT .EventNotHandled 125 141 je SHORT .DisplayHelp 142 jmp SHORT .EventNotHandled 143 144 ALIGN JUMP_ALIGN 145 .DisplayHelp: 126 146 call Menupage_GetActiveMenupageToDSDI 127 147 CALL_MENU_LIBRARY GetHighlightedItemToAX -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menuitem.asm
r57 r59 2 2 ; Project name : XTIDE Universal BIOS Configurator v2 3 3 ; Created date : 5.10.2010 4 ; Last update : 2.11.20104 ; Last update : 19.11.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Functions for accessing MENUITEM structs. … … 8 8 ; Section containing code 9 9 SECTION .text 10 11 ;--------------------------------------------------------------------12 ; Menuitem_SetVisibleFromDSSI13 ; Menuitem_SetInvisibleFromDSSI14 ; Parameters:15 ; DS:SI: Ptr to MENUITEM16 ; Returns: (Menuitem_IsVisibleFromDSSI only)17 ; ZF: Clear if visible18 ; Set if not visible19 ; Corrupts registers:20 ; Nothing21 ;--------------------------------------------------------------------22 ALIGN JUMP_ALIGN23 Menuitem_SetVisibleFromDSSI:24 or BYTE [si+MENUITEM.bFlags], FLG_MENUITEM_VISIBLE25 ret26 27 ALIGN JUMP_ALIGN28 Menuitem_SetInvisibleFromDSSI:29 and BYTE [si+MENUITEM.bFlags], ~FLG_MENUITEM_VISIBLE30 ret31 32 10 33 11 ;-------------------------------------------------------------------- … … 173 151 ja SHORT .InvalidItemType 174 152 175 call Buffers_GetFileBufferToESDI153 call GetConfigurationBufferToESDIforMenuitemInDSSI 176 154 add di, [si+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset] 177 155 jmp [cs:bx+.rgfnJumpToStoreValueBasedOnItemType] … … 259 237 ALIGN JUMP_ALIGN 260 238 .SetUnsavedChanges: 239 test BYTE [si+MENUITEM.bFlags], FLG_MENUITEM_PROGRAMVAR 240 jnz SHORT .NoUnsavedChangesForProgramVariables 261 241 call Buffers_SetUnsavedChanges 242 .NoUnsavedChangesForProgramVariables: 262 243 test BYTE [si+MENUITEM.bFlags], FLG_MENUITEM_MODIFY_MENU 263 244 jnz SHORT .ModifyItemVisibility … … 291 272 ALIGN JUMP_ALIGN 292 273 Menuitem_GetValueToAXfromMenuitemInDSSI: 293 mov bx, [si+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset] 294 call Buffers_GetRomvarsValueToAXfromOffsetInBX 274 call .GetMenuitemValueToAX 295 275 test BYTE [si+MENUITEM.bFlags], FLG_MENUITEM_BYTEVALUE 296 276 jnz SHORT .ConvertWordToByteValue … … 300 280 301 281 ALIGN JUMP_ALIGN 282 .GetMenuitemValueToAX: 283 push es 284 push di 285 call GetConfigurationBufferToESDIforMenuitemInDSSI 286 add di, [si+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset] 287 mov ax, [es:di] 288 pop di 289 pop es 290 ret 291 292 ALIGN JUMP_ALIGN 302 293 .ConvertWordToByteValue: 303 294 xor ah, ah … … 314 305 mov ax, TRUE<<1 ; Shift for lookup 315 306 ret 307 308 309 ;-------------------------------------------------------------------- 310 ; GetConfigurationBufferToESDIforMenuitemInDSSI 311 ; Parameters: 312 ; DS:SI: Ptr to MENUITEM 313 ; Returns: 314 ; ES:DI: Ptr to configuration buffer 315 ; Corrupts registers: 316 ; Nothing 317 ;-------------------------------------------------------------------- 318 ALIGN JUMP_ALIGN 319 GetConfigurationBufferToESDIforMenuitemInDSSI: 320 test BYTE [si+MENUITEM.bFlags], FLG_MENUITEM_PROGRAMVAR 321 jnz SHORT .ReturnCfgvarsInESDI 322 jmp Buffers_GetFileBufferToESDI 323 ALIGN JUMP_ALIGN 324 .ReturnCfgvarsInESDI: 325 push cs 326 pop es 327 mov di, g_cfgVars 328 ret -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/MenuitemPrint.asm
r57 r59 139 139 pop si 140 140 ret 141 141 142 143 ;-------------------------------------------------------------------- 144 ; MenuitemPrint_WriteLookupValueStringToBufferInESDIfromUnshiftedItemInDSSI 145 ; MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI 146 ; Parameters: 147 ; DS:SI: Ptr to MENUITEM 148 ; ES:DI: Ptr to destination buffer 149 ; Returns: 150 ; DI: Updated 151 ; Corrupts registers: 152 ; AX, BX, CX 153 ;-------------------------------------------------------------------- 154 ALIGN JUMP_ALIGN 155 MenuitemPrint_WriteLookupValueStringToBufferInESDIfromUnshiftedItemInDSSI: 156 call Menuitem_GetValueToAXfromMenuitemInDSSI 157 shl ax, 1 158 jmp SHORT PrintLookupValueFromAXtoBufferInESDI 159 160 ALIGN JUMP_ALIGN 161 MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI: 162 call Menuitem_GetValueToAXfromMenuitemInDSSI 163 ; Fall to PrintLookupValueFromAXtoBufferInESDI 142 164 143 165 ;-------------------------------------------------------------------- 144 166 ; MenuitemPrint_WriteLookupValueStringToBufferInESDIfromItemInDSSI 145 167 ; Parameters: 146 ; DS:SI: Ptr to MENUITEM 147 ; ES:DI: Ptr to destination buffer 148 ; Returns: 149 ; DI: Updated 150 ; Corrupts registers: 151 ; AX, BX, CX 152 ;-------------------------------------------------------------------- 153 ALIGN JUMP_ALIGN 154 MenuitemPrint_WriteLookupValueStringToBufferInESDIfromItemInDSSI: 155 push si 156 157 call Menuitem_GetValueToAXfromMenuitemInDSSI 168 ; AX: Value to print 169 ; DS:SI: Ptr to MENUITEM 170 ; ES:DI: Ptr to destination buffer 171 ; Returns: 172 ; DI: Updated 173 ; Corrupts registers: 174 ; AX, BX, CX 175 ;-------------------------------------------------------------------- 176 ALIGN JUMP_ALIGN 177 PrintLookupValueFromAXtoBufferInESDI: 178 push si 158 179 add ax, [si+MENUITEM.itemValue+ITEM_VALUE.rgszValueToStringLookup] 159 180 xchg bx, ax 160 181 mov si, [bx] 161 182 call String_CopyDSSItoESDIandGetLengthToCX 162 163 183 pop si 164 184 ret -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/ConfigurationMenu.asm
r57 r59 2 2 ; Project name : XTIDE Universal BIOS Configurator v2 3 3 ; Created date : 24.10.2010 4 ; Last update : 3.11.20104 ; Last update : 18.11.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : "Configure XTIDE Universal BIOS" menu structs and functions. … … 13 13 istruc MENUPAGE 14 14 at MENUPAGE.fnEnter, dw ConfigurationMenu_EnterMenuOrModifyItemVisibility 15 at MENUPAGE.fnBack, dw MainMenu_EnterMenuOrModifyItemVisibility 15 16 at MENUPAGE.wMenuitems, dw 11 16 17 iend … … 78 79 g_MenuitemConfigurationBootMenuSettings: 79 80 istruc MENUITEM 80 at MENUITEM.fnActivate, dw BootMenuSettings 81 at MENUITEM.fnActivate, dw BootMenuSettingsMenu_EnterMenuOrModifyItemVisibility 81 82 at MENUITEM.szName, dw g_szItemCfgBootMenu 82 83 at MENUITEM.szQuickInfo, dw g_szNfoCfgBootMenu … … 89 90 istruc MENUITEM 90 91 at MENUITEM.fnActivate, dw Menuitem_ActivateMultichoiseSelectionForMenuitemInDSSI 91 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteLookupValueStringToBufferInESDIfrom ItemInDSSI92 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI 92 93 at MENUITEM.szName, dw g_szItemCfgBootLoader 93 94 at MENUITEM.szQuickInfo, dw g_szNfoCfgBootLoader 94 95 at MENUITEM.szHelp, dw g_szNfoCfgBootLoader 95 at MENUITEM.bFlags, db FLG_MENUITEM_VISIBLE | FLG_MENUITEM_ BYTEVALUE96 at MENUITEM.bFlags, db FLG_MENUITEM_VISIBLE | FLG_MENUITEM_MODIFY_MENU | FLG_MENUITEM_BYTEVALUE 96 97 at MENUITEM.bType, db TYPE_MENUITEM_MULTICHOISE 97 98 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw ROMVARS.bBootLdrType … … 105 106 istruc MENUITEM 106 107 at MENUITEM.fnActivate, dw Menuitem_ActivateMultichoiseSelectionForMenuitemInDSSI 107 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteLookupValueStringToBufferInESDIfrom ItemInDSSI108 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI 108 109 at MENUITEM.szName, dw g_szItemCfgFullMode 109 110 at MENUITEM.szQuickInfo, dw g_szNfoCfgFullMode … … 178 179 call .DisableAllIdeControllerMenuitems 179 180 call .EnableIdeControllerMenuitemsBasedOnConfiguration 181 call .EnableOrDisableBootMenuSettings 180 182 call .EnableOrDisableKiBtoStealFromRAM 181 183 call .EnableOrDisableIdeControllerCount … … 229 231 ALIGN JUMP_ALIGN 230 232 .GetIdeControllerCountToCX: 231 mov bx, ROMVARS.wFlags 232 call Buffers_GetRomvarsValueToAXfromOffsetInBX 233 call Buffers_GetRomvarsFlagsToAX 233 234 test ax, FLG_ROMVARS_FULLMODE 234 235 jz SHORT .AllowOnlyOneIdeControllerInLiteMode … … 243 244 ret 244 245 246 247 ;-------------------------------------------------------------------- 248 ; .EnableOrDisableBootMenuSettings 249 ; Parameters: 250 ; SS:BP: Menu handle 251 ; Returns: 252 ; Nothing 253 ; Corrupts registers: 254 ; AX, BX, CX 255 ;-------------------------------------------------------------------- 256 ALIGN JUMP_ALIGN 257 .EnableOrDisableBootMenuSettings: 258 mov bx, ROMVARS.bBootLdrType 259 call Buffers_GetRomvarsValueToAXfromOffsetInBX 260 mov bx, g_MenuitemConfigurationBootMenuSettings 261 cmp ax, BYTE BOOTLOADER_TYPE_MENU 262 jne SHORT .DisableMenuitemFromCSBX 263 jmp SHORT .EnableMenuitemFromCSBX 264 265 245 266 ;-------------------------------------------------------------------- 246 267 ; .EnableOrDisableKiBtoStealFromRAM … … 254 275 ALIGN JUMP_ALIGN 255 276 .EnableOrDisableKiBtoStealFromRAM: 256 mov bx, ROMVARS.wFlags 257 call Buffers_GetRomvarsValueToAXfromOffsetInBX 277 call Buffers_GetRomvarsFlagsToAX 258 278 mov bx, g_MenuitemConfigurationKiBtoStealFromRAM 259 279 test ax, FLG_ROMVARS_FULLMODE … … 272 292 ALIGN JUMP_ALIGN 273 293 .EnableOrDisableIdeControllerCount: 274 mov bx, ROMVARS.wFlags 275 call Buffers_GetRomvarsValueToAXfromOffsetInBX 294 call Buffers_GetRomvarsFlagsToAX 276 295 mov bx, g_MenuitemConfigurationIdeControllers 277 296 test ax, FLG_ROMVARS_FULLMODE … … 339 358 call IdeControllerMenu_InitializeToIdevarsOffsetInBX 340 359 jmp IdeControllerMenu_EnterMenuOrModifyItemVisibility 341 342 343 ALIGN JUMP_ALIGN344 BootMenuSettings:345 ret -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/IdeControllerMenu.asm
r57 r59 2 2 ; Project name : XTIDE Universal BIOS Configurator v2 3 3 ; Created date : 2.11.2010 4 ; Last update : 3.11.20104 ; Last update : 18.11.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : "IDE Controller" menu structs and functions. … … 13 13 istruc MENUPAGE 14 14 at MENUPAGE.fnEnter, dw IdeControllerMenu_EnterMenuOrModifyItemVisibility 15 at MENUPAGE.fnBack, dw ConfigurationMenu_EnterMenuOrModifyItemVisibility 15 16 at MENUPAGE.wMenuitems, dw 8 16 17 iend … … 49 50 istruc MENUITEM 50 51 at MENUITEM.fnActivate, dw Menuitem_ActivateMultichoiseSelectionForMenuitemInDSSI 51 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteLookupValueStringToBufferInESDIfrom ItemInDSSI52 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI 52 53 at MENUITEM.szName, dw g_szItemIdeBusType 53 54 at MENUITEM.szQuickInfo, dw g_szNfoIdeBusType … … 95 96 istruc MENUITEM 96 97 at MENUITEM.fnActivate, dw Menuitem_ActivateMultichoiseSelectionForMenuitemInDSSI 97 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteLookupValueStringToBufferInESDIfrom ItemInDSSI98 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI 98 99 at MENUITEM.szName, dw g_szItemIdeEnIRQ 99 100 at MENUITEM.szQuickInfo, dw g_szNfoIdeEnIRQ -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/MainMenu.asm
r57 r59 2 2 ; Project name : XTIDE Universal BIOS Configurator v2 3 3 ; Created date : 6.10.2010 4 ; Last update : 2.11.20104 ; Last update : 19.11.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Main menu structs and functions. … … 13 13 istruc MENUPAGE 14 14 at MENUPAGE.fnEnter, dw MainMenu_EnterMenuOrModifyItemVisibility 15 at MENUPAGE.fnBack, dw ExitToDos 15 16 at MENUPAGE.wMenuitems, dw 6 16 17 iend … … 58 59 g_MenuitemMainMenuConfigureXtideUniversalBios: 59 60 istruc MENUITEM 60 at MENUITEM.fnActivate, dw Configur eXtideUniversalBios61 at MENUITEM.fnActivate, dw ConfigurationMenu_EnterMenuOrModifyItemVisibility 61 62 at MENUITEM.szName, dw g_szItemMainConfigure 62 63 at MENUITEM.szQuickInfo, dw g_szNfoMainConfigure … … 68 69 g_MenuitemMainMenuFlashEeprom: 69 70 istruc MENUITEM 70 at MENUITEM.fnActivate, dw Flash Eeprom71 at MENUITEM.fnActivate, dw FlashMenu_EnterMenuOrModifyItemVisibility 71 72 at MENUITEM.szName, dw g_szItemMainFlash 72 73 at MENUITEM.szQuickInfo, dw g_szNfoMainFlash … … 207 208 ALIGN JUMP_ALIGN 208 209 LoadBiosFromFile: 210 call Buffers_SaveChangesIfFileLoaded 209 211 mov cx, FILE_DIALOG_IO_size 210 212 call Memory_ReserveCXbytesFromStackToDSSI … … 223 225 ALIGN JUMP_ALIGN 224 226 LoadXtideUniversalBiosFromRom: 227 call Buffers_SaveChangesIfFileLoaded 225 228 call EEPROM_LoadXtideUniversalBiosFromRomToRamBuffer 226 229 mov ax, FLG_CFGVARS_ROMLOADED … … 235 238 ALIGN JUMP_ALIGN 236 239 LoadOldSettingsFromEeprom: 240 call Buffers_SaveChangesIfFileLoaded 237 241 call EEPROM_LoadOldSettingsFromRomToRamBuffer 238 242 and WORD [g_cfgVars+CFGVARS.wFlags], ~FLG_CFGVARS_UNSAVED … … 242 246 CALL_MENU_LIBRARY DisplayMessageWithInputInDSSI 243 247 ret 244 245 246 ALIGN JUMP_ALIGN247 ConfigureXtideUniversalBios:248 jmp ConfigurationMenu_EnterMenuOrModifyItemVisibility249 250 251 ALIGN JUMP_ALIGN252 FlashEeprom:253 ret -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/MasterSlaveMenu.asm
r57 r59 2 2 ; Project name : XTIDE Universal BIOS Configurator v2 3 3 ; Created date : 3.11.2010 4 ; Last update : 3.11.20104 ; Last update : 18.11.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : "Master/Slave Drive" menu structs and functions. … … 13 13 istruc MENUPAGE 14 14 at MENUPAGE.fnEnter, dw MasterSlaveMenu_EnterMenuOrModifyItemVisibility 15 at MENUPAGE.fnBack, dw IdeControllerMenu_EnterMenuOrModifyItemVisibility 15 16 at MENUPAGE.wMenuitems, dw 6 16 17 iend … … 29 30 istruc MENUITEM 30 31 at MENUITEM.fnActivate, dw Menuitem_ActivateMultichoiseSelectionForMenuitemInDSSI 31 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteLookupValueStringToBufferInESDIfrom ItemInDSSI32 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI 32 33 at MENUITEM.szName, dw g_szItemDrvBlockMode 33 34 at MENUITEM.szQuickInfo, dw g_szNfoDrvBlockMode … … 45 46 istruc MENUITEM 46 47 at MENUITEM.fnActivate, dw Menuitem_ActivateMultichoiseSelectionForMenuitemInDSSI 47 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteLookupValueStringToBufferInESDIfrom ItemInDSSI48 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI 48 49 at MENUITEM.szName, dw g_szItemDrvUserCHS 49 50 at MENUITEM.szQuickInfo, dw g_szNfoDrvUserCHS -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm
r57 r59 2 2 ; Project name : XTIDE Universal BIOS Configurator v2 3 3 ; Created date : 5.10.2010 4 ; Last update : 2.11.20104 ; Last update : 19.11.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : All strings. … … 23 23 ; Item formatting 24 24 g_szFormatItemWithoutValue: db "%c%s",NULL 25 g_szFormatItemNameWithValue: db "%2 6s%-9S",NULL25 g_szFormatItemNameWithValue: db "%25s%-10S",NULL 26 26 27 27 … … 31 31 db "No",LF 32 32 db "Yes",NULL 33 34 ; Exit messages 35 g_szDlgExitToDos: db "Exit to DOS?",NULL 36 g_szDlgSaveChanges: db "Do you want to save changes to XTIDE Universal BIOS image file?",NULL 33 37 34 38 … … 76 80 g_szItemCfgFullMode: db "Full operating mode",NULL 77 81 g_szItemCfgStealSize: db "kiB to steal from RAM",NULL 78 g_szItemCfgIdeCnt: db " Number ofIDE controllers",NULL82 g_szItemCfgIdeCnt: db "IDE controllers",NULL 79 83 80 84 g_szDlgCfgFullMode: db "Enable full operating mode?",NULL … … 86 90 g_szNfoCfgBootLoader: db "Boot loader selection for INT 19h.",NULL 87 91 g_szNfoCfgFullMode: db "Full mode supports multiple controllers and has more features.",NULL 88 g_szNfoCfgStealSize: db " Number of kiB of base memory to steal forBIOS variables.",NULL92 g_szNfoCfgStealSize: db "How many kiB's to steal from Conventional memory for XTIDE Universal BIOS variables.",NULL 89 93 g_szNfoCfgIdeCnt: db "Number of IDE controllers to manage.",NULL 90 94 … … 159 163 160 164 g_szNfoDrvBlockMode: db "Transfer multiple sectors per data request.",NULL 161 g_szNfoDrvUserCHS: db "Specify (P-)CHS manually instead of autodetect.",NULL165 g_szNfoDrvUserCHS: db "Specify (P-)CHS parameters manually instead of autodetecting them.",NULL 162 166 g_szNfoDrvCyls: db "Number of user specified P-CHS cylinders.",NULL 163 167 g_szNfoDrvHeads: db "Number of user specified P-CHS heads.",NULL … … 169 173 170 174 ; Strings for boot menu settings menu 171 g_szItemBootHeight: db "Maximum height",NULL172 175 g_szItemBootTimeout: db "Selection timeout",NULL 173 176 g_szItemBootDrive: db "Default boot drive",NULL 174 g_szItemBoot MinFDD: db "Min floppy drive count",NULL177 g_szItemBootFloppyDrvs: db "Number of Floppy Drives",NULL 175 178 g_szItemBootSwap: db "Swap boot drive numbers",NULL 176 179 g_szItemBootRomBoot: db "Display ROM boot",NULL 177 g_szItemBootInfo: db "Display drive info",NULL 178 179 g_szDlgBootHeight: db "Enter boot menu maximum height in characters (8...25).",NULL 180 180 181 g_szDlgBootTimeout: db "Enter Boot Menu selection timeout in seconds (1...60, 0 disables timeout).",NULL 181 182 g_szDlgBootDrive: db "Enter default drive number (0xh for Floppy Drives, 8xh for Hard Disks, FFh for ROM boot).",NULL 182 g_szDlgBoot MinFDD: db "Enter minimum number of floppy drives.",NULL183 g_szDlgBootFloppyDrvs: db "Enter number of Floppy Drives to display on boot menu.",NULL 183 184 g_szDlgBootSwap: db "Enable drive number translation?",NULL 184 185 g_szDlgBootRomBoot: db "Show ROM Boot option on boot menu?",NULL 185 g_szDlgBootInfo: db "Show drive information on boot menu?",NULL 186 187 g_szNfoBootHeight: db "Boot Menu maximum height in characters.",NULL 186 188 187 g_szNfoBootTimeout: db "Menu item selection timeout in seconds.",NULL 189 188 g_szNfoBootDrive: db "Default drive on boot menu.",NULL 190 g_szNfoBoot MinFDD: db "Minimum number of floppy drives to display.",NULL189 g_szNfoBootFloppyDrvs: db "Number of Floppy Drives to display on boot menu.",NULL 191 190 g_szNfoBootSwap: db "Drive Number Translation (swap first drive with selected).",NULL 192 191 g_szNfoBootRomBoot: db "Show ROM Basic or ROM DOS boot option.",NULL 193 g_szNfoBootInfo: db "Show detailed drive information on boot menu.",NULL194 192 195 193 g_szHelpBootTimeout: db "incbin goes here.",NULL 196 194 g_szHelpBootDrive: db "incbin goes here.",NULL 197 g_szHelpBoot MinFDD:db "incbin goes here.",NULL195 g_szHelpBootFloppyDrvs: db "incbin goes here.",NULL 198 196 g_szHelpBootSwap: db "incbin goes here.",NULL 199 197 g_szHelpBootRomBoot: db "incbin goes here.",NULL 200 g_szHelpBootInfo: db "incbin goes here.",NULL 198 199 g_szMultichoiseBootFloppyDrvs: 200 db "Autodetect",LF 201 db "1",LF 202 db "2",LF 203 db "3",LF 204 db "4",NULL 205 206 g_szValueBootFloppyDrvsAuto: db "Auto",NULL 207 g_szValueBootFloppyDrvs1: db "1",NULL 208 g_szValueBootFloppyDrvs2: db "2",NULL 209 g_szValueBootFloppyDrvs3: db "3",NULL 210 g_szValueBootFloppyDrvs4: db "4",NULL 201 211 202 212 203 213 ; Strings for Flash menu 204 214 g_szItemFlashStart: db "Start flashing",NULL 215 g_szItemFlashEepromType:db "EEPROM type",NULL 205 216 g_szItemFlashSDP: db "SDP command",NULL 206 217 g_szItemFlashAddr: db "EEPROM address",NULL … … 208 219 g_szItemFlashChecksum: db "Generate checksum byte",NULL 209 220 221 g_szDlgFlashEepromType: db "Select EEPROM type.",NULL 222 g_szDlgFlashSDP: db "Select Software Data Protection command.",NULL 210 223 g_szDlgFlashAddr: db "Enter segment address where EEPROM is located.",NULL 211 g_szDlgFlashPageSize: db " Enter write page size (1, 2, 4, 8, 16, 32 or 64 bytes).",NULL224 g_szDlgFlashPageSize: db "Select write page size.",NULL 212 225 g_szDlgFlashChecksum: db "Generate checksum byte to the end of BIOS image?",NULL 213 226 227 g_szNfoFlashEepromType: db "EEPROM type.",NULL 214 228 g_szNfoFlashStart: db "Writes BIOS to EEPROM.",NULL 215 229 g_szNfoFlashSDP: db "Software Data Protection command.",NULL … … 222 236 g_szHelpFlashChecksum: db "incbin goes here.",NULL 223 237 224 225 ; Strings for SDP command menu 226 g_szValueSdpNone: 227 g_szItemSdpNone: db "None",NULL 228 g_szValueSdpEnable: 229 g_szItemSdpEnable: db "Enable",NULL 230 g_szValueSdpDisable: 231 g_szItemSdpDisable: db "Disable",NULL 232 233 g_szNfoSdpNone: db "Do not use Software Data Protection.",NULL 234 g_szNfoSdpEnable: db "Enable Software Data Protection after flashing.",NULL 235 g_szNfoSdpDisable: db "Disable Software Data Protection after flashing.",NULL 238 g_szMultichoiseEepromType: 239 db "2816 (2 kiB)",LF 240 db "2832 (4 kiB)",LF 241 db "2864 (8 kiB)",LF 242 db "28128 (16 kiB)",LF 243 db "28256 (32 kiB)",LF 244 db "28512 (64 kiB)",NULL 245 g_szValueFlash2816: db "2816",NULL 246 g_szValueFlash2832: db "2832",NULL 247 g_szValueFlash2864: db "2864",NULL 248 g_szValueFlash28128: db "28128",NULL 249 g_szValueFlash28256: db "28256",NULL 250 g_szValueFlash28512: db "28512",NULL 251 252 g_szMultichoiseSdpCommand: 253 db "None",LF 254 db "Enable",LF 255 db "Disable",NULL 256 g_szValueFlashNone: db "None",NULL 257 g_szValueFlashEnable: db "Enable",NULL 258 g_szValueFlashDisable: db "Disable",NULL 259 260 g_szMultichoisePageSize: 261 db "1 byte",LF 262 db "2 bytes",LF 263 db "4 bytes",LF 264 db "8 bytes",LF 265 db "16 bytes",LF 266 db "32 bytes",LF 267 db "64 bytes",NULL 268 g_szValueFlash1byte: db "None",NULL 269 g_szValueFlash2bytes: db "2 bytes",NULL 270 g_szValueFlash4bytes: db "4 bytes",NULL 271 g_szValueFlash8bytes: db "8 bytes",NULL 272 g_szValueFlash16bytes: db "16 bytes",NULL 273 g_szValueFlash32bytes: db "32 bytes",NULL 274 g_szValueFlash64bytes: db "64 bytes",NULL -
trunk/XTIDE_Universal_BIOS_Configurator_v2/makefile
r57 r59 39 39 40 40 # Subdirectories where library files are: 41 LIBS = ../Assembly Library/Inc/42 LIBS += ../Assembly Library/Src/43 LIBS += ../Assembly Library/Src/Display/44 LIBS += ../Assembly Library/Src/File/45 LIBS += ../Assembly Library/Src/Keyboard/46 LIBS += ../Assembly Library/Src/Menu/47 LIBS += ../Assembly Library/Src/Menu/Dialog/48 LIBS += ../Assembly Library/Src/String/49 LIBS += ../Assembly Library/Src/Time/50 LIBS += ../Assembly Library/Src/Util/41 LIBS = ../Assembly_Library/Inc/ 42 LIBS += ../Assembly_Library/Src/ 43 LIBS += ../Assembly_Library/Src/Display/ 44 LIBS += ../Assembly_Library/Src/File/ 45 LIBS += ../Assembly_Library/Src/Keyboard/ 46 LIBS += ../Assembly_Library/Src/Menu/ 47 LIBS += ../Assembly_Library/Src/Menu/Dialog/ 48 LIBS += ../Assembly_Library/Src/String/ 49 LIBS += ../Assembly_Library/Src/Time/ 50 LIBS += ../Assembly_Library/Src/Util/ 51 51 LIBS += ../XTIDE_Universal_BIOS/Inc/ 52 52 HEADERS += $(LIBS)
Note:
See TracChangeset
for help on using the changeset viewer.