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

Last change on this file since 59 was 59, checked in by aitotat, 13 years ago

Changes to Configuration Program v2:

  • Menu structure should now be complete.
File size: 2.4 KB
Line 
1; File name     :   Variables.inc
2; Project name  :   XTIDE Univeral BIOS Configurator v2
3; Created date  :   5.10.2010
4; Last update   :   19.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    .bEepromType        resb    1           ; EEPROM type
25    .bEepromPageSize    resb    1           ; EEPROM page size in bytes
26    .bSdpCommand        resb    1           ; Command for Software Data Protection
27                        resb    1
28    .szOpenedFile       resb    FILENAME_BUFFER_SIZE
29    .flashVars          resb    FLASHVARS_size
30endstruc
31
32; Bit defines for CFGVARS.wFlags
33FLG_CFGVARS_FILELOADED  EQU     (1<<0)  ; BIOS is loaded from file
34FLG_CFGVARS_ROMLOADED   EQU     (1<<1)  ; BIOS is loaded from EEPROM
35FLG_CFGVARS_UNSAVED     EQU     (1<<2)  ; BIOS has unsaved changes
36FLG_CFGVARS_CHECKSUM    EQU     (1<<3)  ; Generate checksum byte
37
38; EEPROM types
39struc EEPROM_TYPE
40    .2816_2kiB          resb    2
41    .2832_4kiB          resb    2
42    .2864_8kiB          resb    2
43    .28128_16kiB        resb    2
44    .28256_32kiB        resb    2
45    .28512_64kiB        resb    2
46endstruc
47
48; Software Data Protection commands
49struc SDP_COMMAND
50    .none               resb    2   ; Do not use any SDP command
51    .enable             resb    2   ; Flash with SDP enable command
52    .disable            resb    2   ; Flash with SDP disable command
53endstruc
54
55; Page sizes
56struc EEPROM_PAGE_SIZE
57    .1_byte             resb    2
58    .2_bytes            resb    2
59    .4_bytes            resb    2
60    .8_bytes            resb    2
61    .16_bytes           resb    2
62    .32_bytes           resb    2
63    .64_bytes           resb    2
64endstruc
65
66; Default CFGVARS settings
67DEFAULT_CFGVARS_FLAGS   EQU     FLG_CFGVARS_CHECKSUM
68DEFAULT_EEPROM_SEGMENT  EQU     0D000h
69DEFAULT_PAGE_SIZE       EQU     EEPROM_PAGE_SIZE.1_byte
70DEFAULT_SDP_COMMAND     EQU     SDP_COMMAND.enable
71
72
73; Variables required for flashing
74struc FLASHVARS
75    .wTotalPages        resb    2       ; Total number of pages to write
76    .wPagesLeft         resb    2       ; Pages left to write
77    .wByteOffset        resb    2       ; Offset to byte to write next
78endstruc
79
80
81%endif ; VARIABLES_INC
Note: See TracBrowser for help on using the repository browser.