Changeset 193 in xtideuniversalbios
- Timestamp:
- Nov 17, 2011, 2:59:13 AM (13 years ago)
- google:author:
- gregli@hotmail.com
- Location:
- trunk/XTIDE_Universal_BIOS
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc
r175 r193 65 65 ADDRESSING_MODE_LBA48 EQU 3 ; 48-bit LBA Addressing Mode 66 66 67 %macro CustomDPT_GetUnshiftedAddressModeToALZF 0 68 mov al, [di+DPT.bFlagsLow] 69 and al, MASKL_DPT_ADDRESSING_MODE 70 %endmacro 71 67 72 ; Number of Sectors per Track is fixed to 63 for LBA assist calculation. 68 73 ; 1024 cylinders, 256 heads, 63 sectors = 8.4 GB limit (but DOS does not support more than 255 heads) -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrintCfg.asm
r192 r193 54 54 ;-------------------------------------------------------------------- 55 55 PushAddressingMode: 56 call AccessDPT_GetAddressingModeToAXZF 57 mov bl,g_szAddressingModes_Displacement 56 CustomDPT_GetUnshiftedAddressModeToALZF 57 ;; 58 ;; This multiply both shifts the addressing mode bits down to low order bits, and 59 ;; at the same time multiplies by the size of the string displacement. The result is in AH, 60 ;; with AL clear, and so we exchange AL and AH after the multiply for the final result. 61 ;; 62 mov bl,(1<<(8-ADDRESSING_MODE_FIELD_POSITION)) * g_szAddressingModes_Displacement 58 63 mul bl 64 xchg al,ah 59 65 add ax,g_szAddressingModes 60 66 push ax -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Address.asm
r191 r193 86 86 Address_OldInt13hAddressToIdeAddress: 87 87 call Address_ExtractLCHSparametersFromOldInt13hAddress 88 call AccessDPT_GetAddressingModeToAXZF 88 89 CustomDPT_GetUnshiftedAddressModeToALZF 89 90 jz DoNotConvertLCHS ; 0, ADDR_DPT_LCHS 90 dec ax 91 92 ;; 93 ;; Since we are only checking for zero, we can do our math in the high order bits, 94 ;; in this case effectively subtracting 1 from the address mode. 95 ;; 96 sub al,(1<<ADDRESSING_MODE_FIELD_POSITION) 91 97 jz ConvertLCHStoPCHS ; 1, ADDR_DPT_PCHS 98 92 99 ;; Fall-through ; 2, ADDR_DPT_LBA28 and 3, ADDR_DPT_LBA48 93 100 -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AccessDPT.asm
r191 r193 40 40 ret 41 41 42 43 ;-------------------------------------------------------------------- 44 ; AccessDPT_GetAddressingModeToAXZF 45 ; Parameters: 46 ; DS:DI: Ptr to Disk Parameter Table 47 ; Returns: 48 ; AX: Addressing Mode (L-CHS, P-CHS, LBA28, LBA48) 49 ; ZF: Set if AX=0 50 ; Corrupts registers: 51 ; Nothing 52 ;-------------------------------------------------------------------- 53 ALIGN JUMP_ALIGN 54 AccessDPT_GetAddressingModeToAXZF: 55 mov al, [di+DPT.bFlagsLow] 56 and ax, BYTE MASKL_DPT_ADDRESSING_MODE 57 eSHR_IM ax, ADDRESSING_MODE_FIELD_POSITION 58 ret 59 60 42 61 43 ;-------------------------------------------------------------------- 62 44 ; AccessDPT_GetLCHS … … 121 103 ret 122 104 123 124 ;-------------------------------------------------------------------- 125 ; AccessDPT_TestIdeVarsFlagsForMasterOrSlaveDrive 126 ; Parameters: 127 ; AX: Bitmask to test DRVPARAMS.wFlags 128 ; DS:DI: Ptr to Disk Parameter Table 129 ; Returns: 130 ; ZF: Set if tested bit was zero 131 ; Cleared if tested bit was non-zero 132 ; CF: 0 133 ; Corrupts registers: 134 ; BX 135 ;-------------------------------------------------------------------- 136 ALIGN JUMP_ALIGN 137 AccessDPT_TestIdeVarsFlagsForMasterOrSlaveDrive: 138 call AccessDPT_GetPointerToDRVPARAMStoCSBX 139 test [cs:bx+DRVPARAMS.wFlags], ax 140 ret 141 105 142 106 ;-------------------------------------------------------------------- 143 107 ; Returns pointer to DRVPARAMS for master or slave drive. -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm
r181 r193 86 86 .StoreAddressing: 87 87 ; Check if CHS defined in ROMVARS 88 mov al, FLG_DRVPARAMS_USERCHS ; User specified CHS?89 call AccessDPT_TestIdeVarsFlagsForMasterOrSlaveDrive88 call AccessDPT_GetPointerToDRVPARAMStoCSBX 89 test byte [cs:bx+DRVPARAMS.wFlags], FLG_DRVPARAMS_USERCHS ; User specified CHS? 90 90 jnz SHORT .StoreUserDefinedCHSaddressing 91 91
Note:
See TracChangeset
for help on using the changeset viewer.