Changeset 262 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Inc/RamVars.inc


Ignore:
Timestamp:
Feb 24, 2012, 10:28:31 AM (12 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

More optimizations. Merged RamVars_IsFunction/DriveHandledByThisBIOS in with FindDPT_ForDriveNumber, since they are often used together, making a returned NULL DI pointer indicate a foreign drive in many places. Revamped the iteration done in the handlers for int13/0dh and int13h/0h. Added serial specific print string during drive detection.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Inc/RamVars.inc

    r258 r262  
    1010; Variables for translating drive numbers.
    1111struc 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
    1612%ifdef MODULE_SERIAL_FLOPPY
    1713    .bFlopCreateCnt:
     
    2319                        resb    1   ; alignment
    2420%endif
     21    .bXlatedDrv         resb    1   ; Drive number after translation
     22    .wFDandHDswap:
     23    .bFDSwap            resb    1   ; Floppy Drive to swap to 00h and vice versa
     24    .bHDSwap            resb    1   ; Hard Drive to swap to 80h and vice versa
    2525endstruc
    2626
     
    3636    .wDrvCntAndFirst:
    3737    .bFirstDrv          resb    1   ; Number of first drive for this BIOS
     38    .wDrvCntAndFlopCnt:             ; Both the hard disk and floppy counts in one word
     39                                    ; (yes, misaligned, but it is only used this way during initialization)
    3840    .bDrvCnt            resb    1   ; Number of drives handled by this BIOS
    3941
     
    4143    .xlateVars      resb    XLATEVARS_size
    4244endstruc
     45
     46%ifdef MODULE_SERIAL_FLOPPY
     47  %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
     48    %if RAMVARS.xlateVars != RAMVARS.bDrvCnt+1 || XLATEVARS.bFlopCreateCnt != 0
     49        %error "bFlopCreateCnt needs to be the first thing in XLATEVARS, and .xlateVars needs to come immediately after .bDrvCnt.  In at least one place, we read .wDrvCntAndFlopCnt to get both counts in one fetch"
     50    %endif
     51  %endif
     52%endif
    4353
    4454RAMVARS_SIGNATURE       EQU "Xu"    ; RAMVARS signature for .wSignature
Note: See TracChangeset for help on using the changeset viewer.