Changeset 592 in xtideuniversalbios for trunk


Ignore:
Timestamp:
Jun 25, 2018, 10:29:27 PM (6 years ago)
Author:
Krister Nordvall
Message:

Changes:

  • The problem with NASM in the previous revision (r591) has been fixed.
  • The colors used by the boot menu and hotkey bar can now be customized by selecting one of a number of pre-defined color themes. Suggestions for additional themes are more than welcome!
  • Large builds are now 10 KB. Small builds are still 8 KB with the exception of the Tiny build which is now 4 KB. In other words, builds are now as small as possible to make it easier to combine them with other BIOSes.
  • Added code to the library to improve drive error handling. XTIDECFG can now handle "Drive Not Ready" errors.
  • Fixed a couple of potential bugs in AtaID.asm (AtaID_GetMaxPioModeToAXandMinCycleTimeToCX); 1) ATA1.bPioMode was treated as a WORD variable. 2) ATA2.bPIOSupp was assumed to be non-zero which would result in PIO mode 3 being returned if the assumption was wrong.
  • Made the same changes in the equivalent function used by BIOSDRVS (DisplayPioModeInformationUsingAtaInfoFromDSBX in AtaInfo.asm).
  • Fixed a bug from r587 in PDC20x30.asm in PDC20x30_GetMaxPioModeToALandMinPioCycleTimeToBX.
  • Fixed a bug from r523 in XTIDECFG where Auto Configure would only set the IRQ on one IDE interface on AT-builds.
  • XTIDECFG will now restore the default settings for the "Serial port virtual device" when reselecting it in the list of device types. This makes it behave consistently for all device types.
  • The eAAM macro is now used regardless if USE_UNDOC_INTEL is defined or not because it is apparently supported on all processors including the NEC V20/V30 CPUs.
  • Renamed the EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS define to EXCLUDE_FROM_XUB.
  • Added a define to exclude unused library code from BIOSDRVS (EXCLUDE_FROM_BIOSDRVS). This makes it a lot smaller than in previous revisions.
  • All unnecessary CLD-instructions are now under a new define 'CLD_NEEDED' which is only enabled for the BIOS. It is disabled for XTIDECFG and BIOSDRVS but can be enabled if needed by adding this define to the respective makefile. This change was made because these unnecessary instructions are wasteful and should never be needed. In fact, they only serve to hide bugs (in other peoples code) which I strongly believe should be avoided. I recommend people making their own BIOSes from source to not use this define as it's extremely unlikely to be needed.
  • Updated the copyright info in SerDrive and changed an URL to point to the new site.
  • Updated the copyright info and version number in BIOSDRVS.
  • Updated the copyright info in XTIDECFG.
  • Optimizations in general.
