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

Last change on this file since 57 was 57, checked in by Tomi Tilli, 14 years ago

Initial commit (Work in progress).

File size: 2.0 KB
Line 
1; File name : Variables.inc
2; Project name : XTIDE Univeral BIOS Configurator v2
3; Created date : 5.10.2010
4; Last update : 1.11.2010
5; Author : Tomi Tilli
6; Description : Global variables for configuration program.
7%ifndef VARIABLES_INC
8%define VARIABLES_INC
9
10; Equates and defines
11MAX_ALLOWED_IDE_CONTROLLERS EQU 5 ; Maximum number of IDE controllers
12EEPROM_POLLING_TIMEOUT_TICKS EQU 3 ; 1 tick = 54.9 ms
13XTIDE_SIGNATURE_LENGTH EQU 8 ; XTIDE Universal BIOS signature string length
14NUMBER_OF_SUPPORTED_EEPROM_SIZES EQU 5
15MAX_EEPROM_SIZE EQU 65536
16
17
18; Program global variables
19struc CFGVARS
20 .pMenupage resb 2 ; Offset to MENUPAGE to display
21 .wFlags resb 2 ; Program flags
22 .wImageSize resb 2 ; Size in bytes for BIOS image to be flashed (0=65536)
23 .wEepromSegment resb 2 ; Segment where EEPROM is located
24 .bPageSize resb 1 ; EEPROM page size in bytes
25 .bSdpCommand resb 1 ; Command for Software Data Protection
26 .szOpenedFile resb FILENAME_BUFFER_SIZE
27 .flashVars resb FLASHVARS_size
28endstruc
29
30; Bit defines for CFGVARS.wFlags
31FLG_CFGVARS_FILELOADED EQU (1<<0) ; BIOS is loaded from file
32FLG_CFGVARS_ROMLOADED EQU (1<<1) ; BIOS is loaded from EEPROM
33FLG_CFGVARS_UNSAVED EQU (1<<2) ; BIOS has unsaved changes
34FLG_CFGVARS_CHECKSUM EQU (1<<3) ; Generate checksum byte
35
36; SDP command for CFGVARS.bSdpCommand
37CMD_SDP_NONE EQU (0<<1) ; Do not use any SDP command
38CMD_SDP_ENABLE EQU (1<<1) ; Flash with SDP enable command
39CMD_SDP_DISABLE EQU (2<<1) ; Flash with SDP disable command
40
41; Default CFGVARS settings
42DEFAULT_CFGVARS_FLAGS EQU FLG_CFGVARS_CHECKSUM
43DEFAULT_EEPROM_SEGMENT EQU 0D000h
44DEFAULT_PAGE_SIZE EQU 1
45DEFAULT_SDP_COMMAND EQU CMD_SDP_ENABLE
46
47
48; Variables required for flashing
49struc FLASHVARS
50 .wTotalPages resb 2 ; Total number of pages to write
51 .wPagesLeft resb 2 ; Pages left to write
52 .wByteOffset resb 2 ; Offset to byte to write next
53endstruc
54
55
56%endif ; VARIABLES_INC
Note: See TracBrowser for help on using the repository browser.