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

Last change on this file since 497 was 497, checked in by aitotat@…, 11 years ago

Changes to Configurator v2:

  • Added Auto Configure.
File size: 3.6 KB
Line 
1; Project name  :   XTIDE Univeral BIOS Configurator v2
2; Description   :   Global variables for configuration program.
3
4;
5; XTIDE Universal BIOS and Associated Tools
6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
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.
12;
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
16; GNU General Public License for more details.     
17; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
18;
19
20%ifndef VARIABLES_INC
21%define VARIABLES_INC
22
23; Equates and defines
24BOOT_MENU_DEFAULT_TIMEOUT           EQU (30 * TICKS_PER_SECOND)
25MAX_ALLOWED_IDE_CONTROLLERS         EQU     4   ; Maximum number of IDE controllers
26MAX_LITE_MODE_CONTROLLERS           EQU     2
27EEPROM_POLLING_TIMEOUT_TICKS        EQU     3   ; 1 tick = 54.9 ms
28XTIDE_SIGNATURE_LENGTH              EQU     8   ; XTIDE Universal BIOS signature string length
29NUMBER_OF_EEPROM_TYPES              EQU     5
30MAX_EEPROM_SIZE_IN_BYTES            EQU     65536
31IDE_PORT_TO_START_DETECTION         EQU 00h     ; Must be zero (not actual port)
32FIRST_MEMORY_SEGMENT_ADDRESS        EQU 0C000h
33
34
35; Program global variables
36struc CFGVARS
37    .pMenupage          resb    2           ; Offset to MENUPAGE to display
38    .wFlags             resb    2           ; Program flags
39    .wImageSizeInWords  resb    2           ; Size in words for loaded ROM or FILE
40    .wEepromSegment     resb    2           ; Segment where EEPROM is located
41    .bEepromType        resb    1           ; EEPROM type
42    .bEepromPage        resb    1           ; EEPROM page size (EEPROM_PAGE)
43    .bSdpCommand        resb    1           ; Command for Software Data Protection
44                        resb    1
45    .szOpenedFile       resb    FILENAME_BUFFER_SIZE
46endstruc
47
48; Bit defines for CFGVARS.wFlags
49FLG_CFGVARS_FILELOADED  EQU     (1<<0)  ; BIOS is loaded from file
50FLG_CFGVARS_ROMLOADED   EQU     (1<<1)  ; BIOS is loaded from EEPROM
51FLG_CFGVARS_UNSAVED     EQU     (1<<2)  ; BIOS has unsaved changes
52FLG_CFGVARS_CHECKSUM    EQU     (1<<3)  ; Generate checksum byte
53
54; EEPROM types
55struc EEPROM_TYPE
56    .2816_2kiB          resb    2
57    .2864_8kiB          resb    2
58    .2864_8kiB_MOD      resb    2   ; Reversed A0 and A3 address lines
59    .28256_32kiB        resb    2
60    .28512_64kiB        resb    2
61endstruc
62
63; Software Data Protection commands
64struc SDP_COMMAND
65    .none               resb    2   ; Do not use any SDP command
66    .enable             resb    2   ; Flash with SDP enable command
67    .disable            resb    2   ; Flash with SDP disable command
68endstruc
69
70; Page sizes
71struc EEPROM_PAGE
72    .1_byte             resb    2
73    .2_bytes            resb    2
74    .4_bytes            resb    2
75    .8_bytes            resb    2
76    .16_bytes           resb    2
77    .32_bytes           resb    2
78    .64_bytes           resb    2
79endstruc
80
81; Default CFGVARS settings
82DEFAULT_CFGVARS_FLAGS   EQU     FLG_CFGVARS_CHECKSUM
83DEFAULT_EEPROM_SEGMENT  EQU     0D000h
84DEFAULT_EEPROM_TYPE     EQU     EEPROM_TYPE.2864_8kiB
85DEFAULT_PAGE_SIZE       EQU     EEPROM_PAGE.1_byte
86DEFAULT_SDP_COMMAND     EQU     SDP_COMMAND.enable
87
88
89; Variables required for flashing
90struc FLASHVARS
91    .fpNextSourcePage           resb    4
92    .fpNextComparisonPage       resb    4
93    .fpNextDestinationPage      resb    4
94    .wPagesToFlash              resb    2   ; 0 = 65536
95    .wEepromPageSize            resb    2   ; 1, 2, 4, 8, 16, 32 or 64
96    .bEepromSdpCommand          resb    1
97    .bEepromType                resb    1
98
99    .wProgressUpdateParam       resb    2
100    .wTimeoutCounter            resb    2
101    .wLastOffsetWritten         resb    2
102    .bLastByteWritten           resb    1
103    .flashResult                resb    1
104endstruc
105
106; Flashing results
107struc FLASH_RESULT
108    .success                    resb    2
109    .PollingTimeoutError        resb    2
110    .DataVerifyError            resb    2
111endstruc
112
113
114%endif ; VARIABLES_INC
Note: See TracBrowser for help on using the repository browser.