Changeset 625 in xtideuniversalbios for trunk/Assembly_Library


Ignore:
Timestamp:
Feb 19, 2023, 9:26:52 PM (21 months ago)
Author:
Krister Nordvall
Message:

Changes:

  • Added a configuration option to let the BIOS store RamVars to an UMB when Full operating mode is enabled. This is primarily for XT class machines with RAM in the UMA (which apparently is a common thing these days).
  • Added two new builds specifically for IBM PS/2 machines. This is for support of the new McIDE adapter from the guys at zzxio.com. Note that the additional hardware specific code (under the USE_PS2 define) is for the PS/2 machines themselves and not for the McIDE adapters, so any controller in an IBM PS/2 machine can be used with the USE_PS2 define.
  • Moved pColorTheme out of the range of ROMVARS being copied over when doing "Load old settings from EEPROM" in XTIDECFG. This fixed a serious bug from r592 where loading a BIOS from file and then loading the old settings from ROM would corrupt 7 bytes of code somewhere in the loaded BIOS.
  • Optimizations (speed and size) to the library. Browsing the menus in XTIDECFG should now feel a little less sluggish.
  • Hopefully fixed a problem with the PostCommitHook script where it sometimes wouldn't find the CommitInProgress file. I say hopefully because testing this is a nightmare.
