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
|
---|
11 | MAX_ALLOWED_IDE_CONTROLLERS EQU 5 ; Maximum number of IDE controllers
|
---|
12 | EEPROM_POLLING_TIMEOUT_TICKS EQU 3 ; 1 tick = 54.9 ms
|
---|
13 | XTIDE_SIGNATURE_LENGTH EQU 8 ; XTIDE Universal BIOS signature string length
|
---|
14 | NUMBER_OF_SUPPORTED_EEPROM_SIZES EQU 5
|
---|
15 | MAX_EEPROM_SIZE EQU 65536
|
---|
16 |
|
---|
17 |
|
---|
18 | ; Program global variables
|
---|
19 | struc 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
|
---|
28 | endstruc
|
---|
29 |
|
---|
30 | ; Bit defines for CFGVARS.wFlags
|
---|
31 | FLG_CFGVARS_FILELOADED EQU (1<<0) ; BIOS is loaded from file
|
---|
32 | FLG_CFGVARS_ROMLOADED EQU (1<<1) ; BIOS is loaded from EEPROM
|
---|
33 | FLG_CFGVARS_UNSAVED EQU (1<<2) ; BIOS has unsaved changes
|
---|
34 | FLG_CFGVARS_CHECKSUM EQU (1<<3) ; Generate checksum byte
|
---|
35 |
|
---|
36 | ; SDP command for CFGVARS.bSdpCommand
|
---|
37 | CMD_SDP_NONE EQU (0<<1) ; Do not use any SDP command
|
---|
38 | CMD_SDP_ENABLE EQU (1<<1) ; Flash with SDP enable command
|
---|
39 | CMD_SDP_DISABLE EQU (2<<1) ; Flash with SDP disable command
|
---|
40 |
|
---|
41 | ; Default CFGVARS settings
|
---|
42 | DEFAULT_CFGVARS_FLAGS EQU FLG_CFGVARS_CHECKSUM
|
---|
43 | DEFAULT_EEPROM_SEGMENT EQU 0D000h
|
---|
44 | DEFAULT_PAGE_SIZE EQU 1
|
---|
45 | DEFAULT_SDP_COMMAND EQU CMD_SDP_ENABLE
|
---|
46 |
|
---|
47 |
|
---|
48 | ; Variables required for flashing
|
---|
49 | struc 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
|
---|
53 | endstruc
|
---|
54 |
|
---|
55 |
|
---|
56 | %endif ; VARIABLES_INC
|
---|