source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/Variables.inc@ 600

Last change on this file since 600 was 592, checked in by Krister Nordvall, 6 years ago

Changes:

  • The problem with NASM in the previous revision (r591) has been fixed.
  • The colors used by the boot menu and hotkey bar can now be customized by selecting one of a number of pre-defined color themes. Suggestions for additional themes are more than welcome!
  • Large builds are now 10 KB. Small builds are still 8 KB with the exception of the Tiny build which is now 4 KB. In other words, builds are now as small as possible to make it easier to combine them with other BIOSes.
  • Added code to the library to improve drive error handling. XTIDECFG can now handle "Drive Not Ready" errors.
  • Fixed a couple of potential bugs in AtaID.asm (AtaID_GetMaxPioModeToAXandMinCycleTimeToCX); 1) ATA1.bPioMode was treated as a WORD variable. 2) ATA2.bPIOSupp was assumed to be non-zero which would result in PIO mode 3 being returned if the assumption was wrong.
  • Made the same changes in the equivalent function used by BIOSDRVS (DisplayPioModeInformationUsingAtaInfoFromDSBX in AtaInfo.asm).
  • Fixed a bug from r587 in PDC20x30.asm in PDC20x30_GetMaxPioModeToALandMinPioCycleTimeToBX.
  • Fixed a bug from r523 in XTIDECFG where Auto Configure would only set the IRQ on one IDE interface on AT-builds.
  • XTIDECFG will now restore the default settings for the "Serial port virtual device" when reselecting it in the list of device types. This makes it behave consistently for all device types.
  • The eAAM macro is now used regardless if USE_UNDOC_INTEL is defined or not because it is apparently supported on all processors including the NEC V20/V30 CPUs.
  • Renamed the EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS define to EXCLUDE_FROM_XUB.
  • Added a define to exclude unused library code from BIOSDRVS (EXCLUDE_FROM_BIOSDRVS). This makes it a lot smaller than in previous revisions.
  • All unnecessary CLD-instructions are now under a new define 'CLD_NEEDED' which is only enabled for the BIOS. It is disabled for XTIDECFG and BIOSDRVS but can be enabled if needed by adding this define to the respective makefile. This change was made because these unnecessary instructions are wasteful and should never be needed. In fact, they only serve to hide bugs (in other peoples code) which I strongly believe should be avoided. I recommend people making their own BIOSes from source to not use this define as it's extremely unlikely to be needed.
  • Updated the copyright info in SerDrive and changed an URL to point to the new site.
  • Updated the copyright info and version number in BIOSDRVS.
  • Updated the copyright info in XTIDECFG.
  • Optimizations in general.
