Changeset 254 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src


Ignore:
Timestamp:
Feb 18, 2012, 2:51:54 PM (13 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Changed BOOTNFO to BOOTMENUINFO and moved it to BootMenu.inc.
Location:
trunk/XTIDE_Universal_BIOS/Src
Files:
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuInfo.asm

    r253 r254  
    77
    88;--------------------------------------------------------------------
    9 ; Creates new BOOTNFO struct for detected hard disk.
     9; Creates new BOOTMENUINFO struct for detected hard disk.
    1010;
    11 ; BootInfo_CreateForHardDisk
     11; BootMenuInfo_CreateForHardDisk
    1212;   Parameters:
    1313;       DL:     Drive number
     
    1515;       ES:SI:  Ptr to 512-byte ATA information read from the drive
    1616;   Returns:
    17 ;       ES:BX:  Ptr to BOOTNFO (if successful)
     17;       ES:BX:  Ptr to BOOTMENUINFO (if successful)
    1818;   Corrupts registers:
    19 ;       AX, BX, CX, DX, DI, SI
     19;       AX, BX, CX, DX, DI
    2020;--------------------------------------------------------------------
    21 BootInfo_CreateForHardDisk:
    22     call    BootInfo_ConvertDPTtoBX     ; ES:BX now points to new BOOTNFO
    23     push    bx                          ; Preserve for return
     21BootMenuInfo_CreateForHardDisk:
     22    call    BootMenuInfo_ConvertDPTtoBX         ; ES:BX now points to new BOOTMENUINFO
     23    push    bx                                  ; Preserve for return
    2424
    25     mov     di, bx                      ; Starting pointer at beginning of structure
     25    mov     di, bx                              ; Starting pointer at beginning of structure
    2626
    27 ;
    28 ; Store Drive Name
    29 ;       
    30     push    ds                          ; Preserve RAMVARS
    31     push    si                          ; Preserve SI for call to GetTotalSectorCount...
     27    ; Store Drive Name
     28    push    ds                                  ; Preserve RAMVARS
     29    push    si
    3230
    33     push    es                          ; ES copied to DS
     31    push    es                                  ; ES copied to DS
    3432    pop     ds
    3533
    36     add     si, BYTE ATA1.strModel      ; DS:SI now points drive name
    37     lea     di, [bx+BOOTNFO.szDrvName]  ; ES:DI now points to name destination
    38     mov     cx, LEN_BOOTNFO_DRV / 2     ; Max number of WORDs allowed
     34    add     si, BYTE ATA1.strModel              ; DS:SI now points drive name
     35    lea     di, [bx+BOOTMENUINFO.szDrvName]     ; ES:DI now points to name destination
     36    mov     cx, MAX_HARD_DISK_NAME_LENGTH / 2   ; Max number of WORDs allowed
    3937.CopyNextWord:
    4038    lodsw
    41     xchg    al, ah                      ; Change endianness
     39    xchg    al, ah                              ; Change endianness
    4240    stosw
    4341    loop    .CopyNextWord
    44     xor     ax, ax                      ; Zero AX and clear CF
    45     stosw                               ; Terminate with NULL
     42    xor     ax, ax                              ; Zero AX and clear CF
     43    stosw                                       ; Terminate with NULL
    4644
    4745    pop     si
     
    5351
    5452;--------------------------------------------------------------------
    55 ; BootInfo_GetTotalSectorCount
     53; BootMenuInfo_GetTotalSectorCount
    5654;   Parameters:
    5755;       DS:DI:      DPT Pointer
     
    6260;--------------------------------------------------------------------
    6361ALIGN JUMP_ALIGN
    64 BootInfo_GetTotalSectorCount:
     62BootMenuInfo_GetTotalSectorCount:
    6563    test    BYTE [di+DPT.bFlagsLow], FLG_DRVNHEAD_LBA
    6664    jnz     SHORT .ReturnFullCapacity
     
    7169
    7270;--------------------------------------------------------------------
    73 ; Returns offset to BOOTNFO based on DPT pointer.
     71; Returns offset to BOOTMENUINFO based on DPT pointer.
    7472;
    75 ; BootInfo_ConvertDPTtoBX
     73; BootMenuInfo_ConvertDPTtoBX
    7674;   Parameters:
    7775;       DS:DI:  DPT Pointer
    7876;   Returns:
    79 ;       BX:     Offset to BOOTNFO struct
     77;       BX:     Offset to BOOTMENUINFO struct
    8078;   Corrupts registers:
    8179;       AX
    8280;--------------------------------------------------------------------
    8381ALIGN JUMP_ALIGN
    84 BootInfo_ConvertDPTtoBX:
     82BootMenuInfo_ConvertDPTtoBX:
    8583    mov     ax, di
    86     sub     ax, RAMVARS_size                ; subtract off base of DPTs
    87     mov     bl, DPT_BOOTNFO_SIZE_MULTIPLIER ; BOOTNFO's are a whole number multiple of DPT size
     84    sub     ax, RAMVARS_size                        ; subtract off base of DPTs
     85    mov     bl, DPT_BOOTMENUINFO_SIZE_MULTIPLIER    ; BOOTMENUINFO's are a whole number multiple of DPT size
    8886    mul     bl                             
    89     add     ax, BOOTVARS.rgBootNfo          ; add base of BOOTNFO
     87    add     ax, BOOTVARS.rgBootNfo                  ; add base of BOOTMENUINFO
    9088    xchg    ax, bx
    9189    ret         
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm

    r252 r254  
    2727
    2828    call    FindDPT_ForDriveNumber                  ; if it is one of ours, print the string in bootnfo
    29     call    BootInfo_ConvertDPTtoBX
     29    call    BootMenuInfo_ConvertDPTtoBX
    3030    mov     si, g_szDriveNumBOOTNFO                 ; special g_szDriveNum that prints from BDA
    3131    jmp     .go
     
    197197
    198198    ; Get and push total LBA size
    199     call    BootInfo_GetTotalSectorCount
     199    call    BootMenuInfo_GetTotalSectorCount
    200200    call    ConvertSectorCountInBXDXAXtoSizeAndPushForFormat       
    201201    jmp     BootMenuPrintCfg_ForOurDrive
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm

    r242 r254  
    143143    call    CreateDPT_FromAtaInformation
    144144    jc      SHORT DetectDrives_DriveNotFound
    145     call    BootInfo_CreateForHardDisk
     145    call    BootMenuInfo_CreateForHardDisk
    146146    jmp     short DetectPrint_DriveNameFromBootnfoInESBX
    147147
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm

    r244 r254  
    105105; DetectPrint_DriveNameFromBootnfoInESBX
    106106;   Parameters:
    107 ;       ES:BX:  Ptr to BOOTNFO (if drive found)
     107;       ES:BX:  Ptr to BOOTMENUINFO (if drive found)
    108108;   Returns:
    109109;       Nothing
     
    115115    push    bx
    116116
    117     lea     si, [bx+BOOTNFO.szDrvName]
     117    lea     si, [bx+BOOTMENUINFO.szDrvName]
    118118    mov     bx, es
    119119    CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromBXSI
     
    123123    pop     di
    124124    ret
    125 
  • trunk/XTIDE_Universal_BIOS/Src/Main.asm

    r248 r254  
    2929    %include "RomVars.inc"          ; For ROMVARS and IDEVARS structs
    3030    %include "RamVars.inc"          ; For RAMVARS struct
    31     %include "BootVars.inc"         ; For BOOTVARS and BOOTNFO structs
     31    %include "BootVars.inc"         ; For BOOTVARS struct
    3232    %include "BootMenu.inc"         ; For Boot Menu
    3333    %include "IDE_8bit.inc"         ; For IDE 8-bit data port macros
     
    167167    %include "FindDPT.asm"          ; For finding DPTs
    168168    %include "AccessDPT.asm"        ; For accessing DPTs
    169     %include "BootInfo.asm"         ; For creating BOOTNFO structs
     169    %include "BootMenuInfo.asm"     ; For creating BOOTMENUINFO structs
    170170    %include "AtaID.asm"            ; For ATA Identify Device information
    171171    %include "DetectDrives.asm"     ; For detecting IDE drives
Note: See TracChangeset for help on using the changeset viewer.