Changeset 625 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs


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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm

    r623 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
     
    3636    push    es
    3737
    38 %ifndef USE_AT
    39     mov     ax, LITE_MODE_RAMVARS_SEGMENT
    40     test    BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_FULLMODE
    41     jz      SHORT .InitializeRamvars    ; No need to steal RAM
    42 %endif
     38    mov     ax, [cs:ROMVARS.wRamVars]
     39    test    ax, ax                      ; UMB segment or LITE_MODE_RAMVARS_SEGMENT?
     40    jnz     SHORT .InitializeRamvars    ; No need to steal RAM
    4341
    44     LOAD_BDA_SEGMENT_TO ds, ax, !       ; Zero AX
     42    mov     ds, ax
    4543    mov     al, [cs:ROMVARS.bStealSize]
    4644    sub     [BDA.wBaseMem], ax
     
    6765    ret
    6866
     67
    6968;--------------------------------------------------------------------
    7069; Returns segment to RAMVARS.
    71 ; RAMVARS might be located at the top of interrupt vectors (0030:0000h)
    72 ; or at the top of system base RAM.
     70; RAMVARS might be located at the top of interrupt vectors (0030:0000h),
     71; at the top of system base RAM or in a user configured UMB.
    7372;
    7473; RamVars_GetSegmentToDS
     
    8281ALIGN JUMP_ALIGN
    8382RamVars_GetSegmentToDS:
     83    mov     ds, [cs:ROMVARS.wRamVars]
     84    mov     di, ds
     85    test    di, di                  ; UMB segment or LITE_MODE_RAMVARS_SEGMENT?
     86    jnz     SHORT .Return
    8487
    85 %ifndef USE_AT  ; Always in Full Mode for AT builds
    86     test    BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_FULLMODE
    87     jnz     SHORT .GetStolenSegmentToDS
    88     %ifndef USE_186
    89         mov     di, LITE_MODE_RAMVARS_SEGMENT
    90         mov     ds, di
    91     %else
    92         push    LITE_MODE_RAMVARS_SEGMENT
    93         pop     ds
    94     %endif
    95     ret
    96 %endif
    97 
    98 ALIGN JUMP_ALIGN
    99 .GetStolenSegmentToDS:
    100     LOAD_BDA_SEGMENT_TO ds, di
    10188;%ifdef USE_186
    10289;   imul    di, [BDA.wBaseMem], 64  ; 2 bytes less but slower, especially on 386/486 processors
     
    11198    cmp     WORD [RAMVARS.wSignature], RAMVARS_RAM_SIGNATURE
    11299    jne     SHORT .LoopStolenKBs    ; Loop until sign found (always found eventually)
     100.Return:
    113101    ret
    114102
Note: See TracChangeset for help on using the changeset viewer.