Changeset 625 in xtideuniversalbios for trunk


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
Files:
27 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
  • trunk/Tools/PostCommitHook.cmd

    r624 r625  
    11@echo off
    2 if exist ..\CommitInProgress goto NoError1
     2:TryAgain
     3if exist CommitInProgress goto NoError
     4if %6""=="" goto NotCalledFromTSVN
     5if %6=="%cd%" goto FileNotFound
     6cd %6
     7goto TryAgain
     8:NotCalledFromTSVN
     9if "%PreviousCD%"=="%cd%" goto FileNotFound
     10set PreviousCD=%cd%
     11cd..
     12goto TryAgain
     13:FileNotFound
    314echo PostCommitHook was called but no CommitInProgress file could be found!>con
    415echo Something is very wrong as this should not happen!>con
    516pause<con>con
    617exit 1
    7 :NoError1
    8 del ..\CommitInProgress
     18:NoError
     19del CommitInProgress
    920exit 0
  • trunk/XTIDE_Universal_BIOS/Inc/ModuleDependency.inc

    r605 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
     
    1717; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
    1818;
     19
     20%ifdef USE_PS2
     21    %ifndef USE_AT
     22        %define USE_AT
     23    %endif
     24%endif
    1925
    2026; Allow RELOCATE_INT13H_STACK only for AT builds
  • trunk/XTIDE_Universal_BIOS/Inc/RamVars.inc

    r594 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
     
    2020%ifndef RAMVARS_INC
    2121%define RAMVARS_INC
    22 
    23 ; Segment when RAMVARS is stored to top of interrupt vectors.
    24 %ifndef USE_AT
    25     LITE_MODE_RAMVARS_SEGMENT   EQU     30h
    26 %endif
    2722
    2823
  • trunk/XTIDE_Universal_BIOS/Inc/Revision.inc

    r624 r625  
    1 624
     1625
  • trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc

    r624 r625  
    55;
    66; XTIDE Universal BIOS and Associated Tools
    7 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
     7; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team.
    88;
    99; This program is free software; you can redistribute it and/or modify
     
    133133XTCF_DEVICE_OFFSET                      EQU FIRST_XTCF_DEVICE                       ; Used for XT-CF device <--> mode conversion
    134134
     135; Segment when RAMVARS is stored to top of interrupt vectors.
     136LITE_MODE_RAMVARS_SEGMENT               EQU 30h
    135137
    136138; ROM Variables. Written to the ROM image before flashing.
     139; The ROMVARS version in Version.inc must be incremented whenever this struc changes.
    137140struc ROMVARS
    138141    .wRomSign           resb    2   ; ROM Signature (AA55h)
     
    141144
    142145    .rgbSign            resb    6   ; Signature for XTIDE Configurator Program (must be even length)
    143     .szTitle            resb    31  ; BIOS title string
    144     .szVersion          resb    19  ; BIOS version string (supports up to r9999)
    145 
     146    .szTitle            resb    32  ; BIOS title string
     147    .szVersion          resb    18  ; BIOS version string (supports up to r999)
     148
     149    .pColorTheme        resb    2   ; Ptr to the color attribute struc used by the boot menu and hotkey bar
    146150    .wFlags             resb    2   ; Word for ROM flags
     151    ; Note! Any additional ROMVARS must be added below if they are supposed to be copied
     152    ; over when doing "Load old settings from EEPROM" to a new BIOS loaded from file.
     153    .wRamVars           resb    2   ; Segment address for RamVars
    147154    .wDisplayMode       resb    2   ; Display mode for boot menu
    148155    .wBootTimeout       resb    2   ; Boot Menu selection timeout in system timer ticks
    149     .pColorTheme        resb    2   ; Ptr to the color attribute struc used by the boot menu and hotkey bar
    150156    .bIdeCnt            resb    1   ; Number of available IDE controllers
    151157    .bBootDrv           resb    1   ; Default drive to boot from
  • trunk/XTIDE_Universal_BIOS/Inc/Version.inc

    r624 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; Flash signature revisions:
     21; XUB210    Moved pColorTheme so it's not copied when loading old settings from EEPROM.
     22;           Added wRamVars to allow use of UMBs for storing variables in Full operating mode.
     23;           Increased the length of szTitle and decreased the length of szVersion for USE_PS2
    2124; XUB209    Shortened the BIOS version string (ROMVARS.szVersion) and WORD aligned the IDEVARS structures
    2225; XUB208    Added option to skip slave drive detection
     
    3235
    3336%define TITLE_STRING_START      "-=XTIDE Universal BIOS "
    34 %ifdef USE_AT
     37%ifdef USE_PS2
     38    %define TITLE_STRING_END    "(PS/2)=-"
     39%elifdef USE_AT
    3540    %ifdef USE_386
    3641        %define TITLE_STRING_END    "(386)=-"
     
    5156; on the same line, either before or after. In fact, do not even put a preceding label on the same line!
    5257%define BUILD_DATE_STRING       "(",__DATE__,")"
    53 %define FLASH_SIGNATURE         "XUB209"    ; Do not terminate with NULL
     58%define FLASH_SIGNATURE         "XUB210"    ; Also known as the ROMVARS version. Do not terminate with NULL.
    5459
    5560
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm

    r617 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
     
    303303;--------------------------------------------------------------------
    304304ALIGN JUMP_ALIGN
    305 IdeCommand_ReadLBAlowRegisterToAL:
     305IdeCommand_ReadLBAlowRegisterToAL:  ; Unused entrypoint OK
    306306    ; HOB bit (defined in 48-bit address feature set) should be zero by default
    307307    ; so we get the correct value for CHS, LBA28 and LBA48 drives and commands
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.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
     
    5050ALIGN JUMP_ALIGN
    5151IdeTransfer_StartWithCommandInAL:
     52%ifdef USE_PS2
     53    ; Turn on the software controlled HDD LED on IBM PS/2 machines
     54    xchg    bx, ax  ; Save AX
     55    in      al, 92h ; Read System Control Port A
     56    or      al, 80h ; Set bit 7 to turn on LED (bit 6 would also work)
     57    out     92h, al ; Write it back
     58    xchg    bx, ax  ; Restore AX
     59%endif
    5260    ; Are we reading or writing?
    5361    test    al, 16  ; Bit 4 is cleared on all the read commands but set on 3 of the 4 write commands
     
    124132    ; All sectors successfully transferred
    125133    add     cx, [bp+PIOVARS.bSectorsDone]       ; Never sets CF
     134%ifdef USE_PS2
     135    ; Turn off the software controlled HDD LED on IBM PS/2 machines
     136    in      al, 92h ; Read System Control Port A
     137    and     al, 3Fh ; Clear bits 7 and 6 to turn off LED
     138    out     92h, al ; Write it back
     139%endif
    126140    ret
    127141
     
    133147    mov     cl, [bp+PIOVARS.bSectorsDone]
    134148    mov     ch, 0                               ; Preserve CF
     149%endif
     150%ifdef USE_PS2
     151    ; Turn off the software controlled HDD LED on IBM PS/2 machines
     152    in      al, 92h ; Read System Control Port A
     153    and     al, 3Fh ; Clear bits 7 and 6 to turn off LED (Clears CF)
     154    out     92h, al ; Write it back
     155    stc             ; Restore the CF
    135156%endif
    136157    ret
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/AtaID.asm

    r618 r625  
    55;
    66; XTIDE Universal BIOS and Associated Tools
    7 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
     7; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team.
    88;
    99; This program is free software; you can redistribute it and/or modify
     
    4545    pop     es
    4646%endif
    47 AtaID_FixIllegalValuesFromESSI:
     47AtaID_FixIllegalValuesFromESSI: ; Unused entrypoint OK
    4848    jc      SHORT .Return   ; Nothing to fix since failed to read ATA Info
    4949
  • trunk/XTIDE_Universal_BIOS/Src/Main.asm

    r624 r625  
    1515;
    1616; XTIDE Universal BIOS and Associated Tools
    17 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
     17; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team.
    1818;
    1919; This program is free software; you can redistribute it and/or modify
     
    6464
    6565; ROM variables (must start at offset 0)
    66 CNT_ROM_BLOCKS      EQU     BIOS_SIZE / 512     ; number of 512B blocks, 16 = 8kB BIOS
     66CNT_ROM_BLOCKS      EQU     BIOS_SIZE / 512                 ; number of 512B blocks, 16 = 8kB BIOS
    6767istruc ROMVARS
    68     at  ROMVARS.wRomSign,   dw  0AA55h          ; PC ROM signature
    69     at  ROMVARS.bRomSize,   db  CNT_ROM_BLOCKS  ; ROM size in 512B blocks
    70     at  ROMVARS.rgbJump,    jmp Initialize_FromMainBiosRomSearch
    71     at  ROMVARS.rgbSign,    db  FLASH_SIGNATURE
    72     at  ROMVARS.szTitle,    db  TITLE_STRING
    73     at  ROMVARS.szVersion,  db  "r"
    74                             db  ROM_VERSION_STRING
    75                             db  BUILD_DATE_STRING,NULL
     68    at  ROMVARS.wRomSign,       dw  0AA55h                  ; PC ROM signature
     69    at  ROMVARS.bRomSize,       db  CNT_ROM_BLOCKS          ; ROM size in 512B blocks
     70    at  ROMVARS.rgbJump,        jmp Initialize_FromMainBiosRomSearch
     71    at  ROMVARS.rgbSign,        db  FLASH_SIGNATURE
     72    at  ROMVARS.szTitle,        db  TITLE_STRING
     73    at  ROMVARS.szVersion,      db  "r"
     74                                db  ROM_VERSION_STRING
     75                                db  BUILD_DATE_STRING,NULL
     76%ifdef MODULE_BOOT_MENU
     77    at  ROMVARS.pColorTheme,    dw  ColorTheme              ; Offset to the ATTRIBUTE_CHARS struc that holds the color theme
     78%endif
    7679
    7780;---------------------------;
     
    8487    at  ROMVARS.wFlags,         dw  FLG_ROMVARS_FULLMODE | MASK_ROMVARS_INCLUDED_MODULES
    8588%endif
     89    at  ROMVARS.wRamVars,       dw  NULL                    ; Use 'stolen' top of conventional memory by default in Full mode
    8690    at  ROMVARS.wDisplayMode,   dw  DEFAULT_TEXT_MODE
    8791%ifdef MODULE_BOOT_MENU
    8892    at  ROMVARS.wBootTimeout,   dw  BOOT_MENU_DEFAULT_TIMEOUT
    89     at  ROMVARS.pColorTheme,    dw  ColorTheme              ; Offset to the ATTRIBUTE_CHARS struc that holds the color theme
    90 %endif
     93%endif
     94%ifdef USE_PS2
     95    at  ROMVARS.bIdeCnt,        db  4                       ; Number of supported controllers with two McIDE adapters
     96%else
    9197    at  ROMVARS.bIdeCnt,        db  2                       ; Number of supported controllers
     98%endif
    9299    at  ROMVARS.bBootDrv,       db  80h                     ; Boot Menu default drive
    93100    at  ROMVARS.bMinFddCnt,     db  0                       ; Do not force minimum number of floppy drives
     
    99106    at  ROMVARS.ideVars0+IDEVARS.bDevice,           db  DEVICE_16BIT_ATA
    100107%ifdef MODULE_IRQ
     108%ifdef USE_PS2
     109    at  ROMVARS.ideVars0+IDEVARS.bIRQ,              db  0
     110%else
    101111    at  ROMVARS.ideVars0+IDEVARS.bIRQ,              db  14
     112%endif
    102113%endif
    103114    at  ROMVARS.ideVars0+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,  dw  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
     
    108119    at  ROMVARS.ideVars1+IDEVARS.bDevice,           db  DEVICE_16BIT_ATA
    109120%ifdef MODULE_IRQ
     121%ifdef USE_PS2
     122    at  ROMVARS.ideVars1+IDEVARS.bIRQ,              db  0
     123%else
    110124    at  ROMVARS.ideVars1+IDEVARS.bIRQ,              db  15
     125%endif
    111126%endif
    112127    at  ROMVARS.ideVars1+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,  dw  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
     
    117132    at  ROMVARS.ideVars2+IDEVARS.bDevice,           db  DEVICE_16BIT_ATA
    118133%ifdef MODULE_IRQ
     134%ifdef USE_PS2
     135    at  ROMVARS.ideVars2+IDEVARS.bIRQ,              db  0
     136%else
    119137    at  ROMVARS.ideVars2+IDEVARS.bIRQ,              db  0   ; Should be 11 on the GSI Inc. Model 2C
     138%endif
    120139%endif
    121140    at  ROMVARS.ideVars2+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,  dw  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
     
    126145    at  ROMVARS.ideVars3+IDEVARS.bDevice,           db  DEVICE_16BIT_ATA
    127146%ifdef MODULE_IRQ
     147%ifdef USE_PS2
     148    at  ROMVARS.ideVars3+IDEVARS.bIRQ,              db  0
     149%else
    128150    at  ROMVARS.ideVars3+IDEVARS.bIRQ,              db  0   ; Should be 10 on the GSI Inc. Model 2C
     151%endif
    129152%endif
    130153    at  ROMVARS.ideVars3+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,  dw  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
     
    139162;-----------------------------------;
    140163    at  ROMVARS.wFlags,         dw  MASK_ROMVARS_INCLUDED_MODULES
     164    at  ROMVARS.wRamVars,       dw  LITE_MODE_RAMVARS_SEGMENT
    141165    at  ROMVARS.wDisplayMode,   dw  DEFAULT_TEXT_MODE
    142166%ifdef MODULE_BOOT_MENU
    143167    at  ROMVARS.wBootTimeout,   dw  BOOT_MENU_DEFAULT_TIMEOUT
    144     at  ROMVARS.pColorTheme,    dw  ColorTheme              ; Offset to the ATTRIBUTE_CHARS struc that holds the color theme
    145168%endif
    146169    at  ROMVARS.bIdeCnt,        db  1
  • 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
  • trunk/XTIDE_Universal_BIOS/makefile

    r623 r625  
    4444# USE_386                     Use instructions supported by 386 and later (defines USE_286)        #
    4545# USE_AT                      Use features supported on AT and later systems (not available on XT) #
     46# USE_PS2                     For use with IBM PS/2 machines only (defines USE_AT)                 #
    4647# USE_UNDOC_INTEL             Optimizations for Intel CPUs - do NOT use on NEC V20/V30/Sony CPUs   #
    4748# USE_NEC_V                   Optimizations for use with NEC V20/V30 CPUs only                     #
     
    118119DEFINES_AT = $(DEFINES_COMMON) USE_AT USE_286 MODULE_IRQ MODULE_COMPATIBLE_TABLES
    119120DEFINES_386 = $(DEFINES_AT) USE_386 MODULE_ADVANCED_ATA MODULE_WIN9X_CMOS_HACK
     121DEFINES_PS2 = USE_PS2 USE_286 MODULE_STRINGS_COMPRESSED MODULE_HOTKEYS MODULE_BOOT_MENU MODULE_EBIOS MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_IRQ MODULE_POWER_MANAGEMENT NO_ATAID_VALIDATION CLD_NEEDED
    120122
    121123DEFINES_XT_LARGE = $(DEFINES_XT) $(DEFINES_COMMON_LARGE)
     
    123125DEFINES_AT_LARGE = $(DEFINES_AT) $(DEFINES_COMMON_LARGE)
    124126DEFINES_386_LARGE = $(DEFINES_386) $(DEFINES_COMMON_LARGE)
     127DEFINES_PS2_LARGE = $(DEFINES_PS2) MODULE_COMPATIBLE_TABLES
    125128
    126129DEFINES_XT_TINY = MODULE_STRINGS_COMPRESSED MODULE_8BIT_IDE NO_ATAID_VALIDATION NO_ATAID_CORRECTION CLD_NEEDED
     
    144147DEFS_XTPLUS = $(DEFINES_XTPLUS:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_SMALL)
    145148DEFS_AT = $(DEFINES_AT:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_SMALL)
     149DEFS_386 = $(DEFINES_386:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_SMALL)
     150DEFS_PS2 = $(DEFINES_PS2:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_SMALL)
    146151DEFS_XT_LARGE = $(DEFINES_XT_LARGE:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_LARGE)
    147152DEFS_XTPLUS_LARGE = $(DEFINES_XTPLUS_LARGE:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_LARGE)
    148153DEFS_AT_LARGE = $(DEFINES_AT_LARGE:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_LARGE)
     154DEFS_386_LARGE = $(DEFINES_386_LARGE:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_LARGE)
     155DEFS_PS2_LARGE = $(DEFINES_PS2_LARGE:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_LARGE)
    149156DEFS_XT_TINY = $(DEFINES_XT_TINY:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_TINY)
    150 DEFS_386 = $(DEFINES_386:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_SMALL)
    151 DEFS_386_LARGE = $(DEFINES_386_LARGE:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_LARGE)
    152157DEFS_CUSTOM = $(DEFINES_CUSTOM:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_CUSTOM)
    153158
     
    191196    @echo All done!
    192197
    193 small: xt_tiny xt xtplus at 386
     198small: xt_tiny xt xtplus at 386 ps2
    194199    @echo All small binaries built!
    195200
    196 large: xt_large xtplus_large at_large 386_large
     201large: xt_large xtplus_large at_large 386_large ps2_large
    197202    @echo All large binaries built!
     203
     204ps2:
     205    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_PS2) -l"$(TARGET)_ps2.lst" -o"$(TARGET)_ps2.bin"
     206    @echo * Small PS/2 version "$(TARGET)_ps2.bin" built.
     207
     208ps2_large:
     209    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_PS2_LARGE) -l"$(TARGET)_ps2l.lst" -o"$(TARGET)_ps2l.bin"
     210    @echo * Large PS/2 version "$(TARGET)_ps2l.bin" built.
     211
     212386:
     213    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_386) -l"$(TARGET)_386.lst" -o"$(TARGET)_386.bin"
     214    @echo * Small 386 version "$(TARGET)_386.bin" built.
     215
     216386_large:
     217    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_386_LARGE) -l"$(TARGET)_386l.lst" -o"$(TARGET)_386l.bin"
     218    @echo * Large 386 version "$(TARGET)_386l.bin" built.
    198219
    199220at:
     
    224245    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XT_TINY) -l"$(TARGET)_tiny.lst" -o"$(TARGET)_tiny.bin"
    225246    @echo * Tiny XT version "$(TARGET)_tiny.bin" built.
    226 
    227 386:
    228     @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_386) -l"$(TARGET)_386.lst" -o"$(TARGET)_386.bin"
    229     @echo * Small 386 version "$(TARGET)_386.bin" built.
    230 
    231 386_large:
    232     @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_386_LARGE) -l"$(TARGET)_386l.lst" -o"$(TARGET)_386l.bin"
    233     @echo * Large 386 version "$(TARGET)_386l.bin" built.
    234247
    235248custom:
     
    251264    @perl ..\Tools\checksum.pl $(TARGET)_xtp.bin $(BIOS_SIZE_SMALL)
    252265    @perl ..\Tools\checksum.pl $(TARGET)_at.bin $(BIOS_SIZE_SMALL)
     266    @perl ..\Tools\checksum.pl $(TARGET)_386.bin $(BIOS_SIZE_SMALL)
     267    @perl ..\Tools\checksum.pl $(TARGET)_ps2.bin $(BIOS_SIZE_SMALL)
    253268    @perl ..\Tools\checksum.pl $(TARGET)_xtl.bin $(BIOS_SIZE_LARGE)
    254269    @perl ..\Tools\checksum.pl $(TARGET)_xtpl.bin $(BIOS_SIZE_LARGE)
    255270    @perl ..\Tools\checksum.pl $(TARGET)_atl.bin $(BIOS_SIZE_LARGE)
    256     @perl ..\Tools\checksum.pl $(TARGET)_386.bin $(BIOS_SIZE_SMALL)
    257271    @perl ..\Tools\checksum.pl $(TARGET)_386l.bin $(BIOS_SIZE_LARGE)
     272    @perl ..\Tools\checksum.pl $(TARGET)_ps2l.bin $(BIOS_SIZE_LARGE)
    258273
    259274unused:
     
    294309    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_386_LARGE) -o"$(TARGET)_unused_386l.asm" -E -DCHECK_FOR_UNUSED_ENTRYPOINTS
    295310    @perl ..\Tools\unused.pl $(TARGET)_unused_386l.lst $(TARGET)_unused_386l.asm
    296 
     311    @echo "PS/2 Small"
     312    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_PS2) -o"$(TARGET)_unused_ps2.asm" -l"$(TARGET)_unused_ps2.lst"
     313    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_PS2) -o"$(TARGET)_unused_ps2.asm" -E -DCHECK_FOR_UNUSED_ENTRYPOINTS
     314    @perl ..\Tools\unused.pl $(TARGET)_unused_ps2.lst $(TARGET)_unused_ps2.asm
     315    @echo "PS/2 Large"
     316    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_PS2_LARGE) -o"$(TARGET)_unused_ps2l.asm" -l"$(TARGET)_unused_ps2l.lst"
     317    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_PS2_LARGE) -o"$(TARGET)_unused_ps2l.asm" -E -DCHECK_FOR_UNUSED_ENTRYPOINTS
     318    @perl ..\Tools\unused.pl $(TARGET)_unused_ps2l.lst $(TARGET)_unused_ps2l.asm
     319
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menuitem.asm

    r603 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
     
    312312ALIGN JUMP_ALIGN
    313313Menuitem_GetValueToAXfromMenuitemInDSSI:
     314; Note! Changes to this procedure might require changes to
     315; ReadRamVars in ConfigurationMenu.asm as well!
    314316    push    es
    315317    push    di
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/MenuitemPrint.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
     
    264264ALIGN JUMP_ALIGN
    265265MenuitemPrint_WriteHexValueStringToBufferInESDIfromItemInDSSI:
     266; Note! Changes to this procedure might require changes to
     267; ReadRamVars in ConfigurationMenu.asm as well!
    266268    mov     bx, di
    267269    mov     cx, MAX_VALUE_STRING_LENGTH
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/BootMenuSettingsMenu.asm

    r621 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
     
    185185
    186186ColorThemeTable:
    187 ; Note! If there's ever a need to remove a theme or change a theme or reorder the themes then the ROMVARS version must be incremented.
    188 ; This is for backwards compatibility. Adding new themes (at the bottom) however should work with no change to the ROMVARS version.
     187; Note! If there's ever a need to add, remove or change a theme or reorder the themes then the ROMVARS version must be incremented.
    189188    ; Classic (default)
    190189    db  COLOR_ATTRIBUTE(COLOR_YELLOW, COLOR_BLUE)                           ; .cBordersAndBackground
     
    396395    loopne  .NextTheme
    397396    cld
    398     mov     ax, cx
     397    mov     ax, cx                      ; Return the color theme index in AX; zero (default theme) if a theme was not found
    399398    jne     SHORT .SkipCopy
    400399
  • 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
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/IdeControllerMenu.asm

    r621 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
     
    229229    dw  'B'
    230230    dw  'C'
    231     dw  'x'             ; must be last entry (see reader/write routines)
     231    dw  'x'             ; must be last entry (see reader/writer routines)
    232232g_rgszChoiceToStringLookupForCOM:
    233233    dw  g_szValueCfgCOM1
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/MainMenu.asm

    r621 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
     
    292292    add     di, ROMVARS.pColorTheme
    293293    call    WriteColorTheme
     294    ; We did not copy over wFlags but we did copy over wRamVars so we
     295    ; must ensure that the Full Operating Mode setting matches wRamVars.
     296    cmp     WORD [es:ROMVARS.wRamVars], LITE_MODE_RAMVARS_SEGMENT
     297    jne     SHORT .SetFullOperatingMode     ; All builds supports FOM
     298    call    Buffers_IsXTbuildLoaded
     299    jz      SHORT .ClearFullOperatingMode
     300    ; The loaded file is an AT build and we just copied the settings from
     301    ; an XT build in ROM configured for Lite mode. Resolve the conflict
     302    ; by clearing wRamVars thereby setting it to the default for FOM.
     303    mov     WORD [es:ROMVARS.wRamVars], 0
     304    ; Tell the user there was a change in the configuration
     305    mov     dx, g_szDlgFomEnabled
     306    call    Dialogs_DisplayNotificationFromCSDX
     307    ; We don't need to set the FOM flag but fall through anyway
     308.SetFullOperatingMode:
     309    or      BYTE [es:ROMVARS.wFlags], FLG_ROMVARS_FULLMODE
     310    jmp     SHORT .Done
     311
     312.ClearFullOperatingMode:
     313    and     BYTE [es:ROMVARS.wFlags], ~FLG_ROMVARS_FULLMODE
     314
     315.Done:
    294316.FileNotLoaded:
    295317    jmp     MainMenu_EnterMenuOrModifyItemVisibility
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm

    r624 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
     
    9898g_szNfoMainFlash:       db  "Flash loaded BIOS image to EEPROM.",NULL
    9999g_szNfoMainSave:        db  "Save BIOS changes back to original file from which it was loaded.",NULL
    100 g_szNfoMainLicense:     db  "XTIDE Universal BIOS and XTIDECFG Copyright (C) 2009-2010 by Tomi Tilli, 2011-2022 by XTIDE Universal BIOS Team."
     100g_szNfoMainLicense:     db  "XTIDE Universal BIOS and XTIDECFG Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team."
    101101                        db  " Released under GNU GPL v2, with ABSOLUTELY NO WARRANTY. Press ENTER for more details...",NULL
    102102g_szNfoMainHomePage:    db  "Visit http://xtideuniversalbios.org (home page) and http://forum.vcfed.org (support)",NULL
    103103
    104104g_szHelpMainLicense:    db  "XTIDE Universal BIOS and XTIDECFG Configuration program are Copyright 2009-2010 by Tomi Tilli,"
    105                         db  " 2011-2022 by XTIDE Universal BIOS Team. Released under GNU GPL v2. This software comes with ABSOLUTELY NO WARRANTY."
     105                        db  " 2011-2023 by XTIDE Universal BIOS Team. Released under GNU GPL v2. This software comes with ABSOLUTELY NO WARRANTY."
    106106                        db  " This is free software, and you are welcome to redistribute it under certain conditions."
    107107                        db  " See the LICENSE.TXT file that was included with this distribution,"
     
    117117g_szItemAutoConfigure:  db  "Auto Configure",NULL
    118118g_szItemCfgFullMode:    db  "Full operating mode",NULL
     119g_szItemCfgRamVars:     db  "Use UMB for variables",NULL
    119120g_szItemCfgStealSize:   db  "kiB to steal from RAM",NULL
    120121g_szItemCfgIdeCnt:      db  "IDE controllers",NULL
     
    128129                        db  "Zenith Data Systems Z-161",LF,LF
    129130                        db  "The Boot settings menu option 'Remove other hard drives' has been set to YES for this reason.",NULL
     131g_szDlgFomEnabled       db  "The loaded file does not support Lite mode - Full operating mode has been enabled.",NULL
    130132g_szDlgCfgFullMode:     db  "Enable full operating mode?",NULL
     133g_szDlgCfgRamVars:      db  "Store variables in UMB?",NULL
    131134g_szDlgCfgStealSize:    db  "How many kiB of base memory to steal for XTIDE Universal BIOS variables (1...255)?",NULL
    132135g_szDlgCfgIdeCnt:       db  "How many IDE controllers to manage (1...4)?",NULL
     
    136139g_szNfoCfgBootMenu:     db  "Boot configuration.",NULL
    137140g_szNfoAutoConfigure:   db  "Automatically Configure XTIDE Universal BIOS for this system.",NULL
    138 g_szNfoCfgFullMode:     db  "Full mode supports multiple controllers and has more features.",NULL
     141g_szNfoCfgFullMode:     db  "Full mode supports up to four controllers and has more features.",NULL
     142g_szNfoCfgRamVars:      db  "Enter UMB segment address (FFFF=Disable UMB usage and use the top of Conventional memory instead).",NULL
    139143g_szNfoCfgStealSize:    db  "How many kiB's to steal from Conventional memory for XTIDE Universal BIOS variables.",NULL
    140144g_szNfoCfgIdeCnt:       db  "Number of IDE controllers to manage.",NULL
     
    144148                        db  " No further action is required. Serial Controllers must be placed at the end of the list.",NULL
    145149
    146 g_szHelpCfgFullMode:    db  "Full mode supports up to 4 IDE controllers (8 drives). Full mode reserves a bit of RAM from the top of"
    147                         db  " Conventional memory. This makes it possible to use ROM BASIC and other software that requires"
    148                         db  " the interrupt vectors where XTIDE Universal BIOS parameters would be stored in Lite mode.",LF,LF
     150g_szHelpCfgFullMode:    db  "Full mode supports up to 4 IDE controllers (8 drives) and requires 1 kiB of RAM to store hard disk parameters and"
     151                        db  " other variables. This bit of RAM can be reserved from the top of Conventional memory, or, if RAM is available in"
     152                        db  " the Upper Memory Area (UMA), by configuring the BIOS to use an Upper Memory Block (UMB). Full mode makes it"
     153                        db  " possible to use ROM BASIC and other software that requires the memory range where"
     154                        db  " XTIDE Universal BIOS parameters would be stored in Lite mode.",LF,LF
    149155                        db  "Lite mode supports only 2 IDE controllers (4 drives) and stores parameters to the top of the interrupt vectors"
    150                         db  " (30:0h) so no Conventional memory needs to be reserved. Lite mode cannot be used if some software requires"
    151                         db  " the top of interrupt vectors. Usually this is not a problem since only IBM ROM BASIC uses them.",LF,LF
     156                        db  " (30:0h) so no Conventional memory needs to be reserved. Lite mode cannot be used if you intend to use"
     157                        db  " IBM ROM BASIC or software such as Turbo BASIC or BASICA.",LF,LF
    152158                        db  "Tandy 1000 models with 640 kiB or less memory need to use Lite mode since the top of Conventional memory gets"
    153159                        db  " dynamically reserved by video hardware. This happens only with Tandy integrated video controller and not when"
    154                         db  " using expansion graphics cards. It is possible to use Full mode if reserving RAM for video memory + what is"
    155                         db  " required for XTIDE Universal BIOS. This would mean 65 kiB but most software should work with 33 kiB reserved.",NULL
    156 
    157 g_szHelpCfgStealSize:   db  "Parameters for detected hard disks must be stored somewhere. In Full mode they are stored at the top of Conventional"
    158                         db  " memory. 1 kiB is usually enough but you may have to reserve more if you want to use Full mode on a Tandy 1000.",NULL
     160                        db  " using expansion graphics cards. It is possible to use Full mode if configuring the BIOS to use an UMB or by"
     161                        db  " reserving RAM for video memory in addition to what is required for XTIDE Universal BIOS. Most software should"
     162                        db  " work with 33 kiB reserved but some will require 65 kiB. Theoretically speaking, a lot more could be required"
     163                        db  " - it is just that we are not aware of any software with higher video memory requirements.",NULL
     164
     165g_szHelpCfgRamVars:     db  "The UMB segment address entered here will be used to store hard disk parameters and other variables leaving all"
     166                        db  " of the Conventional memory free for other uses.",LF,LF
     167                        db  "Do not use this option unless you know for certain that memory actually exists at this address and that it is"
     168                        db  " writable without any prerequisite chipset programming. If you are using any sort of DOS memory manager or UMB"
     169                        db  " provider then it is probably a good idea to use whatever memory range exclusion option it provides to prevent it"
     170                        db  " from trying to use this memory range. Note that only 1 kiB of the UMB will be used.",NULL
     171
     172g_szHelpCfgStealSize:   db  "Parameters for detected hard disks and other variables must be stored somewhere. If in Full mode, and the BIOS has"
     173                        db  " not been configured to use an UMB, then they are stored at the top of Conventional memory."
     174                        db  " 1 kiB is usually enough but you may have to reserve more if you want to use Full mode on a Tandy 1000.",NULL
    159175
    160176g_szHelpCfgIdleTimeout: db  "This option enables the standby timer for all harddrives handled by XTIDE Universal BIOS,"
Note: See TracChangeset for help on using the changeset viewer.