- Timestamp:
- Feb 19, 2023, 9:26:52 PM (22 months ago)
- Location:
- trunk
- Files:
-
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/Menu/Dialog/Dialog.asm
r593 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 95 95 96 96 ;-------------------------------------------------------------------- 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 ;-------------------------------------------------------------------- 105 ALIGN JUMP_ALIGN 106 Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithItemZero: 107 xor ax, ax 108 ; Fall to Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX 109 110 ;-------------------------------------------------------------------- 97 111 ; Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX 98 112 ; Parameters: … … 104 118 ; CF: Set since event processed 105 119 ;-------------------------------------------------------------------- 106 ALIGN JUMP_ALIGN107 120 Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX: 108 121 les di, [bp+DIALOG.fpDialogIO] -
trunk/Assembly_Library/Src/Menu/Dialog/DialogDrive.asm
r596 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 56 56 ALIGN JUMP_ALIGN 57 57 .InitializeMenuinitFromDSSI: 58 xor ax, ax 59 call Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX 58 call Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithItemZero 60 59 call Drive_GetFlagsForAvailableDrivesToDXAX 61 60 mov [bp+MENU.dwUserData], ax -
trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm
r602 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 121 121 .rgszInfoStringLookup: 122 122 dw g_szChangeDrive 123 %ifndef EXCLUDE_FROM_XTIDECFG 123 124 dw g_szSelectDirectory 124 125 dw g_szCreateNew 126 %endif 125 127 126 128 .rgfnEventHandlers: … … 156 158 call LoadItemStringBufferToESDI 157 159 call SortDirectoryContentsStringFromESDIwithCountInCX 158 call RemoveLastLFandTerminateESDIwithNull159 160 xor ax, ax 161 mov [es:di-1], al ; Terminate with NULL 160 162 call Registers_CopySSBPtoDSSI 161 xor ax, ax162 163 call Dialog_EventInitializeMenuinitFromDSSIwithHighlightedItemInAX 163 164 call GetInfoLinesToCXandDialogFlagsToAX … … 436 437 437 438 ;-------------------------------------------------------------------- 438 ; RemoveLastLFandTerminateESDIwithNull439 ; Parameters:440 ; ES:DI: Ptr to end of buffer to terminate441 ; Returns:442 ; Nothing443 ; Corrupts registers:444 ; AX445 ;--------------------------------------------------------------------446 ALIGN JUMP_ALIGN447 RemoveLastLFandTerminateESDIwithNull:448 dec di449 xor ax, ax450 stosb451 ret452 453 454 ;--------------------------------------------------------------------455 439 ; GetInfoLinesToCXandDialogFlagsToAX 456 440 ; Parameters: … … 586 570 HandleFunctionKeyFromAH: 587 571 call GetDialogFlagsToAL 572 %ifndef EXCLUDE_FROM_XTIDECFG 588 573 cmp ah, KEY_FILEDIALOG_NEW_FILE_OR_DIR 589 574 je SHORT HandleFunctionKeyForCreatingNewFileOrDirectory 590 575 cmp ah, KEY_FILEDIALOG_SELECT_DIRECTORY 591 576 je SHORT HandleFunctionKeyForSelectingDirectoryInsteadOfFile 577 %endif 592 578 cmp ah, KEY_FILEDIALOG_CHANGE_DRIVE 593 579 je SHORT HandleFunctionKeyForDriveChange … … 607 593 ; All, except BP 608 594 ;-------------------------------------------------------------------- 595 %ifndef EXCLUDE_FROM_XTIDECFG 609 596 ALIGN JUMP_ALIGN 610 597 HandleFunctionKeyForCreatingNewFileOrDirectory: … … 649 636 jz SHORT ReturnWithoutHandlingKeystroke 650 637 ; Fall to CloseFileDialogAfterSuccessfulSelection 638 %endif ; EXCLUDE_FROM_XTIDECFG 651 639 652 640 ;-------------------------------------------------------------------- -
trunk/Assembly_Library/Src/Menu/Dialog/DialogProgress.asm
r596 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 89 89 ProgressEventHandler: 90 90 jmp [cs:bx+.rgfnEventHandlers] 91 92 93 ALIGN JUMP_ALIGN94 .InitializeMenuinitFromDSSI:95 mov ax, NO_ITEM_HIGHLIGHTED96 call Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX97 lds si, [bp+DIALOG.fpDialogIO]98 call TimerTicks_ReadFromBdaToAX99 mov [si+PROGRESS_DIALOG_IO.wStartTimeTicks], ax100 101 ; 0 = 65536 but it needs to be adjusted to 65535 to prevent division by zero102 cmp WORD [si+PROGRESS_DIALOG_IO.wMaxProgressValue], BYTE 0103 jne SHORT CalculateProgressNeededBeforeUpdatingCharacter104 dec WORD [si+PROGRESS_DIALOG_IO.wMaxProgressValue]105 jmp SHORT CalculateProgressNeededBeforeUpdatingCharacter106 91 107 92 … … 153 138 154 139 140 ALIGN 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 155 154 ;-------------------------------------------------------------------- 156 155 ; CalculateProgressNeededBeforeUpdatingCharacter … … 163 162 ; AX, BX, DX, SI, DS 164 163 ;-------------------------------------------------------------------- 165 ALIGN JUMP_ALIGN166 164 CalculateProgressNeededBeforeUpdatingCharacter: 167 165 call MenuLocation_GetMaxTextLineLengthToAX … … 216 214 ALIGN JUMP_ALIGN 217 215 .RepeatProgressCharacterCXtimesFromAL: 218 jcxz NothingToRepeat219 216 JMP_DISPLAY_LIBRARY PrintRepeatedCharacterFromALwithCountInCX 220 217 … … 233 230 mov bx, [si+PROGRESS_DIALOG_IO.wMaxProgressValue] 234 231 sub bx, [si+PROGRESS_DIALOG_IO.wMinProgressValue] 235 NothingToRepeat:236 232 ret 237 233 -
trunk/Assembly_Library/Src/Menu/Dialog/DialogString.asm
r596 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 55 55 56 56 ALIGN JUMP_ALIGN 57 .InitializeMenuinitFromDSSI:58 xor ax, ax59 jmp Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX60 61 62 ALIGN JUMP_ALIGN63 57 .IdleProcessing: 64 58 xor cx, cx ; Item 0 is used as input line … … 73 67 .rgfnEventHandlers: 74 68 istruc MENUEVENT 75 at MENUEVENT.InitializeMenuinitFromDSSI, dw .InitializeMenuinitFromDSSI69 at MENUEVENT.InitializeMenuinitFromDSSI, dw Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithItemZero 76 70 at MENUEVENT.ExitMenu, dw Dialog_EventExitMenu 77 71 at MENUEVENT.IdleProcessing, dw .IdleProcessing -
trunk/Assembly_Library/Src/Menu/Dialog/DialogWord.asm
r596 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 56 56 57 57 ALIGN JUMP_ALIGN 58 .InitializeMenuinitFromDSSI:59 xor ax, ax60 jmp Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX61 62 63 ALIGN JUMP_ALIGN64 58 .IdleProcessing: 65 59 xor cx, cx ; Item 0 is used as input line … … 74 68 .rgfnEventHandlers: 75 69 istruc MENUEVENT 76 at MENUEVENT.InitializeMenuinitFromDSSI, dw .InitializeMenuinitFromDSSI70 at MENUEVENT.InitializeMenuinitFromDSSI, dw Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithItemZero 77 71 at MENUEVENT.ExitMenu, dw Dialog_EventExitMenu 78 72 at MENUEVENT.IdleProcessing, dw .IdleProcessing -
trunk/Assembly_Library/Src/Menu/Dialog/ItemLineSplitter.asm
r526 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 51 51 call StringProcess_DSSIwithFunctionInDX 52 52 53 lea ax, [bx+1] 53 xchg bx, ax 54 inc ax 54 55 eLEAVE_STRUCT ITEM_LINE_SPLITTER_size 55 56 pop di … … 119 120 ProcessCharacterFromStringToSplit: 120 121 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 124 123 125 cmp al, LF126 je SHORT .ChangeToNextLine127 cmp al, CR128 jne SHORT .IgnoreUnsupportedControlCharacter129 xor cx, cx ; Carriage return so reset line length so far130 131 ALIGN JUMP_ALIGN132 124 .CheckLineLength: 133 125 cmp [bp+ITEM_LINE_SPLITTER.wMaxTextLineLength], cx 134 126 jb SHORT .ChangeToNextLine 135 ret ; With CF cleared127 ret ; With CF cleared 136 128 137 129 ALIGN JUMP_ALIGN … … 140 132 je SHORT .WantedLineFound 141 133 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 145 136 mov [bp+ITEM_LINE_SPLITTER.wStartOfLine], di 137 .CarriageReturn: 138 xor cx, cx ; Zero character counter (and clear CF) 146 139 ret 147 140 148 141 ALIGN 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 150 150 dec cx 151 151 clc -
trunk/Assembly_Library/Src/Menu/Dialog/StringsForDialogs.asm
r526 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 19 19 20 20 ; Strings for Progress Dialog 21 g_szTimeElapsed: db "Time elapsed :",NULL22 g_szTimeLeft: db "Estimated left:",NULL23 g_szTimeFormat: db " %2-u min %2-u sec",LF,CR,NULL21 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 24 24 25 25 ; Strings for Drive Dialog 26 g_szDriveFormat: db "%c:",NULL26 g_szDriveFormat: db "%c:",NULL 27 27 28 28 ; 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 29 g_szChangeDrive: db "F2 Change Drive",NULL 30 %ifndef EXCLUDE_FROM_XTIDECFG 31 g_szSelectDirectory: db "F3 Select Current Directory",NULL 32 g_szCreateNew: db "F4 Input new File or Directory",NULL 33 %endif 32 34 33 g_szSelectNewDrive: 34 db "Select new drive.",NULL 35 g_szLoadingPleaseWait: 36 db "Loading. Please wait...",NULL 35 g_szSelectNewDrive: db "Select new drive.",NULL 36 g_szLoadingPleaseWait: db "Loading. Please wait...",NULL 37 37 38 g_szEnterNewFileOrDirectory: 39 db "Enter name for new file or directory.",NULL 38 %ifndef EXCLUDE_FROM_XTIDECFG 39 g_szEnterNewFileOrDirectory: db "Enter name for new file or directory.",NULL 40 %endif 40 41 41 42 FILE_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 43 g_szFileFormat: db "%16S%4-u %c%cB",LF,NULL 44 g_szDirectoryFormat: db "%16S%s-DIR",LF,NULL 45 g_szSub: db ANGLE_QUOTE_RIGHT,"SUB",NULL 46 g_szUp: db ANGLE_QUOTE_LEFT," UP",NULL 50 47 51 48 g_szSingleItem: ; Used by Dialog.asm for single item line 52 g_szUpdir: 53 db ".." 54 g_szNull: 55 db NULL 49 g_szUpdir: db ".." 50 g_szNull: db NULL -
trunk/Tools/PostCommitHook.cmd
r624 r625 1 1 @echo off 2 if exist ..\CommitInProgress goto NoError1 2 :TryAgain 3 if exist CommitInProgress goto NoError 4 if %6""=="" goto NotCalledFromTSVN 5 if %6=="%cd%" goto FileNotFound 6 cd %6 7 goto TryAgain 8 :NotCalledFromTSVN 9 if "%PreviousCD%"=="%cd%" goto FileNotFound 10 set PreviousCD=%cd% 11 cd.. 12 goto TryAgain 13 :FileNotFound 3 14 echo PostCommitHook was called but no CommitInProgress file could be found!>con 4 15 echo Something is very wrong as this should not happen!>con 5 16 pause<con>con 6 17 exit 1 7 :NoError 18 del ..\CommitInProgress18 :NoError 19 del CommitInProgress 9 20 exit 0 -
trunk/XTIDE_Universal_BIOS/Inc/ModuleDependency.inc
r605 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 17 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 18 ; 19 20 %ifdef USE_PS2 21 %ifndef USE_AT 22 %define USE_AT 23 %endif 24 %endif 19 25 20 26 ; Allow RELOCATE_INT13H_STACK only for AT builds -
trunk/XTIDE_Universal_BIOS/Inc/RamVars.inc
r594 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 20 20 %ifndef RAMVARS_INC 21 21 %define RAMVARS_INC 22 23 ; Segment when RAMVARS is stored to top of interrupt vectors.24 %ifndef USE_AT25 LITE_MODE_RAMVARS_SEGMENT EQU 30h26 %endif27 22 28 23 -
trunk/XTIDE_Universal_BIOS/Inc/Revision.inc
r624 r625 1 62 41 625 -
trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc
r624 r625 5 5 ; 6 6 ; XTIDE Universal BIOS and Associated Tools 7 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.7 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 8 8 ; 9 9 ; This program is free software; you can redistribute it and/or modify … … 133 133 XTCF_DEVICE_OFFSET EQU FIRST_XTCF_DEVICE ; Used for XT-CF device <--> mode conversion 134 134 135 ; Segment when RAMVARS is stored to top of interrupt vectors. 136 LITE_MODE_RAMVARS_SEGMENT EQU 30h 135 137 136 138 ; ROM Variables. Written to the ROM image before flashing. 139 ; The ROMVARS version in Version.inc must be incremented whenever this struc changes. 137 140 struc ROMVARS 138 141 .wRomSign resb 2 ; ROM Signature (AA55h) … … 141 144 142 145 .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 146 150 .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 147 154 .wDisplayMode resb 2 ; Display mode for boot menu 148 155 .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 bar150 156 .bIdeCnt resb 1 ; Number of available IDE controllers 151 157 .bBootDrv resb 1 ; Default drive to boot from -
trunk/XTIDE_Universal_BIOS/Inc/Version.inc
r624 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 19 19 20 20 ; 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 21 24 ; XUB209 Shortened the BIOS version string (ROMVARS.szVersion) and WORD aligned the IDEVARS structures 22 25 ; XUB208 Added option to skip slave drive detection … … 32 35 33 36 %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 35 40 %ifdef USE_386 36 41 %define TITLE_STRING_END "(386)=-" … … 51 56 ; on the same line, either before or after. In fact, do not even put a preceding label on the same line! 52 57 %define BUILD_DATE_STRING "(",__DATE__,")" 53 %define FLASH_SIGNATURE "XUB2 09" ; Do not terminate with NULL58 %define FLASH_SIGNATURE "XUB210" ; Also known as the ROMVARS version. Do not terminate with NULL. 54 59 55 60 -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm
r617 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 303 303 ;-------------------------------------------------------------------- 304 304 ALIGN JUMP_ALIGN 305 IdeCommand_ReadLBAlowRegisterToAL: 305 IdeCommand_ReadLBAlowRegisterToAL: ; Unused entrypoint OK 306 306 ; HOB bit (defined in 48-bit address feature set) should be zero by default 307 307 ; 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 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 50 50 ALIGN JUMP_ALIGN 51 51 IdeTransfer_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 52 60 ; Are we reading or writing? 53 61 test al, 16 ; Bit 4 is cleared on all the read commands but set on 3 of the 4 write commands … … 124 132 ; All sectors successfully transferred 125 133 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 126 140 ret 127 141 … … 133 147 mov cl, [bp+PIOVARS.bSectorsDone] 134 148 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 135 156 %endif 136 157 ret -
trunk/XTIDE_Universal_BIOS/Src/Initialization/AtaID.asm
r618 r625 5 5 ; 6 6 ; XTIDE Universal BIOS and Associated Tools 7 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.7 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 8 8 ; 9 9 ; This program is free software; you can redistribute it and/or modify … … 45 45 pop es 46 46 %endif 47 AtaID_FixIllegalValuesFromESSI: 47 AtaID_FixIllegalValuesFromESSI: ; Unused entrypoint OK 48 48 jc SHORT .Return ; Nothing to fix since failed to read ATA Info 49 49 -
trunk/XTIDE_Universal_BIOS/Src/Main.asm
r624 r625 15 15 ; 16 16 ; XTIDE Universal BIOS and Associated Tools 17 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.17 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 18 18 ; 19 19 ; This program is free software; you can redistribute it and/or modify … … 64 64 65 65 ; ROM variables (must start at offset 0) 66 CNT_ROM_BLOCKS EQU BIOS_SIZE / 512 ; number of 512B blocks, 16 = 8kB BIOS66 CNT_ROM_BLOCKS EQU BIOS_SIZE / 512 ; number of 512B blocks, 16 = 8kB BIOS 67 67 istruc 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 76 79 77 80 ;---------------------------; … … 84 87 at ROMVARS.wFlags, dw FLG_ROMVARS_FULLMODE | MASK_ROMVARS_INCLUDED_MODULES 85 88 %endif 89 at ROMVARS.wRamVars, dw NULL ; Use 'stolen' top of conventional memory by default in Full mode 86 90 at ROMVARS.wDisplayMode, dw DEFAULT_TEXT_MODE 87 91 %ifdef MODULE_BOOT_MENU 88 92 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 91 97 at ROMVARS.bIdeCnt, db 2 ; Number of supported controllers 98 %endif 92 99 at ROMVARS.bBootDrv, db 80h ; Boot Menu default drive 93 100 at ROMVARS.bMinFddCnt, db 0 ; Do not force minimum number of floppy drives … … 99 106 at ROMVARS.ideVars0+IDEVARS.bDevice, db DEVICE_16BIT_ATA 100 107 %ifdef MODULE_IRQ 108 %ifdef USE_PS2 109 at ROMVARS.ideVars0+IDEVARS.bIRQ, db 0 110 %else 101 111 at ROMVARS.ideVars0+IDEVARS.bIRQ, db 14 112 %endif 102 113 %endif 103 114 at ROMVARS.ideVars0+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags, dw DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION) … … 108 119 at ROMVARS.ideVars1+IDEVARS.bDevice, db DEVICE_16BIT_ATA 109 120 %ifdef MODULE_IRQ 121 %ifdef USE_PS2 122 at ROMVARS.ideVars1+IDEVARS.bIRQ, db 0 123 %else 110 124 at ROMVARS.ideVars1+IDEVARS.bIRQ, db 15 125 %endif 111 126 %endif 112 127 at ROMVARS.ideVars1+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags, dw DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION) … … 117 132 at ROMVARS.ideVars2+IDEVARS.bDevice, db DEVICE_16BIT_ATA 118 133 %ifdef MODULE_IRQ 134 %ifdef USE_PS2 135 at ROMVARS.ideVars2+IDEVARS.bIRQ, db 0 136 %else 119 137 at ROMVARS.ideVars2+IDEVARS.bIRQ, db 0 ; Should be 11 on the GSI Inc. Model 2C 138 %endif 120 139 %endif 121 140 at ROMVARS.ideVars2+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags, dw DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION) … … 126 145 at ROMVARS.ideVars3+IDEVARS.bDevice, db DEVICE_16BIT_ATA 127 146 %ifdef MODULE_IRQ 147 %ifdef USE_PS2 148 at ROMVARS.ideVars3+IDEVARS.bIRQ, db 0 149 %else 128 150 at ROMVARS.ideVars3+IDEVARS.bIRQ, db 0 ; Should be 10 on the GSI Inc. Model 2C 151 %endif 129 152 %endif 130 153 at ROMVARS.ideVars3+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags, dw DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION) … … 139 162 ;-----------------------------------; 140 163 at ROMVARS.wFlags, dw MASK_ROMVARS_INCLUDED_MODULES 164 at ROMVARS.wRamVars, dw LITE_MODE_RAMVARS_SEGMENT 141 165 at ROMVARS.wDisplayMode, dw DEFAULT_TEXT_MODE 142 166 %ifdef MODULE_BOOT_MENU 143 167 at ROMVARS.wBootTimeout, dw BOOT_MENU_DEFAULT_TIMEOUT 144 at ROMVARS.pColorTheme, dw ColorTheme ; Offset to the ATTRIBUTE_CHARS struc that holds the color theme145 168 %endif 146 169 at ROMVARS.bIdeCnt, db 1 -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm
r623 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 36 36 push es 37 37 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 43 41 44 LOAD_BDA_SEGMENT_TO ds, ax, ! ; Zero AX42 mov ds, ax 45 43 mov al, [cs:ROMVARS.bStealSize] 46 44 sub [BDA.wBaseMem], ax … … 67 65 ret 68 66 67 69 68 ;-------------------------------------------------------------------- 70 69 ; 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. 73 72 ; 74 73 ; RamVars_GetSegmentToDS … … 82 81 ALIGN JUMP_ALIGN 83 82 RamVars_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 84 87 85 %ifndef USE_AT ; Always in Full Mode for AT builds86 test BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_FULLMODE87 jnz SHORT .GetStolenSegmentToDS88 %ifndef USE_18689 mov di, LITE_MODE_RAMVARS_SEGMENT90 mov ds, di91 %else92 push LITE_MODE_RAMVARS_SEGMENT93 pop ds94 %endif95 ret96 %endif97 98 ALIGN JUMP_ALIGN99 .GetStolenSegmentToDS:100 LOAD_BDA_SEGMENT_TO ds, di101 88 ;%ifdef USE_186 102 89 ; imul di, [BDA.wBaseMem], 64 ; 2 bytes less but slower, especially on 386/486 processors … … 111 98 cmp WORD [RAMVARS.wSignature], RAMVARS_RAM_SIGNATURE 112 99 jne SHORT .LoopStolenKBs ; Loop until sign found (always found eventually) 100 .Return: 113 101 ret 114 102 -
trunk/XTIDE_Universal_BIOS/makefile
r623 r625 44 44 # USE_386 Use instructions supported by 386 and later (defines USE_286) # 45 45 # 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) # 46 47 # USE_UNDOC_INTEL Optimizations for Intel CPUs - do NOT use on NEC V20/V30/Sony CPUs # 47 48 # USE_NEC_V Optimizations for use with NEC V20/V30 CPUs only # … … 118 119 DEFINES_AT = $(DEFINES_COMMON) USE_AT USE_286 MODULE_IRQ MODULE_COMPATIBLE_TABLES 119 120 DEFINES_386 = $(DEFINES_AT) USE_386 MODULE_ADVANCED_ATA MODULE_WIN9X_CMOS_HACK 121 DEFINES_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 120 122 121 123 DEFINES_XT_LARGE = $(DEFINES_XT) $(DEFINES_COMMON_LARGE) … … 123 125 DEFINES_AT_LARGE = $(DEFINES_AT) $(DEFINES_COMMON_LARGE) 124 126 DEFINES_386_LARGE = $(DEFINES_386) $(DEFINES_COMMON_LARGE) 127 DEFINES_PS2_LARGE = $(DEFINES_PS2) MODULE_COMPATIBLE_TABLES 125 128 126 129 DEFINES_XT_TINY = MODULE_STRINGS_COMPRESSED MODULE_8BIT_IDE NO_ATAID_VALIDATION NO_ATAID_CORRECTION CLD_NEEDED … … 144 147 DEFS_XTPLUS = $(DEFINES_XTPLUS:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_SMALL) 145 148 DEFS_AT = $(DEFINES_AT:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_SMALL) 149 DEFS_386 = $(DEFINES_386:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_SMALL) 150 DEFS_PS2 = $(DEFINES_PS2:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_SMALL) 146 151 DEFS_XT_LARGE = $(DEFINES_XT_LARGE:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_LARGE) 147 152 DEFS_XTPLUS_LARGE = $(DEFINES_XTPLUS_LARGE:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_LARGE) 148 153 DEFS_AT_LARGE = $(DEFINES_AT_LARGE:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_LARGE) 154 DEFS_386_LARGE = $(DEFINES_386_LARGE:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_LARGE) 155 DEFS_PS2_LARGE = $(DEFINES_PS2_LARGE:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_LARGE) 149 156 DEFS_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)152 157 DEFS_CUSTOM = $(DEFINES_CUSTOM:%=-D%) -DBIOS_SIZE=$(BIOS_SIZE_CUSTOM) 153 158 … … 191 196 @echo All done! 192 197 193 small: xt_tiny xt xtplus at 386 198 small: xt_tiny xt xtplus at 386 ps2 194 199 @echo All small binaries built! 195 200 196 large: xt_large xtplus_large at_large 386_large 201 large: xt_large xtplus_large at_large 386_large ps2_large 197 202 @echo All large binaries built! 203 204 ps2: 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 208 ps2_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 212 386: 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 216 386_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. 198 219 199 220 at: … … 224 245 @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XT_TINY) -l"$(TARGET)_tiny.lst" -o"$(TARGET)_tiny.bin" 225 246 @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.234 247 235 248 custom: … … 251 264 @perl ..\Tools\checksum.pl $(TARGET)_xtp.bin $(BIOS_SIZE_SMALL) 252 265 @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) 253 268 @perl ..\Tools\checksum.pl $(TARGET)_xtl.bin $(BIOS_SIZE_LARGE) 254 269 @perl ..\Tools\checksum.pl $(TARGET)_xtpl.bin $(BIOS_SIZE_LARGE) 255 270 @perl ..\Tools\checksum.pl $(TARGET)_atl.bin $(BIOS_SIZE_LARGE) 256 @perl ..\Tools\checksum.pl $(TARGET)_386.bin $(BIOS_SIZE_SMALL)257 271 @perl ..\Tools\checksum.pl $(TARGET)_386l.bin $(BIOS_SIZE_LARGE) 272 @perl ..\Tools\checksum.pl $(TARGET)_ps2l.bin $(BIOS_SIZE_LARGE) 258 273 259 274 unused: … … 294 309 @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_386_LARGE) -o"$(TARGET)_unused_386l.asm" -E -DCHECK_FOR_UNUSED_ENTRYPOINTS 295 310 @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 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 312 312 ALIGN JUMP_ALIGN 313 313 Menuitem_GetValueToAXfromMenuitemInDSSI: 314 ; Note! Changes to this procedure might require changes to 315 ; ReadRamVars in ConfigurationMenu.asm as well! 314 316 push es 315 317 push di -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/MenuitemPrint.asm
r592 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 264 264 ALIGN JUMP_ALIGN 265 265 MenuitemPrint_WriteHexValueStringToBufferInESDIfromItemInDSSI: 266 ; Note! Changes to this procedure might require changes to 267 ; ReadRamVars in ConfigurationMenu.asm as well! 266 268 mov bx, di 267 269 mov cx, MAX_VALUE_STRING_LENGTH -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/BootMenuSettingsMenu.asm
r621 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 185 185 186 186 ColorThemeTable: 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. 189 188 ; Classic (default) 190 189 db COLOR_ATTRIBUTE(COLOR_YELLOW, COLOR_BLUE) ; .cBordersAndBackground … … 396 395 loopne .NextTheme 397 396 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 399 398 jne SHORT .SkipCopy 400 399 -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/ConfigurationMenu.asm
r592 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 26 26 at MENUPAGE.fnEnter, dw ConfigurationMenu_EnterMenuOrModifyItemVisibility 27 27 at MENUPAGE.fnBack, dw MainMenu_EnterMenuOrModifyItemVisibility 28 at MENUPAGE.wMenuitems, dw 1 128 at MENUPAGE.wMenuitems, dw 12 29 29 iend 30 30 … … 113 113 at MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup, dw g_rgszValueToStringLookupForFlagBooleans 114 114 at MENUITEM.itemValue + ITEM_VALUE.wValueBitmask, dw FLG_ROMVARS_FULLMODE 115 at MENUITEM.itemValue + ITEM_VALUE.fnValueWriter, dw WriteFullOperatingMode 116 iend 117 118 g_MenuitemConfigurationRamVars: 119 istruc 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 115 133 iend 116 134 … … 122 140 at MENUITEM.szQuickInfo, dw g_szNfoCfgStealSize 123 141 at MENUITEM.szHelp, dw g_szHelpCfgStealSize 124 at MENUITEM.bFlags, db FLG_MENUITEM_ VISIBLE | FLG_MENUITEM_BYTEVALUE142 at MENUITEM.bFlags, db FLG_MENUITEM_BYTEVALUE 125 143 at MENUITEM.bType, db TYPE_MENUITEM_UNSIGNED 126 144 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw ROMVARS.bStealSize … … 199 217 call .EnableIdeControllerMenuitemsBasedOnConfiguration 200 218 call .EnableOrDisableOperatingModeSelection 219 call Buffers_GetRomvarsFlagsToAX 220 call .EnableOrDisableRamVarsSegmentSelection 201 221 call .EnableOrDisableKiBtoStealFromRAM 202 222 call .EnableOrDisableIdleTimeout … … 251 271 mov bx, g_MenuitemConfigurationFullOperatingMode 252 272 call Buffers_IsXTbuildLoaded 253 j eSHORT .EnableMenuitemFromCSBX273 jz SHORT .EnableMenuitemFromCSBX 254 274 jmp SHORT .DisableMenuitemFromCSBX 255 275 256 276 257 277 ;-------------------------------------------------------------------- 258 ; .EnableOrDisable KiBtoStealFromRAM259 ; Parameters: 260 ; SS:BP: Menu handle261 ; Returns:262 ; Nothing263 ; Corrupts registers:264 ; AX, BX265 ; --------------------------------------------------------------------266 ALIGN JUMP_ALIGN 267 .EnableOrDisableKiBtoStealFromRAM: 268 call Buffers_GetRomvarsFlagsToAX 269 mov bx, g_MenuitemConfiguration KiBtoStealFromRAM278 ; .EnableOrDisableRamVarsSegmentSelection 279 ; Parameters: 280 ; AX: ROMVARS.wFlags 281 ; SS:BP: Menu handle 282 ; Returns: 283 ; Nothing 284 ; Corrupts registers: 285 ; BX 286 ;-------------------------------------------------------------------- 287 ALIGN JUMP_ALIGN 288 .EnableOrDisableRamVarsSegmentSelection: 289 mov bx, g_MenuitemConfigurationRamVars 270 290 test al, FLG_ROMVARS_FULLMODE 271 291 jz SHORT .DisableMenuitemFromCSBX … … 274 294 275 295 ;-------------------------------------------------------------------- 296 ; .EnableOrDisableKiBtoStealFromRAM 297 ; Parameters: 298 ; SS:BP: Menu handle 299 ; Returns: 300 ; Nothing 301 ; Corrupts registers: 302 ; BX 303 ;-------------------------------------------------------------------- 304 ALIGN 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 ;-------------------------------------------------------------------- 276 313 ; .EnableOrDisableIdleTimeout 277 314 ; 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 283 321 ;-------------------------------------------------------------------- 284 322 ALIGN JUMP_ALIGN 285 323 .EnableOrDisableIdleTimeout: 286 call Buffers_GetRomvarsFlagsToAX287 324 mov bx, g_MenuitemConfigurationIdleTimeout 288 325 test al, FLG_ROMVARS_MODULE_POWER_MANAGEMENT … … 308 345 .DisableMenuitemFromCSBX: 309 346 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 ;-------------------------------------------------------------------- 360 ALIGN JUMP_ALIGN 361 WriteFullOperatingMode: 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 ;-------------------------------------------------------------------- 382 ALIGN JUMP_ALIGN 383 ReadRamVars: 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 ;-------------------------------------------------------------------- 414 ALIGN JUMP_ALIGN 415 WriteRamVars: 416 inc ax ; FFFF -> 0000 = Disable UMB usage 417 jz SHORT .Return 418 dec ax 419 .Return: 420 ret 310 421 311 422 -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/IdeControllerMenu.asm
r621 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 229 229 dw 'B' 230 230 dw 'C' 231 dw 'x' ; must be last entry (see reader/write routines)231 dw 'x' ; must be last entry (see reader/writer routines) 232 232 g_rgszChoiceToStringLookupForCOM: 233 233 dw g_szValueCfgCOM1 -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/MainMenu.asm
r621 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 292 292 add di, ROMVARS.pColorTheme 293 293 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: 294 316 .FileNotLoaded: 295 317 jmp MainMenu_EnterMenuOrModifyItemVisibility -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm
r624 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 98 98 g_szNfoMainFlash: db "Flash loaded BIOS image to EEPROM.",NULL 99 99 g_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-202 2by XTIDE Universal BIOS Team."100 g_szNfoMainLicense: db "XTIDE Universal BIOS and XTIDECFG Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team." 101 101 db " Released under GNU GPL v2, with ABSOLUTELY NO WARRANTY. Press ENTER for more details...",NULL 102 102 g_szNfoMainHomePage: db "Visit http://xtideuniversalbios.org (home page) and http://forum.vcfed.org (support)",NULL 103 103 104 104 g_szHelpMainLicense: db "XTIDE Universal BIOS and XTIDECFG Configuration program are Copyright 2009-2010 by Tomi Tilli," 105 db " 2011-202 2by 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." 106 106 db " This is free software, and you are welcome to redistribute it under certain conditions." 107 107 db " See the LICENSE.TXT file that was included with this distribution," … … 117 117 g_szItemAutoConfigure: db "Auto Configure",NULL 118 118 g_szItemCfgFullMode: db "Full operating mode",NULL 119 g_szItemCfgRamVars: db "Use UMB for variables",NULL 119 120 g_szItemCfgStealSize: db "kiB to steal from RAM",NULL 120 121 g_szItemCfgIdeCnt: db "IDE controllers",NULL … … 128 129 db "Zenith Data Systems Z-161",LF,LF 129 130 db "The Boot settings menu option 'Remove other hard drives' has been set to YES for this reason.",NULL 131 g_szDlgFomEnabled db "The loaded file does not support Lite mode - Full operating mode has been enabled.",NULL 130 132 g_szDlgCfgFullMode: db "Enable full operating mode?",NULL 133 g_szDlgCfgRamVars: db "Store variables in UMB?",NULL 131 134 g_szDlgCfgStealSize: db "How many kiB of base memory to steal for XTIDE Universal BIOS variables (1...255)?",NULL 132 135 g_szDlgCfgIdeCnt: db "How many IDE controllers to manage (1...4)?",NULL … … 136 139 g_szNfoCfgBootMenu: db "Boot configuration.",NULL 137 140 g_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 141 g_szNfoCfgFullMode: db "Full mode supports up to four controllers and has more features.",NULL 142 g_szNfoCfgRamVars: db "Enter UMB segment address (FFFF=Disable UMB usage and use the top of Conventional memory instead).",NULL 139 143 g_szNfoCfgStealSize: db "How many kiB's to steal from Conventional memory for XTIDE Universal BIOS variables.",NULL 140 144 g_szNfoCfgIdeCnt: db "Number of IDE controllers to manage.",NULL … … 144 148 db " No further action is required. Serial Controllers must be placed at the end of the list.",NULL 145 149 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 150 g_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 149 155 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,LF156 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 152 158 db "Tandy 1000 models with 640 kiB or less memory need to use Lite mode since the top of Conventional memory gets" 153 159 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 165 g_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 172 g_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 159 175 160 176 g_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.