Location:
trunk/Assembly_Library/Src/Menu/Dialog
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Src/Menu/Dialog/Dialog.asm

    r593 r625  
    44;
    55; XTIDE Universal BIOS and Associated Tools
    6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
     6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team.
    77;
    88; This program is free software; you can redistribute it and/or modify
     
    9595
    9696;--------------------------------------------------------------------
     97; Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithItemZero
     98;   Parameters:
     99;       DS:SI:      Ptr to MENUINIT struct to initialize
     100;       SS:BP:      Ptr to DIALOG
     101;   Returns:
     102;       DS:SI:      Ptr to initialized MENUINIT struct
     103;       CF:         Set since event processed
     104;--------------------------------------------------------------------
     105ALIGN JUMP_ALIGN
     106Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithItemZero:
     107    xor     ax, ax
     108    ; Fall to Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX
     109
     110;--------------------------------------------------------------------
    97111; Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX
    98112;   Parameters:
     
    104118;       CF:         Set since event processed
    105119;--------------------------------------------------------------------
    106 ALIGN JUMP_ALIGN
    107120Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX:
    108121    les     di, [bp+DIALOG.fpDialogIO]
  • trunk/Assembly_Library/Src/Menu/Dialog/DialogDrive.asm

    r596 r625  
    44;
    55; XTIDE Universal BIOS and Associated Tools
    6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
     6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team.
    77;
    88; This program is free software; you can redistribute it and/or modify
     
    5656ALIGN JUMP_ALIGN
    5757.InitializeMenuinitFromDSSI:
    58     xor     ax, ax
    59     call    Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX
     58    call    Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithItemZero
    6059    call    Drive_GetFlagsForAvailableDrivesToDXAX
    6160    mov     [bp+MENU.dwUserData], ax
  • trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm

    r602 r625  
    44;
    55; XTIDE Universal BIOS and Associated Tools
    6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
     6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team.
    77;
    88; This program is free software; you can redistribute it and/or modify
     
    121121.rgszInfoStringLookup:
    122122    dw      g_szChangeDrive
     123%ifndef EXCLUDE_FROM_XTIDECFG
    123124    dw      g_szSelectDirectory
    124125    dw      g_szCreateNew
     126%endif
    125127
    126128.rgfnEventHandlers:
     
    156158    call    LoadItemStringBufferToESDI
    157159    call    SortDirectoryContentsStringFromESDIwithCountInCX
    158     call    RemoveLastLFandTerminateESDIwithNull
    159 
     160    xor     ax, ax
     161    mov     [es:di-1], al                           ; Terminate with NULL
    160162    call    Registers_CopySSBPtoDSSI
    161     xor     ax, ax
    162163    call    Dialog_EventInitializeMenuinitFromDSSIwithHighlightedItemInAX
    163164    call    GetInfoLinesToCXandDialogFlagsToAX
     
    436437
    437438;--------------------------------------------------------------------
    438 ; RemoveLastLFandTerminateESDIwithNull
    439 ;   Parameters:
    440 ;       ES:DI:  Ptr to end of buffer to terminate
    441 ;   Returns:
    442 ;       Nothing
    443 ;   Corrupts registers:
    444 ;       AX
    445 ;--------------------------------------------------------------------
    446 ALIGN JUMP_ALIGN
    447 RemoveLastLFandTerminateESDIwithNull:
    448     dec     di
    449     xor     ax, ax
    450     stosb
    451     ret
    452 
    453 
    454 ;--------------------------------------------------------------------
    455439; GetInfoLinesToCXandDialogFlagsToAX
    456440;   Parameters:
     
    586570HandleFunctionKeyFromAH:
    587571    call    GetDialogFlagsToAL
     572%ifndef EXCLUDE_FROM_XTIDECFG
    588573    cmp     ah, KEY_FILEDIALOG_NEW_FILE_OR_DIR
    589574    je      SHORT HandleFunctionKeyForCreatingNewFileOrDirectory
    590575    cmp     ah, KEY_FILEDIALOG_SELECT_DIRECTORY
    591576    je      SHORT HandleFunctionKeyForSelectingDirectoryInsteadOfFile
     577%endif
    592578    cmp     ah, KEY_FILEDIALOG_CHANGE_DRIVE
    593579    je      SHORT HandleFunctionKeyForDriveChange
     
    607593;       All, except BP
    608594;--------------------------------------------------------------------
     595%ifndef EXCLUDE_FROM_XTIDECFG
    609596ALIGN JUMP_ALIGN
    610597HandleFunctionKeyForCreatingNewFileOrDirectory:
     
    649636    jz      SHORT ReturnWithoutHandlingKeystroke
    650637    ; Fall to CloseFileDialogAfterSuccessfulSelection
     638%endif ; EXCLUDE_FROM_XTIDECFG
    651639
    652640;--------------------------------------------------------------------
  • trunk/Assembly_Library/Src/Menu/Dialog/DialogProgress.asm

    r596 r625  
    44;
    55; XTIDE Universal BIOS and Associated Tools
    6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
     6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team.
    77;
    88; This program is free software; you can redistribute it and/or modify
     
    8989ProgressEventHandler:
    9090    jmp     [cs:bx+.rgfnEventHandlers]
    91 
    92 
    93 ALIGN JUMP_ALIGN
    94 .InitializeMenuinitFromDSSI:
    95     mov     ax, NO_ITEM_HIGHLIGHTED
    96     call    Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX
    97     lds     si, [bp+DIALOG.fpDialogIO]
    98     call    TimerTicks_ReadFromBdaToAX
    99     mov     [si+PROGRESS_DIALOG_IO.wStartTimeTicks], ax
    100 
    101     ; 0 = 65536 but it needs to be adjusted to 65535 to prevent division by zero
    102     cmp     WORD [si+PROGRESS_DIALOG_IO.wMaxProgressValue], BYTE 0
    103     jne     SHORT CalculateProgressNeededBeforeUpdatingCharacter
    104     dec     WORD [si+PROGRESS_DIALOG_IO.wMaxProgressValue]
    105     jmp     SHORT CalculateProgressNeededBeforeUpdatingCharacter
    10691
    10792
     
    153138
    154139
     140ALIGN JUMP_ALIGN
     141.InitializeMenuinitFromDSSI:
     142    mov     ax, NO_ITEM_HIGHLIGHTED
     143    call    Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX
     144    lds     si, [bp+DIALOG.fpDialogIO]
     145    call    TimerTicks_ReadFromBdaToAX
     146    mov     [si+PROGRESS_DIALOG_IO.wStartTimeTicks], ax
     147
     148    ; 0 = 65536 but it needs to be adjusted to 65535 to prevent division by zero
     149    cmp     WORD [si+PROGRESS_DIALOG_IO.wMaxProgressValue], BYTE 0
     150    jne     SHORT CalculateProgressNeededBeforeUpdatingCharacter
     151    dec     WORD [si+PROGRESS_DIALOG_IO.wMaxProgressValue]
     152    ; Fall to CalculateProgressNeededBeforeUpdatingCharacter
     153
    155154;--------------------------------------------------------------------
    156155; CalculateProgressNeededBeforeUpdatingCharacter
     
    163162;       AX, BX, DX, SI, DS
    164163;--------------------------------------------------------------------
    165 ALIGN JUMP_ALIGN
    166164CalculateProgressNeededBeforeUpdatingCharacter:
    167165    call    MenuLocation_GetMaxTextLineLengthToAX
     
    216214ALIGN JUMP_ALIGN
    217215.RepeatProgressCharacterCXtimesFromAL:
    218     jcxz    NothingToRepeat
    219216    JMP_DISPLAY_LIBRARY PrintRepeatedCharacterFromALwithCountInCX
    220217
     
    233230    mov     bx, [si+PROGRESS_DIALOG_IO.wMaxProgressValue]
    234231    sub     bx, [si+PROGRESS_DIALOG_IO.wMinProgressValue]
    235 NothingToRepeat:
    236232    ret
    237233
  • trunk/Assembly_Library/Src/Menu/Dialog/DialogString.asm

    r596 r625  
    44;
    55; XTIDE Universal BIOS and Associated Tools
    6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
     6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team.
    77;
    88; This program is free software; you can redistribute it and/or modify
     
    5555
    5656ALIGN JUMP_ALIGN
    57 .InitializeMenuinitFromDSSI:
    58     xor     ax, ax
    59     jmp     Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX
    60 
    61 
    62 ALIGN JUMP_ALIGN
    6357.IdleProcessing:
    6458    xor     cx, cx                      ; Item 0 is used as input line
     
    7367.rgfnEventHandlers:
    7468istruc MENUEVENT
    75     at  MENUEVENT.InitializeMenuinitFromDSSI,   dw  .InitializeMenuinitFromDSSI
     69    at  MENUEVENT.InitializeMenuinitFromDSSI,   dw  Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithItemZero
    7670    at  MENUEVENT.ExitMenu,                     dw  Dialog_EventExitMenu
    7771    at  MENUEVENT.IdleProcessing,               dw  .IdleProcessing
  • trunk/Assembly_Library/Src/Menu/Dialog/DialogWord.asm

    r596 r625  
    44;
    55; XTIDE Universal BIOS and Associated Tools
    6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
     6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team.
    77;
    88; This program is free software; you can redistribute it and/or modify
     
    5656
    5757ALIGN JUMP_ALIGN
    58 .InitializeMenuinitFromDSSI:
    59     xor     ax, ax
    60     jmp     Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX
    61 
    62 
    63 ALIGN JUMP_ALIGN
    6458.IdleProcessing:
    6559    xor     cx, cx                      ; Item 0 is used as input line
     
    7468.rgfnEventHandlers:
    7569istruc MENUEVENT
    76     at  MENUEVENT.InitializeMenuinitFromDSSI,   dw  .InitializeMenuinitFromDSSI
     70    at  MENUEVENT.InitializeMenuinitFromDSSI,   dw  Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithItemZero
    7771    at  MENUEVENT.ExitMenu,                     dw  Dialog_EventExitMenu
    7872    at  MENUEVENT.IdleProcessing,               dw  .IdleProcessing
  • trunk/Assembly_Library/Src/Menu/Dialog/ItemLineSplitter.asm

    r526 r625  
    44;
    55; XTIDE Universal BIOS and Associated Tools
    6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
     6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team.
    77;
    88; This program is free software; you can redistribute it and/or modify
     
    5151    call    StringProcess_DSSIwithFunctionInDX
    5252
    53     lea     ax, [bx+1]
     53    xchg    bx, ax
     54    inc     ax
    5455    eLEAVE_STRUCT   ITEM_LINE_SPLITTER_size
    5556    pop     di
     
    119120ProcessCharacterFromStringToSplit:
    120121    cmp     al, ' '
    121     ja      SHORT .CheckLineLength
    122     mov     di, si              ; DS:DI now points start of new word
    123     je      SHORT .CheckLineLength
     122    jbe     SHORT .ControlCharacterOrSpace
    124123
    125     cmp     al, LF
    126     je      SHORT .ChangeToNextLine
    127     cmp     al, CR
    128     jne     SHORT .IgnoreUnsupportedControlCharacter
    129     xor     cx, cx              ; Carriage return so reset line length so far
    130 
    131 ALIGN JUMP_ALIGN
    132124.CheckLineLength:
    133125    cmp     [bp+ITEM_LINE_SPLITTER.wMaxTextLineLength], cx
    134126    jb      SHORT .ChangeToNextLine
    135     ret     ; With CF cleared
     127    ret                             ; With CF cleared
    136128
    137129ALIGN JUMP_ALIGN
     
    140132    je      SHORT .WantedLineFound
    141133
    142     inc     bx                  ; Increment line
    143     xor     cx, cx              ; Zero character counter (and clear CF)
    144     mov     si, di              ; Start from complete word
     134    inc     bx                      ; Increment line
     135    mov     si, di                  ; Start from complete word
    145136    mov     [bp+ITEM_LINE_SPLITTER.wStartOfLine], di
     137.CarriageReturn:
     138    xor     cx, cx                  ; Zero character counter (and clear CF)
    146139    ret
    147140
    148141ALIGN JUMP_ALIGN
    149 .IgnoreUnsupportedControlCharacter:
     142.ControlCharacterOrSpace:
     143    mov     di, si                  ; DS:DI now points start of new word
     144    je      SHORT .CheckLineLength  ; Jump if space
     145    cmp     al, LF
     146    je      SHORT .ChangeToNextLine
     147    cmp     al, CR
     148    je      SHORT .CarriageReturn   ; Reset line length
     149    ; Unsupported control character - ignore it
    150150    dec     cx
    151151    clc
  • trunk/Assembly_Library/Src/Menu/Dialog/StringsForDialogs.asm

    r526 r625  
    44;
    55; XTIDE Universal BIOS and Associated Tools
    6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
     6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team.
    77;
    88; This program is free software; you can redistribute it and/or modify
     
    1919
    2020; Strings for Progress Dialog
    21 g_szTimeElapsed:        db  "Time elapsed  :",NULL
    22 g_szTimeLeft:           db  "Estimated left:",NULL
    23 g_szTimeFormat:         db  " %2-u min %2-u sec",LF,CR,NULL
     21g_szTimeElapsed:                db  "Time elapsed  :",NULL
     22g_szTimeLeft:                   db  "Estimated left:",NULL
     23g_szTimeFormat:                 db  " %2-u min %2-u sec",LF,CR,NULL
    2424
    2525; Strings for Drive Dialog
    26 g_szDriveFormat:        db  "%c:",NULL
     26g_szDriveFormat:                db  "%c:",NULL
    2727
    2828; Strings for File Dialog
    29 g_szChangeDrive:        db  "F2 Change Drive",LF,CR,NULL
    30 g_szSelectDirectory:    db  "F3 Select Current Directory",LF,CR,NULL
    31 g_szCreateNew:          db  "F4 Input new File or Directory",NULL
     29g_szChangeDrive:                db  "F2 Change Drive",NULL
     30%ifndef EXCLUDE_FROM_XTIDECFG
     31g_szSelectDirectory:            db  "F3 Select Current Directory",NULL
     32g_szCreateNew:                  db  "F4 Input new File or Directory",NULL
     33%endif
    3234
    33 g_szSelectNewDrive:
    34     db      "Select new drive.",NULL
    35 g_szLoadingPleaseWait:
    36     db      "Loading. Please wait...",NULL
     35g_szSelectNewDrive:             db  "Select new drive.",NULL
     36g_szLoadingPleaseWait:          db  "Loading. Please wait...",NULL
    3737
    38 g_szEnterNewFileOrDirectory:
    39     db      "Enter name for new file or directory.",NULL
     38%ifndef EXCLUDE_FROM_XTIDECFG
     39g_szEnterNewFileOrDirectory:    db  "Enter name for new file or directory.",NULL
     40%endif
    4041
    4142FILE_STRING_LENGTH      EQU     (24+1)  ; +1 = LF in directory contents string
    42 g_szFileFormat:
    43     db      "%16S%4-u %c%cB",LF,NULL
    44 g_szDirectoryFormat:
    45     db      "%16S%s-DIR",LF,NULL
    46 g_szSub:
    47     db      ANGLE_QUOTE_RIGHT,"SUB",NULL
    48 g_szUp:
    49     db      ANGLE_QUOTE_LEFT," UP",NULL
     43g_szFileFormat:                 db  "%16S%4-u %c%cB",LF,NULL
     44g_szDirectoryFormat:            db  "%16S%s-DIR",LF,NULL
     45g_szSub:                        db  ANGLE_QUOTE_RIGHT,"SUB",NULL
     46g_szUp:                         db  ANGLE_QUOTE_LEFT," UP",NULL
    5047
    5148g_szSingleItem:         ; Used by Dialog.asm for single item line
    52 g_szUpdir:
    53     db      ".."
    54 g_szNull:
    55     db      NULL
     49g_szUpdir:                      db  ".."
     50g_szNull:                       db  NULL
Note: See TracChangeset for help on using the changeset viewer.