[88] | 1 | ; Project name : XTIDE Universal BIOS
|
---|
[3] | 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.
|
---|
[150] | 7 | LITE_MODE_RAMVARS_SEGMENT EQU 30h
|
---|
[3] | 8 |
|
---|
| 9 |
|
---|
| 10 | ; Variables for translating drive numbers.
|
---|
| 11 | struc XLATEVARS
|
---|
| 12 | .bFDSwap resb 1 ; Floppy Drive to swap to 00h and vice versa
|
---|
| 13 | .bHDSwap resb 1 ; Hard Drive to swap to 80h and vice versa
|
---|
[148] | 14 | .bXlatedDrv resb 1 ; Drive number after translation
|
---|
[203] | 15 | %ifdef MODULE_SERIAL
|
---|
| 16 | .bLastSerial resb 1 ; Packed Port and Baud for last serial drive detected
|
---|
| 17 | ; (using space of an alignment byte,
|
---|
| 18 | ; used during and after boot (int13/25h case))
|
---|
| 19 | %else
|
---|
| 20 | resb 1 ; alignment
|
---|
| 21 | %endif
|
---|
[3] | 22 | endstruc
|
---|
| 23 |
|
---|
| 24 | ; RAM Variables.
|
---|
| 25 | ; Variables should be kept to minimum since they might be located
|
---|
| 26 | ; at the top of interrupt vectors.
|
---|
| 27 | struc RAMVARS
|
---|
[148] | 28 | .fpOldI13h resb 4 ; Far pointer to old INT 13h handler
|
---|
[150] | 29 | .wSignature resb 2 ; Sign for finding stolen 1 kiB
|
---|
[155] | 30 | .bTimeoutTicksLeft resb 1
|
---|
| 31 | .bLastTimeoutUpdate resb 1
|
---|
[3] | 32 |
|
---|
| 33 | .wDrvCntAndFirst:
|
---|
[148] | 34 | .bDrvCnt resb 1 ; Number of drives handled by this BIOS
|
---|
| 35 | .bFirstDrv resb 1 ; Number of first drive for this BIOS
|
---|
[3] | 36 |
|
---|
| 37 | ; Variables for drive number translation
|
---|
| 38 | .xlateVars resb XLATEVARS_size
|
---|
| 39 | endstruc
|
---|
| 40 |
|
---|
[150] | 41 | RAMVARS_SIGNATURE EQU "Xu" ; RAMVARS signature for .wSignature
|
---|
| 42 |
|
---|
[179] | 43 | ;
|
---|
| 44 | ; IDEPACK NOTE: The first six bytes of this structure are directly put on the
|
---|
| 45 | ; wire for MODULE_SERIAL, please do not change the order or insert other members.
|
---|
| 46 | ;
|
---|
[150] | 47 | struc IDEPACK
|
---|
[179] | 48 | .bFeatures resb 1
|
---|
[150] | 49 | .bDrvAndHead resb 1 ; LBA28 27...24
|
---|
| 50 |
|
---|
| 51 | .wSectorCountAndLbaLow:
|
---|
| 52 | .bSectorCount resb 1
|
---|
| 53 | .bSectorNumber:
|
---|
| 54 | .bLbaLow resb 1 ; LBA 7...0
|
---|
| 55 |
|
---|
| 56 | .wCylinder:
|
---|
| 57 | .wLbaMiddleAndHigh:
|
---|
| 58 | .bLbaMiddle resb 1 ; LBA 15...8
|
---|
| 59 | .bLbaHigh resb 1 ; LBA 23...16
|
---|
| 60 |
|
---|
| 61 | .bCommand resb 1
|
---|
| 62 | .bDeviceControl resb 1 ; Offset 7 shared with PIOVARS
|
---|
| 63 |
|
---|
| 64 | ; Parameters for 48-bit LBA
|
---|
[169] | 65 | .wSectorCountHighAndLbaLowExt:
|
---|
| 66 | .bSectorCountHighExt resb 1
|
---|
[150] | 67 | .bLbaLowExt resb 1 ; LBA48 31...24
|
---|
| 68 |
|
---|
| 69 | .wLbaMiddleAndHighExt:
|
---|
| 70 | .bLbaMiddleExt resb 1 ; LBA48 39...32
|
---|
| 71 | .bLbaHighExt resb 1 ; LBA48 47...40
|
---|
| 72 |
|
---|
| 73 | .intpack resb INTPACK_size
|
---|
[3] | 74 | endstruc
|
---|
| 75 |
|
---|
[155] | 76 | EXTRA_BYTES_FOR_INTPACK EQU (IDEPACK_size - INTPACK_size)
|
---|
[3] | 77 |
|
---|
| 78 |
|
---|
| 79 | %endif ; RAMVARS_INC
|
---|