Changeset 359 in xtideuniversalbios


Ignore:
Timestamp:
Mar 19, 2012, 2:22:17 PM (13 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to BIOS Drive Information Tool:

  • L-CHS variables generated by XTIDE Universal BIOS are now displayed.
Location:
trunk/BIOS_Drive_Information_Tool
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/BIOS_Drive_Information_Tool/Src/Main.asm

    r332 r359  
    77%define INCLUDE_KEYBOARD_LIBRARY
    88%include "AssemblyLibrary.inc"  ; Assembly Library. Must be included first!
    9 %include "ATA_ID.inc"
    10 %include "Int13h.inc"
    11 %include "EBIOS.inc"
     9%include "Version.inc"          ; From XTIDE Universal BIOS
     10%include "ATA_ID.inc"           ; From XTIDE Universal BIOS
     11%include "Int13h.inc"           ; From XTIDE Universal BIOS
     12%include "EBIOS.inc"            ; From XTIDE Universal BIOS
     13FLG_DRVNHEAD_DRV    EQU (1<<4)  ; Required by CustomDPT.inc
     14%include "CustomDPT.inc"        ; From XTIDE Universal BIOS
    1215
    1316
     
    2225; Include library and other sources
    2326%include "AssemblyLibrary.asm"
     27%include "LbaAssist.asm"        ; From XTIDE Universal BIOS
    2428%include "Strings.asm"
    2529%include "Bios.asm"
     
    3337StartBiosDriveInformationTool:
    3438    CALL_DISPLAY_LIBRARY    InitializeDisplayContext
    35     mov     bl, ATTRIBUTES_NOT_USED
    36     mov     ax, Print_DosCharOut
    37     CALL_DISPLAY_LIBRARY    SetCharOutputFunctionFromAXwithAttribFlagInBL
     39    call    Print_SetCharacterOutputToSTDOUT
    3840
    3941    mov     si, g_szProgramName
     
    6062    call    Print_NullTerminatedStringFromSI
    6163    call    Keyboard_GetKeystrokeToAXandWaitIfNecessary
     64
    6265.DisplayFirstDrive:
    6366    mov     si, g_szHeaderDrive
     
    126129    mov     si, g_szLBA48
    127130    call    Print_NullTerminatedStringFromSI
     131    mov     si, bx
    128132    mov     ax, [bx+ATA6.qwLBACnt]
    129133    mov     dx, [bx+ATA6.qwLBACnt+2]
    130134    mov     bx, [bx+ATA6.qwLBACnt+4]
    131135    call    Print_TotalSectorsFromBXDXAX
     136    mov     bx, si
    132137.SkipLBA48:
     138
     139    ; Print L-CHS generated by XTIDE Universal BIOS
     140    mov     ax, g_szXTUBversion
     141    mov     si, g_szXTUB
     142    call    Print_VersionStringFromAXusingFormatStringInSI
     143    call    DisplayXTUBcompatibilityInfoUsingAtaInfoFromDSBX
     144
    133145.SkipAtaInfoSinceError:
    134146    pop     dx
    135147    pop     cx
     148    ret
     149
     150
     151ALIGN JUMP_ALIGN
     152DisplayXTUBcompatibilityInfoUsingAtaInfoFromDSBX:
     153    test    WORD [bx+ATA1.wCaps], A1_wCaps_LBA
     154    jz      SHORT .LbaNotSupported
     155    test    WORD [bx+ATA6.wSetSup83], A6_wSetSup83_LBA48
     156    jz      SHORT .LoadLba28SectorCount
     157
     158    ; Load LBA48 Sector Count
     159    mov     ax, [bx+ATA6.qwLBACnt]
     160    mov     dx, [bx+ATA6.qwLBACnt+2]
     161    mov     bx, [bx+ATA6.qwLBACnt+4]
     162    jmp     SHORT .ConvertLbaToLCHS
     163.LoadLba28SectorCount:
     164    mov     ax, [bx+ATA1.dwLBACnt]
     165    mov     dx, [bx+ATA1.dwLBACnt+2]
     166    xor     bx, bx
     167
     168.ConvertLbaToLCHS:
     169    call    LbaAssist_ConvertSectorCountFromBXDXAXtoLbaAssistedCHSinDXAXBLBH
     170    LIMIT_LBA_CYLINDERS_IN_DXAX_TO_LCHS_CYLINDERS
     171    xchg    cx, ax
     172    eMOVZX  dx, bl
     173    eMOVZX  ax, bh
     174    call    Print_CHSfromCXDXAX
     175.LbaNotSupported:
    136176    ret
    137177
  • trunk/BIOS_Drive_Information_Tool/Src/Print.asm

    r327 r359  
    77
    88;--------------------------------------------------------------------
     9; Print_SetCharacterOutputToSTDOUT
     10;   Parameters:
     11;       Nothing
     12;   Returns:
     13;       Nothing
     14;   Corrupts registers:
     15;       AX, BX, DI
     16;--------------------------------------------------------------------
     17ALIGN JUMP_ALIGN
     18Print_SetCharacterOutputToSTDOUT:
     19    mov     bl, ATTRIBUTES_NOT_USED
     20    mov     ax, DosCharOut
     21    CALL_DISPLAY_LIBRARY    SetCharOutputFunctionFromAXwithAttribFlagInBL
     22    ret
     23
     24;--------------------------------------------------------------------
    925; Use DOS standard output so strings can be redirected to a file.
    1026;
    11 ; Print_DosCharOut
     27; DosCharOut
    1228;   Parameters:
    1329;       AL:     Character to output
     
    2036;--------------------------------------------------------------------
    2137ALIGN JUMP_ALIGN
    22 Print_DosCharOut:
     38DosCharOut:
    2339    xchg    dx, ax
    2440    mov     ah, 02h     ; DOS 1+ - WRITE CHARACTER TO STANDARD OUTPUT
     
    5167;---------------------------------------------------------------------
    5268; Print_DriveNumberFromDLusingFormatStringInSI
     69; Print_VersionStringFromAXusingFormatStringInSI
    5370; Print_BiosFunctionNumberFromAXusingFormatStringInSI
    5471; Print_SectorSizeFromAXusingFormatStringInSI
     
    6481Print_DriveNumberFromDLusingFormatStringInSI:
    6582    eMOVZX  ax, dl
     83Print_VersionStringFromAXusingFormatStringInSI:
    6684Print_BiosFunctionNumberFromAXusingFormatStringInSI:
    6785Print_SectorSizeFromAXusingFormatStringInSI:
  • trunk/BIOS_Drive_Information_Tool/Src/Strings.asm

    r347 r359  
    66SECTION .data
    77
    8 g_szProgramName:    db  "BIOS Drive Information Tool v1.0.0",LF,CR
     8g_szProgramName:    db  "BIOS Drive Information Tool v1.0.1",LF,CR
    99                    db  "(C) 2012 by XTIDE Universal BIOS Team",LF,CR
    1010                    db  "Released under GNU GPL v2",LF,CR
     
    2222g_szLBA48:          db  " LBA48 sectors: ",NULL
    2323
     24g_szXTUB:           db  "XTIDE Universal BIOS %s generates following L-CHS...",LF,CR,NULL
     25g_szXTUBversion:    db  ROM_VERSION_STRING  ; This one is NULL terminated
     26
    2427g_szOldInfoHeader:  db  "Old INT 13h information from AH=08h and AH=15h...",LF,CR,NULL
    2528                    ;   Cylinders
  • trunk/BIOS_Drive_Information_Tool/makefile

    r327 r359  
    4545LIBS += ../Assembly_Library/Src/Util/
    4646LIBS += ../XTIDE_Universal_BIOS/Inc/
     47LIBS += ../XTIDE_Universal_BIOS/Src/VariablesAndDPTs/
    4748HEADERS += $(LIBS)
    4849
Note: See TracChangeset for help on using the changeset viewer.