source: xtideuniversalbios/trunk/Configurator/Inc/Variables.inc@ 480

Last change on this file since 480 was 2, checked in by Tomi Tilli, 15 years ago
File size: 2.3 KB
Line 
1; File name : Variables.inc
2; Project name : XTIDE Univeral BIOS Configurator
3; Created date : 16.4.2010
4; Last update : 2.5.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
11WIDTH_MENU EQU 38 ; Menu width in characters
12WIDTH_DLG EQU 34 ; Dialog width in characters
13CNT_TITLE_LINES EQU 4 ; Number of title lines at the top of menu
14CNT_INFO_LINES EQU 6 ; Number of information lines at the bottom of menu
15CNT_TMEOUT_POLL EQU 3 ; EEPROM polling timeout (3 = 110...165ms)
16CNT_MAX_CTRLS EQU 5 ; Maximum number of IDE controllers
17HEIGHT_MIN_BOOTMNU EQU 8 ; Boot menu minimum height
18HEIGHT_MAX_BOOTMNU EQU 25 ; Boot menu maximum height
19LEN_SIGNATURE EQU 8 ; XTIDE Universal BIOS signature string length
20MAX_EEPROM_SIZE EQU 16384
21
22
23; Program global variables
24struc CFGVARS
25 .wFlags resb 2 ; Program flags
26 .wEepromSize resb 2 ; Size in bytes for EEPROM to be flashed
27 .wEepromSegment resb 2 ; Segment where EEPROM is located
28 .bPageSize resb 1 ; EEPROM page size in bytes
29 .bSdpCommand resb 1 ; Command for Software Data Protection
30 .bMenuCnt resb 1 ; Number of opened menus
31 resb 1
32 .flashVars resb FLASHVARS_size
33
34 ; EEPROM buffers
35 .rgbEepromBuffers resb MAX_EEPROM_SIZE * 2
36endstruc
37
38; Bit defines for CFGVARS.wFlags
39FLG_CFGVARS_FILELOADED EQU (1<<0) ; BIOS is loaded from file
40FLG_CFGVARS_ROMLOADED EQU (1<<1) ; BIOS is loaded from EEPROM
41FLG_CFGVARS_HIDEINFO EQU (1<<2) ; Hide menu information (FLG_MNU_HIDENFO)
42FLG_CFGVARS_UNSAVED EQU (1<<3) ; BIOS has unsaved changes
43FLG_CFGVARS_CHECKSUM EQU (1<<4) ; Generate checksum byte
44
45; SDP command for CFGVARS.bSdpCommand
46CMD_SDP_NONE EQU (0<<1) ; Do not use any SDP command
47CMD_SDP_ENABLE EQU (1<<1) ; Flash with SDP enable command
48CMD_SDP_DISABLE EQU (2<<1) ; Flash with SDP disable command
49
50
51; Variables required for flashing
52struc FLASHVARS
53 .wTotalPages resb 2 ; Total number of pages to write
54 .wPagesLeft resb 2 ; Pages left to write
55 .wPagesBeforeDraw resb 2 ; Number of pages to write before updating progress bar
56 .wByteOffset resb 2 ; Offset to byte to write next
57endstruc
58
59
60; Shortcuts to structs
61%define G_ROMVARS g_cfgVars+CFGVARS.rgbNewROM
62
63
64%endif ; VARIABLES_INC
Note: See TracBrowser for help on using the repository browser.