Changeset 293 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS_Configurator_v2


Ignore:
Timestamp:
Mar 4, 2012, 1:33:52 AM (13 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Commit 1/2 (Library, Configurators and Serial Server):

  • Changed Emulate.inc so that making 286 and 386 versions now works. Additionally, only one processor type define is needed in the makefile.
  • Minor optimizations.
  • Fixed spelling and did some cleaning.
Location:
trunk/XTIDE_Universal_BIOS_Configurator_v2
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/BiosFile.asm

    r181 r293  
    2727    call    Buffers_NewBiosWithSizeInDXCXandSourceInAXhasBeenLoadedForConfiguration
    2828    call    FileIO_CloseUsingHandleFromBX
    29     call    DisplayFileLoadedSuccesfully
     29    call    DisplayFileLoadedSuccessfully
    3030    jmp     SHORT .Return
    3131
     
    4343;       DS:SI:  Name of file to open
    4444;   Returns:
    45 ;       BX:     File handle (if succesfull)
    46 ;       DX:CX:  File size (if succesfull)
    47 ;       CF:     Clear if successfull
     45;       BX:     File handle (if successful)
     46;       DX:CX:  File size (if successful)
     47;       CF:     Clear if successful
    4848;               Set if error
    4949;   Corrupts registers:
     
    8080;       DS:SI:  File name
    8181;   Returns:
    82 ;       CF:     Clear if successfull
     82;       CF:     Clear if successful
    8383;               Set if error
    8484;   Corrupts registers:
     
    167167    call    FileIO_CloseUsingHandleFromBX
    168168    call    Buffers_ClearUnsavedChanges
    169     call    DisplayFileSavedSuccesfully
     169    call    DisplayFileSavedSuccessfully
    170170    jmp     SHORT .Return
    171171
     
    181181
    182182;--------------------------------------------------------------------
    183 ; DisplayFileLoadedSuccesfully
    184 ; DisplayFileSavedSuccesfully
     183; DisplayFileLoadedSuccessfully
     184; DisplayFileSavedSuccessfully
    185185; DisplayFailedToLoadFile
    186186; DisplayFailedToSaveFile
     
    194194;--------------------------------------------------------------------
    195195ALIGN JUMP_ALIGN
    196 DisplayFileLoadedSuccesfully:
     196DisplayFileLoadedSuccessfully:
    197197    mov     dx, g_szDlgMainLoadFile
    198198    jmp     Dialogs_DisplayNotificationFromCSDX
    199199
    200200ALIGN JUMP_ALIGN
    201 DisplayFileSavedSuccesfully:
     201DisplayFileSavedSuccessfully:
    202202    mov     dx, g_szDlgMainSaveFile
    203203    jmp     Dialogs_DisplayNotificationFromCSDX
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Buffers.asm

    r204 r293  
    145145    push    es
    146146
    147     eMOVZX  di, BYTE [cs:g_cfgVars+CFGVARS.bEepromType]
     147    eMOVZX  di, [cs:g_cfgVars+CFGVARS.bEepromType]
    148148    mov     cx, [cs:di+g_rgwEepromTypeToSizeInWords]
    149149    sub     cx, [cs:g_cfgVars+CFGVARS.wImageSizeInWords]    ; CX = WORDs to append
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/EEPROM.asm

    r181 r293  
    9191.GetXtideUniversalBiosSizeFromEStoDXCX:
    9292    xor     dx, dx
    93     eMOVZX  cx, BYTE [es:ROMVARS.bRomSize]
     93    eMOVZX  cx, [es:ROMVARS.bRomSize]
    9494    eSHL_IM cx, 9               ; *= 512 for byte count
    9595    ret
     
    199199    xor     si, si
    200200    call    Buffers_GetFlashComparisonBufferToESDI
    201     eMOVZX  bx, BYTE [cs:g_cfgVars+CFGVARS.bEepromType]
     201    eMOVZX  bx, [cs:g_cfgVars+CFGVARS.bEepromType]
    202202    mov     cx, [cs:bx+g_rgwEepromTypeToSizeInWords]
    203203    cld
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Flash.asm

    r181 r293  
    8686ALIGN JUMP_ALIGN
    8787.GetSdpCommandFunctionToDXwithFlashvarsInSSBP:
    88     eMOVZX  bx, BYTE [bp+FLASHVARS.bEepromSdpCommand]
     88    eMOVZX  bx, [bp+FLASHVARS.bEepromSdpCommand]
    8989    mov     si, [cs:bx+.rgpSdpCommandToEepromTypeLookupTable]
    9090    mov     bl, [bp+FLASHVARS.bEepromType]
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menuitem.asm

    r286 r293  
    146146ALIGN JUMP_ALIGN
    147147Menuitem_StoreValueFromAXtoMenuitemInDSSI:
    148     eMOVZX  bx, BYTE [si+MENUITEM.bType]
     148    eMOVZX  bx, [si+MENUITEM.bType]
    149149    cmp     bl, TYPE_MENUITEM_HEX
    150150    ja      SHORT .InvalidItemType
     
    207207;
    208208; if the lookup pointer is NULL, no translation is needed
    209 ; 
     209;
    210210    mov     bx, [si+MENUITEM.itemValue+ITEM_VALUE.rgwChoiceToValueLookup]
    211211    test    bx, bx
    212212    jz      .StoreByteOrWordValueFromAXtoESDIwithItemInDSSI
    213        
     213
    214214    shl     ax, 1           ; Shift for WORD lookup
    215215    add     bx, ax
     
    234234    mov     bx,[si+MENUITEM.itemValue+ITEM_VALUE.fnValueWriter]
    235235    test    bx,bx
    236     jz      SHORT .NoWriter 
    237 
    238     call    bx     
     236    jz      SHORT .NoWriter
     237
     238    call    bx
    239239
    240240.NoWriter:
     
    313313    xor     ah, ah              ; conversion needs to happen before call to the reader,
    314314                                ; in case the reader unpacks the byte to a word
    315        
     315
    316316.NoConvertWordToByteValue:
    317317    mov     bx, [si+MENUITEM.itemValue+ITEM_VALUE.fnValueReader]
     
    321321    call    bx
    322322
    323 .NoReader:     
     323.NoReader:
    324324    pop     bx
    325325    pop     di
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/MenuitemPrint.asm

    r286 r293  
    3636ALIGN JUMP_ALIGN
    3737MenuitemPrint_NameWithPossibleValueFromDSSI:
    38     eMOVZX  bx, BYTE [si+MENUITEM.bType]
     38    eMOVZX  bx, [si+MENUITEM.bType]
    3939    cmp     bl, TYPE_MENUITEM_ACTION
    4040    ja      SHORT .PrintNameAndValueFromDSSI
     
    147147;   Corrupts registers:
    148148;       AX, BX, CX
    149 ;--------------------------------------------------------------------   
     149;--------------------------------------------------------------------
    150150ALIGN JUMP_ALIGN
    151151MenuitemPrint_WriteLookupValueStringToBufferInESDIfromUnshiftedItemInDSSI:
     
    170170;   Corrupts registers:
    171171;       AX, BX, CX
    172 ;--------------------------------------------------------------------   
     172;--------------------------------------------------------------------
    173173ALIGN JUMP_ALIGN
    174174PrintLookupValueFromAXtoBufferInESDI:
    175175    push    si
    176176    test    byte [si+MENUITEM.bFlags], FLG_MENUITEM_CHOICESTRINGS
    177     jnz     .lookupChoice   
    178        
     177    jnz     .lookupChoice
     178
    179179    add     ax, [si+MENUITEM.itemValue+ITEM_VALUE.rgszValueToStringLookup]
    180180    xchg    bx, ax
    181 .found: 
     181.found:
    182182    mov     si, [bx]
    183183.errorReturn:
     
    187187
    188188;
    189 ; With FLG_MENUITEM_CHOICESTRINGS, the array at .rgszChoiceToStringLookup is based on the 
     189; With FLG_MENUITEM_CHOICESTRINGS, the array at .rgszChoiceToStringLookup is based on the
    190190; Choice number (offset within .rgwChoiceToValueLookup) instead of the value stored.
    191191; Here, we scan the .rgwChoiceToValueLookup array until we find the value there, and then
    192 ; use the same offset in .rgszChoiceToStringLookup.  If we don't find the value, we 
    193 ; return an "Error!" string instead. 
     192; use the same offset in .rgszChoiceToStringLookup.  If we don't find the value, we
     193; return an "Error!" string instead.
    194194;
    195195; Note that the pointer array at .rgszChoiceToStringLookup must be NULL terminated.  Since the
     
    197197;
    198198.lookupChoice:
    199     mov     bx,[si+MENUITEM.itemValue+ITEM_VALUE.rgszChoiceToStringLookup]     
     199    mov     bx,[si+MENUITEM.itemValue+ITEM_VALUE.rgszChoiceToStringLookup]
    200200    mov     si,[si+MENUITEM.itemValue+ITEM_VALUE.rgwChoiceToValueLookup]
    201        
     201
    202202.wordLoop:
    203203    cmp     ax,[si]
     
    222222;   Corrupts registers:
    223223;       AX, BX, CX
    224 ;--------------------------------------------------------------------   
     224;--------------------------------------------------------------------
    225225ALIGN JUMP_ALIGN
    226226MenuitemPrint_WriteUnsignedValueStringToBufferInESDIfromItemInDSSI:
     
    244244;   Corrupts registers:
    245245;       AX, BX, CX
    246 ;--------------------------------------------------------------------   
     246;--------------------------------------------------------------------
    247247ALIGN JUMP_ALIGN
    248248MenuitemPrint_WriteHexValueStringToBufferInESDIfromItemInDSSI:
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/FlashMenu.asm

    r246 r293  
    273273    mov     [si+FLASHVARS.bEepromSdpCommand], al
    274274
    275     eMOVZX  bx, BYTE [cs:g_cfgVars+CFGVARS.bEepromPage]
     275    eMOVZX  bx, [cs:g_cfgVars+CFGVARS.bEepromPage]
    276276    mov     ax, [cs:bx+g_rgwEepromPageToSizeInBytes]
    277277    mov     [si+FLASHVARS.wEepromPageSize], ax
     
    314314ALIGN JUMP_ALIGN
    315315.GetSelectedEepromSizeInWordsToAX:
    316     eMOVZX  bx, BYTE [cs:g_cfgVars+CFGVARS.bEepromType]
     316    eMOVZX  bx, [cs:g_cfgVars+CFGVARS.bEepromType]
    317317    mov     ax, [cs:bx+g_rgwEepromTypeToSizeInWords]
    318318    ret
     
    330330ALIGN JUMP_ALIGN
    331331.DisplayFlashingResultsFromFlashvarsInDSBX:
    332     eMOVZX  bx, BYTE [bx+FLASHVARS.flashResult]
     332    eMOVZX  bx, [bx+FLASHVARS.flashResult]
    333333    jmp     [cs:bx+.rgfnFlashResultMessage]
    334334
     
    370370ALIGN JUMP_ALIGN
    371371.DisplayRebootMessageAndReboot:
    372     mov     dx, g_szPCFlashSuccessfull
     372    mov     dx, g_szPCFlashSuccessful
    373373    call    Dialogs_DisplayNotificationFromCSDX
    374374    xor     ax, ax          ; Cold boot flag
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/MasterSlaveMenu.asm

    r286 r293  
    238238    call    .EnableMenuitemFromCSBX
    239239    mov     bx, g_MenuitemMasterSlaveUserLBA
    240     jmp     .EnableMenuitemFromCSBX 
     240    jmp     .EnableMenuitemFromCSBX
    241241
    242242ALIGN JUMP_ALIGN
     
    245245    call    .EnableMenuitemFromCSBX
    246246    mov     bx, g_MenuitemMasterSlaveUserLBA
    247     jmp     .DisableMenuitemFromCSBX   
     247    jmp     .DisableMenuitemFromCSBX
    248248
    249249ALIGN JUMP_ALIGN
     
    252252    call    .EnableMenuitemFromCSBX
    253253    mov     bx, g_MenuitemMasterSlaveUserCHS
    254     jmp     .DisableMenuitemFromCSBX   
     254    jmp     .DisableMenuitemFromCSBX
    255255
    256256
     
    308308    test    ax, FLG_DRVPARAMS_USERLBA
    309309    jz      SHORT .DisableMenuitemFromCSBX
    310     jmp     SHORT .EnableMenuitemFromCSBX
     310    ; Fall to .EnableMenuitemFromCSBX
    311311
    312312
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm

    r290 r293  
    2222
    2323g_szNo:                             db  "No",NULL
    24 g_szYes:                            db  "Yes",NULL
    2524g_szMultichoiceBooleanFlag:
    2625                                    db  "No",LF
    27                                     db  "Yes",NULL
     26g_szYes:                            db  "Yes",NULL
    2827
    2928; Exit messages
     
    4443g_szErrEepromVerify:    db  "EEPROM did not return the same byte that was written.",LF
    4544                        db  "EEPROM was not flashed properly!",NULL
    46 g_szPCFlashSuccessfull: db  "EEPROM was written successfully.",LF
     45g_szPCFlashSuccessful:  db  "EEPROM was written successfully.",LF
    4746                        db  "Press any key to reboot.",NULL
    4847g_szForeignFlash:       db  "EEPROM was written successfully.",NULL
     
    374373                        db  "None",LF
    375374                        db  "Enable",LF
    376                         db  "Disable",NULL
     375g_szValueFlashDisable:  db  "Disable",NULL
    377376g_szValueFlashNone:     db  "None",NULL
    378377g_szValueFlashEnable:   db  "Enable",NULL
    379 g_szValueFlashDisable:  db  "Disable",NULL
    380378
    381379g_szMultichoicePageSize:
     
    386384                        db  "16 bytes",LF
    387385                        db  "32 bytes",LF
    388                         db  "64 bytes",NULL
     386g_szValueFlash64bytes:  db  "64 bytes",NULL
    389387g_szValueFlash1byte:    db  "1 byte",NULL
    390388g_szValueFlash2bytes:   db  "2 bytes",NULL
     
    393391g_szValueFlash16bytes:  db  "16 bytes",NULL
    394392g_szValueFlash32bytes:  db  "32 bytes",NULL
    395 g_szValueFlash64bytes:  db  "64 bytes",NULL
    396393
    397394g_szSelectionTimeout:   db      DOUBLE_BOTTOM_LEFT_CORNER,DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL,"%ASelection in %2u s",NULL
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/makefile

    r187 r293  
    11###############################################################################
    2 # Generic makefile for building binary files.                                 #
    3 # v. 1.1.0 (28.7.2007 ... 5.10.2010)                                          #
    4 # (C) Tomi Tilli                                                              #
    5 # aitotat@gmail.com                                                           #
     2# Makefile to build XTIDE Universal BIOS Configurator v2.                     #
    63#                                                                             #
    74# Valid makefile targets are:                                                 #
    85# all       Removes existing files and builds binary file in \Build           #
    9 # build     Builds binary file in \Build                                      #
    106# clean     Removes all files from \Build                                     #
    117#                                                                             #
     
    5450
    5551
    56 
    5752#################################################################
    5853# Assembler preprocessor defines.                               #
     
    6156DEFINES_XT = ELIMINATE_CGA_SNOW
    6257DEFINES_XTPLUS = USE_186 ELIMINATE_CGA_SNOW
    63 DEFINES_AT = USE_186 USE_286 USE_AT
     58DEFINES_AT = USE_286 USE_AT
    6459
    6560
     
    113108.PHONY: all at xtplus xt clean release
    114109
    115 # Make clean debug and release versions
    116110all: clean xt
    117111    @echo All done!
     
    123117xtplus:
    124118    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XTPLUS) -l"$(TARGET)_xtp.lst" -o"$(TARGET)_xtp.$(EXTENSION)"
    125     @echo XT plus version "$(TARGET)_xtp.$(EXTENSION)" built.
     119    @echo XT Plus version "$(TARGET)_xtp.$(EXTENSION)" built.
    126120
    127121xt:
Note: See TracChangeset for help on using the changeset viewer.