source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc@ 176

Last change on this file since 176 was 176, checked in by gregli@…, 13 years ago

Made a module around the EBIOS code, so that it can be turned off to make room for serial code, still enabled by default in the Makefile

File size: 2.8 KB
Line 
1; Project name : XTIDE Universal BIOS
2; Description : Defines for ROMVARS struct containing variables stored
3; in BIOS ROM.
4%ifndef ROMVARS_INC
5%define ROMVARS_INC
6
7; ROM Variables. There are written to ROM image before flashing.
8struc ROMVARS
9 .wRomSign resb 2 ; ROM Signature (AA55h)
10 .bRomSize resb 1 ; ROM size in 512 byte blocks
11 .rgbJump resb 3 ; First instruction to ROM init (jmp)
12
13 .rgbSign resb 8 ; Signature for XTIDE Configurator Program
14 .szTitle resb 31 ; BIOS title string
15 .szVersion resb 25 ; BIOS version string
16
17 .wFlags resb 2 ; Word for ROM flags
18 .wDisplayMode resb 2 ; Display mode for boot menu
19 .wBootTimeout resb 2 ; Boot Menu selection timeout in system timer ticks
20 .bIdeCnt resb 1 ; Number of available IDE controllers
21 .bBootDrv resb 1 ; Boot Menu default drive
22 .bMinFddCnt resb 1 ; Minimum number of Floppy Drives
23 .bStealSize resb 1 ; Number of 1kB blocks stolen from 640kB base RAM
24
25 .ideVars0 resb IDEVARS_size
26 .ideVars1 resb IDEVARS_size
27 .ideVars2 resb IDEVARS_size
28 .ideVars3 resb IDEVARS_size
29
30%ifdef MODULE_SERIAL
31 .ideVarsSerialAuto resb IDEVARS_size
32%endif
33endstruc
34
35; Bit defines for ROMVARS.wFlags
36FLG_ROMVARS_FULLMODE EQU (1<<0) ; Full operating mode (steals base RAM, supports EBIOS etc.)
37FLG_ROMVARS_DRVXLAT EQU (1<<2) ; Enable drive number translation
38
39%ifdef MODULE_SERIAL
40FLG_ROMVARS_MODULE_SERIAL EQU (1<<3)
41%else
42FLG_ROMVARS_MODULE_SERIAL EQU 0
43%endif
44
45%ifdef MODULE_EBIOS
46FLG_ROMVARS_MODULE_EBIOS EQU (1<<4)
47%else
48FLG_ROMVARS_MODULE_EBIOS EQU 0
49%endif
50
51; Boot Menu Display Modes (see Assembly Library Display.inc for standard modes)
52DEFAULT_TEXT_MODE EQU 4
53
54
55; Controller specific variables
56struc IDEVARS
57 .wPort resb 2 ; IDE Base Port for Command Block (usual) Registers
58 .wPortCtrl resb 2 ; IDE Base Port for Control Block Registers
59 .bDevice resb 1 ; Device type
60 .bIRQ resb 1 ; Interrupt Request Number
61 .drvParamsMaster resb DRVPARAMS_size
62 .drvParamsSlave resb DRVPARAMS_size
63endstruc
64
65; Device types for IDEVARS.bDevice
66DEVICE_8BIT_DUAL_PORT_XTIDE EQU (0<<1)
67DEVICE_XTIDE_WITH_REVERSED_A3_AND_A0 EQU (1<<1)
68DEVICE_8BIT_SINGLE_PORT EQU (2<<1)
69DEVICE_16BIT_ATA EQU (3<<1)
70DEVICE_32BIT_ATA EQU (4<<1)
71%ifdef MODULE_SERIAL
72DEVICE_SERIAL_PORT EQU (5<<1)
73%endif
74
75; Master/Slave drive specific parameters
76struc DRVPARAMS
77 .wFlags resb 2 ; Drive flags
78 .wCylinders resb 2 ; User specified cylinders (1...16383)
79 .wHeadsAndSectors:
80 .bHeads resb 1 ; User specified Heads (1...16)
81 .bSect resb 1 ; User specified Sectors per track (1...63)
82endstruc
83
84; Bit defines for DRVPARAMS.wFlags
85FLG_DRVPARAMS_USERCHS EQU (1<<0) ; User specified P-CHS values
86FLG_DRVPARAMS_BLOCKMODE EQU (1<<1) ; Enable Block mode transfers
87
88
89%endif ; ROMVARS_INC
Note: See TracBrowser for help on using the repository browser.