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 |
---|
11 | WIDTH_MENU EQU 38 ; Menu width in characters |
---|
12 | WIDTH_DLG EQU 34 ; Dialog width in characters |
---|
13 | CNT_TITLE_LINES EQU 4 ; Number of title lines at the top of menu |
---|
14 | CNT_INFO_LINES EQU 6 ; Number of information lines at the bottom of menu |
---|
15 | CNT_TMEOUT_POLL EQU 3 ; EEPROM polling timeout (3 = 110...165ms) |
---|
16 | CNT_MAX_CTRLS EQU 5 ; Maximum number of IDE controllers |
---|
17 | HEIGHT_MIN_BOOTMNU EQU 8 ; Boot menu minimum height |
---|
18 | HEIGHT_MAX_BOOTMNU EQU 25 ; Boot menu maximum height |
---|
19 | LEN_SIGNATURE EQU 8 ; XTIDE Universal BIOS signature string length |
---|
20 | MAX_EEPROM_SIZE EQU 16384 |
---|
21 | |
---|
22 | |
---|
23 | ; Program global variables |
---|
24 | struc 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 |
---|
36 | endstruc |
---|
37 | |
---|
38 | ; Bit defines for CFGVARS.wFlags |
---|
39 | FLG_CFGVARS_FILELOADED EQU (1<<0) ; BIOS is loaded from file |
---|
40 | FLG_CFGVARS_ROMLOADED EQU (1<<1) ; BIOS is loaded from EEPROM |
---|
41 | FLG_CFGVARS_HIDEINFO EQU (1<<2) ; Hide menu information (FLG_MNU_HIDENFO) |
---|
42 | FLG_CFGVARS_UNSAVED EQU (1<<3) ; BIOS has unsaved changes |
---|
43 | FLG_CFGVARS_CHECKSUM EQU (1<<4) ; Generate checksum byte |
---|
44 | |
---|
45 | ; SDP command for CFGVARS.bSdpCommand |
---|
46 | CMD_SDP_NONE EQU (0<<1) ; Do not use any SDP command |
---|
47 | CMD_SDP_ENABLE EQU (1<<1) ; Flash with SDP enable command |
---|
48 | CMD_SDP_DISABLE EQU (2<<1) ; Flash with SDP disable command |
---|
49 | |
---|
50 | |
---|
51 | ; Variables required for flashing |
---|
52 | struc 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 |
---|
57 | endstruc |
---|
58 | |
---|
59 | |
---|
60 | ; Shortcuts to structs |
---|
61 | %define G_ROMVARS g_cfgVars+CFGVARS.rgbNewROM |
---|
62 | |
---|
63 | |
---|
64 | %endif ; VARIABLES_INC |
---|