Location:
trunk
Files:
94 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Inc/BiosFunctions.inc

    r510 r592  
    66; BIOS interrupts
    77BIOS_VIDEO_INTERRUPT_10h        EQU     10h
     8BIOS_EQUIPMENT_INTERRUPT_11h    EQU     11h
    89BIOS_DISK_INTERRUPT_13h         EQU     13h
    910BIOS_SYSTEM_INTERRUPT_15h       EQU     15h
  • trunk/Assembly_Library/Inc/Debug.inc

    r590 r592  
    2424    mov     bl, %2
    2525    CALL_DISPLAY_LIBRARY PrintWordFromAXWithBaseInBL
    26 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     26%ifndef EXCLUDE_FROM_XUB
    2727    call    Keyboard_RemoveAllKeystrokesFromBuffer
    2828%endif
     
    5252    mov     al, %1
    5353    CALL_DISPLAY_LIBRARY PrintCharacterFromAL
    54 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     54%ifndef EXCLUDE_FROM_XUB
    5555    call    Keyboard_RemoveAllKeystrokesFromBuffer
    5656%endif
     
    9595%macro WAIT_ANY_KEY_TO_CONTINUE 0
    9696    push    ax
    97 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     97%ifndef EXCLUDE_FROM_XUB
    9898    call    Keyboard_RemoveAllKeystrokesFromBuffer
    9999%endif
  • trunk/Assembly_Library/Inc/Display.inc

    r590 r592  
    6161    .InitializeDisplayContext                       resb    2
    6262
    63 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     63%ifndef EXCLUDE_FROM_XUB
    6464    .SetCharacterPointerFromBXAX                    resb    2
    6565%endif
     
    7474    .SynchronizeDisplayContextToHardware            resb    2
    7575
    76 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     76%ifndef EXCLUDE_FROM_XUB
    7777    .GetCharacterPointerToBXAX                      resb    2
    7878%endif
     
    8181
    8282    .FormatNullTerminatedStringFromCSSI             resb    2
    83 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     83%ifndef EXCLUDE_FROM_XUB
    8484    .PrintSignedWordFromAXWithBaseInBL              resb    2
    8585%endif
    8686    .PrintWordFromAXWithBaseInBL                    resb    2
    87 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG
     87%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_XTIDECFG
    8888    .PrintQWordFromSSBPwithBaseInBX                 resb    2
    8989%endif
     
    9494    .PrintCharacterFromAL                           resb    2
    9595    .PrintNewlineCharacters                         resb    2
    96 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     96%ifndef EXCLUDE_FROM_XUB
    9797    .ClearAreaWithHeightInAHandWidthInAL            resb    2
    9898%endif
  • trunk/Assembly_Library/Inc/DosFunctions.inc

    r589 r592  
    66; DOS interrupts
    77DOS_INTERRUPT_21h                                   EQU     21h
     8DOS_CTRL_C_CTRL_BREAK_HANDLER_23h                   EQU     23h
    89DOS_CRITICAL_ERROR_HANDLER_24h                      EQU     24h
    910DOS_TSR_MULTIPLEX_INTERRUPT_2Fh                     EQU     2Fh
     
    3132FIND_FIRST_MATCHING_FILE                            EQU     4Eh     ; DOS 2+
    3233FIND_NEXT_MATCHING_FILE                             EQU     4Fh     ; DOS 2+
     34GET_EXTENDED_ERROR_INFORMATION                      EQU     59h     ; DOS 3.0+
    3335
    3436; DOS errors
  • trunk/Assembly_Library/Inc/Emulate.inc

    r589 r592  
    6060
    6161;--------------------------------------------------------------------
     62; Find String In String
     63;
     64; FSIS
     65;   Parameters:
     66;       %1:     String to search for (case-insensitive)
     67;       %2:     String to search in
     68;   Returns:
     69;   strpos:     Position of %1 in %2 if found, 0 if not found
     70;--------------------------------------------------------------------
     71%macro FSIS 2.nolist
     72%defstr s1 %1
     73%defstr s2 %2
     74%strlen sl1 s1
     75%strlen sl2 s2
     76%assign strpos 0
     77    %if sl1 <= sl2
     78        %assign strpos sl2 - sl1 + 1
     79        %rep strpos
     80            %substr %%ss s2 strpos, sl1
     81            %ifidni %%ss, s1
     82                %exitrep
     83            %else
     84                %assign strpos strpos - 1
     85            %endif
     86        %endrep
     87    %endif
     88%endmacro
     89
     90
     91;--------------------------------------------------------------------
    6292; The undocumented instruction SALC (Set AL According to CF).
    6393; Available on all Intel processors and truly compatible clones.
     
    108138;--------------------------------------------------------------------
    109139; The AAM instruction (ASCII Adjust after Multiplication).
    110 ; Available on all Intel processors and truly compatible clones.
    111 ; Does not work on the NEC V20/V30 or Sony CXQ70108 processors
    112 ; unless %1 is 10 (0Ah).
    113140;
    114141; eAAM
     
    152179%macro eBSF 2
    153180%ifndef USE_386
    154     push    cx
    155181    cmp     WORD %2, BYTE 0     ; Source operand is zero?
    156182    je      SHORT %%Return      ;  If so, return with ZF set
    157183
    158184    ; Set destination to zero and load mask for bit 0
     185    push    cx
    159186    xor     %1, %1
    160187    mov     cx, 1
     
    163190%%BitLoop:
    164191    test    %2, cx              ; Bit set?
    165     jnz     SHORT %%Return      ;  If so, return with ZF cleared
     192    jnz     SHORT %%PopAndReturn;  If so, return with ZF cleared
    166193    shl     cx, 1               ; Prepare to test next bit
    167194    inc     %1                  ; Increment bit index
    168195    jmp     SHORT %%BitLoop     ; Loop until bit found
    169 %%Return:
     196%%PopAndReturn:
    170197    pop     cx
     198%%Return:
    171199;-----------------------------------
    172200%else
     
    193221%macro eBSR 2
    194222%ifndef USE_386
    195     push    cx
    196223    cmp     WORD %2, BYTE 0     ; Source operand is zero?
    197224    je      SHORT %%Return      ;  If so, return with ZF set
    198225
    199226    ; Load mask for highest order bit
     227    push    cx
    200228    mov     cx, 1<<15
    201229    mov     %1, 15
     
    204232%%BitLoop:
    205233    test    %2, cx              ; Bit set?
    206     jnz     SHORT %%Return      ;  If so, return with ZF cleared
     234    jnz     SHORT %%PopAndReturn;  If so, return with ZF cleared
    207235    shr     cx, 1               ; Prepare to test next bit
    208236    dec     %1                  ; Decrement bit index
    209237    jmp     SHORT %%BitLoop     ; Loop until bit found
    210 %%Return:
     238%%PopAndReturn:
    211239    pop     cx
     240%%Return:
    212241;-----------------------------------
    213242%else
     
    260289
    261290%macro eCMOVE 2
    262     eCMOVZ %1, %2
     291    eCMOVZ  %1, %2
    263292%endmacro
    264293
    265294%macro eCMOVNE 2
    266     eCMOVNZ %1, %2
     295    eCMOVNZ %1, %2
    267296%endmacro
    268297
    269298%macro eCMOVB 2
    270     jnb     SHORT %%Return
    271     mov     %1, %2
    272 %%Return:
     299    eCMOVC  %1, %2
    273300%endmacro
    274301
     
    289316; Conditional Set.
    290317;
    291 ; eCSETcc
     318; eSETcc
    292319;   Parameters:
    293320;       %1:     Destination data
     
    297324;       Flags
    298325;--------------------------------------------------------------------
    299 %macro eCSETZ 1
     326%macro eSETZ 1
    300327    mov     %1, 0           ; Clear while preserving flags
    301328    jnz     SHORT %%Return  ; Nothing to set
     
    304331%endmacro
    305332
    306 %macro eCSETNZ 1
     333%macro eSETNZ 1
    307334    mov     %1, 0           ; Clear while preserving flags
    308335    jz      SHORT %%Return  ; Nothing to set
     
    339366        xor     dh, dh
    340367    %else   ; SI, DI, BP (all may be used in effective address)
    341         push    ax
    342         mov     al, %2
    343         xor     ah, ah
    344         xchg    ax, %1
    345         pop     ax
     368        FSIS    %1, %2
     369        %if strpos
     370            push    ax
     371            mov     al, %2
     372            xor     ah, ah
     373            xchg    %1, ax
     374            pop     ax
     375        %else
     376            xchg    %1, ax
     377            mov     al, %2
     378            xor     ah, ah
     379            xchg    %1, ax
     380        %endif
    346381    %endif
    347382;-----------------------------------
     
    484519; eSEG_STR
    485520;   Parameters:
    486 ;       %1:     REP/REPNE or REPE prefix
     521;       %1:     REP/REPE/REPZ or REPNE/REPNZ prefix
    487522;       %2:     Source segment override (destination is always ES)
    488523;       %3:     String instruction
     
    491526;       FLAGS for cmps and scas only
    492527;   Corrupts registers:
    493 ;       Nothing
     528;       FLAGS
    494529;--------------------------------------------------------------------
    495530%macro eSEG_STR 3
     
    499534        %2                      ; SEG is the prefix that won't be lost
    500535        %3                      ; String instruction
     536FSIS    cmps, %3
     537%ifn strpos
     538    FSIS    scas, %3
     539%endif
     540%if strpos                      ; Must preserve FLAGS
    501541        jcxz    %%End           ; Jump to end if no repeats left (preserves FLAGS)
    502542        jmp     SHORT %%Loop    ; Loop while repeats left
    503543    %%End:
     544%else                           ; No need to preserve FLAGS
     545        inc     cx
     546        loop    %%Loop
     547%endif
    504548%else   ; No bug on V20/V30 and later, don't know about 188/186
    505549    %2
     
    556600%ifdef USE_386
    557601    %if %2 = 1
    558         add     %1, %1  ; Same size but faster on 386 and 486. Fails if %1 is a memory operand.
     602        FSIS    ], %1
     603        %if strpos
     604            eSHIFT_IM   %1, %2, shl
     605        %else
     606            add     %1, %1  ; Same size but faster on 386 and 486.
     607        %endif
    559608    %else
    560609        eSHIFT_IM   %1, %2, shl
     
    582631%ifdef USE_386
    583632    %if %2 = 1
    584         adc     %1, %1  ; Same size but faster on 386 and 486. Fails if %1 is a memory operand.
     633        FSIS    ], %1
     634        %if strpos
     635            eSHIFT_IM   %1, %2, rcl
     636        %else
     637            adc     %1, %1  ; Same size but faster on 386 and 486.
     638        %endif
    585639    %else
    586640        eSHIFT_IM   %1, %2, rcl
  • trunk/Assembly_Library/Inc/Macros.inc

    r566 r592  
    1818;       %1
    1919;--------------------------------------------------------------------
    20 %macro SKIP2B 1
     20%macro SKIP2B 1.nolist
    2121    %ifidni     %1, f
    2222        db  03Dh                    ; Opcode byte for CMP AX, <immed>
  • trunk/Assembly_Library/Inc/Math.inc

    r589 r592  
    2323    jb      %%Return            ;  If so, return
    2424    mov     %1, %2              ; Copy %2 to %1
    25 ALIGN JUMP_ALIGN
    2625%%Return:
    2726%endmacro
     
    3130    jl      %%Return            ;  If so, return
    3231    mov     %1, %2              ; Copy %2 to %1
    33 ALIGN JUMP_ALIGN
    3432%%Return:
    3533%endmacro
     
    5149    ja      %%Return            ;  If so, return
    5250    mov     %1, %2              ; Copy %2 to %1
    53 ALIGN JUMP_ALIGN
    5451%%Return:
    5552%endmacro
     
    5956    jg      %%Return            ;  If so, return
    6057    mov     %1, %2              ; Copy %2 to %1
    61 ALIGN JUMP_ALIGN
    6258%%Return:
    6359%endmacro
     
    6763; SHL_DXAX
    6864;   Parameters:
    69 ;       %1:     Number of bits to shift
     65;       %1:     Number of bits to shift. Can be (in preferred order) CX, CL or an immediate value.
    7066;   Returns:
    7167;       DX:AX   Shifted value
     
    7470;--------------------------------------------------------------------
    7571%macro SHL_DXAX 1
     72%ifdef USE_386
    7673    %ifnidni %1, cx
     74        ; %1 is CL or an immediate
     75        shld    dx, ax, %1
     76        shl     ax, %1
     77    %else
     78        ; %1 is CX
     79        shld    dx, ax, cl
     80        shl     ax, cl
     81    %endif
     82%else
     83    %ifidni %1, cl
     84        ; %1 is CL
     85        xor     ch, ch
     86    %elifnidni %1, cx
     87        ; %1 is an immediate
    7788        mov     cx, %1
    7889    %endif
     
    8293    eRCL_IM dx, 1
    8394    loop    .ShiftNextBit
     95%endif
    8496%endmacro
    8597
     
    88100; SHR_DXAX
    89101;   Parameters:
    90 ;       %1:     Number of bits to shift
     102;       %1:     Number of bits to shift. Can be (in preferred order) CX, CL or an immediate value.
    91103;   Returns:
    92104;       DX:AX   Shifted value
     
    95107;--------------------------------------------------------------------
    96108%macro SHR_DXAX 1
     109%ifdef USE_386
    97110    %ifnidni %1, cx
     111        ; %1 is CL or an immediate
     112        shrd    ax, dx, %1
     113        shr     dx, %1
     114    %else
     115        ; %1 is CX
     116        shrd    ax, dx, cl
     117        shr     dx, cl
     118    %endif
     119%else
     120    %ifidni %1, cl
     121        ; %1 is CL
     122        xor     ch, ch
     123    %elifnidni %1, cx
     124        ; %1 is an immediate
    98125        mov     cx, %1
    99126    %endif
     
    103130    rcr     ax, 1
    104131    loop    .ShiftNextBit
     132%endif
    105133%endmacro
    106134
  • trunk/Assembly_Library/Inc/Menu.inc

    r525 r592  
    159159SCROLL_THUMB_CHARACTER              EQU     BLOCK_FULL_FOREGROUND
    160160
    161 NO_ITEM_SELECTED                    EQU     -1
     161;NO_ITEM_SELECTED                   EQU     -1
    162162NO_ITEM_HIGHLIGHTED                 EQU     -1
    163163NO_TIMEOUT_USED                     EQU     0
  • trunk/Assembly_Library/Src/AssemblyLibrary.asm

    r526 r592  
    9090  %endif
    9191    %include "Char.asm"
    92     %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     92    %ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    9393        %include "String.asm"
    9494        %include "StringProcess.asm"
     
    106106
    107107%ifdef INCLUDE_TIME_LIBRARY
    108     %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     108    %ifndef EXCLUDE_FROM_XUB
    109109        %include "Delay.asm"
    110110        %ifndef EXCLUDE_FROM_XTIDECFG
     
    119119    %define UTIL_SIZE_JUMP_ALIGN 1
    120120  %endif
    121     %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    122         %include "Bit.asm"
     121    %ifndef EXCLUDE_FROM_XUB
     122        %ifndef EXCLUDE_FROM_BIOSDRVS
     123            %include "Bit.asm"
     124        %endif
     125        %include "Math.asm"
    123126    %endif
    124     %include "Math.asm"
    125     %include "Registers.asm"
    126     %include "Reboot.asm"
    127     %include "Memory.asm"
     127    %ifndef EXCLUDE_FROM_BIOSDRVS
     128        %include "Registers.asm"
     129        %include "Reboot.asm"
     130        %include "Memory.asm"
     131    %endif
    128132    %include "Size.asm"
    129     %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     133    %ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    130134        %include "Sort.asm"
    131135    %endif
  • trunk/Assembly_Library/Src/Display/CgaSnow.asm

    r583 r592  
    106106;       AX, CX, DX
    107107;--------------------------------------------------------------------
    108 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     108%ifdef EXCLUDE_FROM_XUB
    109109    %ifdef MODULE_STRINGS_COMPRESSED
    110110        %define EXCLUDE
  • trunk/Assembly_Library/Src/Display/Display.asm

    r590 r592  
    3838    push    dx
    3939
     40%ifdef CLD_NEEDED
    4041    cld
     42%endif
    4143    LOAD_BDA_SEGMENT_TO ds, dx
    4244    mov     dx, di
     
    7678    %define InitializeDisplayContext                        DisplayContext_Initialize
    7779
    78 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     80%ifndef EXCLUDE_FROM_XUB
    7981    %define SetCharacterPointerFromBXAX                     DisplayContext_SetCharacterPointerFromBXAX
    8082%endif
     
    8991    %define SynchronizeDisplayContextToHardware             DisplayContext_SynchronizeToHardware
    9092
    91 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     93%ifndef EXCLUDE_FROM_XUB
    9294    %define GetCharacterPointerToBXAX                       DisplayContext_GetCharacterPointerToBXAX
    9395%endif
     
    9698
    9799    %define FormatNullTerminatedStringFromCSSI              Display_FormatNullTerminatedStringFromCSSI
    98 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     100%ifndef EXCLUDE_FROM_XUB
    99101    %define PrintSignedWordFromAXWithBaseInBL               DisplayPrint_SignedWordFromAXWithBaseInBL
    100102%endif
    101103    %define PrintWordFromAXWithBaseInBL                     DisplayPrint_WordFromAXWithBaseInBL
    102 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG
     104%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_XTIDECFG
    103105    %define PrintQWordFromSSBPwithBaseInBX                  DisplayPrint_QWordFromSSBPwithBaseInBX
    104106%endif
     
    109111    %define PrintCharacterFromAL                            DisplayPrint_CharacterFromAL
    110112    %define PrintNewlineCharacters                          DisplayPrint_Newline
    111 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     113%ifndef EXCLUDE_FROM_XUB
    112114    %define ClearAreaWithHeightInAHandWidthInAL             DisplayPrint_ClearAreaWithHeightInAHandWidthInAL
    113115%endif
  • trunk/Assembly_Library/Src/Display/DisplayContext.asm

    r588 r592  
    110110;       AX, DI
    111111;--------------------------------------------------------------------
    112 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     112%ifdef EXCLUDE_FROM_XUB
    113113    %ifndef MODULE_BOOT_MENU
    114114        %define EXCLUDE
     
    116116%endif
    117117
    118 %ifndef EXCLUDE
     118%ifndef EXCLUDE OR EXCLUDE_FROM_BIOSDRVS
    119119ALIGN DISPLAY_JUMP_ALIGN
    120120DisplayContext_Push:
     
    170170    mov     ds, di                  ; Restore DS
    171171    ret
    172 %endif ; EXCLUDE
     172%endif ; EXCLUDE OR EXCLUDE_FROM_BIOSDRVS
    173173%undef EXCLUDE
    174174
     
    184184;       AX, DI
    185185;--------------------------------------------------------------------
    186 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     186%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    187187ALIGN DISPLAY_JUMP_ALIGN
    188188DisplayContext_PrepareOffScreenBufferInESBXwithLengthInCX:
     
    202202    pop     ds
    203203    ret
    204 %endif ; EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     204%endif ; EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    205205
    206206
     
    215215;       AX
    216216;--------------------------------------------------------------------
    217 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     217%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    218218ALIGN DISPLAY_JUMP_ALIGN
    219219DisplayContext_SetCharacterPointerFromBXAX:
     
    235235;       Nothing
    236236;--------------------------------------------------------------------
    237 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     237%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    238238ALIGN DISPLAY_JUMP_ALIGN
    239239DisplayContext_GetCharacterPointerToBXAX:
     
    244244
    245245
    246 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     246%ifdef EXCLUDE_FROM_XUB
    247247    %ifndef MODULE_BOOT_MENU
    248248        %define EXCLUDE
     
    282282;--------------------------------------------------------------------
    283283%ifndef EXCLUDE ; 2 of 3
     284%ifndef EXCLUDE_FROM_BIOSDRVS
    284285ALIGN DISPLAY_JUMP_ALIGN
    285286DisplayContext_SetCharacterAttributeFromAL:
     
    287288    ret
    288289%endif
     290%endif
    289291
    290292
     
    300302;--------------------------------------------------------------------
    301303%ifndef EXCLUDE ; 3 of 3
     304%ifndef EXCLUDE_FROM_BIOSDRVS
    302305ALIGN DISPLAY_JUMP_ALIGN
    303306DisplayContext_SetCharacterOutputParameterFromAX:
     
    305308    ret
    306309%endif
     310%endif
    307311
    308312%undef EXCLUDE
     
    318322;       Nothing
    319323;--------------------------------------------------------------------
    320 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG
     324%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_XTIDECFG OR EXCLUDE_FROM_BIOSDRVS
    321325ALIGN DISPLAY_JUMP_ALIGN
    322326DisplayContext_GetCharacterOutputParameterToDX:
  • trunk/Assembly_Library/Src/Display/DisplayCursor.asm

    r526 r592  
    4848;       Nothing
    4949;--------------------------------------------------------------------
    50 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     50%ifdef EXCLUDE_FROM_XUB
    5151    %ifndef MODULE_BOOT_MENU
    5252        %define EXCLUDE
     
    5454%endif
    5555
    56 %ifndef EXCLUDE
     56%ifndef EXCLUDE OR EXCLUDE_FROM_BIOSDRVS
    5757ALIGN DISPLAY_JUMP_ALIGN
    5858DisplayCursor_SetShapeFromAX:
  • trunk/Assembly_Library/Src/Display/DisplayFormat.asm

    r590 r592  
    142142
    143143.rgcFormatCharToLookupIndex:
    144 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     144%ifndef EXCLUDE_FROM_XUB
    145145    db      "aIAduxsSctz-+%"
    146146%else
     
    150150ALIGN WORD_ALIGN
    151151.rgfnFormatSpecifierParser:
    152 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     152%ifndef EXCLUDE_FROM_XUB
    153153    dw      a_FormatAttributeForNextCharacter
    154154%endif
    155155    dw      I_FormatDashForZero
    156156    dw      A_FormatAttributeForRemainingString
    157 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     157%ifndef EXCLUDE_FROM_XUB
    158158    dw      d_FormatSignedDecimalWord
    159159%endif
     
    161161    dw      x_FormatHexadecimalWord
    162162    dw      s_FormatStringFromSegmentCS
    163 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     163%ifndef EXCLUDE_FROM_XUB
    164164    dw      S_FormatStringFromFarPointer
    165165%endif
    166166    dw      c_FormatCharacter
    167 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     167%ifndef EXCLUDE_FROM_XUB
    168168    dw      t_FormatRepeatCharacter
    169169%endif
    170170    dw      z_FormatStringFromSegmentZero
    171171    dw      PrepareToPrependParameterWithSpaces
    172 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     172%ifndef EXCLUDE_FROM_XUB
    173173    dw      PrepareToAppendSpacesAfterParameter
    174174    dw      percent_FormatPercent
     
    308308;       AX, BX, DX
    309309;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    310 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     310%ifndef EXCLUDE_FROM_XUB
    311311ALIGN DISPLAY_JUMP_ALIGN
    312312a_FormatAttributeForNextCharacter:
     
    330330    ret
    331331
    332 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     332%ifndef EXCLUDE_FROM_XUB
    333333ALIGN DISPLAY_JUMP_ALIGN
    334334d_FormatSignedDecimalWord:
     
    391391    ret
    392392
    393 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     393%ifndef EXCLUDE_FROM_XUB
    394394ALIGN DISPLAY_JUMP_ALIGN
    395395S_FormatStringFromFarPointer:
     
    408408    jmp     DisplayPrint_CharacterFromAL
    409409
    410 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     410%ifndef EXCLUDE_FROM_XUB
    411411ALIGN DISPLAY_JUMP_ALIGN
    412412t_FormatRepeatCharacter:
  • trunk/Assembly_Library/Src/Display/DisplayPage.asm

    r589 r592  
    3131;       AX, DX
    3232;--------------------------------------------------------------------
    33 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG
     33%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_XTIDECFG OR EXCLUDE_FROM_BIOSDRVS
    3434ALIGN DISPLAY_JUMP_ALIGN
    3535DisplayPage_SetFromAL:
     
    4141
    4242
    43 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     43%ifdef EXCLUDE_FROM_XUB
    4444    %define EXCLUDE
    4545    %ifdef MODULE_HOTKEYS OR MODULE_BOOT_MENU
     
    4848%endif
    4949
    50 %ifndef EXCLUDE
     50%ifndef EXCLUDE OR EXCLUDE_FROM_BIOSDRVS
    5151;--------------------------------------------------------------------
    5252; DisplayPage_GetColumnsToALandRowsToAH
  • trunk/Assembly_Library/Src/Display/DisplayPrint.asm

    r590 r592  
    9494;       AX, BH, DX
    9595;--------------------------------------------------------------------
    96 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     96%ifndef EXCLUDE_FROM_XUB
    9797ALIGN DISPLAY_JUMP_ALIGN
    9898DisplayPrint_SignedWordFromAXWithBaseInBL:
     
    163163;       AX, DX, [SS:BP]
    164164;--------------------------------------------------------------------
    165 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG
     165%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_XTIDECFG
    166166ALIGN DISPLAY_JUMP_ALIGN
    167167DisplayPrint_QWordFromSSBPwithBaseInBX:
     
    194194;       AX, DX
    195195;--------------------------------------------------------------------
    196 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     196%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    197197ALIGN DISPLAY_JUMP_ALIGN
    198198DisplayPrint_CharacterBufferFromBXSIwithLengthInCX:
     
    261261;       AX, DX
    262262;--------------------------------------------------------------------
    263 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     263%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    264264ALIGN DISPLAY_JUMP_ALIGN
    265265DisplayPrint_ClearAreaWithHeightInAHandWidthInAL:
     
    292292%endif
    293293
    294 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     294%ifdef EXCLUDE_FROM_XUB
    295295    %define EXCLUDE
    296296    %ifndef MODULE_STRINGS_COMPRESSED
  • trunk/Assembly_Library/Src/File/Directory.asm

    r526 r592  
    9999;       Nothing
    100100;--------------------------------------------------------------------
     101%ifndef EXCLUDE_FROM_XTIDECFG
    101102ALIGN JUMP_ALIGN
    102103Directory_GetMatchCountToAXforSearchStringInDSSIwithAttributesInCX:
     
    115116    pop     dx
    116117    ret
     118%endif
    117119
    118120
  • trunk/Assembly_Library/Src/File/DosCritical.asm

    r526 r592  
    1 ; File name     :   DosCritical.asm
    21; Project name  :   Assembly Library
    3 ; Created date  :   1.9.2010
    4 ; Last update   :   2.9.2010
    5 ; Author        :   Tomi Tilli
    62; Description   :   DOS Critical Error Handler (24h) replacements.
    73
     
    2218;
    2319
     20; Note! Only DOS functions 01h - 0Ch, 30h and 59h can be called from a Critical Error Handler.
    2421
    2522; DOS Critical Error Handler return values
     
    2825    .retryOperation                             resb    1
    2926    .terminateProgramAsThoughInt21hAH4ChCalled  resb    1
    30     .failSystemCallInProgress                   resb    1
     27    .failSystemCallInProgress                   resb    1   ; Needs DOS 3.1+
    3128endstruc
    3229
     
    8380
    8481;--------------------------------------------------------------------
     82; DosCritical_CustomHandler
     83;   Parameters:
     84;       Nothing
     85;   Returns:
     86;       Nothing
     87;   Corrupts registers:
     88;       Nothing
     89;--------------------------------------------------------------------
     90ALIGN JUMP_ALIGN
     91DosCritical_CustomHandler:
     92    add     sp, 6   ; Remove the INT 24h return address and flags from stack
     93
     94    mov     ah, GET_EXTENDED_ERROR_INFORMATION  ; Requires DOS 3.0+
     95    xor     bx, bx
     96    int     DOS_INTERRUPT_21h
     97    mov     [cs:bLastCriticalError], al
     98
     99    pop     ax
     100    pop     bx
     101    pop     cx
     102    pop     dx
     103    pop     si
     104    pop     di
     105    pop     bp
     106    pop     ds
     107    pop     es
     108    iret            ; Return from the INT 21h call
     109
     110bLastCriticalError:     db  0
     111
     112
     113;--------------------------------------------------------------------
    85114; DosCritical_HandlerToIgnoreAllErrors
    86115;   Parameters:
     
    95124    mov     al, CRITICAL_ERROR_ACTION.ignoreErrorAndContinueProcessingRequest
    96125    iret
     126
  • trunk/Assembly_Library/Src/File/Drive.asm

    r589 r592  
    3030;       Nothing
    3131;--------------------------------------------------------------------
     32%ifndef EXCLUDE_FROM_XTIDECFG
    3233ALIGN JUMP_ALIGN
    3334Drive_GetNumberOfAvailableDrivesToAX:
     
    4243    pop     dx
    4344    ret
     45%endif
    4446
    4547
  • trunk/Assembly_Library/Src/File/FileIO.asm

    r526 r592  
    3535;       AX, BX
    3636;--------------------------------------------------------------------
     37%ifndef EXCLUDE_FROM_XTIDECFG
    3738ALIGN JUMP_ALIGN
    3839FileIO_CreateWithPathInDSSIandAttributesInCX:
     
    4041    SKIP2B  bx
    4142    ; Fall to FileIO_OpenWithPathInDSSIandFileAccessInAL
     43%endif
    4244
    4345;--------------------------------------------------------------------
  • trunk/Assembly_Library/Src/Keyboard/Keyboard.asm

    r589 r592  
    3737;       DX
    3838;--------------------------------------------------------------------
    39 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     39%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    4040ALIGN KEYBOARD_JUMP_ALIGN
    4141Keyboard_ReadUserInputtedWordWhilePrinting:
     
    8787;       AX
    8888;--------------------------------------------------------------------
    89 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     89%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    9090ALIGN KEYBOARD_JUMP_ALIGN
    9191Keyboard_ReadUserInputtedStringToESDIWhilePrinting:
     
    9898    xor     bx, bx                              ; Zero character counter
    9999    dec     cx                                  ; Decrement buffer size for NULL
     100%ifdef CLD_NEEDED
    100101    cld
     102%endif
    101103ALIGN KEYBOARD_JUMP_ALIGN
    102104.GetCharacterFromUser:
     
    197199    xor     al, al                              ; Set ZF and clear CF
    198200    ret
    199 %endif ; EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     201%endif ; EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    200202
    201203
     
    209211;       AX
    210212;--------------------------------------------------------------------
    211 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     213%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    212214ALIGN KEYBOARD_JUMP_ALIGN
    213215Keyboard_PrintBackspace:
     
    230232;       AX
    231233;--------------------------------------------------------------------
    232 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     234%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    233235ALIGN KEYBOARD_JUMP_ALIGN
    234236Keyboard_PlayBellForUnwantedKeystroke:
     
    246248;       AX
    247249;--------------------------------------------------------------------
    248 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     250%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    249251ALIGN KEYBOARD_JUMP_ALIGN
    250252Keyboard_PrintInputtedCharacter:
     
    266268;       AX
    267269;--------------------------------------------------------------------
    268 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS   ; Only used when debugging
     270%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS               ; Only used when debugging
    269271ALIGN KEYBOARD_JUMP_ALIGN
    270272Keyboard_RemoveAllKeystrokesFromBuffer:
     
    289291;       Nothing
    290292;--------------------------------------------------------------------
    291 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     293%ifdef EXCLUDE_FROM_XUB
    292294    %define EXCLUDE
    293295    %ifdef MODULE_HOTKEYS OR MODULE_BOOT_MENU
  • trunk/Assembly_Library/Src/LibSizeCheck.asm

    r526 r592  
    2020
    2121; Include .inc files
    22 %define EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     22%define EXCLUDE_FROM_XUB
    2323;%define INCLUDE_DISPLAY_LIBRARY
    2424;%define INCLUDE_FILE_LIBRARY
  • trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm

    r589 r592  
    249249ALIGN JUMP_ALIGN
    250250AppendFileFromDTAinDSSItoOffScreenBuffer:
    251     call    .FilterCurrentDirectory         ; We never want "."
    252     call    .FilterUpDirectoryWhenInRoot    ; No ".." when in root directory
     251    cmp     WORD [si+DTA.szFile], CURRENTDIR_CHARACTERS
     252    je      SHORT .Return                   ; We never want "."
     253    test    dl, dl
     254    jnz     SHORT .NotInRootDirectory
     255    cmp     WORD [si+DTA.szFile], UPDIR_CHARACTERS
     256    je      SHORT .Return                   ; No ".." when in root directory
     257.NotInRootDirectory:
    253258    inc     cx                              ; Nothing filtered so increment files/directories
    254259
     
    262267    pop     si
    263268    pop     bp
    264     ret
    265 
    266 ;--------------------------------------------------------------------
    267 ; .FilterCurrentDirectory
    268 ; .FilterUpDirectoryWhenInRoot
    269 ;   Parameters:
    270 ;       DL:     Zero if root directory selected
    271 ;       DS:SI:  Ptr to DTA containing file information
    272 ;   Returns:
    273 ;       Nothing
    274 ;       Returns from AppendFileToBufferInESDIfromDtaInDSSI when filtering
    275 ;   Corrupts registers:
    276 ;       AX
    277 ;--------------------------------------------------------------------
    278 ALIGN JUMP_ALIGN
    279 .FilterCurrentDirectory:
    280     cmp     WORD [si+DTA.szFile], CURRENTDIR_CHARACTERS
    281     je      SHORT .DoFilter
    282     ret
    283 
    284 ALIGN JUMP_ALIGN
    285 .FilterUpDirectoryWhenInRoot:
    286     test    dl, dl          ; Set ZF if root directory selected
    287     jnz     SHORT .ReturnWithoutFiltering
    288     cmp     WORD [si+DTA.szFile], UPDIR_CHARACTERS
    289     jne     SHORT .ReturnWithoutFiltering
    290 .DoFilter:
    291     add     sp, BYTE 2      ; Remove return address from stack
    292 ALIGN JUMP_ALIGN, ret
    293 .ReturnWithoutFiltering:
     269.Return:
    294270    ret
    295271
     
    473449ALIGN JUMP_ALIGN
    474450GetInfoLinesToCXandDialogFlagsToAX:
    475     xor     ax, ax
    476     call    GetDialogFlagsToAL
    477     jmp     Bit_GetSetCountToCXfromAX
     451    ePUSH_T ax, Bit_GetSetCountToCXfromAX
     452    xor     ah, ah
     453    ; Fall to GetDialogFlagsToAL
    478454
    479455;--------------------------------------------------------------------
     
    696672    call    .ChangeDriveToUserSelectionFromIoInDSSI
    697673    add     sp, BYTE DRIVE_DIALOG_IO_size
     674.UserCancelledDriveChange:
    698675    ret
    699676
     
    729706    jne     SHORT .UserCancelledDriveChange
    730707
     708    ; Install our Custom Critical Error Handler to catch "Drive Not Ready" errors. This handler only works on DOS 3.0+ systems
     709    ; but that should be OK because only DOS 3.1+ will trigger it. Under older DOS versions drives are enumerated using
     710    ; GET_DOS_DRIVE_PARAMETER_BLOCK_FOR_SPECIFIC_DRIVE which will access the drive so we know it is available at this point.
     711    mov     dx, DosCritical_CustomHandler
     712    call    DosCritical_InstallNewHandlerFromCSDX
     713
     714    ; Save the current drive on stack in case the selected drive is not ready and the user decides to cancel the change.
     715    call    Drive_GetDefaultToAL
     716    xchg    dx, ax
     717
     718.RetryDrive:
     719    push    dx                                  ; Save the previous current drive to stack
     720
    731721    mov     dl, [si+DRIVE_DIALOG_IO.bReturnDriveNumber]
    732722    call    Drive_SetDefaultFromDL
     723
     724    ; Now we must try to force a media access to catch "Drive Not Ready".
     725    push    ds
     726    push    ss
     727    pop     ds
     728    ePUSH_T ax, CURRENTDIR_CHARACTERS
     729    mov     cx, FLG_FILEATTR_DIRECTORY
     730    mov     dx, sp
     731    mov     ax, FIND_FIRST_MATCHING_FILE<<8
     732    int     DOS_INTERRUPT_21h
     733    pop     ax
     734    pop     ds
     735
     736    pop     dx                                  ; Restore the previous current drive from stack
     737
     738    xchg    ah, [cs:bLastCriticalError]         ; Zero bLastCriticalError and fetch error code to AH
     739    cmp     ah, ERR_DOS_DRIVE_NOT_READY
     740    jne     SHORT .DriveIsReady
     741
     742    mov     bx, g_szDlgDriveNotReady
     743    call    Dialogs_DisplayYesNoResponseDialogWithTitleStringInBX
     744    jz      SHORT .RetryDrive
     745    ; The user cancelled the drive change. Restore current drive to what it was previously.
     746    call    Drive_SetDefaultFromDL
     747    jmp     DosCritical_RestoreDosHandler
     748
     749.DriveIsReady:
     750    call    DosCritical_RestoreDosHandler
    733751    jmp     RefreshFilesToDisplay
    734 .UserCancelledDriveChange:
    735     ret
    736752
    737753
  • trunk/Assembly_Library/Src/Menu/MenuAttributes.asm

    r526 r592  
    9191
    9292.rgcColorAttributes:
     93; Classic (default theme)
    9394istruc ATTRIBUTE_CHARS
    9495    at  ATTRIBUTE_CHARS.cBordersAndBackground,  db  COLOR_ATTRIBUTE(COLOR_YELLOW, COLOR_BLUE)
     
    100101    at  ATTRIBUTE_CHARS.cNormalTimeout,         db  COLOR_ATTRIBUTE(COLOR_GREEN, COLOR_BLUE)
    101102iend
     103ColorTheme  equ     MenuAttribute_GetToAXfromTypeInSI.rgcColorAttributes
    102104
    103105.rgcBlackAndWhiteAttributes:    ; Only COLOR_WHITE, COLOR_BRIGHT_WHITE and COLOR_BLACK should be used
  • trunk/Assembly_Library/Src/Menu/MenuBorders.asm

    r583 r592  
    8787;       AX, BX, CX, DX, SI, DI
    8888;--------------------------------------------------------------------
    89 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     89%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_XTIDECFG
    9090ALIGN MENU_JUMP_ALIGN
    9191MenuBorders_RefreshItemBorders:
  • trunk/Assembly_Library/Src/Menu/MenuInit.asm

    r532 r592  
    114114;       AX, BX, DX
    115115;--------------------------------------------------------------------
    116 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     116%ifndef EXCLUDE_FROM_XUB
    117117ALIGN MENU_JUMP_ALIGN
    118118MenuInit_CloseMenuIfExitEventAllows:
     
    138138
    139139
    140 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     140%ifndef EXCLUDE_FROM_XUB
    141141;--------------------------------------------------------------------
    142142; MenuInit_HighlightItemFromAX
     
    168168    mov     ax, [bp+MENUINIT.wHighlightedItem]
    169169    ret
    170 %endif ; EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     170%endif ; EXCLUDE_FROM_XUB
    171171
    172172
     
    183183;       Nothing
    184184;--------------------------------------------------------------------
    185 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     185%ifndef EXCLUDE_FROM_XUB
     186%ifndef EXCLUDE_FROM_XTIDECFG
    186187ALIGN MENU_JUMP_ALIGN
    187188MenuInit_SetTitleHeightFromAL:
     
    193194    mov     [bp+MENUINIT.bInfoLines], al
    194195    ret
     196%endif ; EXCLUDE_FROM_XTIDECFG
    195197
    196198ALIGN MENU_JUMP_ALIGN
     
    198200    mov     [bp+MENUINIT.wItems], ax
    199201    ret
    200 %endif
     202%endif ; EXCLUDE_FROM_XUB
    201203
    202204
     
    212214;       Nothing
    213215;--------------------------------------------------------------------
    214 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     216%ifndef EXCLUDE_FROM_XUB
     217%ifndef EXCLUDE_FROM_XTIDECFG
    215218ALIGN MENU_JUMP_ALIGN
    216219MenuInit_SetUserDataFromDSSI:
     
    218221    mov     [bp+MENU.dwUserData+2], ds
    219222    ret
     223%endif ; EXCLUDE_FROM_XTIDECFG
    220224
    221225ALIGN MENU_JUMP_ALIGN
     
    223227    lds     si, [bp+MENU.dwUserData]
    224228    ret
    225 %endif
     229%endif ; EXCLUDE_FROM_XUB
  • trunk/Assembly_Library/Src/Menu/MenuLocation.asm

    r583 r592  
    5555;       Nothing
    5656;--------------------------------------------------------------------
    57 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     57%ifndef EXCLUDE_FROM_XUB
    5858MenuLocation_GetItemBordersTopLeftCoordinatesToAX:
    5959%endif
  • trunk/Assembly_Library/Src/Menu/MenuText.asm

    r583 r592  
    3232;       AX, BX, CX, DX, SI, DI
    3333;--------------------------------------------------------------------
    34 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     34%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_XTIDECFG
    3535ALIGN MENU_JUMP_ALIGN
    3636MenuText_ClearTitleArea:
  • trunk/Assembly_Library/Src/Serial/SerialServer.asm

    r568 r592  
    6161        push    ax              ; working copy on the top of the stack
    6262
    63 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS   ; DF already cleared in Int13h.asm
     63%ifndef EXCLUDE_FROM_XUB        ; DF already cleared in Int13h.asm
     64%ifdef CLD_NEEDED
    6465        cld
     66%endif
    6567%endif
    6668
  • trunk/Assembly_Library/Src/String/Char.asm

    r526 r592  
    5151;       Nothing
    5252;--------------------------------------------------------------------
    53 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     53%ifdef EXCLUDE_FROM_XUB
    5454    %ifndef MODULE_HOTKEYS
    5555        %define EXCLUDE
     
    5757%endif
    5858
    59 %ifndef EXCLUDE
     59%ifndef EXCLUDE OR EXCLUDE_FROM_BIOSDRVS
    6060ALIGN STRING_JUMP_ALIGN
    6161Char_IsLowerCaseLetterInAL:
     
    7676;       Nothing
    7777;--------------------------------------------------------------------
    78 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     78%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    7979ALIGN STRING_JUMP_ALIGN
    8080Char_IsUpperCaseLetterInAL:
     
    9595;       Nothing
    9696;--------------------------------------------------------------------
    97 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     97%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    9898ALIGN STRING_JUMP_ALIGN
    9999Char_IsHexadecimalDigitInAL:
     
    136136;       Nothing
    137137;--------------------------------------------------------------------
    138 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     138%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    139139ALIGN STRING_JUMP_ALIGN
    140140Char_ConvertIntegerToALfromDigitInALwithBaseInBX:
     
    166166;       Nothing
    167167;--------------------------------------------------------------------
    168 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     168%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    169169ALIGN STRING_JUMP_ALIGN
    170170Char_CharIsValid:
     
    174174
    175175
    176 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     176%ifdef EXCLUDE_FROM_XUB
    177177    %ifndef MODULE_HOTKEYS
    178178        %define EXCLUDE
     
    201201;       Nothing
    202202;--------------------------------------------------------------------
    203 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     203%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    204204ALIGN STRING_JUMP_ALIGN
    205205Char_ALtoLowerCaseLetter:
     
    218218;       Nothing
    219219;--------------------------------------------------------------------
    220 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     220%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    221221ALIGN STRING_JUMP_ALIGN
    222222Char_ALtoUpperCaseLetter:
     
    237237;       Nothing
    238238;--------------------------------------------------------------------
    239 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     239%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    240240Char_ChangeCaseInAL:
    241241    xor     al, 32
     
    254254;       Nothing
    255255;--------------------------------------------------------------------
    256 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     256%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_BIOSDRVS
    257257ALIGN STRING_JUMP_ALIGN
    258258Char_GetFilterFunctionToDXforNumericBaseInBX:
  • trunk/Assembly_Library/Src/Time/TimerTicks.asm

    r526 r592  
    4848;       CX
    4949;--------------------------------------------------------------------
    50 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     50%ifndef EXCLUDE_FROM_XUB
    5151%ifndef EXCLUDE_FROM_XTIDECFG
    5252ALIGN JUMP_ALIGN
     
    6464    div     cx      ; Divide DX:AX by CX, Minutes to AX, remainder ticks to DX
    6565    ret
    66 %endif ; EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    67 
    68 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG
     66%endif ; EXCLUDE_FROM_XUB
     67
     68%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_XTIDECFG
    6969ALIGN JUMP_ALIGN
    7070TimerTicks_GetSecondsToAXandRemainderTicksToDXfromTicksInDX:
     
    8080
    8181
    82 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     82%ifdef EXCLUDE_FROM_XUB
    8383    %ifndef MODULE_BOOT_MENU
    8484        %define EXCLUDE
     
    164164;       Nothing
    165165;--------------------------------------------------------------------
    166 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     166%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_XTIDECFG
    167167ALIGN JUMP_ALIGN
    168168TimerTicks_GetElapsedToAXandResetDSBX:
     
    184184;       Nothing
    185185;--------------------------------------------------------------------
    186 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     186%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_XTIDECFG
    187187ALIGN JUMP_ALIGN
    188188TimerTicks_GetElapsedToAXfromDSBX:
     
    202202;       Nothing
    203203;--------------------------------------------------------------------
    204 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     204%ifdef EXCLUDE_FROM_XUB
    205205    %ifndef MODULE_BOOT_MENU OR MODULE_HOTKEYS
    206206        %define EXCLUDE
  • trunk/Assembly_Library/Src/Util/Bit.asm

    r526 r592  
    2424; Bit_GetSetCountToCXfromDXAX
    2525;   Parameters
    26 ;       DX:AX:      Source DWORD
     26;       DX:AX:  Source DWORD
    2727;   Returns:
    2828;       CX:     Number of bits set in DX:AX
     
    5858    push    ax
    5959
    60     xor     cx, cx
     60    mov     cx, -1
    6161ALIGN JUMP_ALIGN
    62 .BitScanLoop:
     62.IncrementCX:
     63    inc     cx
     64.ShiftLoop:
    6365    shr     ax, 1
    64     jz      SHORT .LastBitInCF
    65     adc     cl, ch
    66     jmp     SHORT .BitScanLoop
    67 ALIGN JUMP_ALIGN
    68 .LastBitInCF:
    69     adc     cl, ch
     66    jc      SHORT .IncrementCX
     67    jnz     SHORT .ShiftLoop
    7068
    7169    pop     ax
     
    9593    ret
    9694
     95
    9796;--------------------------------------------------------------------
    9897; Bit_SetToAXfromIndexInCL
     
    115114    pop     dx
    116115    ret
     116
  • trunk/Assembly_Library/Src/Util/Math.asm

    r589 r592  
    3333;       AX
    3434;--------------------------------------------------------------------
    35 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG
     35%ifndef EXCLUDE_FROM_XTIDECFG
    3636ALIGN JUMP_ALIGN
    3737Math_DivQWatSSBPbyCX:
    38 %if 1
    39     xor     dx, dx
    40     mov     ax, [bp+6]      ; Load highest divident WORD to DX:AX
    41     div     cx
    42     mov     [bp+6], ax      ; Store quotient
    43 
    44     mov     ax, [bp+4]
    45     div     cx
    46     mov     [bp+4], ax
    47 
    48     mov     ax, [bp+2]
    49     div     cx
    50     mov     [bp+2], ax
    51 
    52     mov     ax, [bp]
    53     div     cx
    54     mov     [bp], ax
    55     ret
    56 %else ; ~1
    57 ; This is about half the size compared to the above code but it's not tested which is why it's commented away.
    5838    push    di
    5939    mov     di, 6
     
    6545    dec     di
    6646    dec     di
    67     jns     .Next
     47    jns     SHORT .Next
    6848    pop     di
    6949    ret
    70 %endif ; 1
    7150%endif
    7251
     
    8362;       Nothing
    8463;--------------------------------------------------------------------
    85 %ifndef EXCLUDE_FROM_XTIDECFG
     64%ifndef EXCLUDE_FROM_XTIDECFG OR EXCLUDE_FROM_BIOSDRVS
    8665ALIGN JUMP_ALIGN
    8766Math_DivDXAXbyCX:
  • trunk/Assembly_Library/Src/Util/Memory.asm

    r580 r592  
    2424; OPTIMIZE_STRING_OPERATION
    2525;   Parameters
    26 ;       %1:     Repeat instruction
    27 ;       %2:     String instruction without size (for example MOVS and not MOVSB or MOVSW)
     26;       %1:     String instruction without size (only MOVS and STOS is supported)
    2827;       CX:     Number of BYTEs to operate
    29 ;       DS:SI:  Ptr to source data
     28;       DS:SI:  Ptr to source data (for MOVS)
    3029;       ES:DI:  Ptr to destination
    3130;   Returns:
     31;       CF:     Cleared
     32;       CX:     Zero
    3233;       SI, DI: Updated by number of bytes operated
    3334;   Corrupts registers:
    3435;       Nothing
    3536;--------------------------------------------------------------------
    36 %macro OPTIMIZE_STRING_OPERATION 2
    37     push    cx
    38 
    39     shr     cx, 1           ; Operate with WORDs for performance
    40     jz  %%HandleRemainingByte
    41     %1      %2w
    42 %%HandleRemainingByte:
    43     jnc     SHORT %%OperationCompleted
    44     %2b
    45 
    46 ALIGN JUMP_ALIGN
    47 %%OperationCompleted:
    48     pop     cx
     37%macro OPTIMIZE_STRING_OPERATION 1
     38    shr     cx, 1
     39    rep     %1w
     40    eRCL_IM cx, 1
     41    rep     %1b
    4942%endmacro
    5043
     
    5750;       ES:DI:  Ptr to destination buffer
    5851;   Returns:
     52;       CF:     Cleared
    5953;       SI, DI: Updated by number of bytes copied
    6054;   Corrupts registers:
    6155;       Nothing
    6256;--------------------------------------------------------------------
    63 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     57%ifndef EXCLUDE_FROM_XUB
    6458ALIGN JUMP_ALIGN
    6559Memory_CopyCXbytesFromDSSItoESDI:
    66     OPTIMIZE_STRING_OPERATION rep, movs
     60    push    cx
     61    OPTIMIZE_STRING_OPERATION movs
     62    pop     cx
    6763    ret
    6864%endif
     
    7773;       Nothing
    7874;   Corrupts registers:
    79 ;       Nothing
     75;       CX
    8076;--------------------------------------------------------------------
    8177%ifdef INCLUDE_MENU_LIBRARY
     
    10298;       DI:     Updated by number of BYTEs stored
    10399;   Corrupts registers:
    104 ;       AX
     100;       AX, CX
    105101;--------------------------------------------------------------------
    106102ALIGN JUMP_ALIGN
     
    118114;       DI:     Updated by number of BYTEs stored
    119115;   Corrupts registers:
    120 ;       Nothing
     116;       CX
    121117;--------------------------------------------------------------------
    122 ALIGN JUMP_ALIGN
    123118Memory_StoreCXbytesFromAccumToESDI:
    124     OPTIMIZE_STRING_OPERATION rep, stos
     119    OPTIMIZE_STRING_OPERATION stos
    125120    ret
    126121
     
    135130;       AX
    136131;--------------------------------------------------------------------
    137 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     132%ifndef EXCLUDE_FROM_XUB
    138133ALIGN JUMP_ALIGN
    139134Memory_ReserveCXbytesFromStackToDSSI:
  • trunk/Assembly_Library/Src/Util/Reboot.asm

    r526 r592  
    4444    mov     al, 0FEh                ; System reset (AT+ keyboard controller)
    4545    out     64h, al                 ; Reset computer (AT+)
    46 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     46%ifndef EXCLUDE_FROM_XUB
    4747    %ifdef INCLUDE_TIME_LIBRARY
    4848        mov     ax, 10
  • trunk/Assembly_Library/Src/Util/Registers.asm

    r526 r592  
    5959%endif
    6060
    61 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     61%ifndef EXCLUDE_FROM_XUB
    6262ALIGN JUMP_ALIGN
    6363Registers_CopySSBPtoDSSI:
     
    9191;
    9292;--------------------------------------------------------------------
    93 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG
     93%ifndef EXCLUDE_FROM_XUB OR EXCLUDE_FROM_XTIDECFG
    9494ALIGN JUMP_ALIGN
    9595Registers_NormalizeESSI:
    9696    mov         cx, si
    97     and         si, byte 0fh
    98     jmp         Registers_NormalizeFinish
     97    and         si, BYTE 0Fh
     98    jmp         SHORT Registers_NormalizeFinish
    9999
    100100ALIGN JUMP_ALIGN
    101101Registers_NormalizeESDI:
    102102    mov         cx, di
    103     and         di, byte 0fh
     103    and         di, BYTE 0Fh
    104104;;; fall-through
    105105
  • trunk/Assembly_Library/Src/Util/Size.asm

    r580 r592  
    7070    jae     SHORT Size_DivideSizeInBXDXAXby1024andIncrementMagnitudeInCX
    7171    add     sp, BYTE 2                  ; Clean return address from stack
    72     xchg    si, cx                      ; CX = Remainder (0...1023), SI = Magnitude
    7372
    7473    ; Convert remainder to tenths
    75     xchg    bx, ax                      ; Store AX
    76     mov     al, 5                       ; AH = 0
    77     mul     cx                          ; DX:AX = remainder * (10 / 2)
    78 %ifdef USE_186
    79     shr     ax, 9                       ; Divide AX by (1024 / 2)
    80 %else
    81     shr     ax, 1
    82     mov     al, ah
    83     cbw
    84 %endif
    85     xchg    cx, ax                      ; CX = tenths
    86     xchg    ax, bx
     74    mov     bx, 640
     75    xchg    bx, ax                      ; BX = Size, AX = (10 / 1024) * 65536
     76    mul     si                          ; DX = Remainder * (10 / 1024)
     77    xchg    dx, ax
     78    xchg    cx, ax                      ; CX = Tenths, AX = Magnitude
     79    xchg    bx, ax                      ; AX = Size, BX = Magnitude
    8780
    8881    ; Convert magnitude to character
    89     mov     dl, [cs:si+.rgbMagnitudeToChar]
     82    mov     dl, [cs:bx+.rgbMagnitudeToChar]
    9083
    9184    pop     si
     
    154147;       Nothing
    155148;--------------------------------------------------------------------
    156 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     149%ifdef EXCLUDE_FROM_XUB
    157150    %ifdef USE_386
    158151        %define EXCLUDE
  • trunk/Assembly_Library/Src/Util/Sort.asm

    r526 r592  
    6363    push    cx
    6464
     65%ifdef CLD_NEEDED
    6566    cld
     67%endif
    6668    mov     cx, di                      ; Restore item size to CX
    6769    xor     ax, ax                      ; Zero starting index
     
    191193
    192194    cmp     ax, dx  ; If (left <= right)
    193     jg      SHORT ArrangeItemsInRangeAXtoDXtoBothSidesOfPivotInESDI
     195    jg      SHORT .BreakLoopSinceAllItemsExamined
    194196    call    SwapItemsFromIndexesAXandDX
    195197    inc     ax
  • trunk/BIOS_Drive_Information_Tool/Src/AtaInfo.asm

    r558 r592  
    7171
    7272    ; Print L-CHS generated by XTIDE Universal BIOS
    73     call    DisplayXTUBcompatibilityInfoUsingAtaInfoFromDSBX
     73    call    DisplayXUBcompatibilityInfoUsingAtaInfoFromDSBX
    7474
    7575.SkipAtaInfoSinceError:
     
    8080
    8181;--------------------------------------------------------------------
    82 ; DisplayXTUBcompatibilityInfoUsingAtaInfoFromDSBX
     82; DisplayPCHSusingAtaInfoFromDSBX
    8383;   Parameters:
    8484;       BX:     Offset to ATA Information
     
    193193DisplayPioModeInformationUsingAtaInfoFromDSBX:
    194194    ; Load standard timings (up to PIO-2)
    195     mov     ax, [bx+ATA1.bPioMode]
     195    mov     al, [bx+ATA1.bPioMode]
     196    cbw
    196197    mov     si, ax
    197     shl     si, 1       ; Shift for WORD lookup
     198    eSHL_IM si, 1       ; Shift for WORD lookup
    198199    mov     dx, [si+.rgwStandardPioTimings] ; Load min cycle time
    199200    mov     cx, -1      ; IORDY not supported
     
    203204    jz      SHORT .NoAdvancedPioModesSupported
    204205
    205     mov     si, [bx+ATA2.bPIOSupp]  ; Advanced mode flags
     206    mov     si, 0FFh
     207    and     si, [bx+ATA2.bPIOSupp]  ; Advanced mode flags
     208    jz      SHORT .NoAdvancedPioModesSupported
    206209.IncrementPioMode:
    207210    inc     ax
     
    222225
    223226;--------------------------------------------------------------------
    224 ; DisplayXTUBcompatibilityInfoUsingAtaInfoFromDSBX
     227; DisplayXUBcompatibilityInfoUsingAtaInfoFromDSBX
    225228;   Parameters:
    226229;       BX:     Offset to ATA Information
     
    230233;       AX, BX, CX, DX, BP, SI, DI
    231234;--------------------------------------------------------------------
    232 DisplayXTUBcompatibilityInfoUsingAtaInfoFromDSBX:
     235DisplayXUBcompatibilityInfoUsingAtaInfoFromDSBX:
    233236    ; Display header
    234     mov     ax, g_szXTUBversion
    235     mov     si, g_szXTUB
     237    mov     ax, g_szXUBversion
     238    mov     si, g_szXUB
    236239    call    Print_FormatStringFromSIwithParameterInAX
    237240
  • trunk/BIOS_Drive_Information_Tool/Src/Print.asm

    r589 r592  
    149149    xor     dh, dh
    150150    mov     si, dx
    151     shl     si, 1       ; Shift for WORD lookup
     151    eSHL_IM si, 1       ; Shift for WORD lookup
    152152    push    WORD [si+.rgszXlateModeToString]
    153153
     
    197197;--------------------------------------------------------------------
    198198Print_NameFromAtaInfoInBX:
     199%ifdef CLD_NEEDED
    199200    cld
     201%endif
     202    mov     bp, sp
    200203    lea     si, [bx+ATA1.strModel]
     204    push    si
    201205    mov     di, si
    202206    mov     cx, A1_MODEL_NUMBER_LENGTH/2
     
    211215    stosb               ; Terminate with NULL
    212216
    213     mov     bp, sp
    214     lea     si, [bx+ATA1.strModel]
    215     push    si
    216217    mov     si, g_szFormatDrvName
    217218    jmp     SHORT JumpToFormatNullTerminatedStringFromSI
  • trunk/BIOS_Drive_Information_Tool/Src/Strings.asm

    r590 r592  
    2121SECTION .data
    2222
    23 g_szProgramName:    db  "BIOS Drive Information Tool v1.0.2",CR,LF
    24                     db  "(C) 2012-2016 by XTIDE Universal BIOS Team",CR,LF
     23g_szProgramName:    db  "BIOS Drive Information Tool v1.0.3",CR,LF
     24                    db  "(C) 2012-2018 by XTIDE Universal BIOS Team",CR,LF
    2525                    db  "Released under GNU GPL v2",CR,LF
    2626                    db  "http://xtideuniversalbios.org/",CR,LF,NULL
     
    4242g_szBlockMode:      db  " Block mode   : Set to %u from max %u sectors",CR,LF,NULL
    4343g_szPIO:            db  " PIO mode     : Max %u, Min cycle times: %u ns, with IORDY %d ns",CR,LF,NULL
    44 g_szXTUB:           db  "XTIDE Universal BIOS %s generates following L-CHS...",CR,LF,NULL
    45 g_szXTUBversion:    db  ROM_VERSION_STRING  ; This one is NULL terminated
     44g_szXUB:            db  "XTIDE Universal BIOS %s generates following L-CHS...",CR,LF,NULL
     45g_szXUBversion:     db  ROM_VERSION_STRING  ; This one is NULL terminated
    4646
    4747g_szOldInfoHeader:  db  "Old INT 13h information from AH=08h and AH=15h...",CR,LF,NULL
  • trunk/BIOS_Drive_Information_Tool/makefile

    r359 r592  
    5252# Assembler preprocessor defines.                               #
    5353#################################################################
    54 DEFINES =
     54DEFINES = EXCLUDE_FROM_BIOSDRVS
    5555DEFINES_XT = ELIMINATE_CGA_SNOW
    5656DEFINES_XTPLUS = USE_186 ELIMINATE_CGA_SNOW
     
    9898ASFLAGS += $(IHEADERS)          # Set header file directory paths
    9999ASFLAGS += -Worphan-labels      # Warn about labels without colon
    100 ASFLAGS += -O9                  # Optimize operands to their shortest forms
     100ASFLAGS += -Ox                  # Optimize operands to their shortest forms
    101101
    102102
     
    130130    @upx -qq --8086 --ultra-brute $(TARGET).$(EXTENSION)
    131131    @echo Done! XT version is ready for release.
     132
     133xt_unused: xt
     134    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XT) -o"$(TARGET)_xt_unused.asm" -E -DCHECK_FOR_UNUSED_ENTRYPOINTS
     135    @perl ..\Tools\unused.pl $(TARGET)_xt.lst $(TARGET)_xt_unused.asm
     136
  • trunk/Serial_Server/library/Checksum.cpp

    r589 r592  
    343343            }
    344344
    345             bbuff[ rand() % 512 ] ^= bit[ rand() % 8 ];
     345            bbuff[ rand() & 511 ] ^= bit[ rand() & 7 ];
    346346
    347347            if( b > 0 )
  • trunk/Serial_Server/library/Image.cpp

    r589 r592  
    131131            sect = 63;
    132132        }
    133         else if( (totallba % 16) != 0 || ((totallba/16) % 63) != 0 )
     133        else if( (totallba & 15) != 0 || ((totallba/16) % 63) != 0 )
    134134        {
    135135            log( -1, "'%s', file size does not match standard CHS geometry (x:16:63), please specify geometry explicitly with -g", name );
  • trunk/Serial_Server/win32/Win32.cpp

    r589 r592  
    3737char *bannerStrings[] = {
    3838    "SerDrive - XTIDE Universal BIOS Serial Drive Server",
    39     "Copyright (C) 2012-2013 by XTIDE Universal BIOS Team",
     39    "Copyright (C) 2012-2018 by XTIDE Universal BIOS Team",
    4040    "Released under GNU GPL v2, with ABSOLUTELY NO WARRANTY",
    4141    ROM_VERSION_STRING,
     
    4949    "http://www.gnu.org/licenses/gpl-2.0.html",
    5050    "",
    51     "Visit the wiki on http://code.google.com/p/xtideuniversalbios for detailed",
    52     "serial drive usage directions.",
     51    "Visit the wiki on http://xtideuniversalbios.org for detailed usage directions.",
    5352    "",
    5453    "Usage: SerDrive [options] imagefile [[slave-options] slave-imagefile]",
  • trunk/XTIDE_Universal_BIOS/Inc/BootVars.inc

    r589 r592  
    2828; Number of times to retry booting before accepting error
    2929BOOT_READ_RETRY_TIMES       EQU     3
    30 
    31 
    3230
    3331; Pre-boot variables. These do not exist after successful boot to OS.
     
    6967%endif ; MODULE_HOTKEYS
    7068
     69; MAX_HARD_DISK_NAME_LENGTH must be defined ahead of the DRVDETECTINFO structure to avoid problems with NASM
     70MAX_HARD_DISK_NAME_LENGTH   EQU     30      ; Bytes reserved for drive name
     71
    7172struc DRVDETECTINFO
    7273    .StartOfDrvDetectInfo:
     
    7980endstruc
    8081
    81 ; Boot Menu Information Table. These are generated for all XTIDE Universal
    82 ; BIOS drives. Available only until boot is successful.
    83 MAX_HARD_DISK_NAME_LENGTH           EQU     30      ; Bytes reserved for drive name
    8482DPT_DRVDETECTINFO_SIZE_MULTIPLIER   EQU     DRVDETECTINFO_size / LARGEST_DPT_SIZE
    8583
    86 
    8784%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    88 
    8985%if MAX_HARD_DISK_NAME_LENGTH % 2 <> 0
    9086    %error "MAX_HARD_DISK_NAME_LENGTH needs to be a multiple of 2, memory is moved with word operations."
    9187%endif
    92 
    93 %if DRVDETECTINFO_size % LARGEST_DPT_SIZE <> 0
    94     %error "DRVDETECTINFO's size must be an even multiple of DPT's size.  Add or remove padding at the bottom of DRVDETECTINFO to bring the two sizes into alignment.  As DRVDETECTINFO is only used at boot time, with plenty of memory to consume, it is OK to waste some space here."
    95 %endif
    96 
    97 %if DRVDETECTINFO.szDrvName <> 0
    98     %error "DRVDETECTINFO.szDrvName is assumed to be the first member of struc DRVDETECTINFO, in BootMenuPrint_RefreshItem"
    99 %endif
    100 
    10188%endif
    10289
  • trunk/XTIDE_Universal_BIOS/Inc/IdeIO.inc

    r589 r592  
    5757%ifndef MODULE_8BIT_IDE ; Standard IDE controllers only
    5858
     59    eMOVZX  bx, [di+DPT.bIdevarsOffset]
    5960    %ifnidni %1, dx
    6061        mov     dx, %1
    6162    %endif
    62     eMOVZX  bx, BYTE [di+DPT.bIdevarsOffset]
    6363    add     dx, [cs:bx+IDEVARS.wControlBlockPort]
    6464    out     dx, al
  • trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc

    r589 r592  
    3535    .wDisplayMode       resb    2   ; Display mode for boot menu
    3636    .wBootTimeout       resb    2   ; Boot Menu selection timeout in system timer ticks
     37    .pColorTheme        resb    2   ; Ptr to the color attribute struc used by the boot menu and hotkey bar
    3738    .bIdeCnt            resb    1   ; Number of available IDE controllers
    3839    .bBootDrv           resb    1   ; Default drive to boot from
     
    182183endstruc
    183184
    184 ; Bit defines for DRVPARAMS.wFlags
     185; Bit defines for DRVPARAMS.wFlags - these flags are accessed as bytes so changes here might require changes elsewhere
    185186MASK_DRVPARAMS_WRITECACHE       EQU (3<<0)  ; Bits 0...1, Drive internal write cache settings (must start at bit 0)
    186187    DEFAULT_WRITE_CACHE             EQU 0   ; Must be 0
  • trunk/XTIDE_Universal_BIOS/Inc/Version.inc

    r584 r592  
    2020
    2121; Flash signature revisions:
     22; XTIDE206  Added support for Color Themes
    2223; XTIDE205  Added DEVICE_8BIT_XTCF_PIO16_WITH_BIU_OFFLOAD after other XT-CF
    2324;           PIO modes (prevents empty indexes in PIO jump tables)
     
    4849%define TITLE_STRING            TITLE_STRING_START, TITLE_STRING_END
    4950%define ROM_VERSION_STRING      "v2.0.0",BETA,"3+ (",__DATE__,")",NULL
    50 %define FLASH_SIGNATURE         "XTIDE205"  ; Do not terminate with NULL
     51%define FLASH_SIGNATURE         "XTIDE206"  ; Do not terminate with NULL
    5152
    5253
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm

    r589 r592  
    200200%ifdef MODULE_IRQ
    201201    test    BYTE [bp+IDEPACK.bDeviceControl], FLG_DEVCONTROL_nIEN
     202%ifdef USE_386
     203    jnz     IdeWait_IRQorStatusFlagInBLwithTimeoutInBH
     204%else
    202205    jz      SHORT .PollStatusFlagInsteadOfWaitIrq
    203206    jmp     IdeWait_IRQorStatusFlagInBLwithTimeoutInBH
    204207.PollStatusFlagInsteadOfWaitIrq:
    205208%endif
     209%endif ; MODULE_IRQ
    206210    jmp     IdeWait_PollStatusFlagInBLwithTimeoutInBH
    207211
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeDPT.asm

    r582 r592  
    121121    jnz     SHORT .ChangeTo32bitDevice
    122122
    123     and     BYTE [di+DPT.bFlagsHigh], ~FLGH_DPT_IORDY   ; No IORDY supported if need to limit
     123    and     [di+DPT.bFlagsHigh], ah     ; Mask off FLGH_DPT_IORDY if IORDY not supported
    124124    MIN_U   [di+DPT_ADVANCED_ATA.bPioMode], al
    125125    mov     [di+DPT_ADVANCED_ATA.wMinPioCycleTime], bx
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/JrIdeTransfer.asm

    r545 r592  
    147147    lds     di, [bp+MEMPIOVARS.fpDPT]           ; DPT now in DS:DI
    148148%ifdef USE_386
    149     movzx   cx, BYTE [bp+MEMPIOVARS.bSectorsDone]
     149    movzx   cx, [bp+MEMPIOVARS.bSectorsDone]
    150150%else
    151151    mov     ch, 0                               ; Preserve CF
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm

    r589 r592  
    9797    sti                                 ; Enable interrupts
    9898%endif
     99%ifdef CLD_NEEDED
    99100    cld                                 ; String instructions to increment pointers
     101%endif
    100102    ePUSHA
    101103    push    ds
     
    193195
    194196    ; Push old INT 13h handler and restore registers
     197%ifdef USE_386
     198    push    DWORD [RAMVARS.fpOldI13h]
     199%else
    195200    push    WORD [RAMVARS.fpOldI13h+2]
    196201    push    WORD [RAMVARS.fpOldI13h]
     202%endif
    197203    mov     bx, [bp+IDEPACK.intpack+INTPACK.bx]
    198204    mov     di, [bp+IDEPACK.intpack+INTPACK.di]
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm

    r567 r592  
    126126    mov     cx, NUMBER_OF_IDEVARS
    127127
    128 .loop:
     128.Loop:
    129129    call    FindDPT_MasterOrSingleForIdevarsOffsetInDL
    130130    jc      SHORT .ControllerNotAvailable
     
    162162.ControllerNotAvailable:
    163163    add     dl, IDEVARS_size                            ; move Idevars pointer forward
    164     loop    .loop
     164    loop    .Loop
    165165    ret
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH1Eh_XTCF.asm

    r589 r592  
    121121    ;
    122122    ; Also note that some machines, noteably the Olivetti M24 (also known as
    123     ; the AT&T PC6300 and Xerox 6060), have hardware errors in the BIU logic,
    124     ; resulting in reversed byte ordering.  Therefore, XTCF_8BIT_PIO_MODE is
    125     ; the default transfer mode for best system compatibility.
     123    ; the AT&T PC6300 or Xerox 6060 or Logabax Persona 1600), have hardware errors
     124    ; in the BIU logic, resulting in reversed byte ordering.  Therefore,
     125    ; XTCF_8BIT_PIO_MODE is the default transfer mode for best system compatibility.
    126126
    127127
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH41h_CheckIfExtensionsPresent.asm

    r567 r592  
    4646
    4747    mov     BYTE [bp+IDEPACK.intpack+INTPACK.ah], EBIOS_VERSION
    48     mov     WORD [bp+IDEPACK.intpack+INTPACK.bx], 0AA55h
     48    not     WORD [bp+IDEPACK.intpack+INTPACK.bx]    ; 55AAh = AA55h
    4949
    5050%ifdef MODULE_COMPATIBLE_TABLES
     
    7575;--------------------------------------------------------------------
    7676AH41h_GetSupportBitsToCX:
     77%ifdef USE_AT   ; Always in Full mode
     78%ifndef MODULE_8BIT_IDE OR MODULE_SERIAL
     79    mov     cx, ENHANCED_DRIVE_ACCESS_SUPPORT | ENHANCED_DISK_DRIVE_SUPPORT
     80%else
     81    mov     cx, ENHANCED_DRIVE_ACCESS_SUPPORT
     82    cmp     BYTE [di+DPT_ATA.bDevice], DEVICE_8BIT_ATA
     83    jae     SHORT .DoNotSetEDDflag
     84    or      cl, ENHANCED_DISK_DRIVE_SUPPORT
     85%endif
     86%else ; ~USE_AT
    7787    mov     cx, ENHANCED_DRIVE_ACCESS_SUPPORT
    7888
    7989    ; DPTE needs buffer from RAM so do not return it in lite mode
    80 %ifndef USE_AT
    8190    test    BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_FULLMODE
    8291    jz      SHORT .DoNotSetEDDflag
    83 %endif
    8492
    8593%ifdef MODULE_8BIT_IDE OR MODULE_SERIAL
     
    9199
    92100    or      cl, ENHANCED_DISK_DRIVE_SUPPORT ; AH=48h returns DPTE
     101%endif ; USE_AT
    93102.DoNotSetEDDflag:
    94103    ret
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Address.asm

    r589 r592  
    110110    and     al, MASKL_DPT_TRANSLATEMODE
    111111
    112 ;;; 0: ADDRESSING_MODE_NORMAL
     112;;; 0: TRANSLATEMODE_NORMAL
    113113    jz      SHORT DoNotConvertLCHS
    114114
    115 ;;; 1: ADDRESSING_MODE_LARGE
     115;;; 1: TRANSLATEMODE_LARGE
    116116    test    al, FLGL_DPT_ASSISTED_LBA
    117117    jz      SHORT ConvertLargeModeLCHStoPCHS
    118118
    119 ;;; 2: ADDRESSING_MODE_ASSISTED_LBA
     119;;; 2: TRANSLATEMODE_ASSISTED_LBA
    120120    ; Fall to ConvertAssistedLBAModeLCHStoLBARegisterValues
    121121
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm

    r567 r592  
    3030Int19h_BootLoaderHandler:
    3131    sti                                         ; Enable interrupts
     32%ifdef CLD_NEEDED
    3233    cld                                         ; String instructions to increment pointers
     34%endif
    3335%ifdef MODULE_VERY_LATE_INIT
    3436    LOAD_BDA_SEGMENT_TO ds, ax                  ; Load BDA segment (zero) to DS
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/AdvancedAta/AdvAtaInit.asm

    r589 r592  
    6060;       AX:     ID WORD specific for detected controller
    6161;   Returns:
    62 ;       AL:     Max supported PIO mode
    63 ;       AH:     FLGH_DPT_IORDY if IORDY supported, zero otherwise
     62;       AL:     Max supported PIO mode (only if ZF set)
     63;       AH:     ~FLGH_DPT_IORDY if IORDY not supported, -1 otherwise (only if ZF set)
    6464;       BX:     Min PIO cycle time (only if ZF set)
    6565;       ZF:     Set if PIO limit necessary
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/AdvancedAta/PDC20x30.asm

    r589 r592  
    127127
    128128    ; PDC20230C and PDC20630 clears the bit we set at the beginning
    129     in      al, dx
     129    in      al, dx  ; 1F2h
    130130    dec     dx
    131131    dec     dx      ; Base port
     
    139139;       AX:     ID WORD specific for detected controller
    140140;   Returns:
    141 ;       AL:     Max supported PIO mode
    142 ;       AH:     FLGH_DPT_IORDY if IORDY supported, zero otherwise
     141;       AL:     Max supported PIO mode (only if ZF set)
     142;       AH:     ~FLGH_DPT_IORDY if IORDY not supported, -1 otherwise (only if ZF set)
    143143;       BX:     Min PIO cycle time (only if ZF set)
    144144;       ZF:     Set if PIO limit necessary
     
    148148;--------------------------------------------------------------------
    149149PDC20x30_GetMaxPioModeToALandMinPioCycleTimeToBX:
    150     cmp     ah, ID_PDC20630
    151     je      SHORT .Return       ; No need to limit anything
    152     mov     ax, 2               ; Limit PIO to 2 for ID_PDC20230
     150    cmp     ah, ID_PDC20230
     151    jne     SHORT .Return                           ; No need to limit anything for ID_PDC20630
     152    mov     ax, (~FLGH_DPT_IORDY & 0FFh) << 8 | 2   ; Limit PIO to 2 for ID_PDC20230
    153153    mov     bx, PIO_2_MIN_CYCLE_TIME_NS
    154     stc
    155154.Return:
    156155    ret
     
    206205;--------------------------------------------------------------------
    207206SetSpeedForDriveInCX:
    208     eMOVZX  bx, BYTE [di+DPT_ADVANCED_ATA.bPioMode]
    209     MIN_U   bl, 2   ; Limit to PIO2
    210     mov     bl, [cs:bx+.rgbPioModeToPDCspeedValue]
     207    mov     bx, .rgbPioModeToPDCspeedValue
     208    mov     al, [di+DPT_ADVANCED_ATA.bPioMode]
     209    MIN_U   al, 2   ; Limit to PIO2
     210    cs xlat
     211    xchg    bx, ax
    211212
    212213    add     dx, BYTE SECTOR_NUMBER_REGISTER
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/AdvancedAta/Vision.asm

    r589 r592  
    131131;       AH:     QDI Vision Controller ID
    132132;   Returns:
    133 ;       AL:     Max supported PIO mode
    134 ;       AH:     FLGH_DPT_IORDY if IORDY supported, zero otherwise
     133;       AL:     Max supported PIO mode (only if ZF set)
     134;       AH:     ~FLGH_DPT_IORDY if IORDY not supported, -1 otherwise (only if ZF set)
    135135;       BX:     Min PIO Cycle Time (only if ZF set)
    136136;       ZF:     Set if PIO limit necessary
     
    142142    cmp     ah, ID_QD6500
    143143    jne     SHORT .NoNeedToLimitForQD6580
    144 
    145     mov     ax, 2   ; Limit to PIO 2 because QD6500 does not support IORDY
     144    mov     ax, (~FLGH_DPT_IORDY & 0FFh) << 8 | 2   ; Limit to PIO 2 because QD6500 does not support IORDY
    146145    mov     bx, PIO_2_MIN_CYCLE_TIME_NS
    147146.NoNeedToLimitForQD6580:
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/AtaID.asm

    r580 r592  
    104104;       DX:     User defined P-CHS to L-CHS translate mode
    105105;   Corrupts registers:
    106 ;       AX, BX, CX
     106;       AX, BX
    107107;--------------------------------------------------------------------
    108108AtaID_ModifyESSIforUserDefinedLimitsAndReturnTranslateModeInDX:
     
    113113    pop     ds
    114114
    115     ; Load User Defined CHS or LBA to CX:AX
    116     mov     dx, [bx+DRVPARAMS.wFlags]
     115    ; Load User Defined CHS or LBA to BX:AX
     116    mov     dl, [bx+DRVPARAMS.wFlags]           ; Only load the flags we actually need
    117117    mov     ax, [bx+DRVPARAMS.wCylinders]       ; Or .dwMaximumLBA
    118     mov     cx, [bx+DRVPARAMS.wHeadsAndSectors] ; Or .dwMaximumLBA+2
     118    mov     bx, [bx+DRVPARAMS.wHeadsAndSectors] ; Or .dwMaximumLBA+2
    119119
    120120    push    es
     
    127127    ; Apply new CHS and disable LBA (we also want to set CHS addressing)
    128128    mov     [si+ATA1.wCylCnt], ax
    129     eMOVZX  ax, cl
     129    eMOVZX  ax, bl
    130130    mov     [si+ATA1.wHeadCnt], ax
    131     mov     al, ch
     131    mov     al, bh
    132132    mov     [si+ATA1.wSPT], ax
    133133    and     BYTE [si+ATA1.wCaps+1], ~(A1_wCaps_LBA>>8)
     
    140140
    141141    ; Apply new LBA and disable LBA48
    142     cmp     cx, [si+ATA1.dwLBACnt+2]
     142    cmp     bx, [si+ATA1.dwLBACnt+2]
    143143    ja      SHORT .NoUserDefinedLBA     ; Do not set larger than drive
    144144    jb      SHORT .StoreNewLBA
     
    147147.StoreNewLBA:
    148148    mov     [si+ATA1.dwLBACnt], ax
    149     mov     [si+ATA1.dwLBACnt+2], cx
     149    mov     [si+ATA1.dwLBACnt+2], bx
    150150    and     BYTE [si+ATA6.wSetSup83+1], ~(A6_wSetSup83_LBA48>>8)
    151151.NoUserDefinedLBA:
     
    173173AtaID_GetMaxPioModeToAXandMinCycleTimeToCX:
    174174    ; Get PIO mode and cycle time for PIO 0...2
    175     mov     bx, [es:si+ATA1.bPioMode]
    176     mov     ax, bx                  ; AH = 0, AL = PIO mode 0, 1 or 2
    177     eSHL_IM bx, 1                   ; Shift for WORD lookup
     175%ifdef USE_386
     176    movzx   ax, [es:si+ATA1.bPioMode]   ; AH = 0, AL = PIO mode 0, 1 or 2
     177%else
     178    mov     al, [es:si+ATA1.bPioMode]
     179    cbw
     180%endif
     181    mov     bx, ax
     182    eSHL_IM bx, 1                       ; Shift for WORD lookup
    178183    mov     cx, [cs:bx+.rgwPio0to2CycleTimeInNanosecs]
    179184
    180185    ; Check if IORDY is supported
    181186    test    BYTE [es:si+ATA2.wCaps+1], A2_wCaps_IORDY >> 8
    182     jz      SHORT .ReturnPioTimings ; No PIO 3 or higher if no IORDY
    183     mov     ah, FLGH_DPT_IORDY
     187    jz      SHORT .ReturnPioTimings     ; No PIO 3 or higher if no IORDY
     188    mov     ah, FLGH_DPT_IORDY          ; *FIXME* Actually, CF specification v4.1 says that use of IORDY is invalid for PIO modes 5 and 6.
    184189
    185190    ; Check if Advanced PIO modes are supported (3 and above)
     
    187192    jz      SHORT .ReturnPioTimings
    188193
    189     ; Get Advanced PIO mode
    190     ; (Hard Disks supports up to 4 but CF cards can support 5 and 6)
    191     mov     bl, [es:si+ATA2.bPIOSupp]
     194    ; Get Advanced PIO mode (Hard Disks supports up to 4 but CF cards can support 5 and 6)
     195    or      bh, [es:si+ATA2.bPIOSupp]
     196    jz      SHORT .ReturnPioTimings
    192197.CheckNextFlag:
    193198    inc     ax
    194     shr     bl, 1
     199    shr     bh, 1
    195200    jnz     SHORT .CheckNextFlag
    196201    MIN_U   al, 6                       ; Make sure not above lookup tables
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm

    r589 r592  
    150150    push    bp
    151151    mov     bp, sp
     152%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
     153%if DRVDETECTINFO.szDrvName = 0
     154    push    bx
     155%else
    152156    lea     si, [bx+DRVDETECTINFO.szDrvName]
    153157    push    si
     158%endif
     159%endif
    154160    mov     si, g_szDriveName
    155161    jmp     SHORT DetectPrint_FormatCSSIfromParamsInSSBP
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/FloppyDrive.asm

    r567 r592  
    190190    LOAD_BDA_SEGMENT_TO ds, ax
    191191    mov     al, [BDA.wEquipment]    ; Load Equipment WORD low byte
     192    and     al, 0C1h                ; Leave bits 7..6 and 0
     193    eAAM    64
     194    add     al, ah                  ; AL = Floppy Drive count
    192195    pop     ds
    193 
    194 %ifdef USE_UNDOC_INTEL
    195     and     al, 0C1h
    196     eAAM    64
    197 %else
    198     mov     ah, al                  ; Copy it to AH
    199     and     ax, 0C001h              ; Leave bits 15..14 and 0
    200     eROL_IM ah, 2                   ; EW low byte bits 7..6 to 1..0
    201 %endif ; USE_UNDOC_INTEL
    202 
    203     add     al, ah                  ; AL = Floppy Drive count
    204196%endif ; USE_AT
    205197
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/Interrupts.asm

    r589 r592  
    239239.ClearBitFrom8259MaskRegister:
    240240    push    cx
    241     xchg    ax, cx              ; IRQ index to CL
     241    xchg    cx, ax              ; IRQ index to CL
     242    in      al, dx              ; Read Interrupt Mask Register
    242243    mov     ch, ~1              ; Load bit mask to be rotated
    243244    rol     ch, cl              ; Rotate mask to correct position for clearing
    244     in      al, dx              ; Read Interrupt Mask Register
    245245    and     al, ch              ; Clear wanted bit
    246246    out     dx, al              ; Write modified Interrupt Mask Register
  • trunk/XTIDE_Universal_BIOS/Src/Main.asm

    r589 r592  
    3232
    3333    ; We must define included libraries before including "AssemblyLibrary.inc".
    34 %define EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS   ; Exclude unused library functions
     34%define EXCLUDE_FROM_XUB                    ; Exclude unused library functions
    3535%ifdef MODULE_BOOT_MENU
    3636    %define MENUEVENT_INLINE_OFFSETS        ; Only one menu required, save space and inline offsets
     
    8181%ifdef MODULE_BOOT_MENU
    8282    at  ROMVARS.wBootTimeout,   dw  BOOT_MENU_DEFAULT_TIMEOUT
     83    at  ROMVARS.pColorTheme,    dw  ColorTheme              ; Offset to the ATTRIBUTE_CHARS struc that holds the color theme
    8384%endif
    8485    at  ROMVARS.bIdeCnt,        db  2                       ; Number of supported controllers
     
    105106    at  ROMVARS.ideVars2+IDEVARS.wControlBlockPort, dw  DEVICE_ATA_TERTIARY_PORTCTRL
    106107    at  ROMVARS.ideVars2+IDEVARS.bDevice,           db  DEVICE_16BIT_ATA
    107     at  ROMVARS.ideVars2+IDEVARS.bIRQ,              db  0
     108    at  ROMVARS.ideVars2+IDEVARS.bIRQ,              db  0   ; Should be 11 on the GSI Inc. Model 2C
    108109    at  ROMVARS.ideVars2+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,  dw  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
    109110    at  ROMVARS.ideVars2+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,   dw  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
     
    112113    at  ROMVARS.ideVars3+IDEVARS.wControlBlockPort, dw  DEVICE_ATA_QUATERNARY_PORTCTRL
    113114    at  ROMVARS.ideVars3+IDEVARS.bDevice,           db  DEVICE_16BIT_ATA
    114     at  ROMVARS.ideVars3+IDEVARS.bIRQ,              db  0
     115    at  ROMVARS.ideVars3+IDEVARS.bIRQ,              db  0   ; Should be 10 on the GSI Inc. Model 2C
    115116    at  ROMVARS.ideVars3+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,  dw  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
    116117    at  ROMVARS.ideVars3+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,   dw  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
     
    127128%ifdef MODULE_BOOT_MENU
    128129    at  ROMVARS.wBootTimeout,   dw  BOOT_MENU_DEFAULT_TIMEOUT
     130    at  ROMVARS.pColorTheme,    dw  ColorTheme              ; Offset to the ATTRIBUTE_CHARS struc that holds the color theme
    129131%endif
    130132    at  ROMVARS.bIdeCnt,        db  1
     
    301303
    302304
     305%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    303306; Although it's very unlikely to happen, we give warnings for builds that cannot be automatically checksummed due to the size being too large.
    304307; In some cases it's theoretically possible to checksum the build anyway (manually) which is why these are warnings and not errors.
     
    309312        %endif
    310313    %endif
    311 %elif ($-$$) = BIOS_SIZE            ; A large build.
     314%elif ($-$$) = BIOS_SIZE            ; A large or tiny build.
    312315    %warning "This build is too large to be auto-checksummed!"
    313316%endif
     317%endif
  • trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuEvent.asm

    r567 r592  
    141141
    142142    ; Store default Menuitem (=default drive to boot from)
    143     eMOVZX  dx, BYTE [cs:ROMVARS.bBootDrv]
     143    eMOVZX  dx, [cs:ROMVARS.bBootDrv]
    144144    call    GetMenuitemToDXforDriveInDL
    145145    mov     [bp+MENUINIT.wHighlightedItem], dx
  • trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrint.asm

    r589 r592  
    5454    test    dl, dl
    5555    js      SHORT .go
    56     mov     bl, ((g_szFloppyDrv)-$$ & 0xff)         ; and revisit the earlier assumption...
     56    mov     bl, (g_szFloppyDrv - $$) & 0xff         ; and revisit the earlier assumption...
    5757
    5858.go:
  • trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrintCfg.asm

    r568 r592  
    6363    ;; with AL clear, and so we exchange AL and AH after the multiply for the final result.
    6464    ;;
     65%ifdef USE_186
     66    imul    ax, g_szAddressingModes_Displacement << (8-TRANSLATEMODE_FIELD_POSITION)
     67%else
    6568    mov     cx, g_szAddressingModes_Displacement << (8-TRANSLATEMODE_FIELD_POSITION)
    6669    mul     cx
     70%endif
    6771    xchg    al, ah      ; AL = always zero after above multiplication
    6872    add     ax, g_szAddressingModes
  • trunk/XTIDE_Universal_BIOS/Src/Menus/HotkeyBar.asm

    r568 r592  
    407407    sbb     di, BYTE 1              ; Sub CF if Floppy Drive
    408408    xchg    ax, cx
    409     mov     [es:di], al
     409    stosb
    410410    stc                             ; Valid hotkey scancode returned in AL
    411411
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AtaGeometry.asm

    r580 r592  
    114114    ; slower. The speed difference doesn't matter on AT systems.
    115115.UseAssistedLBA:
    116     call    GetSectorCountToDXAXfromCHSinAXBLBH
    117     call    ConvertChsSectorCountFromDXAXtoLbaAssistedLCHSinAXBLBH
    118     xor     cx, cx      ; No bits to shift
     116    ; Fall to GetSectorCountToDXAXfromCHSinAXBLBH
     117
     118
     119;--------------------------------------------------------------------
     120; GetSectorCountToDXAXfromCHSinAXBLBH
     121;   Parameters:
     122;       AX:     Number of cylinders (1...16383)
     123;       BL:     Number of heads (1...255)
     124;       BH:     Number of sectors per track (1...63)
     125;   Returns:
     126;       DX:AX:  Total number of CHS addressable sectors
     127;   Corrupts registers:
     128;       BX
     129;--------------------------------------------------------------------
     130GetSectorCountToDXAXfromCHSinAXBLBH:
     131    xchg    ax, bx
     132    mul     ah          ; AX = Heads * Sectors per track
     133    mul     bx
     134    ; Fall to ConvertChsSectorCountFromDXAXtoLbaAssistedLCHSinAXBLBH
     135
     136
     137;--------------------------------------------------------------------
     138; LBA assist calculation (or Assisted LBA)
     139;
     140; This algorithm translates P-CHS sector count up to largest possible
     141; L-CHS sector count (1024, 255, 63). Note that INT 13h interface allows
     142; 256 heads but DOS supports up to 255 head. That is why BIOSes never
     143; use 256 heads.
     144;
     145; L-CHS parameters generated here require the drive to use LBA addressing.
     146;
     147; Here is the algorithm:
     148; If cylinders > 8192
     149;  Variable CH = Total CHS Sectors / 63
     150;  Divide (CH - 1) by 1024 and add 1
     151;  Round the result up to the nearest of 16, 32, 64, 128 and 255. This is the value to be used for the number of heads.
     152;  Divide CH by the number of heads. This is the value to be used for the number of cylinders.
     153;
     154; ConvertChsSectorCountFromDXAXtoLbaAssistedLCHSinAXBLBH:
     155;   Parameters:
     156;       DX:AX:  Total number of P-CHS sectors for CHS addressing
     157;               (max = 16383 * 16 * 63 = 16,514,064)
     158;   Returns:
     159;       AX:     Number of cylinders (?...1027)
     160;       BL:     Number of heads (16, 32, 64, 128 or 255)
     161;       BH:     Number of sectors per track (always 63)
     162;       CX:     Number of bits shifted (0)
     163;       DL:     TRANSLATEMODE_ASSISTED_LBA
     164;   Corrupts registers:
     165;       DH
     166;--------------------------------------------------------------------
     167ConvertChsSectorCountFromDXAXtoLbaAssistedLCHSinAXBLBH:
     168    ; Value CH = Total sector count / 63
     169    ; Max = 16,514,064 / 63 = 262128
     170    mov     cx, LBA_ASSIST_SPT          ; CX = 63
     171
     172    ; --- Math_DivDXAXbyCX inlined (and slightly modified) since it's only used here
     173    xor     bx, bx
     174    xchg    bx, ax
     175    xchg    dx, ax
     176    div     cx
     177    xchg    ax, bx
     178    div     cx
     179    mov     dx, bx
     180    ; ---
     181
     182    push    ax
     183    push    dx                          ; Value CH stored for later use
     184
     185    ; BX:DX:AX = Value CH - 1
     186    ; Max = 262128 - 1 = 262127
     187    xor     bx, bx
     188    sub     ax, BYTE 1
     189    sbb     dx, bx
     190
     191    ; AX = Number of heads = ((Value CH - 1) / 1024) + 1
     192    ; Max = (262127 / 1024) + 1 = 256
     193    call    Size_DivideSizeInBXDXAXby1024   ; Preserves CX and returns with BH cleared
     194    pop     dx
     195    inc     ax                          ; + 1
     196
     197    ; Heads must be 16, 32, 64, 128 or 255 (round up to the nearest)
     198    ; Max = 255
     199    mov     bl, 16                      ; Min number of heads
     200.CompareNextValidNumberOfHeads:
     201    cmp     ax, bx
     202    jbe     SHORT .NumberOfHeadsNowInBX
     203    eSHL_IM bx, 1                       ; Double number of heads
     204    jpo     SHORT .CompareNextValidNumberOfHeads    ; Reached 256 heads?
     205    dec     bx                          ;  If so, limit heads to 255
     206.NumberOfHeadsNowInBX:
     207
     208    ; DX:AX = Number of cylinders = Value CH (without - 1) / number of heads
     209    ; Max = 262128 / 255 = 1027
     210    pop     ax                          ; Value CH back to DX:AX
     211    div     bx
     212
     213    xchg    bh, cl                      ; Sectors per Track to BH, zero to CL (CX)
    119214    mov     dl, TRANSLATEMODE_ASSISTED_LBA
     215ReturnLCHSinAXBLBH:
    120216    ret
    121217
     
    136232    mov     bl, [es:si+ATA1.wHeadCnt]   ; Heads (1...16)
    137233    mov     bh, [es:si+ATA1.wSPT]       ; Sectors per Track (1...63)
    138     ret
    139 
    140 
    141 ;--------------------------------------------------------------------
    142 ; GetSectorCountToDXAXfromCHSinAXBLBH
    143 ;   Parameters:
    144 ;       AX:     Number of cylinders (1...16383)
    145 ;       BL:     Number of heads (1...255)
    146 ;       BH:     Number of sectors per track (1...63)
    147 ;   Returns:
    148 ;       DX:AX:  Total number of CHS addressable sectors
    149 ;   Corrupts registers:
    150 ;       BX
    151 ;--------------------------------------------------------------------
    152 GetSectorCountToDXAXfromCHSinAXBLBH:
    153     xchg    ax, bx
    154     mul     ah          ; AX = Heads * Sectors per track
    155     mul     bx
    156234    ret
    157235
     
    175253;  Do a standard ECHS translation
    176254;
     255; *FIXME* The above algorithm seems to be conflicting with info found here
     256; https://web.archive.org/web/20000817071418/http://www.firmware.com:80/support/bios/over4gb.htm
     257; which says that Revised ECHS is used when the cylinder count is > 8191.
     258;
    177259; ConvertPCHfromAXBLtoRevisedEnhancedCHinAXBL:
    178260;   Parameters:
     
    183265;       BL:     Number of L-CHS heads (?...240)
    184266;       CX:     Number of bits shifted (0...3)
    185 ;       DX:     ADDRESSING_MODE_NORMAL or ADDRESSING_MODE_LARGE
     267;       DX:     TRANSLATEMODE_NORMAL or TRANSLATEMODE_LARGE
    186268;   Corrupts registers:
    187269;       Nothing
     
    271353    ret
    272354
    273 
    274 ;--------------------------------------------------------------------
    275 ; LBA assist calculation (or Assisted LBA)
    276 ;
    277 ; This algorithm translates P-CHS sector count up to largest possible
    278 ; L-CHS sector count (1024, 255, 63). Note that INT 13h interface allows
    279 ; 256 heads but DOS supports up to 255 head. That is why BIOSes never
    280 ; use 256 heads.
    281 ;
    282 ; L-CHS parameters generated here require the drive to use LBA addressing.
    283 ;
    284 ; Here is the algorithm:
    285 ; If cylinders > 8192
    286 ;  Variable CH = Total CHS Sectors / 63
    287 ;  Divide (CH – 1) by 1024 and add 1
    288 ;  Round the result up to the nearest of 16, 32, 64, 128 and 255. This is the value to be used for the number of heads.
    289 ;  Divide CH by the number of heads. This is the value to be used for the number of cylinders.
    290 ;
    291 ; ConvertChsSectorCountFromDXAXtoLbaAssistedLCHSinAXBLBH:
    292 ;   Parameters:
    293 ;       DX:AX:  Total number of P-CHS sectors for CHS addressing
    294 ;               (max = 16383 * 16 * 63 = 16,514,064)
    295 ;   Returns:
    296 ;       AX:     Number of cylinders (?...1027)
    297 ;       BL:     Number of heads (16, 32, 64, 128 or 255)
    298 ;       BH:     Number of sectors per track (always 63)
    299 ;   Corrupts registers:
    300 ;       CX, DX
    301 ;--------------------------------------------------------------------
    302 ConvertChsSectorCountFromDXAXtoLbaAssistedLCHSinAXBLBH:
    303     ; Value CH = Total sector count / 63
    304     ; Max = 16,514,064 / 63 = 262128
    305     mov     cx, LBA_ASSIST_SPT          ; CX = 63
    306     call    Math_DivDXAXbyCX            ; Preserves CX
    307     push    dx
    308     push    ax                          ; Value CH stored for later use
    309 
    310     ; BX:DX:AX = Value CH - 1
    311     ; Max = 262128 - 1 = 262127
    312     xor     bx, bx
    313     sub     ax, BYTE 1
    314     sbb     dx, bx
    315 
    316     ; AX = Number of heads = ((Value CH - 1) / 1024) + 1
    317     ; Max = (262127 / 1024) + 1 = 256
    318     call    Size_DivideSizeInBXDXAXby1024   ; Preserves CX
    319     inc     ax                          ; + 1
    320 
    321     ; Heads must be 16, 32, 64, 128 or 255 (round up to the nearest)
    322     ; Max = 255
    323     mov     cl, 16                      ; Min number of heads
    324 .CompareNextValidNumberOfHeads:
    325     cmp     ax, cx
    326     jbe     SHORT .NumberOfHeadsNowInCX
    327     eSHL_IM cx, 1                       ; Double number of heads
    328     jpo     SHORT .CompareNextValidNumberOfHeads    ; Reached 256 heads?
    329     dec     cx                          ;  If so, limit heads to 255
    330 .NumberOfHeadsNowInCX:
    331     mov     bx, cx                      ; Number of heads are returned in BL
    332     mov     bh, LBA_ASSIST_SPT          ; Sectors per Track
    333 
    334     ; DX:AX = Number of cylinders = Value CH (without - 1) / number of heads
    335     ; Max = 262128 / 255 = 1027
    336     pop     ax
    337     pop     dx                          ; Value CH back to DX:AX
    338     div     cx
    339 
    340     ; Return L-CHS
    341 ReturnLCHSinAXBLBH:
    342     ret
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/DrvDetectInfo.asm

    r591 r592  
    4646
    4747    add     si, BYTE ATA1.strModel              ; DS:SI now points drive name (Clears CF)
     48%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    4849%if DRVDETECTINFO.szDrvName = 0
    4950    mov     di, bx
    5051%else
    5152    lea     di, [bx+DRVDETECTINFO.szDrvName]    ; ES:DI now points to name destination
     53%endif
    5254%endif
    5355    mov     cx, MAX_HARD_DISK_NAME_LENGTH / 2   ; Max number of WORDs allowed
     
    7880;--------------------------------------------------------------------
    7981DriveDetectInfo_ConvertDPTtoBX:
     82%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    8083%if DPT_DRVDETECTINFO_SIZE_MULTIPLIER = 2
    8184%if BOOTVARS.rgDrvDetectInfo & 1                    ; Should never be odd but better safe than sorry
    82     lea     ax, [di-RAMVARS_size]
    83     eSHL_IM ax, 1
    84     add     ax, BOOTVARS.rgDrvDetectInfo
     85    lea     bx, [di-RAMVARS_size]
     86    eSHL_IM bx, 1
     87    add     bx, BOOTVARS.rgDrvDetectInfo
    8588%else
    86     lea     ax, [di-RAMVARS_size+(BOOTVARS.rgDrvDetectInfo/2)]
    87 ;   eSHL_IM ax, 1                                   ; *FIXME* For some reason this will cause NASM to crap itself.
    88     shl     ax, 1                                   ; So this will have to suffice for now.
     89    lea     bx, [di-RAMVARS_size+(BOOTVARS.rgDrvDetectInfo/2)]
     90    eSHL_IM bx, 1
    8991%endif
     92%else
     93%ifdef USE_186
     94    lea     bx, [di-RAMVARS_size]
     95    imul    bx, DPT_DRVDETECTINFO_SIZE_MULTIPLIER
     96    add     bx, BOOTVARS.rgDrvDetectInfo
    9097%else
    9198    lea     ax, [di-RAMVARS_size]                   ; subtract off base of DPTs
     
    93100    mul     bl
    94101    add     ax, BOOTVARS.rgDrvDetectInfo            ; add base of DRVDETECTINFO
     102    xchg    bx, ax
    95103%endif
    96     xchg    bx, ax
     104%endif
     105%endif
    97106    ret
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm

    r567 r592  
    3131;       DS:     RAMVARS segment
    3232;   Corrupts registers:
    33 ;       AX, CX, DI
     33;       AX, CX, DX, DI
    3434;--------------------------------------------------------------------
    3535RamVars_Initialize:
    3636    push    es
    37     ; Fall to .StealMemoryForRAMVARS
    3837
    39 ;--------------------------------------------------------------------
    40 ; .StealMemoryForRAMVARS
    41 ;   Parameters:
    42 ;       Nothing
    43 ;   Returns:
    44 ;       DS:     RAMVARS segment
    45 ;   Corrupts registers:
    46 ;       AX, CL
    47 ;--------------------------------------------------------------------
    48 .StealMemoryForRAMVARS:
    4938%ifndef USE_AT
    5039    mov     ax, LITE_MODE_RAMVARS_SEGMENT
     
    5645    mov     al, [cs:ROMVARS.bStealSize]
    5746    sub     [BDA.wBaseMem], ax
    58     mov     ax, [BDA.wBaseMem]
    5947%ifdef USE_186
    60     shl     ax, 6                       ; Segment to first stolen kB (*=40h)
     48    imul    ax, [BDA.wBaseMem], 64
    6149%else
    62     mov     cl, 6
    63     shl     ax, cl
     50    mov     al, 64
     51    mul     WORD [BDA.wBaseMem]
    6452%endif
    65     ; Fall to .InitializeRamvars
    6653
    67 ;--------------------------------------------------------------------
    68 ; .InitializeRamvars
    69 ;   Parameters:
    70 ;       AX:     RAMVARS segment
    71 ;   Returns:
    72 ;       DS:     RAMVARS segment
    73 ;   Corrupts registers:
    74 ;       AX, CX, DI, ES
    75 ;--------------------------------------------------------------------
    7654.InitializeRamvars:
     55    xor     di, di
    7756    mov     ds, ax
    7857    mov     es, ax
    7958    mov     cx, RAMVARS_size
    80     xor     di, di
    8159    call    Memory_ZeroESDIwithSizeInCX
    8260    mov     WORD [RAMVARS.wDrvDetectSignature], RAMVARS_DRV_DETECT_SIGNATURE
     
    12199.GetStolenSegmentToDS:
    122100    LOAD_BDA_SEGMENT_TO ds, di
     101;%ifdef USE_186
     102;   imul    di, [BDA.wBaseMem], 64  ; 2 bytes less but slower, especially on 386/486 processors
     103;%else
    123104    mov     di, [BDA.wBaseMem]      ; Load available base memory size in kB
    124105    eSHL_IM di, 6                   ; Segment to first stolen kB (*=40h)
     106;%endif
    125107ALIGN JUMP_ALIGN
    126108.LoopStolenKBs:
  • trunk/XTIDE_Universal_BIOS/makefile

    r589 r592  
    4141# USE_AT                      Use features supported on AT and later systems (not available on XT) #
    4242# USE_UNDOC_INTEL             Optimizations for Intel CPU:s - do NOT use on NEC V20/V30/Sony CPU:s #
     43# CLD_NEEDED                  Only needed for compatibility with buggy software/BIOSes             #
    4344#                                                                                                  #
    4445# ** AT Builds only (when USE_AT is defined)                                                       #
     
    103104# Assembler preprocessor defines.                               #
    104105#################################################################
    105 DEFINES_COMMON = MODULE_STRINGS_COMPRESSED MODULE_HOTKEYS MODULE_8BIT_IDE MODULE_EBIOS MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_POWER_MANAGEMENT RESERVE_DIAGNOSTIC_CYLINDER NO_ATAID_VALIDATION
     106DEFINES_COMMON = MODULE_STRINGS_COMPRESSED MODULE_HOTKEYS MODULE_8BIT_IDE MODULE_EBIOS MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_POWER_MANAGEMENT RESERVE_DIAGNOSTIC_CYLINDER NO_ATAID_VALIDATION CLD_NEEDED
    106107DEFINES_COMMON_LARGE = MODULE_BOOT_MENU MODULE_8BIT_IDE_ADVANCED MODULE_COMPATIBLE_TABLES
    107108
     
    114115DEFINES_AT_LARGE = $(DEFINES_AT) $(DEFINES_COMMON_LARGE)
    115116
    116 DEFINES_XT_TINY = MODULE_STRINGS_COMPRESSED MODULE_8BIT_IDE NO_ATAID_VALIDATION
     117DEFINES_XT_TINY = MODULE_STRINGS_COMPRESSED MODULE_8BIT_IDE NO_ATAID_VALIDATION CLD_NEEDED
    117118DEFINES_386_8K = $(DEFINES_AT) USE_386 MODULE_ADVANCED_ATA
    118119
     
    125126###################
    126127
    127 # Target size of the ROM, used in main.asm for number of 512B blocks and by checksum Perl script below
    128 BIOS_SIZE = 8192        # For BIOS header (use even multiplier!)
    129 ROMSIZE = $(BIOS_SIZE)  # Size of binary to build when building with make checksum
    130 BIOS_SIZE_LARGE = 12288
    131 ROMSIZE_LARGE = $(BIOS_SIZE_LARGE)
     128# Target size of the BIOS, used in main.asm for number of 512B blocks (CNT_ROM_BLOCKS) and by checksum Perl script below ('make checksum').
     129# Note! The size must be a multiple of 2 KB for compatibility reasons.
     130BIOS_SIZE_TINY = 4096
     131BIOS_SIZE_SMALL = 8192
     132BIOS_SIZE_LARGE = 10240
    132133
    133134# Add -D in front of every preprocessor define declaration
    134 DEFS_XT = $(DEFINES_XT:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE)
    135 DEFS_XTPLUS = $(DEFINES_XTPLUS:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE)
    136 DEFS_AT = $(DEFINES_AT:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE)
     135DEFS_XT = $(DEFINES_XT:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_SMALL)
     136DEFS_XTPLUS = $(DEFINES_XTPLUS:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_SMALL)
     137DEFS_AT = $(DEFINES_AT:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_SMALL)
    137138DEFS_XT_LARGE = $(DEFINES_XT_LARGE:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_LARGE)
    138139DEFS_XTPLUS_LARGE = $(DEFINES_XTPLUS_LARGE:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_LARGE)
    139140DEFS_AT_LARGE = $(DEFINES_AT_LARGE:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_LARGE)
    140 DEFS_XT_TINY = $(DEFINES_XT_TINY:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE)
    141 DEFS_386_8K = $(DEFINES_386_8K:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE)
     141DEFS_XT_TINY = $(DEFINES_XT_TINY:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_TINY)
     142DEFS_386_8K = $(DEFINES_386_8K:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_SMALL)
    142143DEFS_ALL_FEATURES = $(DEFINES_ALL_FEATURES:%=-D%)
    143144
     
    220221strings: src\Strings.asm
    221222    @$(AS) src\Strings.asm $(ASFLAGS) $(DEFS_AT_LARGE) -DCHECK_FOR_UNUSED_ENTRYPOINTS -DMODULE_STRINGS_COMPRESSED_PRECOMPRESS -o build\Strings.bin -l build\StringsPrecompress.lst
    222     @perl ..\tools\StringsCompress.pl < build\StringsPrecompress.lst > src\StringsCompressed.asm
     223    @perl ..\Tools\StringsCompress.pl < build\StringsPrecompress.lst > src\StringsCompressed.asm
    223224    @echo StringsCompressed.asm updated!
    224225
     
    228229
    229230checksum: all
    230     @perl ..\tools\checksum.pl $(TARGET)_tiny.bin $(ROMSIZE)
    231     @perl ..\tools\checksum.pl $(TARGET)_xt.bin $(ROMSIZE)
    232     @perl ..\tools\checksum.pl $(TARGET)_xtp.bin $(ROMSIZE)
    233     @perl ..\tools\checksum.pl $(TARGET)_at.bin $(ROMSIZE)
    234     @perl ..\tools\checksum.pl $(TARGET)_xtl.bin $(ROMSIZE_LARGE)
    235     @perl ..\tools\checksum.pl $(TARGET)_xtpl.bin $(ROMSIZE_LARGE)
    236     @perl ..\tools\checksum.pl $(TARGET)_atl.bin $(ROMSIZE_LARGE)
    237     @perl ..\tools\checksum.pl $(TARGET)_386.bin $(ROMSIZE)
     231    @perl ..\Tools\checksum.pl $(TARGET)_tiny.bin $(BIOS_SIZE_TINY)
     232    @perl ..\Tools\checksum.pl $(TARGET)_xt.bin $(BIOS_SIZE_SMALL)
     233    @perl ..\Tools\checksum.pl $(TARGET)_xtp.bin $(BIOS_SIZE_SMALL)
     234    @perl ..\Tools\checksum.pl $(TARGET)_at.bin $(BIOS_SIZE_SMALL)
     235    @perl ..\Tools\checksum.pl $(TARGET)_xtl.bin $(BIOS_SIZE_LARGE)
     236    @perl ..\Tools\checksum.pl $(TARGET)_xtpl.bin $(BIOS_SIZE_LARGE)
     237    @perl ..\Tools\checksum.pl $(TARGET)_atl.bin $(BIOS_SIZE_LARGE)
     238    @perl ..\Tools\checksum.pl $(TARGET)_386.bin $(BIOS_SIZE_SMALL)
    238239
    239240unused:
     
    241242    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_ALL_FEATURES) $(DEFS_XT) $(DEFS_XT_PLUS) $(DEFS_AT) $(DEFS_XT_LARGE) $(DEFS_XTPLUS_LARGE) $(DEFS_AT_LARGE) $(DEFS_XT_TINY) $(DEFS_386_8K) -o"$(TARGET)_unused.asm" -l"$(TARGET)_unused.lst"
    242243    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_ALL_FEATURES) $(DEFS_XT) $(DEFS_XT_PLUS) $(DEFS_AT) $(DEFS_XT_LARGE) $(DEFS_XTPLUS_LARGE) $(DEFS_AT_LARGE) $(DEFS_XT_TINY) $(DEFS_386_8K) -o"$(TARGET)_unused.asm" -E -DCHECK_FOR_UNUSED_ENTRYPOINTS
    243     @perl ..\tools\unused.pl $(TARGET)_unused.lst $(TARGET)_unused.asm
     244    @perl ..\Tools\unused.pl $(TARGET)_unused.lst $(TARGET)_unused.asm
    244245    @echo "XT Small"
    245246    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XT) -o"$(TARGET)_unused_xt.asm" -l"$(TARGET)_unused_xt.lst"
    246247    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XT) -o"$(TARGET)_unused_xt.asm" -E -DCHECK_FOR_UNUSED_ENTRYPOINTS
    247     @perl ..\tools\unused.pl $(TARGET)_unused_xt.lst $(TARGET)_unused_xt.asm
     248    @perl ..\Tools\unused.pl $(TARGET)_unused_xt.lst $(TARGET)_unused_xt.asm
    248249    @echo "XT Large"
    249250    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XT_LARGE) -o"$(TARGET)_unused_xtl.asm" -l"$(TARGET)_unused_xtl.lst"
    250251    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XT_LARGE) -o"$(TARGET)_unused_xtl.asm" -E -DCHECK_FOR_UNUSED_ENTRYPOINTS
    251     @perl ..\tools\unused.pl $(TARGET)_unused_xtl.lst $(TARGET)_unused_xtl.asm
     252    @perl ..\Tools\unused.pl $(TARGET)_unused_xtl.lst $(TARGET)_unused_xtl.asm
    252253    @echo "AT Small"
    253254    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_AT) -o"$(TARGET)_unused_at.asm" -l"$(TARGET)_unused_at.lst"
    254255    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_AT) -o"$(TARGET)_unused_at.asm" -E -DCHECK_FOR_UNUSED_ENTRYPOINTS
    255     @perl ..\tools\unused.pl $(TARGET)_unused_at.lst $(TARGET)_unused_at.asm
     256    @perl ..\Tools\unused.pl $(TARGET)_unused_at.lst $(TARGET)_unused_at.asm
    256257    @echo "AT Large"
    257258    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_AT_LARGE) -o"$(TARGET)_unused_atl.asm" -l"$(TARGET)_unused_atl.lst"
    258259    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_AT_LARGE) -o"$(TARGET)_unused_atl.asm" -E -DCHECK_FOR_UNUSED_ENTRYPOINTS
    259     @perl ..\tools\unused.pl $(TARGET)_unused_atl.lst $(TARGET)_unused_atl.asm
    260 
    261 
     260    @perl ..\Tools\unused.pl $(TARGET)_unused_atl.lst $(TARGET)_unused_atl.asm
     261
     262
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/Variables.inc

    r583 r592  
    3434struc CFGVARS
    3535    .pMenupage          resb    2           ; Offset to MENUPAGE to display
    36     .wFlags             resb    2           ; Program flags
     36    .wFlags             resb    2           ; Program flags - Only the low byte is used currently and code depend on this
    3737    .wImageSizeInWords  resb    2           ; Size in words for loaded ROM or FILE
    3838    .wEepromSegment     resb    2           ; Segment where EEPROM is located
     
    4444endstruc
    4545
    46 ; Bit defines for CFGVARS.wFlags
     46; Bit defines for CFGVARS.wFlags (changes here might require changes elsewhere)
    4747FLG_CFGVARS_FILELOADED  EQU     (1<<0)  ; BIOS is loaded from file
    4848FLG_CFGVARS_ROMLOADED   EQU     (1<<1)  ; BIOS is loaded from EEPROM
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/AutoConfigure.asm

    r526 r592  
    4343    call    ResetIdevarsToDefaultValues
    4444    call    DetectIdePortsAndDevices
    45     call    EnableInterruptsForPrimaryAndSecondaryControllers
     45    call    EnableInterruptsForAllStandardControllers
    4646    call    StoreAndDisplayNumberOfControllers
    4747
     
    5555;   Parameters:
    5656;       DS:DI:  Ptr to ROMVARS
     57;       ES:DI:  Ptr to ROMVARS
    5758;   Returns:
    5859;       Nothing
     
    123124
    124125;--------------------------------------------------------------------
    125 ; EnableInterruptsForPrimaryAndSecondaryControllers
     126; EnableInterruptsForAllStandardControllers
    126127;   Parameters:
    127128;       DS:DI:  Ptr to ROMVARS
     
    130131;       Nothing
    131132;   Corrupts registers:
    132 ;       AX, ES
    133 ;--------------------------------------------------------------------
    134 ALIGN JUMP_ALIGN
    135 EnableInterruptsForPrimaryAndSecondaryControllers:
     133;       AX
     134;--------------------------------------------------------------------
     135ALIGN JUMP_ALIGN
     136EnableInterruptsForAllStandardControllers:
    136137    jcxz    .NoControllersDetected
    137138    call    Buffers_IsXTbuildLoaded
     
    148149    inc     ax  ; 15
    149150    cmp     WORD [di+IDEVARS.wBasePort], DEVICE_ATA_SECONDARY_PORT
     151
     152%if 0
     153    je      SHORT .EnableIrqAL
     154
     155    ; Defaults on the GSI Inc. Model 2C EIDE controller
     156    mov     al, 11
     157    cmp     WORD [di+IDEVARS.wBasePort], DEVICE_ATA_TERTIARY_PORT
     158    je      SHORT .EnableIrqAL
     159
     160    dec     ax  ; 10
     161    cmp     WORD [di+IDEVARS.wBasePort], DEVICE_ATA_QUATERNARY_PORT
     162%endif
     163
    150164    jne     SHORT .DoNotEnableIRQ
    151165
     
    153167    mov     [di+IDEVARS.bIRQ], al
    154168.DoNotEnableIRQ:
     169    add     di, IDEVARS_size
    155170    loop    .CheckNextController
    156171    pop     cx
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/BiosFile.asm

    r589 r592  
    4444    call    FileIO_CloseUsingHandleFromBX
    4545    call    DisplayFileLoadedSuccessfully
    46     jmp     SHORT .Return
     46    pop     ds
     47    ret
    4748
    4849.DisplayErrorMessage:
    4950    call    FileIO_CloseUsingHandleFromBX
    5051    call    DisplayFailedToLoadFile
    51 ALIGN JUMP_ALIGN
    52 .Return:
    5352    pop     ds
    5453    ret
     
    117116    pop     es
    118117    mov     di, g_cfgVars+CFGVARS.szOpenedFile
     118%ifdef CLD_NEEDED
    119119    cld
     120%endif
    120121    call    String_CopyDSSItoESDIandGetLengthToCX
    121122    clc
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Buffers.asm

    r589 r592  
    4949ALIGN JUMP_ALIGN
    5050Buffers_IsXtideUniversalBiosLoaded:
    51     test    WORD [cs:g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_FILELOADED | FLG_CFGVARS_ROMLOADED
     51    test    BYTE [cs:g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_FILELOADED | FLG_CFGVARS_ROMLOADED
    5252    jnz     SHORT .FileOrBiosLoaded
    53     or      cl, 1       ; Clear ZF
     53    test    sp, sp      ; Clear ZF
    5454    ret
    5555
     
    7676    add     di, BYTE ROMVARS.rgbSign
    7777    mov     cx, XTIDE_SIGNATURE_LENGTH / 2
     78%ifdef CLD_NEEDED
    7879    cld
     80%endif
    7981    eSEG_STR repe, cs, cmpsw
    8082
     
    9193;               Cleared if some other (AT, 386) build is loaded
    9294;   Corrupts registers:
    93 ;       DI, ES
     95;       Nothing
    9496;--------------------------------------------------------------------
    9597ALIGN JUMP_ALIGN
    9698Buffers_IsXTbuildLoaded:
    9799%strlen BUILD_TYPE_OFFSET   TITLE_STRING_START
     100    push    es
     101    push    di
    98102    call    Buffers_GetFileBufferToESDI
    99103    cmp     WORD [es:di+ROMVARS.szTitle+BUILD_TYPE_OFFSET+1], 'XT'  ; +1 is for '('
     104    pop     di
     105    pop     es
    100106    ret
    101107%undef BUILD_TYPE_OFFSET
     
    105111; Buffers_NewBiosWithSizeInDXCXandSourceInAXhasBeenLoadedForConfiguration
    106112;   Parameters:
    107 ;       AX:     EEPROM source (FLG_CFGVARS_FILELOADED or FLG_CFGVARS_ROMLOADED)
     113;       AL:     EEPROM source (FLG_CFGVARS_FILELOADED or FLG_CFGVARS_ROMLOADED)
    108114;       DX:CX:  EEPROM size in bytes
    109115;   Returns:
    110116;       Nothing
    111117;   Corrupts registers:
    112 ;       AX, CX, DX
     118;       CX, DX
    113119;--------------------------------------------------------------------
    114120ALIGN JUMP_ALIGN
    115121Buffers_NewBiosWithSizeInDXCXandSourceInAXhasBeenLoadedForConfiguration:
    116     and     WORD [cs:g_cfgVars+CFGVARS.wFlags], ~(FLG_CFGVARS_FILELOADED | FLG_CFGVARS_ROMLOADED | FLG_CFGVARS_UNSAVED)
    117     or      WORD [cs:g_cfgVars+CFGVARS.wFlags], ax
     122    and     BYTE [cs:g_cfgVars+CFGVARS.wFlags], ~(FLG_CFGVARS_FILELOADED | FLG_CFGVARS_ROMLOADED | FLG_CFGVARS_UNSAVED)
     123    or      [cs:g_cfgVars+CFGVARS.wFlags], al
    118124    shr     dx, 1
    119125    rcr     cx, 1
     
    135141ALIGN JUMP_ALIGN
    136142Buffers_SetUnsavedChanges:
    137     or      WORD [cs:g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_UNSAVED
     143    or      BYTE [cs:g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_UNSAVED
    138144    ret
    139145
    140146ALIGN JUMP_ALIGN
    141147Buffers_ClearUnsavedChanges:
    142     and     WORD [cs:g_cfgVars+CFGVARS.wFlags], ~FLG_CFGVARS_UNSAVED
     148    and     BYTE [cs:g_cfgVars+CFGVARS.wFlags], ~FLG_CFGVARS_UNSAVED
    143149    ret
    144150
     
    155161ALIGN JUMP_ALIGN
    156162Buffers_SaveChangesIfFileLoaded:
    157     mov     ax, [cs:g_cfgVars+CFGVARS.wFlags]
    158     and     ax, BYTE (FLG_CFGVARS_FILELOADED | FLG_CFGVARS_UNSAVED)
    159     cmp     ax, BYTE (FLG_CFGVARS_FILELOADED | FLG_CFGVARS_UNSAVED)
    160     jne     SHORT .NothingToSave
    161     call    Dialogs_DisplaySaveChangesDialog
     163    mov     al, [cs:g_cfgVars+CFGVARS.wFlags]
     164    and     al, FLG_CFGVARS_FILELOADED | FLG_CFGVARS_UNSAVED
     165    jz      SHORT .NothingToSave
     166    jpo     SHORT .NothingToSave
     167    mov     bx, g_szDlgSaveChanges
     168    call    Dialogs_DisplayYesNoResponseDialogWithTitleStringInBX
    162169    jnz     SHORT .NothingToSave
    163170    jmp     BiosFile_SaveUnsavedChanges
     
    181188
    182189    eMOVZX  di, [cs:g_cfgVars+CFGVARS.bEepromType]
    183     mov     cx, [cs:di+g_rgwEepromTypeToSizeInWords]
     190;%if g_rgwEepromTypeToSizeInWords = 0   ; *FIXME* It really is but NASM won't accept this.
     191    mov     cx, [cs:di]
     192;%else
     193;   mov     cx, [cs:di+g_rgwEepromTypeToSizeInWords]
     194;%endif
    184195    sub     cx, [cs:g_cfgVars+CFGVARS.wImageSizeInWords]    ; CX = WORDs to append
    185196    jbe     SHORT .NoNeedToAppendZeroes
     
    187198    call    Buffers_GetFileBufferToESDI
    188199    mov     ax, [cs:g_cfgVars+CFGVARS.wImageSizeInWords]
    189     shl     ax, 1
     200    eSHL_IM ax, 1
    190201    add     di, ax          ; ES:DI now point first unused image byte
    191202    xor     ax, ax
     203%ifdef CLD_NEEDED
    192204    cld
     205%endif
    193206    rep stosw
    194207ALIGN JUMP_ALIGN
     
    214227    call    Buffers_GetFileBufferToESDI
    215228    call    EEPROM_GetXtideUniversalBiosSizeFromESDItoDXCX
     229%ifdef CLD_NEEDED
     230    cld
     231%endif
    216232
    217233; Compatibility fix for 3Com 3C503 cards where the ASIC returns 8080h as the last two bytes of the ROM.
     
    223239    jne     SHORT .BiosSizeIsNot8K
    224240    ; The BIOS size is 8K and therefore a potential candidate for a 3Com 3C503 card.
    225     dec     cx
    226     dec     cx
     241    mov     cl, (8192 - 3) & 0FFh
    227242    mov     ah, 3
    228243ALIGN JUMP_ALIGN
     
    230245.SumNextByte:
    231246    add     al, [es:di]
    232 .NextChecksumByte:
    233247    inc     di
    234248    loop    .SumNextByte
     249.NextChecksumByte:
    235250    neg     al
    236     mov     [es:di], al
    237     inc     cx
     251    stosb
    238252    dec     ah
    239253    jnz     SHORT .NextChecksumByte
     
    306320
    307321;--------------------------------------------------------------------
    308 ; Buffers_GetFileBufferToESDI
    309322; Buffers_GetFlashComparisonBufferToESDI
    310323; Buffers_GetFileDialogItemBufferToESDI
     324; Buffers_GetFileBufferToESDI
    311325;   Parameters:
    312326;       Nothing
     
    320334Buffers_GetFileDialogItemBufferToESDI:
    321335    call    Buffers_GetFileBufferToESDI
    322     push    di
    323336    mov     di, es
    324     add     di, 1000h       ; Third 64k page
    325     mov     es, di
    326     pop     di
    327     ret
    328 ALIGN JUMP_ALIGN
     337    SKIP2B  f
    329338Buffers_GetFileBufferToESDI:
    330339    mov     di, cs
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Dialogs.asm

    r526 r592  
    4141    mov     cx, DIALOG_INPUT_size
    4242    call    Memory_ReserveCXbytesFromStackToDSSI
    43     call    InitializeDialogInputFromDSSI
    4443    mov     [si+DIALOG_INPUT.fszTitle], di
    4544    jmp     SHORT DisplayMessageDialogWithMessageInCSDXandDialogInputInDSSI
     
    6564    mov     cx, DIALOG_INPUT_size
    6665    call    Memory_ReserveCXbytesFromStackToDSSI
    67     call    InitializeDialogInputFromDSSI
    6866    mov     WORD [si+DIALOG_INPUT.fszTitle], g_szNotificationDialog
    6967    jmp     SHORT DisplayMessageDialogWithMessageInCSDXandDialogInputInDSSI
     
    123121
    124122;--------------------------------------------------------------------
    125 ; Dialogs_DisplayQuitDialog
    126 ; Dialogs_DisplaySaveChangesDialog
     123; Dialogs_DisplayYesNoResponseDialogWithTitleStringInBX
    127124;   Parameters:
     125;       BX:     Offset to dialog title string
    128126;       SS:BP:  Menu handle
    129127;   Returns:
     
    134132;--------------------------------------------------------------------
    135133ALIGN JUMP_ALIGN
    136 Dialogs_DisplayQuitDialog:
     134Dialogs_DisplayYesNoResponseDialogWithTitleStringInBX:
    137135    push    ds
    138136
     
    140138    call    Memory_ReserveCXbytesFromStackToDSSI
    141139    call    InitializeDialogInputFromDSSI
    142     mov     WORD [si+DIALOG_INPUT.fszTitle], g_szDlgExitToDos
    143     jmp     Dialogs_DisplayQuitAndSaveChangesDialogsSharedEnding
    144 
    145 
    146 ALIGN JUMP_ALIGN
    147 Dialogs_DisplaySaveChangesDialog:
    148     push    ds
    149 
    150     mov     cx, DIALOG_INPUT_size
    151     call    Memory_ReserveCXbytesFromStackToDSSI
    152     call    InitializeDialogInputFromDSSI
    153     mov     WORD [si+DIALOG_INPUT.fszTitle], g_szDlgSaveChanges
    154 Dialogs_DisplayQuitAndSaveChangesDialogsSharedEnding:
     140    mov     [si+DIALOG_INPUT.fszTitle], bx
    155141    mov     WORD [si+DIALOG_INPUT.fszItems], g_szMultichoiceBooleanFlag
    156142    CALL_MENU_LIBRARY GetSelectionToAXwithInputInDSSI
    157143    add     sp, BYTE DIALOG_INPUT_size
    158     cmp     ax, BYTE 1      ; 1 = YES
     144    dec     ax              ; -1 = NO, 0 = YES
    159145
    160146    pop     ds
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/EEPROM.asm

    r589 r592  
    5050;       DX:CX:  BIOS size in bytes
    5151;   Corrupts registers:
    52 ;       AX, BX, SI, DI
     52;       BX, SI, DI
    5353;--------------------------------------------------------------------
    5454ALIGN JUMP_ALIGN
     
    6161    call    LoadBytesFromRomToRamBuffer
    6262
    63     call    EEPROM_GetXtideUniversalBiosSizeFromESDItoDXCX
    6463    pop     es
    6564    ret
     
    9089;       Nothing
    9190;   Returns:
    92 ;       CF:     Set if EEPROM was found
    93 ;               Cleared if EEPROM not found
    94 ;   Corrupts registers:
    95 ;       AX, BX, CX, SI, DI
     91;       CF:     Cleared if EEPROM was found
     92;               Set if EEPROM not found
     93;   Corrupts registers:
     94;       BX, CX, SI
    9695;--------------------------------------------------------------------
    9796ALIGN JUMP_ALIGN
     
    107106;       SI:     Offset to first byte to load
    108107;   Returns:
    109 ;       CF:     Set if EEPROM was found
    110 ;               Cleared if EEPROM not found
    111 ;   Corrupts registers:
    112 ;       AX, BX, CX, SI
     108;       CF:     Cleared if EEPROM was found
     109;               Set if EEPROM not found
     110;   Corrupts registers:
     111;       BX, SI
    113112;--------------------------------------------------------------------
    114113ALIGN JUMP_ALIGN
     
    119118
    120119    call    EEPROM_FindXtideUniversalBiosROMtoESDI
    121     jnc     SHORT .XtideUniversalBiosNotFound
     120    jc      SHORT .XtideUniversalBiosNotFound
    122121    push    es
    123122    pop     ds                                          ; DS:SI points to ROM
     
    126125    mov     di, si                                      ; ES:DI points to RAM buffer
    127126
     127%ifdef CLD_NEEDED
    128128    cld
    129     call    Memory_CopyCXbytesFromDSSItoESDI
    130     stc
     129%endif
     130    call    Memory_CopyCXbytesFromDSSItoESDI            ; Clears CF
    131131
    132132.XtideUniversalBiosNotFound:
     
    143143;   Returns:
    144144;       ES:DI:  EEPROM segment
    145 ;       CF:     Set if EEPROM was found
    146 ;               Cleared if EEPROM not found
    147 ;   Corrupts registers:
    148 ;       AX, BX
     145;       CF:     Cleared if EEPROM was found
     146;               Set if EEPROM not found
     147;   Corrupts registers:
     148;       BX
    149149;--------------------------------------------------------------------
    150150ALIGN JUMP_ALIGN
     
    159159    mov     es, bx                  ; Possible ROM segment to ES
    160160    call    Buffers_IsXtideUniversalBiosSignatureInESDI
    161     je      SHORT .RomFound
     161    je      SHORT .RomFound         ; If equal, CF=0
    162162    add     bx, 80h                 ; Increment by 2kB (minimum possible distance from the beginning of one option ROM to the next)
    163163    jnc     SHORT .SegmentLoop      ; Loop until segment overflows
    164     clc
    165     jmp     SHORT .ReturnWithoutUpdatingCF
    166 ALIGN JUMP_ALIGN
    167164.RomFound:
    168     stc
    169 .ReturnWithoutUpdatingCF:
    170165    pop     cx
    171166    pop     si
     
    191186    call    Buffers_GetFlashComparisonBufferToESDI
    192187    eMOVZX  bx, [cs:g_cfgVars+CFGVARS.bEepromType]
    193     mov     cx, [cs:bx+g_rgwEepromTypeToSizeInWords]
     188%ifdef CLD_NEEDED
    194189    cld
     190%endif
     191;%if g_rgwEepromTypeToSizeInWords = 0   ; *FIXME* It really is but NASM won't accept this.
     192    mov     cx, [cs:bx]
     193;%else
     194;   mov     cx, [cs:bx+g_rgwEepromTypeToSizeInWords]
     195;%endif
    195196    rep movsw
    196197
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Flash.asm

    r568 r592  
    7878ALIGN JUMP_ALIGN
    7979Flash_SinglePageWithFlashvarsInSSBP:
     80%ifdef CLD_NEEDED
    8081    cld
     82%endif
    8183    call    AreSourceAndDestinationPagesEqualFromFlashvarsInSSBP
    8284    je      SHORT .NoNeedToFlashThePage ; CF cleared
     
    305307ALIGN JUMP_ALIGN
    306308WaitUntilEepromPageWriteHasCompleted:
    307     call    .InitializeTimeoutCounterForEepromPollingWithFlashvarsInSSBP
    308     mov     es, [bp+FLASHVARS.fpNextDestinationPage+2]
    309     mov     di, [bp+FLASHVARS.wLastOffsetWritten]
    310 ALIGN JUMP_ALIGN
    311 .PollEeprom:
    312     call    .HasWriteCycleCompleted
    313     je      SHORT .PageWriteCompleted   ; CF cleared
    314     call    TimerTicks_GetTimeoutTicksLeftToAXfromDSBX
    315     jnc     SHORT .PollEeprom
    316 ALIGN JUMP_ALIGN
    317 .PageWriteCompleted:
    318     ret
    319 
    320 ;--------------------------------------------------------------------
    321 ; .InitializeTimeoutCounterForEepromPollingWithFlashvarsInSSBP
    322 ;   Parameters:
    323 ;       SS:BP:  Ptr to FLASHVARS
    324 ;   Returns:
    325 ;       DS:BX:  Ptr to timeout counter variable
    326 ;   Corrupts registers:
    327 ;       AX
    328 ;--------------------------------------------------------------------
    329 ALIGN JUMP_ALIGN
    330 .InitializeTimeoutCounterForEepromPollingWithFlashvarsInSSBP:
    331309    push    ss
    332310    pop     ds
    333311    lea     bx, [bp+FLASHVARS.wTimeoutCounter]
    334312    mov     ax, EEPROM_POLLING_TIMEOUT_TICKS
    335     jmp     TimerTicks_InitializeTimeoutFromAX
    336 
    337 ;--------------------------------------------------------------------
    338 ; .HasWriteCycleCompleted
    339 ;   Parameters:
    340 ;       ES:DI:  Ptr to last written byte in EEPROM
    341 ;       SS:BP:  Ptr to FLASHVARS
    342 ;   Returns:
    343 ;       ZF:     Set if write cycle has completed
    344 ;               Cleared if write cycle in progress
    345 ;   Corrupts registers:
    346 ;       AX
    347 ;--------------------------------------------------------------------
    348 ALIGN JUMP_ALIGN
    349 .HasWriteCycleCompleted:
    350     mov     ah, [es:di]     ; Load byte from EEPROM
    351     mov     al, [bp+FLASHVARS.bLastByteWritten]
    352     and     ax, 8080h       ; Clear all but bit 7 from both bytes
    353     cmp     al, ah          ; Set ZF if high bits are the same
    354     ret
    355 
     313    call    TimerTicks_InitializeTimeoutFromAX
     314    mov     es, [bp+FLASHVARS.fpNextDestinationPage+2]
     315    mov     di, [bp+FLASHVARS.wLastOffsetWritten]
     316ALIGN JUMP_ALIGN
     317.PollEeprom:
     318    mov     al, [es:di]                         ; Load byte from EEPROM
     319    xor     al, [bp+FLASHVARS.bLastByteWritten] ; Clear SF if the most significant bits are the same
     320    jns     SHORT .PageWriteCompleted           ; With CF cleared
     321    call    TimerTicks_GetTimeoutTicksLeftToAXfromDSBX
     322    jnc     SHORT .PollEeprom
     323ALIGN JUMP_ALIGN, ret
     324.PageWriteCompleted:
     325    ret
    356326
    357327;--------------------------------------------------------------------
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/IdeAutodetect.asm

    r589 r592  
    118118    ; example Promise FloppyMAX has Control Block at STANDARD_CONTROL_BLOCK_OFFSET but Sound Blaster 16 (CT2290)
    119119    ; use DEVICE_ATA_SECONDARY_PORTCTRL for Tertiary and Quaternary even though only Secondary should use that.
    120     call    ChangeDifferentControlBlockAddressToSI
    121     je      SHORT .RedetectTertiaryOrQuaternaryWithDifferentControlBlockAddress
     120    call    ChangeControlBlockAddressInSI
     121    jz      SHORT .RedetectTertiaryOrQuaternaryWithDifferentControlBlockAddress
    122122
    123123
     
    130130    mov     si, dx
    131131    add     si, BYTE XTCF_CONTROL_BLOCK_OFFSET
    132     shl     bx, 1                       ; SHL 1 register offsets for XT-CF
     132    eSHL_IM bx, 1                       ; SHL 1 register offsets for XT-CF
    133133    call    DetectIdeDeviceFromPortsDXandSIwithOffsetsInBLandBH
    134134    mov     al, DEVICE_8BIT_XTCF_PIO8
     
    233233
    234234;--------------------------------------------------------------------
    235 ; ChangeDifferentControlBlockAddressToSI
     235; ChangeControlBlockAddressInSI
    236236;   Parameters:
    237237;       DX:     IDE Base Port address
     
    241241;               Cleared if different control block address is not possible
    242242;   Corrupts registers:
    243 ;       AH
    244 ;--------------------------------------------------------------------
    245 ChangeDifferentControlBlockAddressToSI:
     243;       Nothing
     244;--------------------------------------------------------------------
     245ChangeControlBlockAddressInSI:
    246246    cmp     si, 368h
    247247    je      SHORT .TrySecondAlternative
     
    252252    je      SHORT .TryLastAlternative
    253253    cmp     si, 3E0h
    254     je      SHORT .TryLastAlternative
    255     ret     ; Return with ZF cleared
     254    jne     SHORT .Return   ; With ZF cleared
    256255
    257256.TryLastAlternative:
     
    260259.TrySecondAlternative:
    261260    sub     si, BYTE 8h     ; 368h to 360h, 3E8h to 3E0h
    262     xor     ah, ah          ; Set ZF
     261    cmp     sp, sp          ; Set ZF
     262.Return:
    263263    ret
    264264
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Main.asm

    r589 r592  
    132132    call    Buffers_Clear
    133133    call    EEPROM_FindXtideUniversalBiosROMtoESDI
    134     jnc     SHORT .InitializationCompleted
     134    jc      SHORT .InitializationCompleted
    135135    mov     [CFGVARS.wEepromSegment], es
    136136.InitializationCompleted:
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/MenuEvents.asm

    r526 r592  
    8484    pop     ds
    8585
    86     mov     WORD [si+MENUINIT.wItems], ax
    87     mov     WORD [si+MENUINIT.bTitleLines], TITLE_LINES_IN_MENU
    88     mov     WORD [si+MENUINIT.bInfoLines], INFO_LINES_IN_MENU
     86    mov     [si+MENUINIT.wItems], ax
     87    mov     WORD [si+MENUINIT.wTitleAndInfoLines], INFO_LINES_IN_MENU << 8 | TITLE_LINES_IN_MENU
    8988    mov     BYTE [si+MENUINIT.bWidth], MENU_WIDTH
    9089    CALL_DISPLAY_LIBRARY GetColumnsToALandRowsToAH
     
    112111ALIGN JUMP_ALIGN
    113112.QuitProgram:
    114     call    Dialogs_DisplayQuitDialog
     113    mov     bx, g_szDlgExitToDos
     114    call    Dialogs_DisplayYesNoResponseDialogWithTitleStringInBX
    115115    jz      SHORT .ExitToDOS
    116116    clc
     
    169169ALIGN JUMP_ALIGN
    170170.RefreshItemFromCX:
    171     cmp     cx, NO_ITEM_HIGHLIGHTED
    172     je      SHORT .NothingToRefresh
     171    inc     cx                  ; NO_ITEM_HIGHLIGHTED ?
     172    jz      SHORT .NothingToRefresh
     173    dec     cx
    173174    call    Menupage_GetActiveMenupageToDSDI
    174175    call    Menupage_GetCXthVisibleMenuitemToDSSIfromDSDI
     
    185186ALIGN JUMP_ALIGN
    186187.RefreshInformation:
    187     cmp     cx, NO_ITEM_HIGHLIGHTED
    188     je      SHORT .NothingToRefresh
     188    inc     cx                  ; NO_ITEM_HIGHLIGHTED ?
     189    jz      SHORT .NothingToRefresh
     190    dec     cx
    189191    call    Menupage_GetActiveMenupageToDSDI
    190192    call    Menupage_GetCXthVisibleMenuitemToDSSIfromDSDI
     
    213215ALIGN JUMP_ALIGN
    214216.PrintLoadStatus:
    215     mov     ax, [g_cfgVars+CFGVARS.wFlags]
    216     test    ax, FLG_CFGVARS_FILELOADED
     217    mov     al, [g_cfgVars+CFGVARS.wFlags]
     218    test    al, FLG_CFGVARS_FILELOADED
    217219    jnz     SHORT .PrintNameOfLoadedFile
    218     test    ax, FLG_CFGVARS_ROMLOADED
     220    test    al, FLG_CFGVARS_ROMLOADED
    219221    mov     si, g_szEEPROM
    220222    jnz     SHORT .PrintNameOfLoadedFileOrEeprom
     
    253255ALIGN JUMP_ALIGN
    254256.PrintStatusOfUnsavedChanges:
    255     test    WORD [g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_UNSAVED
     257    test    BYTE [g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_UNSAVED
    256258    jz      SHORT .ReturnSinceNothingToPrint
    257259    mov     si, g_szUnsaved
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menuitem.asm

    r567 r592  
    5353    call    Memory_ReserveCXbytesFromStackToDSSI
    5454    call    InitializeDialogInputInDSSIfromMenuitemInESDI
    55     mov     ax, [es:di+MENUITEM.itemValue + ITEM_VALUE.szMultichoice]
     55    mov     ax, [es:di+MENUITEM.itemValue+ITEM_VALUE.szMultichoice]
    5656    mov     [si+DIALOG_INPUT.fszItems], ax
    5757    push    di
     
    5959    pop     di
    6060
    61     cmp     ax, BYTE NO_ITEM_SELECTED
    62     je      SHORT .NothingToChange
     61    inc     ax              ; NO_ITEM_SELECTED ?
     62    jz      SHORT .NothingToChange
     63    dec     ax
    6364    call    Registers_CopyESDItoDSSI
    6465    call    Menuitem_StoreValueFromAXtoMenuitemInDSSI
     
    7071;--------------------------------------------------------------------
    7172; Menuitem_ActivateHexInputForMenuitemInDSSI
    72 ;   Parameters:
    73 ;       DS:SI:  Ptr to MENUITEM
    74 ;   Returns:
    75 ;       Nothing
     73; Menuitem_ActivateUnsignedInputForMenuitemInDSSI
     74;   Parameters:
     75;       DS:SI:  Ptr to MENUITEM
     76;   Returns:
     77;       CF:     Cleared if value inputted
     78;               Set if user cancellation
    7679;   Corrupts registers:
    7780;       AX, BX, CX, SI, DI, ES
    7881;--------------------------------------------------------------------
    79 ALIGN JUMP_ALIGN
    8082Menuitem_ActivateHexInputForMenuitemInDSSI:
     83    mov     bl, 16
     84    SKIP2B  ax
     85Menuitem_ActivateUnsignedInputForMenuitemInDSSI:
     86    mov     bl, 10
     87
    8188    call    Registers_CopyDSSItoESDI
    82 
    8389    mov     cx, WORD_DIALOG_IO_size
    8490    call    Memory_ReserveCXbytesFromStackToDSSI
    8591    call    InitializeDialogInputInDSSIfromMenuitemInESDI
    86     mov     BYTE [si+WORD_DIALOG_IO.bNumericBase], 16
    87     jmp     SHORT ContinueWordInput
    88 
    89 ;--------------------------------------------------------------------
    90 ; Menuitem_ActivateUnsignedInputForMenuitemInDSSI
    91 ;   Parameters:
    92 ;       DS:SI:  Ptr to MENUITEM
    93 ;   Returns:
    94 ;       CF:     Cleared if value inputted
    95 ;               Set if user cancellation
    96 ;   Corrupts registers:
    97 ;       AX, BX, CX, SI, DI, ES
    98 ;--------------------------------------------------------------------
    99 ALIGN JUMP_ALIGN
    100 Menuitem_ActivateUnsignedInputForMenuitemInDSSI:
    101     call    Registers_CopyDSSItoESDI
    102 
    103     mov     cx, WORD_DIALOG_IO_size
    104     call    Memory_ReserveCXbytesFromStackToDSSI
    105     call    InitializeDialogInputInDSSIfromMenuitemInESDI
    106     mov     BYTE [si+WORD_DIALOG_IO.bNumericBase], 10
    107 ContinueWordInput:
    108     mov     ax, [es:di+MENUITEM.itemValue + ITEM_VALUE.wMinValue]
     92    mov     [si+WORD_DIALOG_IO.bNumericBase], bl
     93    mov     ax, [es:di+MENUITEM.itemValue+ITEM_VALUE.wMinValue]
    10994    mov     [si+WORD_DIALOG_IO.wMin], ax
    110     mov     ax, [es:di+MENUITEM.itemValue + ITEM_VALUE.wMaxValue]
     95    mov     ax, [es:di+MENUITEM.itemValue+ITEM_VALUE.wMaxValue]
    11196    mov     [si+WORD_DIALOG_IO.wMax], ax
    11297    push    di
     
    138123ALIGN JUMP_ALIGN
    139124InitializeDialogInputInDSSIfromMenuitemInESDI:
    140     mov     ax, [es:di+MENUITEM.itemValue + ITEM_VALUE.szDialogTitle]
     125    mov     ax, [es:di+MENUITEM.itemValue+ITEM_VALUE.szDialogTitle]
    141126    mov     [si+DIALOG_INPUT.fszTitle], ax
    142127    mov     [si+DIALOG_INPUT.fszTitle+2], cs
     
    162147ALIGN JUMP_ALIGN
    163148Menuitem_StoreValueFromAXtoMenuitemInDSSI:
     149%if 0
     150    ; 3 bytes more but this will always invoke the Writer, even if it's an invalid item type (which might be useful).
    164151    eMOVZX  bx, [si+MENUITEM.bType]
    165152    cmp     bl, TYPE_MENUITEM_HEX
     153%else
     154    ; This will only invoke the Writer for valid item types.
     155    mov     bx, -TYPE_MENUITEM_MULTICHOICE & 0FFh
     156    add     bl, [si+MENUITEM.bType]
     157    jnc     SHORT .InvalidItemType
     158    cmp     bl, TYPE_MENUITEM_HEX - TYPE_MENUITEM_MULTICHOICE
     159%endif
    166160    ja      SHORT .InvalidItemType
    167161
     
    169163    add     di, [si+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
    170164
    171     push    bx
    172     mov     bx,[si+MENUITEM.itemValue+ITEM_VALUE.fnValueWriter]
    173     test    bx,bx
    174     jz      SHORT .NoWriter
    175     call    bx
    176 .NoWriter:
     165    push    WORD [cs:bx+.rgfnJumpToStoreValueBasedOnItemType]
     166    mov     bx, [si+MENUITEM.itemValue+ITEM_VALUE.fnValueWriter]
     167    test    bx, bx
     168    jnz     SHORT .InvokeWriter
     169.InvalidItemType:
    177170    pop     bx
    178 
    179     jmp     [cs:bx+.rgfnJumpToStoreValueBasedOnItemType]
    180 .InvalidItemType:
    181     ret
     171.InvokeWriter:
     172    jmp     bx              ; The Writer can freely corrupt BX
    182173
    183174ALIGN WORD_ALIGN
    184175.rgfnJumpToStoreValueBasedOnItemType:
    185     dw      .InvalidItemType                                    ; TYPE_MENUITEM_PAGEBACK
    186     dw      .InvalidItemType                                    ; TYPE_MENUITEM_PAGENEXT
    187     dw      .InvalidItemType                                    ; TYPE_MENUITEM_ACTION
     176;   dw      .InvalidItemType                                    ; TYPE_MENUITEM_PAGEBACK
     177;   dw      .InvalidItemType                                    ; TYPE_MENUITEM_PAGENEXT
     178;   dw      .InvalidItemType                                    ; TYPE_MENUITEM_ACTION
    188179    dw      .StoreMultichoiceValueFromAXtoESDIwithItemInDSSI    ; TYPE_MENUITEM_MULTICHOICE
    189180    dw      .StoreByteOrWordValueFromAXtoESDIwithItemInDSSI     ; TYPE_MENUITEM_UNSIGNED
     
    237228    jz      .StoreByteOrWordValueFromAXtoESDIwithItemInDSSI
    238229
    239     shl     ax, 1           ; Shift for WORD lookup
     230    eSHL_IM ax, 1           ; Shift for WORD lookup
    240231    add     bx, ax
    241232    mov     ax, [bx]        ; Lookup complete
     
    317308;       AX:     Menuitem value
    318309;   Corrupts registers:
    319 ;       BX
     310;       Nothing
    320311;--------------------------------------------------------------------
    321312ALIGN JUMP_ALIGN
     
    330321    test    BYTE [si+MENUITEM.bFlags], FLG_MENUITEM_BYTEVALUE
    331322    jz      SHORT .NoConvertWordToByteValue
    332     xor     ah, ah              ; conversion needs to happen before call to the reader,
    333                                 ; in case the reader unpacks the byte to a word
     323    xor     ah, ah          ; conversion needs to happen before call to the reader,
     324                            ; in case the reader unpacks the byte to a word
    334325
    335326.NoConvertWordToByteValue:
     
    338329    jz      SHORT .NoReader
    339330
    340     call    bx
     331    call    bx              ; The Reader can freely corrupt BX, DI and ES
    341332
    342333.NoReader:
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/MenuitemPrint.asm

    r590 r592  
    168168MenuitemPrint_WriteLookupValueStringToBufferInESDIfromUnshiftedItemInDSSI:
    169169    call    Menuitem_GetValueToAXfromMenuitemInDSSI
    170     shl     ax, 1
     170    eSHL_IM ax, 1
    171171    jmp     SHORT PrintLookupValueFromAXtoBufferInESDI
    172172
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/BootMenuSettingsMenu.asm

    r580 r592  
    11; Project name  :   XTIDE Universal BIOS Configurator v2
    2 ; Description   :   "Boot Menu Settings" menu structs and functions.
     2; Description   :   "Boot settings" menu structs and functions.
    33
    44;
     
    2626    at  MENUPAGE.fnEnter,           dw  BootMenuSettingsMenu_EnterMenuOrModifyItemVisibility
    2727    at  MENUPAGE.fnBack,            dw  ConfigurationMenu_EnterMenuOrModifyItemVisibility
    28     at  MENUPAGE.wMenuitems,        dw  6
     28    at  MENUPAGE.wMenuitems,        dw  7
    2929iend
    3030
     
    5555iend
    5656
     57g_MenuitemBootMnuStngsColorTheme:
     58istruc MENUITEM
     59    at  MENUITEM.fnActivate,        dw  Menuitem_ActivateMultichoiceSelectionForMenuitemInDSSI
     60    at  MENUITEM.fnFormatValue,     dw  MenuitemPrint_WriteLookupValueStringToBufferInESDIfromUnshiftedItemInDSSI
     61    at  MENUITEM.szName,            dw  g_szItemColorTheme
     62    at  MENUITEM.szQuickInfo,       dw  g_szNfoColorTheme
     63    at  MENUITEM.szHelp,            dw  g_szHelpColorTheme
     64    at  MENUITEM.bFlags,            db  FLG_MENUITEM_VISIBLE | FLG_MENUITEM_MODIFY_MENU
     65    at  MENUITEM.bType,             db  TYPE_MENUITEM_MULTICHOICE
     66    at  MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,        dw  ROMVARS.pColorTheme     ; Only ever read - never modified
     67    at  MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,              dw  g_szDlgColorTheme
     68    at  MENUITEM.itemValue + ITEM_VALUE.szMultichoice,              dw  g_szMultichoiceColorTheme
     69    at  MENUITEM.itemValue + ITEM_VALUE.rgwChoiceToValueLookup,     dw  NULL
     70    at  MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup,    dw  g_rgszValueToStringLookupForColorTheme
     71    at  MENUITEM.itemValue + ITEM_VALUE.fnValueReader,              dw  ReadColorTheme
     72    at  MENUITEM.itemValue + ITEM_VALUE.fnValueWriter,              dw  WriteColorTheme
     73iend
     74
    5775g_MenuitemBootMnuStngsFloppyDrives:
    5876istruc MENUITEM
     
    116134    at  MENUITEM.itemValue + ITEM_VALUE.wMaxValue,                  dw  1092
    117135iend
    118 
    119 
    120 g_rgwChoiceToValueLookupForEnableBootMenu:
    121     dw  FALSE
    122     dw  BOOT_MENU_DEFAULT_TIMEOUT
    123136
    124137g_rgwChoiceToValueLookupForDisplayModes:
     
    146159    dw  g_szValueBootFloppyDrvs4
    147160
     161g_rgszValueToStringLookupForColorTheme:
     162    dw  g_szValueColorTheme0
     163    dw  g_szValueColorTheme1
     164    dw  g_szValueColorTheme2
     165    dw  g_szValueColorTheme3
     166    dw  g_szValueColorTheme4
     167    dw  g_szValueColorTheme5
     168
     169ColorThemeTable:
     170    ; Classic (default)
     171    db  COLOR_ATTRIBUTE(COLOR_YELLOW, COLOR_BLUE)                           ; .cBordersAndBackground
     172    db  COLOR_ATTRIBUTE(COLOR_GRAY, COLOR_BLACK)                            ; .cShadow
     173    db  COLOR_ATTRIBUTE(COLOR_BRIGHT_WHITE, COLOR_BLUE)                     ; .cTitle
     174    db  COLOR_ATTRIBUTE(COLOR_WHITE, COLOR_BLUE)                            ; .cItem
     175    db  COLOR_ATTRIBUTE(COLOR_BRIGHT_WHITE, COLOR_CYAN)                     ; .cHighlightedItem
     176    db  COLOR_ATTRIBUTE(COLOR_RED, COLOR_BLUE) | FLG_COLOR_BLINK            ; .cHurryTimeout
     177    db  COLOR_ATTRIBUTE(COLOR_GREEN, COLOR_BLUE)                            ; .cNormalTimeout
     178    ; Argon Blue
     179    db  COLOR_ATTRIBUTE(COLOR_LIGHT_BLUE, COLOR_BLACK)                      ; .cBordersAndBackground
     180    db  COLOR_ATTRIBUTE(COLOR_GRAY, COLOR_BLACK)                            ; .cShadow
     181    db  COLOR_ATTRIBUTE(COLOR_BRIGHT_WHITE, COLOR_BLACK)                    ; .cTitle
     182    db  COLOR_ATTRIBUTE(COLOR_WHITE, COLOR_BLACK)                           ; .cItem
     183    db  COLOR_ATTRIBUTE(COLOR_LIGHT_BLUE, COLOR_BLACK)                      ; .cHighlightedItem
     184    db  COLOR_ATTRIBUTE(COLOR_LIGHT_BLUE, COLOR_BLACK) | FLG_COLOR_BLINK    ; .cHurryTimeout
     185    db  COLOR_ATTRIBUTE(COLOR_LIGHT_BLUE, COLOR_BLACK)                      ; .cNormalTimeout
     186    ; Neon Red
     187    db  COLOR_ATTRIBUTE(COLOR_LIGHT_RED, COLOR_BLACK)                       ; .cBordersAndBackground
     188    db  COLOR_ATTRIBUTE(COLOR_GRAY, COLOR_BLACK)                            ; .cShadow
     189    db  COLOR_ATTRIBUTE(COLOR_BRIGHT_WHITE, COLOR_BLACK)                    ; .cTitle
     190    db  COLOR_ATTRIBUTE(COLOR_WHITE, COLOR_BLACK)                           ; .cItem
     191    db  COLOR_ATTRIBUTE(COLOR_LIGHT_RED, COLOR_BLACK)                       ; .cHighlightedItem
     192    db  COLOR_ATTRIBUTE(COLOR_LIGHT_RED, COLOR_BLACK) | FLG_COLOR_BLINK     ; .cHurryTimeout
     193    db  COLOR_ATTRIBUTE(COLOR_LIGHT_RED, COLOR_BLACK)                       ; .cNormalTimeout
     194    ; Phosphor Green
     195    db  COLOR_ATTRIBUTE(COLOR_LIGHT_GREEN, COLOR_BLACK)                     ; .cBordersAndBackground
     196    db  COLOR_ATTRIBUTE(COLOR_GRAY, COLOR_BLACK)                            ; .cShadow
     197    db  COLOR_ATTRIBUTE(COLOR_BRIGHT_WHITE, COLOR_BLACK)                    ; .cTitle
     198    db  COLOR_ATTRIBUTE(COLOR_WHITE, COLOR_BLACK)                           ; .cItem
     199    db  COLOR_ATTRIBUTE(COLOR_LIGHT_GREEN, COLOR_BLACK)                     ; .cHighlightedItem
     200    db  COLOR_ATTRIBUTE(COLOR_LIGHT_GREEN, COLOR_BLACK) | FLG_COLOR_BLINK   ; .cHurryTimeout
     201    db  COLOR_ATTRIBUTE(COLOR_LIGHT_GREEN, COLOR_BLACK)                     ; .cNormalTimeout
     202    ; Moon Surface
     203    db  COLOR_ATTRIBUTE(COLOR_GRAY, COLOR_BLACK)                            ; .cBordersAndBackground
     204    db  COLOR_ATTRIBUTE(COLOR_GRAY, COLOR_BLACK)                            ; .cShadow
     205    db  COLOR_ATTRIBUTE(COLOR_BRIGHT_WHITE, COLOR_BLACK)                    ; .cTitle
     206    db  COLOR_ATTRIBUTE(COLOR_WHITE, COLOR_BLACK)                           ; .cItem
     207    db  COLOR_ATTRIBUTE(COLOR_BROWN, COLOR_BLACK)                           ; .cHighlightedItem
     208    db  COLOR_ATTRIBUTE(COLOR_BRIGHT_WHITE, COLOR_BLACK) | FLG_COLOR_BLINK  ; .cHurryTimeout
     209    db  COLOR_ATTRIBUTE(COLOR_WHITE, COLOR_BLACK)                           ; .cNormalTimeout
     210    ; Toxic Waste
     211    db  COLOR_ATTRIBUTE(COLOR_LIGHT_GREEN, COLOR_BLACK)                     ; .cBordersAndBackground
     212    db  COLOR_ATTRIBUTE(COLOR_GRAY, COLOR_BLACK)                            ; .cShadow
     213    db  COLOR_ATTRIBUTE(COLOR_LIGHT_GREEN, COLOR_BLACK)                     ; .cTitle
     214    db  COLOR_ATTRIBUTE(COLOR_LIGHT_CYAN, COLOR_BLACK)                      ; .cItem
     215    db  COLOR_ATTRIBUTE(COLOR_LIGHT_CYAN, COLOR_BLUE)                       ; .cHighlightedItem
     216    db  COLOR_ATTRIBUTE(COLOR_LIGHT_RED, COLOR_BLACK) | FLG_COLOR_BLINK     ; .cHurryTimeout
     217    db  COLOR_ATTRIBUTE(COLOR_LIGHT_RED, COLOR_BLACK)                       ; .cNormalTimeout
     218EndOfColorThemeTable:
     219CountOfThemes   equ     (EndOfColorThemeTable-ColorThemeTable) / ATTRIBUTE_CHARS_size
     220
    148221
    149222; Section containing code
     
    166239    call    .EnableOrDisableScanForSerialDrives
    167240    call    .EnableOrDisableDefaultBootDrive
     241    call    .EnableOrDisableColorThemeSelection
    168242    call    .EnableOrDisableBootMenuSelectionTimeout
    169243    mov     si, g_MenupageForBootMenuSettingsMenu
     
    202276    mov     bx, g_MenuitemBootMnuStngsDefaultBootDrive
    203277    test    ax, FLG_ROMVARS_MODULE_HOTKEYS | FLG_ROMVARS_MODULE_BOOT_MENU
     278    jmp     SHORT .DisableMenuitemFromCSBXifZFset
     279
     280
     281;--------------------------------------------------------------------
     282; .EnableOrDisableColorThemeSelection
     283;   Parameters:
     284;       AX:     ROMVARS.wFlags
     285;       SS:BP:  Menu handle
     286;   Returns:
     287;       Nothing
     288;   Corrupts registers:
     289;       BX
     290;--------------------------------------------------------------------
     291ALIGN JUMP_ALIGN
     292.EnableOrDisableColorThemeSelection:
     293    mov     bx, g_MenuitemBootMnuStngsColorTheme
     294    test    ax, FLG_ROMVARS_MODULE_BOOT_MENU
    204295    jmp     SHORT .DisableMenuitemFromCSBXifZFset
    205296
     
    244335
    245336;--------------------------------------------------------------------
    246 ; MENUITEM value reader functions
    247 ;   Parameters:
    248 ;       AX:     Value from MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset
    249 ;       DS:SI:  Ptr to MENUITEM
    250 ;       ES:DI:  Ptr to value variable
    251 ;   Returns:
    252 ;       AX:     Value with possible modifications
    253 ;   Corrupts registers:
    254 ;       Nothing
    255 ;--------------------------------------------------------------------
    256 ALIGN JUMP_ALIGN
    257 ValueReaderForEnableBootMenu:
    258     test    ax, ax
    259     jz      SHORT .NoNeedToModify
    260     mov     ax, TRUE<<1
    261 .NoNeedToModify:
     337; ReadColorTheme
     338;   Parameters:
     339;       AX:     Value read from the ROMVARS location
     340;       ES:DI:  ROMVARS location where the value was just read from
     341;       DS:SI:  MENUITEM pointer
     342;   Returns:
     343;       AX:     Value that the MENUITEM system will interact with and display
     344;   Corrupts registers:
     345;       BX, DI, ES
     346;--------------------------------------------------------------------
     347ALIGN JUMP_ALIGN
     348ReadColorTheme:
     349    push    ds
     350
     351    push    es                          ; ES -> DS
     352    pop     ds
     353    push    cs                          ; CS -> ES
     354    pop     es
     355
     356    mov     di, EndOfColorThemeTable-1  ; ES:DI now points to the end of the last theme in the table of available themes in XTIDECFG
     357    xor     bx, bx
     358
     359    push    si
     360    push    cx
     361    mov     cx, CountOfThemes
     362    std
     363.NextTheme:
     364    push    cx
     365    mov     cl, ATTRIBUTE_CHARS_size
     366    mov     si, ax                      ; [ROMVARS.pColorTheme] to SI
     367    dec     si
     368    add     si, cx                      ; DS:SI now points to the end of the ColorTheme in the loaded BIOS
     369    sub     di, bx                      ; Update the pointer to the end of the next theme in the table
     370
     371    ; We verify that the theme in the loaded BIOS exists in our table. If it doesn't exist then that most likely means
     372    ; the loaded BIOS doesn't contain MODULE_BOOT_MENU and the theme actually isn't a theme - it's code. Either way,
     373    ; we don't trust it enough to copy it over as corrupt/invalid settings could render the UI in XTIDECFG unreadable.
     374    repe    cmpsb
     375    mov     bx, cx
     376    pop     cx
     377    loopne  .NextTheme
     378    cld
     379    mov     ax, cx
     380    jne     SHORT .SkipCopy
     381
     382    ; Copy the color theme fron the loaded BIOS overwriting XTIDECFG's own theme
     383    inc     si
     384    mov     di, ColorTheme              ; ES:DI now points to ColorTheme in XTIDECFG
     385
     386    mov     cl, ATTRIBUTE_CHARS_size
     387    call    Memory_CopyCXbytesFromDSSItoESDI
     388
     389.SkipCopy:
     390    pop     cx
     391    pop     si
     392    pop     ds
    262393    ret
     394
     395
     396;--------------------------------------------------------------------
     397; WriteColorTheme
     398;   Parameters:
     399;       AX:     Value that the MENUITEM system was interacting with
     400;       ES:DI:  ROMVARS location where the value is to be stored
     401;       DS:SI:  MENUITEM pointer
     402;   Returns:
     403;       AX:     Value to actually write to ROMVARS
     404;   Corrupts registers:
     405;       Nothing
     406;--------------------------------------------------------------------
     407ALIGN JUMP_ALIGN
     408WriteColorTheme:
     409    push    cx
     410    push    si
     411    push    di
     412
     413    mov     cx, ATTRIBUTE_CHARS_size
     414    mul     cl                          ; Multiply with the menu choice index
     415    mov     si, ColorThemeTable
     416    add     si, ax
     417    mov     ax, [es:di]                 ; Fetch the ptr to ColorTheme
     418    mov     di, ax
     419
     420    call    Memory_CopyCXbytesFromDSSItoESDI
     421
     422    pop     di
     423    pop     si
     424    pop     cx
     425    ret
     426
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/ConfigurationMenu.asm

    r589 r592  
    245245;       Nothing
    246246;   Corrupts registers:
    247 ;       BX, DI, ES
     247;       BX
    248248;--------------------------------------------------------------------
    249249ALIGN JUMP_ALIGN
     
    262262;       Nothing
    263263;   Corrupts registers:
    264 ;       AX, BX, CX
     264;       AX, BX
    265265;--------------------------------------------------------------------
    266266ALIGN JUMP_ALIGN
     
    268268    call    Buffers_GetRomvarsFlagsToAX
    269269    mov     bx, g_MenuitemConfigurationKiBtoStealFromRAM
    270     test    ax, FLG_ROMVARS_FULLMODE
     270    test    al, FLG_ROMVARS_FULLMODE
    271271    jz      SHORT .DisableMenuitemFromCSBX
    272272    jmp     SHORT .EnableMenuitemFromCSBX
     
    319319;       All, except segments
    320320;--------------------------------------------------------------------
     321%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
     322%if (ROMVARS.ideVars0 | ROMVARS.ideVars1 | ROMVARS.ideVars2 | ROMVARS.ideVars3) & 0FF00h = 0
     323PrimaryIdeController:
     324    mov     bl, ROMVARS.ideVars0 & 0FFh
     325    SKIP2B  f
     326SecondaryIdeController:
     327    mov     bl, ROMVARS.ideVars1 & 0FFh
     328    SKIP2B  f
     329TertiaryIdeController:
     330    mov     bl, ROMVARS.ideVars2 & 0FFh
     331    SKIP2B  f
     332QuaternaryIdeController:
     333    mov     bl, ROMVARS.ideVars3 & 0FFh
     334    xor     bh, bh
     335    ; Fall to DisplayIdeControllerMenu
     336%else
    321337ALIGN JUMP_ALIGN
    322338PrimaryIdeController:
     
    338354    mov     bx, ROMVARS.ideVars3
    339355    ; Fall to DisplayIdeControllerMenu
     356%endif
     357%endif
    340358
    341359ALIGN JUMP_ALIGN
     
    383401;       Nothing
    384402;   Corrupts registers:
    385 ;       All
     403;       AX, BX, CX, DX
    386404;----------------------------------------------------------------------
    387405ConfigurationMenu_CheckAndMoveSerialDrivesToBottom:
     
    428446; move serial to end of list, others up
    429447;
     448%ifdef CLD_NEEDED
    430449    cld
    431 
     450%endif
    432451    mov     ax, di                      ; save end pointer of list after scan
    433 
    434452    sub     sp, IDEVARS_size            ; copy serial to temporary space on stack
    435 
    436453    mov     di, sp
    437454
     
    439456    pop     es
    440457
     458%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    441459%if IDEVARS_size & 1
    442460    mov     cl, IDEVARS_size
     
    446464    rep movsw
    447465%endif
     466%endif
    448467
    449468    lea     di, [si-IDEVARS_size]       ; move up all the idevars below the serial, by one slot
    450 
    451469    mov     cx, ax                      ; restore end pointer of list, subtract off end of serial idevars
    452470    sub     cx, si
     
    462480    ; di is already at last IDEVARS position
    463481
     482%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    464483%if IDEVARS_size & 1
    465484    mov     cl, IDEVARS_size
     
    469488    rep movsw
    470489%endif
     490%endif
    471491
    472492    add     sp, IDEVARS_size
     
    476496
    477497    mov     dh, 1                       ; set flag that we have done a relocation
    478 
    479498    jmp     SHORT .outerLoop
    480499
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/FlashMenu.asm

    r589 r592  
    185185    pop     ds
    186186
    187     cmp     WORD [cs:g_cfgVars+CFGVARS.wEepromSegment], 0
    188     jne     .alreadySet
     187    cmp     WORD [g_cfgVars+CFGVARS.wEepromSegment], 0
     188    jne     SHORT .AlreadySet
    189189
    190190    push    es
    191191    push    di
    192192    call    EEPROM_FindXtideUniversalBiosROMtoESDI
    193     push    es
    194     pop     ax
     193    mov     ax, es
    195194    pop     di
    196195    pop     es
    197     jc      .storeEepromSegment
     196    jnc     SHORT .StoreEepromSegment
    198197    mov     ax, DEFAULT_EEPROM_SEGMENT
    199 .storeEepromSegment:
    200     mov     WORD [cs:g_cfgVars+CFGVARS.wEepromSegment], ax
    201 
    202 .alreadySet:
    203 
     198.StoreEepromSegment:
     199    mov     [g_cfgVars+CFGVARS.wEepromSegment], ax
     200
     201.AlreadySet:
    204202    mov     si, g_MenupageForFlashMenu
    205203    jmp     Menupage_ChangeToNewMenupageInDSSI
     
    256254ALIGN JUMP_ALIGN, ret
    257255.ImageFitsInSelectedEeprom:
     256.DoNotGenerateChecksumByte:
    258257    ret
    259258
     
    271270    call    EEPROM_LoadFromRomToRamComparisonBuffer
    272271    call    Buffers_AppendZeroesIfNeeded
    273     test    WORD [cs:g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_CHECKSUM
     272    test    BYTE [cs:g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_CHECKSUM
    274273    jz      SHORT .DoNotGenerateChecksumByte
    275274    jmp     Buffers_GenerateChecksum
    276 .DoNotGenerateChecksumByte:
    277     ret
    278275
    279276;--------------------------------------------------------------------
     
    349346.GetSelectedEepromSizeInWordsToAX:
    350347    eMOVZX  bx, [cs:g_cfgVars+CFGVARS.bEepromType]
    351     mov     ax, [cs:bx+g_rgwEepromTypeToSizeInWords]
     348;%if g_rgwEepromTypeToSizeInWords = 0   ; *FIXME* It really is but NASM won't accept this.
     349    mov     ax, [cs:bx]
     350;%else
     351;   mov     ax, [cs:bx+g_rgwEepromTypeToSizeInWords]
     352;%endif
    352353    ret
    353354
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/IdeControllerMenu.asm

    r589 r592  
    135135    at  MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,              dw  g_szDlgIdeCmdPort
    136136    at  MENUITEM.itemValue + ITEM_VALUE.wMinValue,                  dw  8h
    137     at  MENUITEM.itemValue + ITEM_VALUE.wMaxValue,                  dw  3f8h
     137    at  MENUITEM.itemValue + ITEM_VALUE.wMaxValue,                  dw  3F8h
    138138    at  MENUITEM.itemValue + ITEM_VALUE.fnValueReader,              dw  IdeControllerMenu_SerialReadPort
    139139    at  MENUITEM.itemValue + ITEM_VALUE.fnValueWriter,              dw  IdeControllerMenu_SerialWritePort
     
    306306    mov     [cs:g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
    307307
     308%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
     309%if IDEVARS.wBasePort = 0
     310    mov     [cs:g_MenuitemIdeControllerCommandBlockAddress+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], bx
     311%else
    308312    lea     ax, [bx+IDEVARS.wBasePort]
    309313    mov     [cs:g_MenuitemIdeControllerCommandBlockAddress+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
    310 
     314%endif
     315
     316%if IDEVARS.bSerialPort = 0
     317    mov     [cs:g_MenuitemIdeControllerSerialPort+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], bx
     318%else
    311319    lea     ax, [bx+IDEVARS.bSerialPort]
    312320    mov     [cs:g_MenuitemIdeControllerSerialPort+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
     321%endif
     322%endif
    313323
    314324    lea     ax, [bx+IDEVARS.bSerialBaud]
     
    361371ALIGN JUMP_ALIGN
    362372.EnableOrDisableCommandBlockPort:
    363     mov     bx, [cs:g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
     373    mov     bx, [g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
    364374    call    Buffers_GetRomvarsValueToAXfromOffsetInBX
    365375    mov     bx, g_MenuitemIdeControllerCommandBlockAddress
     
    380390ALIGN JUMP_ALIGN
    381391.EnableOrDisableControlBlockPort:
    382     mov     bx, [cs:g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
     392    mov     bx, [g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
    383393    call    Buffers_GetRomvarsValueToAXfromOffsetInBX
    384394    mov     bx, g_MenuitemIdeControllerControlBlockAddress
     
    404414    jz      SHORT .DisableMenuitemFromCSBX
    405415
    406     mov     bx, [cs:g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
     416    mov     bx, [g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
    407417    call    Buffers_GetRomvarsValueToAXfromOffsetInBX
    408418    mov     bx, g_MenuitemIdeControllerEnableInterrupt
     
    424434ALIGN JUMP_ALIGN
    425435.EnableOrDisableIRQchannelSelection:
    426     mov     bx, [cs:g_MenuitemIdeControllerEnableInterrupt+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
     436    mov     bx, [g_MenuitemIdeControllerEnableInterrupt+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
    427437    call    Buffers_GetRomvarsValueToAXfromOffsetInBX
    428438    mov     bx, g_MenuitemIdeControllerIdeIRQ
     
    453463
    454464
     465;--------------------------------------------------------------------
     466; .EnableOrDisableSerial
     467;   Parameters:
     468;       SS:BP:  Menu handle
     469;   Returns:
     470;       Nothing
     471;   Corrupts registers:
     472;       AX, BX
     473;--------------------------------------------------------------------
    455474.EnableOrDisableSerial:
    456475    mov     bx, g_MenuitemIdeControllerSerialBaud
     
    463482    call    DisableMenuitemFromCSBX
    464483
    465     mov     bx, [cs:g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
     484    mov     bx, [g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
    466485    call    Buffers_GetRomvarsValueToAXfromOffsetInBX
    467486    cmp     al, DEVICE_SERIAL_PORT
    468     jne     .DisableAllSerial
     487    jne     SHORT .DisableAllSerial
    469488
    470489    mov     bx, g_MenuitemIdeControllerSerialCOM
     
    474493    call    EnableMenuitemFromCSBX
    475494
    476     mov     bx, [cs:g_MenuitemIdeControllerSerialCOM+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
     495    mov     bx, [g_MenuitemIdeControllerSerialCOM+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
    477496    call    Buffers_GetRomvarsValueToAXfromOffsetInBX
    478497    mov     bx, g_MenuitemIdeControllerSerialPort
     
    483502    ret
    484503
     504
    485505;--------------------------------------------------------------------
    486506; MENUITEM activation functions (.fnActivate)
     
    531551    jmp     MasterSlaveMenu_EnterMenuOrModifyItemVisibility
    532552
    533 ;------------------------------------------------------------------------------------------
    534 ;
    535 ; Reader/Writer Routines
    536 ;
    537 ; For serial drives, we pack the port number and baud rate into a single byte, and thus
    538 ; we need to take care to properly read/write just the bits we need.  In addition, since
    539 ; we use the Port/PortCtrl bytes in a special way for serial drives, we need to properly
    540 ; default the values stored in both these words when switching in and out of the Serial
    541 ; device choice.
    542 ;
    543 ; Writers:
    544 ;   Parameters:
    545 ;       AX:     Value that the MENUITEM system was interacting with
    546 ;       ES:DI:  ROMVARS location where the value is to be stored
     553
     554;--------------------------------------------------------------------
     555; IdeControllerMenu_WriteDevice
     556;
     557; Sets default values to ports and other device dependent stuff
     558;
     559;   Parameters:
     560;       AX:     IDE controller/Device type menu choice index
     561;       ES:DI:  Ptr to IDEVARS.bDevice
    547562;       DS:SI:  MENUITEM pointer
    548563;   Returns:
    549 ;       AX:     Value to actually write to ROMVARS
    550 ;   Corrupts registers:
    551 ;       AX
    552 ;
    553 ; Readers:
    554 ;   Parameters:
    555 ;       AX:     Value read from the ROMVARS location
    556 ;       ES:DI:  ROMVARS location where the value was just read from
    557 ;       DS:SI:  MENUITEM pointer
    558 ;   Returns:
    559 ;       AX:     Value that the MENUITEM system will interact with and display
    560 ;   Corrupts registers:
    561 ;       AX
    562 ;
    563 ALIGN JUMP_ALIGN
    564 WriterForXTCFwindow:
    565     xor     al, al
    566     SKIP2B  f
    567 ReaderForXTCFwindow:
    568     xor     ah, ah
    569     xchg    al, ah
    570     ret
    571 
    572 
     564;       AX:     IDE controller/Device type menu choice index
     565;   Corrupts registers:
     566;       BX, DX
     567;--------------------------------------------------------------------
    573568ALIGN JUMP_ALIGN
    574569IdeControllerMenu_WriteDevice:
    575     push    bx
    576570    push    di
    577571    push    ax
     
    581575
    582576    ; Note! AL is the choice index, not device code
    583     shl     al, 1                               ; Selection to device code
    584 
    585     ; Restore ports and other stuff to default values
     577    eSHL_IM al, 1                               ; Selection to device code
    586578    jz      SHORT .StandardIdeDevice            ; DEVICE_16BIT_ATA
    587579
     
    603595    div     bl
    604596    mov     bx, .rgbLowByteOfStdIdeInterfacePorts
    605     xlat
     597    xlat                                        ; DS=CS so no segment override needed
    606598    mov     ah, 1                               ; DEVICE_ATA_*_PORT >> 8
    607599    mov     bh, 3                               ; DEVICE_ATA_*_PORTCTRL >> 8
     
    622614
    623615.SupportForDeviceNotAvailable:
    624     push    dx
    625616    mov     dx, g_szUnsupportedDevice
    626617    call    Dialogs_DisplayErrorFromCSDX
    627     pop     dx
    628618
    629619    ; Restore device type to the previous value
     
    631621    mov     al, bl                              ; Previous device type to AL
    632622    shr     al, 1                               ; Device code to choice index
    633     jmp     SHORT .DoneWithNoChangeOfDevice
     623    pop     di
     624    ret
    634625
    635626.NotSerialDevice:
     
    670661
    671662.ChangingToSerial:
    672     cmp     bl, DEVICE_SERIAL_PORT
    673     je      SHORT .Done                         ; if we were already serial, nothing to do
    674 
     663;
     664; For serial drives, we pack the port number and baud rate into a single byte, and thus
     665; we need to take care to properly read/write just the bits we need.  In addition, since
     666; we use the Port/PortCtrl bytes in a special way for serial drives, we need to properly
     667; default the values stored in both these words when switching in and out of the Serial
     668; device choice.
     669;
     670    mov     al, SERIAL_DEFAULT_COM
    675671    mov     BYTE [es:di+IDEVARS.bSerialBaud-IDEVARS.wBasePort], SERIAL_DEFAULT_BAUD
    676     mov     BYTE [es:di+IDEVARS.bIRQ-IDEVARS.wBasePort], 0  ; Clear .bIRQ to keep the boot menu from printing it
    677 
    678     mov     al, SERIAL_DEFAULT_COM
     672    mov     [es:di+IDEVARS.bIRQ-IDEVARS.wBasePort], ah  ; Clear .bIRQ to keep the boot menu from printing it
     673
    679674    sub     di, IDEVARS.wBasePort - IDEVARS.bSerialCOMPortChar
    680675    call    IdeControllerMenu_SerialWriteCOM
     
    683678.Done:
    684679    pop     ax
    685 .DoneWithNoChangeOfDevice:
    686     pop     di          ; IDEVARS.bDevice
    687     pop     bx
     680    pop     di
    688681    ret
    689682
    690 ;
    691 ; Doesn't modify COM character (unless it is not recognized, which would be an error case),
    692 ; But does update the port address based on COM port selection
    693 ;
     683
     684;--------------------------------------------------------------------
     685; IdeControllerMenu_SerialWriteCOM
     686;
     687; Updates the port address based on COM port selection
     688;
     689;   Parameters:
     690;       AL:     COM port
     691;       ES:DI:  Ptr to IDEVARS.bSerialCOMPortChar
     692;       DS:SI:  MENUITEM pointer
     693;   Returns:
     694;       Nothing
     695;   Corrupts registers:
     696;       BX
     697;--------------------------------------------------------------------
    694698ALIGN JUMP_ALIGN
    695699IdeControllerMenu_SerialWriteCOM:
    696700    push    ax
    697     push    bx
    698701    push    si
    699702
    700     mov     si, g_rgbChoiceToValueLookupForCOM
    701     mov     bx, PackedCOMPortAddresses
    702 
    703 .loop:
    704     mov     ah, [bx]
    705 
    706     cmp     ah, (SERIAL_DEFAULT_CUSTOM_PORT >> 2)
    707     je      .notFound
    708 
    709     cmp     al, [si]
    710     je      .found
    711 
     703    mov     bx, PackedCOMPortAddresses - 1
     704    mov     si, g_rgbChoiceToValueLookupForCOM - 2
     705
     706.Loop:
     707    inc     bx
    712708    inc     si
    713709    inc     si
    714     inc     bx
    715 
    716     jmp     .loop
    717 
    718 .notFound:
    719     mov     al, 'x'
    720 
    721 .found:
     710
     711    mov     ah, [bx]
     712    cmp     ah, SERIAL_DEFAULT_CUSTOM_PORT >> 2
     713    je      SHORT .NotFound
     714
     715    cmp     al, [si]
     716    jne     SHORT .Loop
     717
     718.NotFound:
    722719    mov     [es:di+IDEVARS.bSerialPort-IDEVARS.bSerialCOMPortChar], ah
    723720
    724721    pop     si
    725     pop     bx
    726722    pop     ax
    727 
    728723    ret
    729724
    730725
     726;--------------------------------------------------------------------
     727; IdeControllerMenu_SerialReadPort
    731728;
    732729; Packed Port (byte) -> Numeric Port (word)
    733730;
     731;   Parameters:
     732;       AX:     Value read from the ROMVARS location
     733;       ES:DI:  ROMVARS location where the value was just read from
     734;       DS:SI:  MENUITEM pointer
     735;   Returns:
     736;       AX:     Value that the MENUITEM system will interact with and display
     737;   Corrupts registers:
     738;       Nothing
     739;--------------------------------------------------------------------
    734740ALIGN JUMP_ALIGN
    735741IdeControllerMenu_SerialReadPort:
     
    738744    ret
    739745
     746
     747;--------------------------------------------------------------------
     748; IdeControllerMenu_SerialWritePort
    740749;
    741750; Numeric Port (word) -> Packed Port (byte)
    742 ; And convert from Custom to a defined COM port if we match one of the pre-defined COM port numbers
    743 ;
     751;
     752; And convert from Custom to a defined COM port if we
     753; match one of the pre-defined COM port numbers
     754;
     755;   Parameters:
     756;       AX:     Value that the MENUITEM system was interacting with
     757;       ES:DI:  ROMVARS location where the value is to be stored
     758;       DS:SI:  MENUITEM pointer
     759;   Returns:
     760;       AX:     Value to actually write to ROMVARS
     761;   Corrupts registers:
     762;       BX
     763;--------------------------------------------------------------------
    744764ALIGN JUMP_ALIGN
    745765IdeControllerMenu_SerialWritePort:
    746     push    bx
    747766    push    si
    748767
    749768    eSHR_IM ax, 2
    750     and     al, 0feh            ; force 8-byte boundary
    751 
    752     mov     si, g_rgbChoiceToValueLookupForCOM
    753     mov     bx, PackedCOMPortAddresses          ; loop, looking for port address in known COM address list
    754 
    755 .loop:
    756     mov     ah, [si]
    757     cmp     ah, 'x'
    758     je      .found
    759 
    760     cmp     al, [bx]
    761     je      .found
    762 
     769    and     al, 0FEh                            ; Force 8-byte boundary
     770
     771    mov     si, g_rgbChoiceToValueLookupForCOM - 2
     772    mov     bx, PackedCOMPortAddresses - 1      ; Loop, looking for port address in known COM address list
     773
     774.Loop:
    763775    inc     si
    764776    inc     si
    765777    inc     bx
    766778
    767     jmp     .loop
    768 
    769 .found:
     779    mov     ah, [si]
     780    cmp     ah, 'x'
     781    je      SHORT .Found
     782
     783    cmp     al, [bx]
     784    jne     SHORT .Loop
     785
     786.Found:
    770787    mov     [es:di+IDEVARS.bSerialCOMPortChar-IDEVARS.bSerialPort], ah
    771788
    772789    pop     si
    773     pop     bx
    774 
    775790    ret
    776791
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/MainMenu.asm

    r546 r592  
    155155.EnableOrDisableXtideRomItems:
    156156    call    EEPROM_FindXtideUniversalBiosROMtoESDI
    157     jnc     SHORT .DisableAllRomItems
     157    jc      SHORT .DisableAllRomItems
    158158    or      BYTE [g_MenuitemMainMenuLoadXtideUniversalBiosFromRom+MENUITEM.bFlags], FLG_MENUITEM_VISIBLE
    159159    call    Buffers_IsXtideUniversalBiosLoaded
     
    201201ALIGN JUMP_ALIGN
    202202.EnableOrDisableFlashEeprom:
    203     test    WORD [g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_FILELOADED | FLG_CFGVARS_ROMLOADED
     203    test    BYTE [g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_FILELOADED | FLG_CFGVARS_ROMLOADED
    204204    jz      SHORT .DisableFlashEeprom
    205205    or      BYTE [g_MenuitemMainMenuFlashEeprom+MENUITEM.bFlags], FLG_MENUITEM_VISIBLE
     
    222222ALIGN JUMP_ALIGN
    223223.EnableOrDisableSave:
    224     test    WORD [g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_FILELOADED
     224    test    BYTE [g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_FILELOADED
    225225    jz      SHORT .DisableSave
    226226    or      BYTE [g_MenuitemMainMenuSaveFile+MENUITEM.bFlags], FLG_MENUITEM_VISIBLE
     
    257257    add     si, BYTE FILE_DIALOG_IO.szFile
    258258    call    BiosFile_LoadFileFromDSSItoRamBuffer
     259    call    LoadColorTheme
     260    ; *FIXME* Will load themes even from unrecognized versions of the BIOS which isn't really a problem but still 'unexpected behaviour' and therefore a bug.
    259261    call    MainMenu_EnterMenuOrModifyItemVisibility
    260262.CancelFileLoading:
     
    272274    mov     dx, g_szDlgMainLoadROM
    273275    call    Dialogs_DisplayNotificationFromCSDX
     276    call    LoadColorTheme
    274277    jmp     MainMenu_EnterMenuOrModifyItemVisibility
    275278
     
    281284    call    Buffers_SetUnsavedChanges
    282285    mov     dx, g_szDlgMainLoadStngs
    283     jmp     Dialogs_DisplayNotificationFromCSDX
    284 
     286    call    Dialogs_DisplayNotificationFromCSDX
     287    call    EEPROM_FindXtideUniversalBiosROMtoESDI
     288    call    LoadColorTheme.FromROM
     289    jmp     MainMenu_EnterMenuOrModifyItemVisibility
     290
     291
     292;--------------------------------------------------------------------
     293; LoadColorTheme
     294;   Parameters:
     295;       ES:     ROMVARS segment (only when loading theme from ROM)
     296;   Returns:
     297;       Nothing
     298;   Corrupts registers:
     299;       AX, BX, DI, ES
     300;--------------------------------------------------------------------
     301ALIGN JUMP_ALIGN
     302LoadColorTheme:
     303    call    Buffers_GetFileBufferToESDI
     304.FromROM:
     305    mov     ax, [es:ROMVARS.pColorTheme]
     306    jmp     ReadColorTheme
     307
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/MasterSlaveMenu.asm

    r583 r592  
    196196    dw  DISABLE_WRITE_CACHE
    197197    dw  ENABLE_WRITE_CACHE
    198 
    199198g_rgszChoiceToStringLookupForWriteCache:
    200199    dw  g_szValueBootDispModeDefault
     
    207206    dw  TRANSLATEMODE_ASSISTED_LBA
    208207    dw  TRANSLATEMODE_AUTO
    209 
    210208g_rgszChoiceToStringLookupForXlateMode:
    211209    dw  g_szValueDrvXlateNormal
     
    229227ALIGN JUMP_ALIGN
    230228MasterSlaveMenu_InitializeToDrvparamsOffsetInBX:
     229    push    ds
     230
     231    push    cs
     232    pop     ds
     233
     234%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
     235%if DRVPARAMS.wFlags = 0
     236    mov     ax, bx
     237%else
    231238    lea     ax, [bx+DRVPARAMS.wFlags]
    232     mov     [cs:g_MenuitemMasterSlaveBlockModeTransfers+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
    233     mov     [cs:g_MenuitemMasterSlaveChsTranslateMode+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
    234     mov     [cs:g_MenuitemMasterSlaveWriteCache+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
    235     mov     [cs:g_MenuitemMasterSlaveUserCHS+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
    236     mov     [cs:g_MenuitemMasterSlaveUserLBA+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
     239%endif
     240%endif
     241    mov     [g_MenuitemMasterSlaveBlockModeTransfers+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
     242    mov     [g_MenuitemMasterSlaveChsTranslateMode+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
     243    mov     [g_MenuitemMasterSlaveWriteCache+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
     244    mov     [g_MenuitemMasterSlaveUserCHS+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
     245    mov     [g_MenuitemMasterSlaveUserLBA+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
    237246
    238247    lea     ax, [bx+DRVPARAMS.wCylinders]
    239     mov     [cs:g_MenuitemMasterSlaveCylinders+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
     248    mov     [g_MenuitemMasterSlaveCylinders+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
    240249
    241250    lea     ax, [bx+DRVPARAMS.bHeads]
    242     mov     [cs:g_MenuitemMasterSlaveHeads+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
     251    mov     [g_MenuitemMasterSlaveHeads+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
    243252
    244253    lea     ax, [bx+DRVPARAMS.bSect]
    245     mov     [cs:g_MenuitemMasterSlaveSectors+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
     254    mov     [g_MenuitemMasterSlaveSectors+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
    246255
    247256    lea     ax, [bx+DRVPARAMS.dwMaximumLBA]
    248     mov     [cs:g_MenuitemMasterSlaveUserLbaValue+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
     257    mov     [g_MenuitemMasterSlaveUserLbaValue+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
     258
     259    pop     ds
    249260    ret
    250261
     
    283294    mov     bx, [g_MenuitemMasterSlaveUserLBA+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
    284295    call    Buffers_GetRomvarsValueToAXfromOffsetInBX
    285     test    ax, FLG_DRVPARAMS_USERLBA
     296    test    al, FLG_DRVPARAMS_USERLBA
    286297    jnz     SHORT .DisableCHSandEnableLBA
    287     test    ax, FLG_DRVPARAMS_USERCHS
     298    test    al, FLG_DRVPARAMS_USERCHS
    288299    jnz     SHORT .EnableCHSandDisableLBA
    289300
     
    320331ALIGN JUMP_ALIGN
    321332.EnableOrDisableCHandS:
    322     mov     bx, [cs:g_MenuitemMasterSlaveUserCHS+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
     333    mov     bx, [g_MenuitemMasterSlaveUserCHS+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
    323334    call    Buffers_GetRomvarsValueToAXfromOffsetInBX
    324     test    ax, FLG_DRVPARAMS_USERCHS
     335    test    al, FLG_DRVPARAMS_USERCHS
    325336    jz      SHORT .DisableCHandS
    326     test    ax, FLG_DRVPARAMS_USERLBA
     337    test    al, FLG_DRVPARAMS_USERLBA
    327338    jnz     SHORT .DisableCHandS
    328339
     
    355366ALIGN JUMP_ALIGN
    356367.EnableOrDisableUserLbaValue:
    357     mov     bx, [cs:g_MenuitemMasterSlaveUserLBA+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
     368    mov     bx, [g_MenuitemMasterSlaveUserLBA+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
    358369    call    Buffers_GetRomvarsValueToAXfromOffsetInBX
    359370    mov     bx, g_MenuitemMasterSlaveUserLbaValue
    360     test    ax, FLG_DRVPARAMS_USERCHS
     371    test    al, FLG_DRVPARAMS_USERCHS
    361372    jnz     SHORT .DisableMenuitemFromCSBX
    362     test    ax, FLG_DRVPARAMS_USERLBA
     373    test    al, FLG_DRVPARAMS_USERLBA
    363374    jz      SHORT .DisableMenuitemFromCSBX
    364375    ; Fall to .EnableMenuitemFromCSBX
     
    443454ALIGN JUMP_ALIGN
    444455MasterSlaveMenu_WriteCHSFlag:
    445     test    word [es:di], FLG_DRVPARAMS_USERCHS
    446     jnz     .alreadySet
     456    test    BYTE [es:di], FLG_DRVPARAMS_USERCHS
     457    jnz     SHORT .AlreadySet
    447458
    448459    push    ax
     
    466477    pop     ax
    467478
    468 .alreadySet:
     479.AlreadySet:
    469480    ret
    470481
     
    475486ALIGN JUMP_ALIGN
    476487MasterSlaveMenu_WriteLBAFlag:
    477     test    word [es:di], FLG_DRVPARAMS_USERLBA
    478     jnz     .alreadySet
     488    test    BYTE [es:di], FLG_DRVPARAMS_USERLBA
     489    jnz     SHORT .AlreadySet
    479490
    480491    push    ax
     
    490501    pop     ax
    491502
    492 .alreadySet:
     503.AlreadySet:
    493504    ret
     505
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm

    r590 r592  
    4242g_szYes:                            db  "Yes",NULL
    4343
    44 ; Exit messages
     44; General Yes/No response type dialog messages
    4545g_szDlgExitToDos:       db  "Exit to DOS?",NULL
    4646g_szDlgSaveChanges:     db  "Do you want to save changes to XTIDE Universal BIOS image file?",NULL
    47 
     47g_szDlgDriveNotReady:   db  "Drive not ready! Retry?",NULL
    4848
    4949; Generic dialog strings
     
    9292g_szNfoMainFlash:       db  "Flash loaded BIOS image to EEPROM.",NULL
    9393g_szNfoMainSave:        db  "Save BIOS changes back to original file from which it was loaded.",NULL
    94 g_szNfoMainLicense:     db  "XTIDE Universal BIOS and XTIDECFG Copyright (C) 2009-2010 by Tomi Tilli, 2011-2016 by XTIDE Universal BIOS Team."
     94g_szNfoMainLicense:     db  "XTIDE Universal BIOS and XTIDECFG Copyright (C) 2009-2010 by Tomi Tilli, 2011-2018 by XTIDE Universal BIOS Team."
    9595                        db  " Released under GNU GPL v2, with ABSOLUTELY NO WARRANTY. Press ENTER for more details...",NULL
    9696g_szNfoMainHomePage:    db  "Visit http://xtideuniversalbios.org (home page) and http://vcfed.org/forum (support)",NULL
    9797
    9898g_szHelpMainLicense:    db  "XTIDE Universal BIOS and XTIDECFG Configuration program are Copyright 2009-2010 by Tomi Tilli,"
    99                         db  " 2011-2016 by XTIDE Universal BIOS Team. Released under GNU GPL v2. This software comes with ABSOLUTELY NO WARRANTY."
     99                        db  " 2011-2018 by XTIDE Universal BIOS Team. Released under GNU GPL v2. This software comes with ABSOLUTELY NO WARRANTY."
    100100                        db  " This is free software, and you are welcome to redistribute it under certain conditions."
    101101                        db  " See the LICENSE.TXT file that was included with this distribution,"
     
    423423g_szItemBootDrive:      db  "Default boot drive",NULL
    424424g_szItemBootDispMode:   db  "Display Mode",NULL
     425g_szItemColorTheme:     db  "Color Theme",NULL
    425426g_szItemBootFloppyDrvs: db  "Number of Floppy Drives",NULL
    426427g_szItemSerialDetect:   db  "Scan for Serial Drives",NULL
     
    429430g_szDlgBootDrive:       db  "Enter default drive number (0xh for Floppy Drives, 8xh for Hard Disks).",NULL
    430431g_szDlgBootDispMode:    db  "Select display mode.",NULL
     432g_szDlgColorTheme:      db  "Select color theme.",NULL
    431433g_szDlgBootFloppyDrvs:  db  "Select number of Floppy Drives in system.",NULL
    432434g_szDlgSerialDetect:    db  "Scan for serial drives?",NULL
     
    435437g_szNfoBootDrive:       db  "Default boot drive.",NULL
    436438g_szNfoDispMode:        db  "Display mode to set when booting.",NULL
     439g_szNfoColorTheme:      db  "Color theme used by the boot menu and the hotkey bar.",NULL
    437440g_szNfoBootFloppyDrvs:  db  "Number of Floppy Drives in system.",NULL
    438441g_szNfoSerialDetect:    db  "Scans all standard COM ports for serial drives."
     
    442445                        db  " When timer goes to zero, currently selected drive will be booted automatically."
    443446                        db  " Timeout can be disabled by setting this to 0.",NULL
    444 
    445447g_szHelpBootDrive:      db  "Drive to be set selected by default when Boot Menu is displayed.",NULL
    446 
     448g_szHelpColorTheme:     db  "Pick a theme from a list of several pre-defined themes to customize the colors used by the boot menu and, if"
     449                        db  " available, the hotkey bar. Selecting a theme or loading a BIOS, or its settings, from file or from ROM will"
     450                        db  " make XTIDECFG apply the theme to itself for easy preview. The ability to preview themes requires that"
     451                        db  " XTIDECFG is running in a display mode that can display colors. In other words, you may configure the"
     452                        db  " BIOS on a machine with a monochrome graphics adapter and not be able to preview the theme but the BIOS will"
     453                        db  " still use the selected theme when installed in a machine with a color graphics adapter.",NULL
    447454g_szHelpBootFloppyDrvs: db  "Detecting the correct number of floppy drives might fail when using a floppy controller with its own BIOS."
    448455                        db  " A minimum number of floppy drives can be specified to force non-detected drives to appear on boot menu.",NULL
    449 
    450456g_szHelpSerialDetect:   db  "Set to Yes, at the end of normal drive detection, COM ports 1-7 (in reverse order) will be scanned for a connection"
    451457                        db  " to a serial drive server. This option provides flexibility with the COM port and baud rate to be used,"
     
    468474g_szValueBootDispModeCO80:      db  "CO80",NULL
    469475g_szValueBootDispModeMono:      db  "Mono",NULL
     476
     477g_szMultichoiceColorTheme:      db  "Classic (default)",LF
     478                                db  "Argon Blue",LF
     479                                db  "Neon Red",LF
     480                                db  "Phosphor Green",LF
     481                                db  "Moon Surface",LF
     482                                db  "Toxic Waste",NULL
     483g_szValueColorTheme0:           db  "Classic",NULL
     484g_szValueColorTheme1:           db  "Argon",NULL
     485g_szValueColorTheme2:           db  "Neon",NULL
     486g_szValueColorTheme3:           db  "Phosphor",NULL
     487g_szValueColorTheme4:           db  "Moon",NULL
     488g_szValueColorTheme5:           db  "Toxic",NULL
    470489
    471490g_szMultichoiceBootFloppyDrvs:  db  "Autodetect",LF
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/makefile

    r481 r592  
    100100ASFLAGS += $(IHEADERS)          # Set header file directory paths
    101101ASFLAGS += -Worphan-labels      # Warn about labels without colon
    102 ASFLAGS += -O9                  # Optimize operands to their shortest forms
     102ASFLAGS += -Ox                  # Optimize operands to their shortest forms
    103103
    104104
     
    135135xt_unused: xt
    136136    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XT) -o"$(TARGET)_xt_unused.asm" -E -DCHECK_FOR_UNUSED_ENTRYPOINTS
    137     @perl ..\tools\unused.pl $(TARGET)_xt.lst $(TARGET)_xt_unused.asm
     137    @perl ..\Tools\unused.pl $(TARGET)_xt.lst $(TARGET)_xt_unused.asm
    138138
Note: See TracChangeset for help on using the changeset viewer.