Changeset 127 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src


Ignore:
Timestamp:
Mar 3, 2011, 6:43:50 PM (14 years ago)
Author:
Tomi Tilli
google:author:
aitotat
Message:

Changes to XTIDE Universal BIOS:

  • More boot menu fixes.
Location:
trunk/XTIDE_Universal_BIOS/Src
Files:
5 edited

Legend:

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

    r124 r127  
    3636;       CX:     Index of selected item or NO_ITEM_SELECTED
    3737;   Corrupts registers:
    38 ;       BX, DI
     38;       AX, BX, DI
    3939;--------------------------------------------------------------------
    4040ALIGN JUMP_ALIGN
     
    166166    jz      SHORT .ReturnItemIndexInDX  ; Return if floppy drive (HD bit not set)
    167167    call    FloppyDrive_GetCountToCX
     168    and     dl, ~80h                    ; Clear HD bit
    168169    add     dx, cx
    169170.ReturnItemIndexInDX:
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuEvent.asm

    r124 r127  
    2424ALIGN JUMP_ALIGN
    2525BootMenuEvent_Handler:
    26     cmp     bx, MENUEVENT.RefreshItemFromCX ; Above last supported item?
     26    cmp     bx, BYTE MENUEVENT.RefreshItemFromCX    ; Above last supported item?
    2727    ja      SHORT .EventNotHandled
    28     jmp     [bx+.rgfnEventSpecificHandlers]
     28    jmp     [cs:bx+.rgfnEventSpecificHandlers]
    2929.EventNotHandled:
    3030    clc
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm

    r124 r127  
    8888;       AX, BX, SI, DI
    8989;--------------------------------------------------------------------
    90 ;ALIGN JUMP_ALIGN
    9190.HardDiskMenuitemForOurDrive:
    9291    call    BootInfo_GetOffsetToBX
     
    224223    call    FindDPT_ForDriveNumber      ; DS:DI to point DPT
    225224    jnc     SHORT .HardDiskMenuitemInfoForForeignDrive
    226     call    .HardDiskMenuitemInfoSizeForOurDrive
    227     jmp     BootMenuPrintCfg_ForOurDrive
     225    ; Fall to .HardDiskMenuitemInfoForOurDrive
     226
     227;--------------------------------------------------------------------
     228; .HardDiskMenuitemInfoForOurDrive
     229;   Parameters:
     230;       DL:     Untranslated Hard Disk number
     231;       DS:DI:  Ptr to DPT
     232;   Returns:
     233;       Nothing
     234;   Corrupts registers:
     235;       AX, BX, CX, DX, SI, DI, ES
     236;--------------------------------------------------------------------
     237ALIGN JUMP_ALIGN
     238.HardDiskMenuitemInfoForOurDrive:
     239    push    di
     240    ePUSH_T ax, BootMenuPrintCfg_ForOurDrive    ; Return from BootMenuPrint_FormatCSSIfromParamsInSSBP
     241    push    bp
     242    mov     bp, sp
     243    ePUSH_T ax, g_szCapacity
     244
     245    ; Get and push L-CHS size
     246    call    HCapacity_GetSectorCountFromOurAH08h
     247    call    ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
     248
     249    ; Get and push total LBA size
     250    mov     dl, [di+DPT.bDrvNum]
     251    call    BootInfo_GetTotalSectorCount
     252    call    ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
     253
     254    mov     si, g_szSizeDual
     255    jmp     SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP
     256
    228257
    229258;--------------------------------------------------------------------
     
    248277
    249278    mov     si, g_szSizeSingle
    250     jmp     SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP
    251 
    252 ;--------------------------------------------------------------------
    253 ; .HardDiskMenuitemInfoSizeForOurDrive
    254 ;   Parameters:
    255 ;       DL:     Untranslated Hard Disk number
    256 ;       DS:DI:  Ptr to DPT
    257 ;   Returns:
    258 ;       Nothing
    259 ;   Corrupts registers:
    260 ;       AX, BX, CX, DX, SI, ES
    261 ;--------------------------------------------------------------------
    262 ALIGN JUMP_ALIGN
    263 .HardDiskMenuitemInfoSizeForOurDrive:
    264     push    bp
    265     mov     bp, sp
    266     ePUSH_T ax, g_szCapacity
    267 
    268     ; Get and push L-CHS size
    269     call    HCapacity_GetSectorCountFromOurAH08h
    270     call    ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
    271 
    272     ; Get and push total LBA size
    273     call    BootInfo_GetTotalSectorCount
    274     call    ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
    275 
    276     mov     si, g_szSizeDual
    277279    ; Fall to BootMenuPrint_FormatCSSIfromParamsInSSBP
    278280
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrintCfg.asm

    r116 r127  
    1212; BootMenuPrintCfg_ForOurDrive
    1313;   Parameters:
    14 ;       DS:DI:  Ptr to DPT
     14;       DS:     Segment to DPT
     15;       Stack:  Offset to DPT
    1516;   Returns:
    1617;       Nothing
     
    2021ALIGN JUMP_ALIGN
    2122BootMenuPrintCfg_ForOurDrive:
     23    pop     di
    2224    mov     si, g_szCfgHeader
    2325    call    BootMenuPrint_NullTerminatedStringFromCSSIandSetCF
     
    3739;       AX, DX, SI, DI
    3840;--------------------------------------------------------------------
    39 ALIGN JUMP_ALIGN
    4041PushAndFormatCfgString:
    4142    push    bp
     
    173174PrintValuesFromStack:
    174175    mov     si, g_szCfgFormat
    175     jmp     BootMenuPrint_NullTerminatedStringFromCSSIandSetCF
     176    jmp     BootMenuPrint_FormatCSSIfromParamsInSSBP
    176177
    177178
  • trunk/XTIDE_Universal_BIOS/Src/Strings.asm

    r122 r127  
    66
    77; POST drive detection strings
    8 g_szRomAt:      db  "%s @ %x",CR,LF,NULL
     8g_szRomAt:      db  "%s @ %x",LF,CR,NULL
    99g_szMaster:     db  "Master",NULL
    1010g_szSlave:      db  "Slave ",NULL
    1111g_szDetect:     db  "IDE %s at %x: ",NULL           ; IDE Master at 1F0h:
    12 g_szNotFound:   db  "not found",CR,LF,NULL
     12g_szNotFound:   db  "not found",LF,CR,NULL
    1313
    1414; Boot loader strings
    15 g_szTryToBoot:  db  "Booting from %s %x",ANGLE_QUOTE_RIGHT,"%x",CR,LF,NULL
     15g_szTryToBoot:  db  "Booting from %s %x",ANGLE_QUOTE_RIGHT,"%x",LF,CR,NULL
    1616g_szBootSector: db  "Boot sector",NULL
    1717g_szFound:      db  "found",NULL
    18 g_szSectRead:   db  "%s %s!",CR,LF,NULL
    19 g_szReadError:  db  "Error %x!",CR,LF,NULL
     18g_szSectRead:   db  "%s %s!",LF,CR,NULL
     19g_szReadError:  db  "Error %x!",LF,CR,NULL
    2020
    2121; Boot menu bottom of screen strings
     
    3434g_szCapacity:   db  "Capacity : ",NULL
    3535g_szSizeSingle: db  "%s%u.%u %ciB",NULL
    36 g_szSizeDual:   db  "%s%u.%u %ciB / %u.%u %ciB",NULL
    37 g_szCfgHeader:  db  "Addr.",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",  SINGLE_VERTICAL,"IRQ",  SINGLE_VERTICAL,"Reset",CR,LF,NULL
     36g_szSizeDual:   db  "%s%u.%u %ciB / %u.%u %ciB",LF,CR,NULL
     37g_szCfgHeader:  db  "Addr.",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",  SINGLE_VERTICAL,"IRQ",  SINGLE_VERTICAL,"Reset",LF,CR,NULL
    3838g_szCfgFormat:  db  "%s"   ,SINGLE_VERTICAL,"%5u",  SINGLE_VERTICAL,"%c%2u",SINGLE_VERTICAL," %c%c",SINGLE_VERTICAL,"%5x",  NULL
    3939g_szLCHS:       db  "L-CHS",NULL
Note: See TracChangeset for help on using the changeset viewer.