Changeset 397 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs


Ignore:
Timestamp:
Apr 19, 2012, 11:11:41 AM (12 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Cleaned some code concerning recent module changes.
  • Removed drive number translation flag from ROMVARS.
  • BOOTMENUINFO is now DRVDETECTINFO.
  • Makefile now builds tiny binary (XT build with minimal features).
Location:
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/BootVars.asm

    r395 r397  
    3333BootVars_Initialize:
    3434    ; Clear to zero
    35     mov     al, BOOTMENUINFO_size
     35    mov     al, DRVDETECTINFO_size
    3636    mul     BYTE [cs:ROMVARS.bIdeCnt]
    37     mov     di, BOOTVARS.hotkeyVars ; We must not initialize anything before this!
     37    mov     di, BOOTVARS.clearToZeroFromThisPoint   ; We must not initialize anything before this!
    3838    add     ax, BOOTVARS_size
    3939    sub     ax, di
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/DrvDetectInfo.asm

    r395 r397  
    2323
    2424;--------------------------------------------------------------------
    25 ; Creates new BOOTMENUINFO struct for detected hard disk.
     25; Creates new DRVDETECTINFO struct for detected hard disk.
    2626;
    27 ; BootMenuInfo_CreateForHardDisk
     27; DriveDetectInfo_CreateForHardDisk
    2828;   Parameters:
    2929;       DL:     Drive number
     
    3131;       ES:SI:  Ptr to 512-byte ATA information read from the drive
    3232;   Returns:
    33 ;       ES:BX:  Ptr to BOOTMENUINFO (if successful)
     33;       ES:BX:  Ptr to DRVDETECTINFO (if successful)
    3434;   Corrupts registers:
    3535;       AX, BX, CX, DX, DI
    3636;--------------------------------------------------------------------
    37 BootMenuInfo_CreateForHardDisk:
    38     call    BootMenuInfo_ConvertDPTtoBX         ; ES:BX now points to new BOOTMENUINFO
     37DriveDetectInfo_CreateForHardDisk:
     38    call    DriveDetectInfo_ConvertDPTtoBX      ; ES:BX now points to new DRVDETECTINFO
    3939
    4040    ; Store Drive Name
     
    4646
    4747    add     si, BYTE ATA1.strModel              ; DS:SI now points drive name
    48     lea     di, [bx+BOOTMENUINFO.szDrvName]     ; ES:DI now points to name destination
     48    lea     di, [bx+DRVDETECTINFO.szDrvName]        ; ES:DI now points to name destination
    4949    mov     cx, MAX_HARD_DISK_NAME_LENGTH / 2   ; Max number of WORDs allowed
    5050.CopyNextWord:
     
    6363
    6464;--------------------------------------------------------------------
    65 ; BootMenuInfo_GetTotalSectorCount
    66 ;   Parameters:
    67 ;       DS:DI:      DPT Pointer
    68 ;   Returns:
    69 ;       BX:DX:AX:   48-bit sector count
    70 ;   Corrupts registers:
    71 ;       CX
    72 ;--------------------------------------------------------------------
    73 %ifdef MODULE_BOOT_MENU
    74 BootMenuInfo_GetTotalSectorCount:
    75     test    BYTE [di+DPT.bFlagsLow], FLG_DRVNHEAD_LBA
    76     jnz     SHORT .ReturnFullCapacity
    77     jmp     AH15h_GetSectorCountToBXDXAX
    78 .ReturnFullCapacity:
    79     jmp     AccessDPT_GetLbaSectorCountToBXDXAX
    80 %endif
    81 
    82 
    83 ;--------------------------------------------------------------------
    84 ; Returns offset to BOOTMENUINFO based on DPT pointer.
     65; Returns offset to DRVDETECTINFO based on DPT pointer.
    8566;
    86 ; BootMenuInfo_ConvertDPTtoBX
     67; DriveDetectInfo_ConvertDPTtoBX
    8768;   Parameters:
    8869;       DS:DI:  DPT Pointer
    8970;   Returns:
    90 ;       BX:     Offset to BOOTMENUINFO struct
     71;       BX:     Offset to DRVDETECTINFO struct
    9172;   Corrupts registers:
    9273;       AX
    9374;--------------------------------------------------------------------
    94 BootMenuInfo_ConvertDPTtoBX:
     75DriveDetectInfo_ConvertDPTtoBX:
    9576    mov     ax, di
    9677    sub     ax, BYTE RAMVARS_size                   ; subtract off base of DPTs
    97     mov     bl, DPT_BOOTMENUINFO_SIZE_MULTIPLIER    ; BOOTMENUINFO's are a whole number multiple of DPT size
     78    mov     bl, DPT_DRVDETECTINFO_SIZE_MULTIPLIER   ; DRVDETECTINFO are a whole number multiple of DPT size
    9879    mul     bl                             
    99     add     ax, BOOTVARS.rgBootNfo                  ; add base of BOOTMENUINFO
     80    add     ax, BOOTVARS.rgDrvDetectInfo            ; add base of DRVDETECTINFO
    10081    xchg    ax, bx
    10182    ret
Note: See TracChangeset for help on using the changeset viewer.