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

Last change on this file since 404 was 376, checked in by gregli@…, 13 years ago

WIDE checkin... Added copyright and license information to sorce files, as per the GPL instructions for usage.

File size: 3.4 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
31
32
33; Program global variables
34struc CFGVARS
35 .pMenupage resb 2 ; Offset to MENUPAGE to display
36 .wFlags resb 2 ; Program flags
37 .wImageSizeInWords resb 2 ; Size in words for loaded ROM or FILE
38 .wEepromSegment resb 2 ; Segment where EEPROM is located
39 .bEepromType resb 1 ; EEPROM type
40 .bEepromPage resb 1 ; EEPROM page size (EEPROM_PAGE)
41 .bSdpCommand resb 1 ; Command for Software Data Protection
42 resb 1
43 .szOpenedFile resb FILENAME_BUFFER_SIZE
44endstruc
45
46; Bit defines for CFGVARS.wFlags
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
52; EEPROM types
53struc EEPROM_TYPE
54 .2816_2kiB resb 2
55 .2864_8kiB resb 2
56 .2864_8kiB_MOD resb 2 ; Reversed A0 and A3 address lines
57 .28256_32kiB resb 2
58 .28512_64kiB resb 2
59endstruc
60
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
69struc EEPROM_PAGE
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
79; Default CFGVARS settings
80DEFAULT_CFGVARS_FLAGS EQU FLG_CFGVARS_CHECKSUM
81DEFAULT_EEPROM_SEGMENT EQU 0D000h
82DEFAULT_EEPROM_TYPE EQU EEPROM_TYPE.2864_8kiB
83DEFAULT_PAGE_SIZE EQU EEPROM_PAGE.1_byte
84DEFAULT_SDP_COMMAND EQU SDP_COMMAND.enable
85
86
87; Variables required for flashing
88struc FLASHVARS
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
102endstruc
103
104; Flashing results
105struc FLASH_RESULT
106 .success resb 2
107 .PollingTimeoutError resb 2
108 .DataVerifyError resb 2
109endstruc
110
111
112%endif ; VARIABLES_INC
Note: See TracBrowser for help on using the repository browser.