Ignore:
Timestamp:
Feb 19, 2023, 9:26:52 PM (14 months ago)
Author:
krille_n_
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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/ConfigurationMenu.asm

    r592 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
     
    2626    at  MENUPAGE.fnEnter,           dw  ConfigurationMenu_EnterMenuOrModifyItemVisibility
    2727    at  MENUPAGE.fnBack,            dw  MainMenu_EnterMenuOrModifyItemVisibility
    28     at  MENUPAGE.wMenuitems,        dw  11
     28    at  MENUPAGE.wMenuitems,        dw  12
    2929iend
    3030
     
    113113    at  MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup,    dw  g_rgszValueToStringLookupForFlagBooleans
    114114    at  MENUITEM.itemValue + ITEM_VALUE.wValueBitmask,              dw  FLG_ROMVARS_FULLMODE
     115    at  MENUITEM.itemValue + ITEM_VALUE.fnValueWriter,              dw  WriteFullOperatingMode
     116iend
     117
     118g_MenuitemConfigurationRamVars:
     119istruc MENUITEM
     120    at  MENUITEM.fnActivate,        dw  Menuitem_ActivateHexInputForMenuitemInDSSI
     121    at  MENUITEM.fnFormatValue,     dw  MenuitemPrint_WriteHexValueStringToBufferInESDIfromItemInDSSI
     122    at  MENUITEM.szName,            dw  g_szItemCfgRamVars
     123    at  MENUITEM.szQuickInfo,       dw  g_szNfoCfgRamVars
     124    at  MENUITEM.szHelp,            dw  g_szHelpCfgRamVars
     125    at  MENUITEM.bFlags,            db  FLG_MENUITEM_MODIFY_MENU
     126    at  MENUITEM.bType,             db  TYPE_MENUITEM_HEX
     127    at  MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,        dw  ROMVARS.wRamVars
     128    at  MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,              dw  g_szDlgCfgRamVars
     129    at  MENUITEM.itemValue + ITEM_VALUE.wMinValue,                  dw  0A000h
     130    at  MENUITEM.itemValue + ITEM_VALUE.wMaxValue,                  dw  0FFFFh  ; Disables use of UMB
     131    at  MENUITEM.itemValue + ITEM_VALUE.fnValueReader,              dw  ReadRamVars
     132    at  MENUITEM.itemValue + ITEM_VALUE.fnValueWriter,              dw  WriteRamVars
    115133iend
    116134
     
    122140    at  MENUITEM.szQuickInfo,       dw  g_szNfoCfgStealSize
    123141    at  MENUITEM.szHelp,            dw  g_szHelpCfgStealSize
    124     at  MENUITEM.bFlags,            db  FLG_MENUITEM_VISIBLE | FLG_MENUITEM_BYTEVALUE
     142    at  MENUITEM.bFlags,            db  FLG_MENUITEM_BYTEVALUE
    125143    at  MENUITEM.bType,             db  TYPE_MENUITEM_UNSIGNED
    126144    at  MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,        dw  ROMVARS.bStealSize
     
    199217    call    .EnableIdeControllerMenuitemsBasedOnConfiguration
    200218    call    .EnableOrDisableOperatingModeSelection
     219    call    Buffers_GetRomvarsFlagsToAX
     220    call    .EnableOrDisableRamVarsSegmentSelection
    201221    call    .EnableOrDisableKiBtoStealFromRAM
    202222    call    .EnableOrDisableIdleTimeout
     
    251271    mov     bx, g_MenuitemConfigurationFullOperatingMode
    252272    call    Buffers_IsXTbuildLoaded
    253     je      SHORT .EnableMenuitemFromCSBX
     273    jz      SHORT .EnableMenuitemFromCSBX
    254274    jmp     SHORT .DisableMenuitemFromCSBX
    255275
    256276
    257277;--------------------------------------------------------------------
    258 ; .EnableOrDisableKiBtoStealFromRAM
    259 ;   Parameters:
    260 ;       SS:BP:  Menu handle
    261 ;   Returns:
    262 ;       Nothing
    263 ;   Corrupts registers:
    264 ;       AX, BX
    265 ;--------------------------------------------------------------------
    266 ALIGN JUMP_ALIGN
    267 .EnableOrDisableKiBtoStealFromRAM:
    268     call    Buffers_GetRomvarsFlagsToAX
    269     mov     bx, g_MenuitemConfigurationKiBtoStealFromRAM
     278; .EnableOrDisableRamVarsSegmentSelection
     279;   Parameters:
     280;       AX:     ROMVARS.wFlags
     281;       SS:BP:  Menu handle
     282;   Returns:
     283;       Nothing
     284;   Corrupts registers:
     285;       BX
     286;--------------------------------------------------------------------
     287ALIGN JUMP_ALIGN
     288.EnableOrDisableRamVarsSegmentSelection:
     289    mov     bx, g_MenuitemConfigurationRamVars
    270290    test    al, FLG_ROMVARS_FULLMODE
    271291    jz      SHORT .DisableMenuitemFromCSBX
     
    274294
    275295;--------------------------------------------------------------------
     296; .EnableOrDisableKiBtoStealFromRAM
     297;   Parameters:
     298;       SS:BP:  Menu handle
     299;   Returns:
     300;       Nothing
     301;   Corrupts registers:
     302;       BX
     303;--------------------------------------------------------------------
     304ALIGN JUMP_ALIGN
     305.EnableOrDisableKiBtoStealFromRAM:
     306    mov     bx, g_MenuitemConfigurationKiBtoStealFromRAM
     307    cmp     WORD [es:ROMVARS.wRamVars], 0
     308    jne     SHORT .DisableMenuitemFromCSBX
     309    jmp     SHORT .EnableMenuitemFromCSBX
     310
     311
     312;--------------------------------------------------------------------
    276313; .EnableOrDisableIdleTimeout
    277314;   Parameters:
    278 ;       SS:BP:  Menu handle
    279 ;   Returns:
    280 ;       Nothing
    281 ;   Corrupts registers:
    282 ;       AX, BX
     315;       AX:     ROMVARS.wFlags
     316;       SS:BP:  Menu handle
     317;   Returns:
     318;       Nothing
     319;   Corrupts registers:
     320;       BX
    283321;--------------------------------------------------------------------
    284322ALIGN JUMP_ALIGN
    285323.EnableOrDisableIdleTimeout:
    286     call    Buffers_GetRomvarsFlagsToAX
    287324    mov     bx, g_MenuitemConfigurationIdleTimeout
    288325    test    al, FLG_ROMVARS_MODULE_POWER_MANAGEMENT
     
    308345.DisableMenuitemFromCSBX:
    309346    jmp     DisableMenuitemFromCSBX
     347
     348
     349;--------------------------------------------------------------------
     350; WriteFullOperatingMode
     351;   Parameters:
     352;       AX:     Value that the MENUITEM system was interacting with
     353;       ES:DI:  ROMVARS location where the value is to be stored
     354;       DS:SI:  MENUITEM pointer
     355;   Returns:
     356;       AX:     Value to actually write to ROMVARS
     357;   Corrupts registers:
     358;       BX
     359;--------------------------------------------------------------------
     360ALIGN JUMP_ALIGN
     361WriteFullOperatingMode:
     362    test    ax, ax                              ; FOM disabled?
     363    mov     bx, LITE_MODE_RAMVARS_SEGMENT
     364    jz      SHORT .WriteDefaultValueToRamVars   ; Yes, Lite mode it is
     365    xor     bx, bx                              ; No, use Conventional memory
     366.WriteDefaultValueToRamVars:
     367    mov     [es:ROMVARS.wRamVars], bx
     368    ret
     369
     370
     371;--------------------------------------------------------------------
     372; ReadRamVars
     373;   Parameters:
     374;       AX:     Value read from the ROMVARS location
     375;       ES:DI:  ROMVARS location where the value was just read from
     376;       DS:SI:  MENUITEM pointer
     377;   Returns:
     378;       AX:     Value that the MENUITEM system will interact with and display
     379;   Corrupts registers:
     380;       Nothing
     381;--------------------------------------------------------------------
     382ALIGN JUMP_ALIGN
     383ReadRamVars:
     384    test    ax, ax
     385    jz      SHORT .PrintNoInsteadOfValue
     386    cmp     ax, LITE_MODE_RAMVARS_SEGMENT
     387    jne     SHORT WriteRamVars.Return
     388
     389.PrintNoInsteadOfValue:
     390    push    si
     391    mov     si, g_szNo
     392    CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromCSSI
     393    pop     si
     394; This is a humongous hack. The menu system should not be (ab)used like this.
     395    pop     ax      ; Return from ReadRamVars to Menuitem_GetValueToAXfromMenuitemInDSSI
     396    pop     bx      ; Restore registers
     397    pop     di
     398    pop     es
     399    pop     ax      ; Return from Menuitem_GetValueToAXfromMenuitemInDSSI to MenuitemPrint_WriteHexValueStringToBufferInESDIfromItemInDSSI
     400    jmp     MenuitemPrint_FinishPrintingUnsignedOrHexValue
     401
     402
     403;--------------------------------------------------------------------
     404; WriteRamVars
     405;   Parameters:
     406;       AX:     Value that the MENUITEM system was interacting with
     407;       ES:DI:  ROMVARS location where the value is to be stored
     408;       DS:SI:  MENUITEM pointer
     409;   Returns:
     410;       AX:     Value to actually write to ROMVARS
     411;   Corrupts registers:
     412;       Nothing
     413;--------------------------------------------------------------------
     414ALIGN JUMP_ALIGN
     415WriteRamVars:
     416    inc     ax      ; FFFF -> 0000 = Disable UMB usage
     417    jz      SHORT .Return
     418    dec     ax
     419.Return:
     420    ret
    310421
    311422
Note: See TracChangeset for help on using the changeset viewer.