Changeset 542 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers
- Timestamp:
- Apr 15, 2013, 4:03:33 PM (12 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Handlers
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm
r540 r542 123 123 ALIGN JUMP_ALIGN 124 124 .JumpToEbiosFunction: 125 test BYTE [di+DPT.bFlagsLow], FLGL_DPT_LBA _AND_EBIOS_SUPPORTED125 test BYTE [di+DPT.bFlagsLow], FLGL_DPT_LBA 126 126 jz SHORT UnsupportedFunction ; No eINT 13h for CHS drives 127 127 sub bl, 41h<<1 ; BX = Offset to eINT 13h jump table -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm
r526 r542 99 99 ;;; SelectDrive 100 100 ; Try to select drive and wait until ready 101 call AccessDPT_GetDriveSelectByte ForOldInt13hToAL101 call AccessDPT_GetDriveSelectByteToAL 102 102 mov [bp+IDEPACK.bDrvAndHead], al 103 103 call Device_SelectDrive … … 130 130 131 131 ;;; InitializeDeviceParameters 132 ; Initialize CHS parameters if LBA is not used and133 ; user has specified P-CHS parameters134 test BYTE [di+DPT.bFlagsLow], FLGL_DPT_ASSISTED_LBA135 jnz SHORT .SkipInitializeDeviceParameters ; No need to initialize CHS parameters if LBA mode enabled136 call AccessDPT_GetPointerToDRVPARAMStoCSBX137 test BYTE [cs:bx+DRVPARAMS.wFlags], FLG_DRVPARAMS_USERCHS ; User specified P-CHS?138 jz SHORT .SkipInitializeDeviceParameters139 140 132 ; Initialize Logical Sectors per Track and Max Head number 141 mov ax, [ cs:bx+DRVPARAMS.wHeadsAndSectors]133 mov ax, [di+DPT.wPchsHeadsAndSectors] 142 134 dec ax ; Max Head number 143 xchg a l, ah ; Heads now in AH144 mov d x, ax ; Sectors per Track now in DL135 xchg ah, al 136 mov dl, al ; Sectors per track 145 137 mov al, COMMAND_INITIALIZE_DEVICE_PARAMETERS 146 138 mov bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_BSY, FLG_STATUS_BSY) -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH48h_GetExtendedDriveParameters.asm
r541 r542 52 52 ; AH=48h Total Sector Count: 11873* 16*63 = 11,967,984 53 53 ; 54 ; Notice how AH=48h returns lesser total sector count than AH= 8h! The only54 ; Notice how AH=48h returns lesser total sector count than AH=08h! The only 55 55 ; way I could think of to get 11873 cylinders is to divide AH=08h sector 56 56 ; count with P-CHS heads and sectors: (745*255*63) / (16*63) = 11873 57 57 ; 58 ; I have no idea what is the reasoning behind it but at least there is one 59 ; BIOS that does just that. 60 ; 61 ; I decided that we multiply P-CHS values and do not waste space like the 62 ; Award BIOS does. 58 ; The only reason I can think of is that the Award BIOS has a bug and 59 ; uses L-CHS when it should use P-CHS values in the calculation. 63 60 ; 64 61 ; … … 139 136 ; Store P-CHS. Based on phoenix specification this is returned only if 140 137 ; total sector count is 15,482,880 or less. 141 sub ax, 4001h142 sbb dx, 0ECh138 sub ax, MAX_SECTOR_COUNT_TO_RETURN_PCHS & 0FFFFh 139 sbb dx, MAX_SECTOR_COUNT_TO_RETURN_PCHS >> 16 143 140 sbb bx, cx ; Zero 144 j nc SHORT .ReturnWithSuccess ; More than EC4000h145 or WORD[di+EDRIVE_INFO.wFlags], FLG_CHS_INFORMATION_IS_VALID141 ja SHORT .ReturnWithSuccess 142 or BYTE [di+EDRIVE_INFO.wFlags], FLG_CHS_INFORMATION_IS_VALID 146 143 147 144 eMOVZX dx, BYTE [es:si+DPT.bPchsHeads] -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Address.asm
r526 r542 120 120 ; Only 24-bits are used since LHCS to LBA28 conversion has 8.4GB limit. 121 121 ; LBA = ((cylToSeek*headsPerCyl+headToSeek)*sectPerTrack)+sectToSeek-1 122 ; headsPerCyl and sectPerTrack are the current translation values (L-CHS). 122 123 ; 123 124 ; Returned address is in same registers that
Note:
See TracChangeset
for help on using the changeset viewer.