Changeset 589 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Menus


Ignore:
Timestamp:
May 22, 2016, 12:26:57 PM (9 years ago)
Author:
Krister Nordvall
Message:

Changes:

  • BIOS: Fixed a purely cosmetic bug from r542 where, in builds containing MODULE_EBIOS, the boot menu would display an incorrect drive size (0.4 kB with MODULE_STRINGS_COMPRESSED or 0.5 kB without) for old drives with no support for LBA.
  • Fixed a bug from r392 where Vision_DetectAndReturnIDinAXandPortInDXifControllerPresent would return the ID in AL instead of AH (if DANGEROUS_DETECTION had been defined).
  • Fixed a bug from r587 in AdvAtaInit.asm that would prevent detection of QDI Vision controllers.
  • Also changed how the QDI Vision IDs are defined (removed the need for shifting) to avoid confusion. This fixed a potential bug from r587 in AdvAtaInit.asm where some IDs were not being shifted.
  • Fixed a bug in PDC20x30.asm from r587 where GetPdcIDtoAX would not return with the IDE base port in DX so DisablePdcProgrammingMode would fail.
  • Made some changes to ModuleDependency.inc and other files so that MODULE_ADVANCED_ATA now requires USE_386. Consequently it is no longer included in the regular AT-builds, only in the 386_8k-build.
  • Moved the UNROLL_SECTORS_IN_CX_TO_xWORDS macros from IDE_8bit.inc to IdeIO.inc which means it's now possible to build a BIOS without MODULE_8BIT_IDE.
  • XTIDECFG: Added a minimum DOS version check (since it needs DOS version 2+) to allow the program to quit gracefully in the unlikely scenario where someone tries to run it under DOS version 1.
  • Made some changes to Drive.asm to improve drive enumeration. The old method using GET_DOS_DRIVE_PARAMETER_BLOCK_FOR_SPECIFIC_DRIVE worked well in Windows XP but not in Windows 98 SE (in Windows or in DOS mode). The two problems were; 1) The function call would access the drives which on single floppy drive systems would cause Windows to swap between A: and B: (throwing a blue screen asking the user to insert a disk etc). 2) Only floppy drives and FAT16 drives would be available in the list of drives, no FAT32/optical/network drives.
  • Improved code in IdeControllerMenu.asm so that the default port addresses for all IDE interfaces are now restored when (re-)selecting the (same) type of IDE device.
  • Also made it impossible to select a device type unless the required module is included in the loaded BIOS.
  • The version check done when loading a BIOS now uses the FLASH_SIGNATURE definition from Version.inc. Any changes affecting RomVars now only requires updating that definition. This means that changes to RomVars must be implemented in both the BIOS and XTIDECFG before being committed to the repository.
  • Added a compatibility fix for 3Com 3C503 cards to the ROM checksumming code in Buffers.asm (Buffers_GenerateChecksum).
  • SerDrive: Made some minor changes to file names and paths to improve compatibility with case sensitive environments.
  • BIOSDRVS: Made a minor size optimization which as a side effect also makes it compatible with all DOS versions including DOS version 1.
  • Library: Renamed the WAIT_RETRACE_IF_NECESSARY_THEN macro to CALL_WAIT_FOR_RETRACE_IF_NECESSARY_THEN and made a tail-call-optimized version of it (JMP_WAIT_FOR_RETRACE_IF_NECESSARY_THEN).
  • A speed optimization to the eRCL_IM macro for 386 and higher. This change breaks emulation in the sense that the macro will fail when given a memory operand as the first parameter.
  • Other minor optimizations and fixes.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrint.asm

    r583 r589  
    3939    mov     si, g_szRomBootDash                     ; Standard "Rom Boot" but with a "-" at the front
    4040    mov     al, 20h                                 ; The space between "Rom" and "Boot"
    41     jnc     .ROMBoot                                ; display "Rom Boot" option for last entry
     41    jnc     SHORT .ROMBoot                          ; display "Rom Boot" option for last entry
    4242
    4343    call    FindDPT_ForDriveNumberInDL
    44     jc      .notOurs
     44    jc      SHORT .notOurs
    4545
    4646    call    DriveDetectInfo_ConvertDPTtoBX
    4747    mov     si, g_szDriveNumBOOTNFO                 ; special g_szDriveNum that prints from BDA
    48     jmp     .go
     48    jmp     SHORT .go
    4949
    5050.notOurs:
    51     mov     si,g_szDriveNum
    52     mov     bx,g_szForeignHD                        ; assume a hard disk for the moment
     51    mov     si, g_szDriveNum
     52    mov     bx, g_szForeignHD                       ; assume a hard disk for the moment
    5353
    5454    test    dl, dl
    55     js      .go
    56     mov     bl,((g_szFloppyDrv)-$$ & 0xff)          ; and revisit the earlier assumption...
     55    js      SHORT .go
     56    mov     bl, ((g_szFloppyDrv)-$$ & 0xff)         ; and revisit the earlier assumption...
    5757
    5858.go:
     
    6060    call    DriveXlate_ToOrBack
    6161
    62     test    dl, 0f0h                                ; if there is a character in the upper nibble
    63     jnz     .noSpace
    64     dec     si                                      ; backup a character to a leading space
    65 .noSpace:
     62    cmp     dl, 10h                                 ; Check if there is a character in the upper nibble
     63    sbb     si, 0                                   ; If not, backup a character to a leading space
    6664
    6765    push    dx                                      ; translated drive number
     
    8684;--------------------------------------------------------------------
    8785BootMenuPrint_TitleStrings:
    88     xor     di,di                       ; Null character will be eaten
     86    xor     di, di                      ; Null character will be eaten
    8987    mov     si, g_szBootMenuTitle
    9088    jmp     DetectPrint_RomFoundAtSegment.BootMenuEntry
     
    105103
    106104    call    BootMenu_GetDriveToDXforMenuitemInCX
    107     jnc     BootMenuEvent_Completed                     ; nothing to display if "Rom Boot" option
     105    jnc     SHORT BootMenuEvent_Completed               ; nothing to display if "Rom Boot" option
    108106
    109107    push    bp
     
    116114    inc     dl                                          ; are we a hard disk?
    117115    dec     dl                                          ; inc/dec will set SF, without modifying CF or DL
    118     js      .HardDiskRefreshInformation
    119 
    120     jnc     .ours                                       ; Based on CF from FindDPT_ForDriveNumberInDL above
     116    js      SHORT .HardDiskRefreshInformation
     117
     118    jnc     SHORT .ours                                 ; Based on CF from FindDPT_ForDriveNumberInDL above
    121119    call    FloppyDrive_GetType                         ; Get Floppy Drive type to BX
    122     jmp     .around
     120    jmp     SHORT .around
    123121.ours:
    124122    call    AH8h_GetDriveParameters
     
    132130    cmp     bl, FLOPPY_TYPE_35_ED
    133131    ja      SHORT .PushAXAndOutput
    134 
    135132    ; Fall to .PrintKnownFloppyType
    136133
     
    162159    mov     al, (g_szFddThreeHalf - $$) & 0xff
    163160    cmp     bl, FLOPPY_TYPE_525_HD
    164     ja      .ThreeHalf
     161    ja      SHORT .ThreeHalf
    165162    mov     al, (g_szFddFiveQuarter - $$) & 0xff
    166163.ThreeHalf:
     
    168165
    169166    xor     bh, bh
    170     mov     al,FloppyTypes.rgbCapacityMultiplier
     167    mov     al, FloppyTypes.rgbCapacityMultiplier
    171168    mul     BYTE [cs:bx+FloppyTypes.rgbCapacity - 1]    ; -1 since 0 is handled above and not in the table
    172169
     
    184181;   Parameters:
    185182;       DS:     RAMVARS segment
     183;       DI:     Zero if foreign drive
     184;               Offset to DPT if our drive
     185;       CF:     Set if foreign drive
     186;               Clear if our drive
    186187;   Returns:
    187188;       CF:     Set since menu event was handled successfully
    188189;   Corrupts registers:
    189 ;       BX, CX, DX, SI, DI, ES
     190;       AX, BX, CX, DX, SI, DI, ES
    190191;--------------------------------------------------------------------
    191192.HardDiskRefreshInformation:
    192     jc      .HardDiskMenuitemInfoForForeignDrive        ; Based on CF from FindDPT_ForDriveNumberInDL (way) above
     193    jc      SHORT .HardDiskMenuitemInfoForForeignDrive  ; Based on CF from FindDPT_ForDriveNumberInDL (way) above
    193194
    194195.HardDiskMenuitemInfoForOurDrive:
    195196    ePUSH_T ax, g_szInformation                         ; Add substring for our hard disk information
    196     call    GetTotalSectorCount
    197     jmp     .ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
     197
     198%ifdef MODULE_EBIOS
     199    ePUSH_T ax, .ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
     200    test    BYTE [di+DPT.bFlagsLow], FLGL_DPT_LBA
     201%ifdef USE_386
     202    jnz     AccessDPT_GetLbaSectorCountToBXDXAX
     203    jmp     AH15h_GetSectorCountToBXDXAX
     204%else ; ~USE_386
     205    jz      SHORT .NoLBA
     206    jmp     AccessDPT_GetLbaSectorCountToBXDXAX
     207.NoLBA:
     208    jmp     AH15h_GetSectorCountToBXDXAX
     209%endif
     210%else ; ~MODULE_EBIOS
     211    call    AH15h_GetSectorCountToBXDXAX
     212    jmp     SHORT .ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
     213%endif ; MODULE_EBIOS
    198214
    199215.HardDiskMenuitemInfoForForeignDrive:
     
    226242    db      2880  / FloppyTypes.rgbCapacityMultiplier    ;  type 5
    227243    db      2880  / FloppyTypes.rgbCapacityMultiplier    ;  type 6
    228 
    229 
    230 ;--------------------------------------------------------------------
    231 ; GetTotalSectorCount
    232 ;   Parameters:
    233 ;       DS:DI:      DPT Pointer
    234 ;   Returns:
    235 ;       BX:DX:AX:   48-bit sector count
    236 ;   Corrupts registers:
    237 ;       CX
    238 ;--------------------------------------------------------------------
    239 %ifdef MODULE_EBIOS
    240 GetTotalSectorCount     EQU     AccessDPT_GetLbaSectorCountToBXDXAX
    241 %else
    242 GetTotalSectorCount     EQU     AH15h_GetSectorCountToBXDXAX
    243 %endif
Note: See TracChangeset for help on using the changeset viewer.