source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Inc/RamVars.inc @ 258

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

Added floppy drive emulation over the serial connection (MODULE_SERIAL_FLOPPY). Along the way, various optimizations were made to stay within the 8K ROM size target. Also, serial code now returns the number of sectors transferred.

File size: 2.4 KB
Line 
1; Project name  :   XTIDE Universal BIOS
2; Description   :   RAMVARS struct containing BIOS variables stored in RAM.
3%ifndef RAMVARS_INC
4%define RAMVARS_INC
5
6; Segment when RAMVARS is stored to top of interrupt vectors.
7LITE_MODE_RAMVARS_SEGMENT   EQU     30h
8
9
10; Variables for translating drive numbers.
11struc XLATEVARS
12    .wFDandHDswap:
13    .bFDSwap            resb    1   ; Floppy Drive to swap to 00h and vice versa
14    .bHDSwap            resb    1   ; Hard Drive to swap to 80h and vice versa
15    .bXlatedDrv         resb    1   ; Drive number after translation
16%ifdef MODULE_SERIAL_FLOPPY
17    .bFlopCreateCnt:
18    .bFlopCntAndFirst   resb    1   ; Normally, packed starting floppy drive number (high order 7 bits)
19                                    ; and number of drives (low order bit, max 2 drives supported).
20                                    ; During initialization, until the end of DetectDrives_FromAllIDEControllers,
21                                    ; this byte contains the raw number of floppy drives seen (using .bFlopCreateCnt)
22%else
23                        resb    1   ; alignment
24%endif
25endstruc
26
27; RAM Variables.
28; Variables should be kept to minimum since they might be located
29; at the top of interrupt vectors.
30struc RAMVARS
31    .fpOldI13h          resb    4   ; Far pointer to old INT 13h handler
32    .wSignature         resb    2   ; Sign for finding stolen 1 kiB
33    .bTimeoutTicksLeft  resb    1
34    .bLastTimeoutUpdate resb    1
35
36    .wDrvCntAndFirst:
37    .bFirstDrv          resb    1   ; Number of first drive for this BIOS
38    .bDrvCnt            resb    1   ; Number of drives handled by this BIOS
39
40    ; Variables for drive number translation
41    .xlateVars      resb    XLATEVARS_size
42endstruc
43
44RAMVARS_SIGNATURE       EQU "Xu"    ; RAMVARS signature for .wSignature
45
46;
47; IDEPACK NOTE: The first six bytes of this structure are directly put on the
48; wire for MODULE_SERIAL, please do not change the order or insert other members.
49;
50struc IDEPACK
51    .bFeatures              resb    1
52    .bDrvAndHead            resb    1   ; LBA28 27...24
53
54    .wSectorCountAndLbaLow:
55    .bSectorCount           resb    1
56    .bSectorNumber:
57    .bLbaLow                resb    1   ; LBA 7...0
58
59    .wCylinder:
60    .wLbaMiddleAndHigh:
61    .bLbaMiddle             resb    1   ; LBA 15...8
62    .bLbaHigh               resb    1   ; LBA 23...16
63
64    .bCommand               resb    1
65    .bDeviceControl         resb    1   ; Offset 7 shared with PIOVARS
66                            resb    1
67
68    ; Parameters for 48-bit LBA
69    .bLbaLowExt             resb    1   ; LBA48 31...24
70    .wLbaMiddleAndHighExt:
71    .bLbaMiddleExt          resb    1   ; LBA48 39...32
72    .bLbaHighExt            resb    1   ; LBA48 47...40
73
74    .intpack                resb    INTPACK_size
75endstruc
76
77EXTRA_BYTES_FOR_INTPACK     EQU (IDEPACK_size - INTPACK_size)
78
79
80%endif ; RAMVARS_INC
Note: See TracBrowser for help on using the repository browser.