[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
|
---|
[3] | 15 | resb 1 ; For WORD alignment
|
---|
| 16 | endstruc
|
---|
| 17 |
|
---|
| 18 | ; RAM Variables.
|
---|
| 19 | ; Variables should be kept to minimum since they might be located
|
---|
| 20 | ; at the top of interrupt vectors.
|
---|
| 21 | struc RAMVARS
|
---|
[148] | 22 | .fpOldI13h resb 4 ; Far pointer to old INT 13h handler
|
---|
[88] | 23 | .wTimeoutCounter resb 2
|
---|
[150] | 24 | .wSignature resb 2 ; Sign for finding stolen 1 kiB
|
---|
[3] | 25 |
|
---|
| 26 | .wDrvCntAndFirst:
|
---|
[148] | 27 | .bDrvCnt resb 1 ; Number of drives handled by this BIOS
|
---|
| 28 | .bFirstDrv resb 1 ; Number of first drive for this BIOS
|
---|
[3] | 29 |
|
---|
| 30 | ; Variables for drive number translation
|
---|
| 31 | .xlateVars resb XLATEVARS_size
|
---|
| 32 | endstruc
|
---|
| 33 |
|
---|
[150] | 34 | RAMVARS_SIGNATURE EQU "Xu" ; RAMVARS signature for .wSignature
|
---|
| 35 |
|
---|
| 36 |
|
---|
| 37 | struc IDEPACK
|
---|
| 38 | .bDrvAndHead resb 1 ; LBA28 27...24
|
---|
| 39 | .bFeatures resb 1
|
---|
| 40 |
|
---|
| 41 | .wSectorCountAndLbaLow:
|
---|
| 42 | .bSectorCount resb 1
|
---|
| 43 | .bSectorNumber:
|
---|
| 44 | .bLbaLow resb 1 ; LBA 7...0
|
---|
| 45 |
|
---|
| 46 | .wCylinder:
|
---|
| 47 | .wLbaMiddleAndHigh:
|
---|
| 48 | .bLbaMiddle resb 1 ; LBA 15...8
|
---|
| 49 | .bLbaHigh resb 1 ; LBA 23...16
|
---|
| 50 |
|
---|
| 51 | .bCommand resb 1
|
---|
| 52 | .bDeviceControl resb 1 ; Offset 7 shared with PIOVARS
|
---|
| 53 |
|
---|
| 54 | ; Parameters for 48-bit LBA
|
---|
| 55 | .wSectorCountHighAndLbaLowExt:
|
---|
| 56 | .bSectorCountHighExt resb 1 ; LBA48 Sector Count 15...8
|
---|
| 57 | .bLbaLowExt resb 1 ; LBA48 31...24
|
---|
| 58 |
|
---|
| 59 | .wLbaMiddleAndHighExt:
|
---|
| 60 | .bLbaMiddleExt resb 1 ; LBA48 39...32
|
---|
| 61 | .bLbaHighExt resb 1 ; LBA48 47...40
|
---|
| 62 |
|
---|
| 63 | .intpack resb INTPACK_size
|
---|
[3] | 64 | endstruc
|
---|
| 65 |
|
---|
[150] | 66 | EXTRA_WORDS_TO_RESERVE_FOR_INTPACK EQU ((IDEPACK_size - INTPACK_size) / 2)
|
---|
[3] | 67 |
|
---|
| 68 |
|
---|
| 69 | %endif ; RAMVARS_INC
|
---|