File size: 3.6 KB
RevLine 
[57]1; Project name : XTIDE Univeral BIOS Configurator v2
2; Description : Global variables for configuration program.
[376]3
4;
[526]5; XTIDE Universal BIOS and Associated Tools
6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
[376]7;
8; This program is free software; you can redistribute it and/or modify
9; it under the terms of the GNU General Public License as published by
10; the Free Software Foundation; either version 2 of the License, or
11; (at your option) any later version.
[526]12;
[376]13; This program is distributed in the hope that it will be useful,
14; but WITHOUT ANY WARRANTY; without even the implied warranty of
15; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
[526]16; GNU General Public License for more details.
[376]17; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
18;
19
[57]20%ifndef VARIABLES_INC
21%define VARIABLES_INC
22
23; Equates and defines
[583]24BOOT_MENU_DEFAULT_TIMEOUT EQU (TICKS_PER_MINUTE / 2)
[109]25MAX_ALLOWED_IDE_CONTROLLERS EQU 4 ; Maximum number of IDE controllers
[153]26MAX_LITE_MODE_CONTROLLERS EQU 2
[57]27EEPROM_POLLING_TIMEOUT_TICKS EQU 3 ; 1 tick = 54.9 ms
28XTIDE_SIGNATURE_LENGTH EQU 8 ; XTIDE Universal BIOS signature string length
[159]29NUMBER_OF_EEPROM_TYPES EQU 5
[68]30MAX_EEPROM_SIZE_IN_BYTES EQU 65536
[57]31
32
33; Program global variables
34struc CFGVARS
35 .pMenupage resb 2 ; Offset to MENUPAGE to display
[592]36 .wFlags resb 2 ; Program flags - Only the low byte is used currently and code depend on this
[65]37 .wImageSizeInWords resb 2 ; Size in words for loaded ROM or FILE
[57]38 .wEepromSegment resb 2 ; Segment where EEPROM is located
[59]39 .bEepromType resb 1 ; EEPROM type
[65]40 .bEepromPage resb 1 ; EEPROM page size (EEPROM_PAGE)
[57]41 .bSdpCommand resb 1 ; Command for Software Data Protection
[59]42 resb 1
[57]43 .szOpenedFile resb FILENAME_BUFFER_SIZE
44endstruc
45
[592]46; Bit defines for CFGVARS.wFlags (changes here might require changes elsewhere)
[57]47FLG_CFGVARS_FILELOADED EQU (1<<0) ; BIOS is loaded from file
48FLG_CFGVARS_ROMLOADED EQU (1<<1) ; BIOS is loaded from EEPROM
49FLG_CFGVARS_UNSAVED EQU (1<<2) ; BIOS has unsaved changes
50FLG_CFGVARS_CHECKSUM EQU (1<<3) ; Generate checksum byte
51
[59]52; EEPROM types
53struc EEPROM_TYPE
54 .2816_2kiB resb 2
55 .2864_8kiB resb 2
[159]56 .2864_8kiB_MOD resb 2 ; Reversed A0 and A3 address lines
[59]57 .28256_32kiB resb 2
58 .28512_64kiB resb 2
59endstruc
[57]60
[59]61; Software Data Protection commands
62struc SDP_COMMAND
63 .none resb 2 ; Do not use any SDP command
64 .enable resb 2 ; Flash with SDP enable command
65 .disable resb 2 ; Flash with SDP disable command
66endstruc
67
68; Page sizes
[65]69struc EEPROM_PAGE
[59]70 .1_byte resb 2
71 .2_bytes resb 2
72 .4_bytes resb 2
73 .8_bytes resb 2
74 .16_bytes resb 2
75 .32_bytes resb 2
76 .64_bytes resb 2
77endstruc
78
[57]79; Default CFGVARS settings
80DEFAULT_CFGVARS_FLAGS EQU FLG_CFGVARS_CHECKSUM
81DEFAULT_EEPROM_SEGMENT EQU 0D000h
[63]82DEFAULT_EEPROM_TYPE EQU EEPROM_TYPE.2864_8kiB
[65]83DEFAULT_PAGE_SIZE EQU EEPROM_PAGE.1_byte
[59]84DEFAULT_SDP_COMMAND EQU SDP_COMMAND.enable
[57]85
86
87; Variables required for flashing
88struc FLASHVARS
[65]89 .fpNextSourcePage resb 4
90 .fpNextComparisonPage resb 4
91 .fpNextDestinationPage resb 4
92 .wPagesToFlash resb 2 ; 0 = 65536
93 .wEepromPageSize resb 2 ; 1, 2, 4, 8, 16, 32 or 64
94 .bEepromSdpCommand resb 1
95 .bEepromType resb 1
96
97 .wProgressUpdateParam resb 2
98 .wTimeoutCounter resb 2
99 .wLastOffsetWritten resb 2
100 .bLastByteWritten resb 1
101 .flashResult resb 1
[57]102endstruc
103
[65]104; Flashing results
105struc FLASH_RESULT
106 .success resb 2
107 .PollingTimeoutError resb 2
108 .DataVerifyError resb 2
109endstruc
[57]110
[65]111
[57]112%endif ; VARIABLES_INC
Note: See TracBrowser for help on using the repository browser.