Changeset 32 in xtideuniversalbios
- Timestamp:
- Aug 6, 2010, 7:11:04 AM (14 years ago)
- google:author:
- aitotat
- Location:
- trunk/XTIDE_Universal_BIOS
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Doc/changes.txt
r28 r32 1 XTIDE Universal BIOS v1.1.3 (29 July 2010) 1 * Correct number of drives is now returned from AH=08h even when it is redirected to foreign BIOS. 2 3 4 XTIDE Universal BIOS v1.1.3 (1 August 2010) 2 5 * v1.1.1 broke booting from foreign drives, it is now fixed. 3 6 * Improved error handling a bit. -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenu.asm
r28 r32 2 2 ; Project name : IDE BIOS 3 3 ; Created date : 25.3.2010 4 ; Last update : 29.7.20104 ; Last update : 3.8.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Displays Boot Menu. … … 57 57 ALIGN JUMP_ALIGN 58 58 BootMenu_GetMenuitemCount: 59 call RamVars_Get DriveCounts60 movax, cx59 call RamVars_GetHardDiskCountFromBDAtoCX 60 xchg ax, cx 61 61 call FloppyDrive_GetCount 62 62 add ax, cx … … 254 254 jb SHORT .ReturnFloppyDriveInDX 255 255 sub dx, cx ; Remove floppy drives from index 256 call RamVars_Get DriveCounts256 call RamVars_GetHardDiskCountFromBDAtoCX 257 257 cmp dx, cx ; Hard disk? 258 258 jb SHORT .ReturnHardDiskInDX … … 330 330 ALIGN JUMP_ALIGN 331 331 BootMenu_IsDriveInSystem: 332 test dl, 80h ; Floppy drive?332 test dl, 80h ; Floppy drive? 333 333 jz SHORT .IsFloppyDriveIsInSystem 334 call RamVars_Get DriveCounts; Hard Disk count to CX335 or cl, 80h ; Set Hard Disk bit to CX334 call RamVars_GetHardDiskCountFromBDAtoCX ; Hard Disk count to CX 335 or cl, 80h ; Set Hard Disk bit to CX 336 336 jmp SHORT .CompareDriveNumberToDriveCount 337 337 .IsFloppyDriveIsInSystem: 338 call FloppyDrive_GetCount ; Floppy Drive count to CX338 call FloppyDrive_GetCount ; Floppy Drive count to CX 339 339 .CompareDriveNumberToDriveCount: 340 340 cmp dl, cl -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm
r3 r32 2 2 ; Project name : IDE BIOS 3 3 ; Created date : 26.3.2010 4 ; Last update : 12.4.20104 ; Last update : 3.8.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Functions for printing boot menu strings. … … 24 24 call FloppyDrive_GetCount 25 25 mov bl, cl ; Floppy Drive count to BL 26 call RamVars_Get DriveCounts26 call RamVars_GetHardDiskCountFromBDAtoCX 27 27 mov bh, cl ; Hard Disk count to BH 28 28 call BootMenuPrint_GetCoordinatesForBottomStrings -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm
r28 r32 110 110 cli ; Disable interrupts as INT would 111 111 retf 112 113 114 ;-------------------------------------------------------------------- 115 ; Int13h_CallPreviousInt13hHandler 116 ; Parameters: 117 ; AH: Bios function 118 ; DS: RAMVARS segment 119 ; Other: Depends on function to call 120 ; Returns: 121 ; Depends on function to call 122 ; Corrupts registers: 123 ; FLAGS 124 ;-------------------------------------------------------------------- 125 ALIGN JUMP_ALIGN 126 Int13h_CallPreviousInt13hHandler: 127 pushf ; Push flags to simulate INT 128 cli ; Disable interrupts since INT does that 129 call FAR [RAMVARS.fpOldI13h] 130 sti 131 ret 112 132 113 133 -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm
r28 r32 2 2 ; Project name : IDE BIOS 3 3 ; Created date : 27.9.2007 4 ; Last update : 29.7.20104 ; Last update : 3.8.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Int 13h function AH=0h, Disk Controller Reset. 7 8 RETRIES_IF_RESET_FAILS EQU 39 TIMEOUT_BEFORE_RESET_RETRY EQU 5 ; System timer ticks10 7 11 8 ; Section containing code … … 82 79 call GetDriveNumberForForeignBiosesToDL 83 80 xor ah, ah ; Disk Controller Reset 84 pushf ; Push flags to simulate INT 85 cli ; Disable interrupts since INT does that 86 call FAR [RAMVARS.fpOldI13h] 87 sti ; Make sure interrupts are enabled again (some BIOSes fails to enable it) 81 call Int13h_CallPreviousInt13hHandler 88 82 jmp SHORT BackupErrorCodeFromTheRequestedDriveToBH 89 83 -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH8h_HParams.asm
r28 r32 2 2 ; Project name : IDE BIOS 3 3 ; Created date : 27.9.2007 4 ; Last update : 12.4.20104 ; Last update : 3.8.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Int 13h function AH=8h, Read Disk Drive Parameters. … … 32 32 ALIGN JUMP_ALIGN 33 33 AH8h_HandlerForReadDiskDriveParameters: 34 call RamVars_IsDriveHandledByThisBIOS 35 jnc SHORT .GetDriveParametersForForeignHardDiskInDL 36 34 37 push bx 35 38 call AH8h_GetDriveParameters 36 39 pop bx 40 jmp Int13h_ReturnWithoutSwappingDrives 41 42 ALIGN JUMP_ALIGN 43 .GetDriveParametersForForeignHardDiskInDL: 44 call Int13h_CallPreviousInt13hHandler 45 call RamVars_GetCountOfKnownDrivesToDL 37 46 jmp Int13h_ReturnWithoutSwappingDrives 38 47 … … 97 106 ; BX: Number of L-CHS cylinders available (1...1024) 98 107 ; DX: Number of L-CHS heads (1...256) 108 ; DS: RAMVARS segment 99 109 ; Returns: 100 110 ; CH: Maximum cylinder number, bits 7...0 … … 111 121 dec dx ; Head count to max head number 112 122 mov dh, dl ; Max head number to DH 113 push ax114 call RamVars_GetDriveCounts ; Hard disk count to CX115 pop ax116 mov dl, cl ; Hard disk count to DL117 123 mov ch, bl ; Cylinder bits 7...0 to CH 118 124 mov cl, bh ; Cylinder bits 9...8 to CL 119 125 eROR_IM cl, 2 ; Cylinder bits 9...8 to CL bits 7...6 120 126 or cl, al ; Sectors per track to CL bits 5...0 121 ret127 jmp RamVars_GetCountOfKnownDrivesToDL -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Common/HCapacity.asm
r3 r32 2 2 ; Project name : IDE BIOS 3 3 ; Created date : 16.3.2010 4 ; Last update : 12.4.20104 ; Last update : 3.8.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Functions for hard disk capacity calculations. … … 26 26 HCapacity_GetSectorCountFromForeignAH08h: 27 27 mov ah, 08h ; Get Drive Parameters 28 int INTV_DISK_FUNC28 call Int13h_CallPreviousInt13hHandler 29 29 jmp SHORT HCapacity_ConvertAH08hReturnValuesToSectorCount 30 30 -
trunk/XTIDE_Universal_BIOS/Src/Main.asm
r28 r32 38 38 at ROMVARS.bRomSize, db CNT_ROM_BLOCKS ; ROM size in 512B blocks 39 39 at ROMVARS.rgbJump, jmp Initialize_FromMainBiosRomSearch 40 at ROMVARS.rgbDate, db "08/0 1/10" ; Build data (mm/dd/yy)40 at ROMVARS.rgbDate, db "08/03/10" ; Build data (mm/dd/yy) 41 41 at ROMVARS.rgbSign, db "XTIDE110" ; Signature for flash program 42 42 at ROMVARS.szTitle … … 49 49 db " (XT)=-",STOP 50 50 %endif 51 at ROMVARS.szVersion, db "v1.1.3 (08/0 1/10)",STOP51 at ROMVARS.szVersion, db "v1.1.3 (08/03/10)",STOP 52 52 53 53 ;---------------------------; -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm
r3 r32 2 2 ; Project name : IDE BIOS 3 3 ; Created date : 14.3.2010 4 ; Last update : 2.5.20104 ; Last update : 3.8.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Functions for accessings RAMVARS. … … 130 130 RamVars_IsFunctionHandledByThisBIOS: 131 131 test ah, ah ; Reset for all floppy and hard disk drives? 132 jnz SHORT RamVars_IsDriveHandledByThisBIOS 132 jz SHORT .FunctionIsHandledByOurBIOS 133 cmp ah, 08h ; Read Disk Drive Parameters? 134 jne SHORT RamVars_IsDriveHandledByThisBIOS 135 test dl, 80h ; We dot not handle floppy drives 136 jz SHORT .FunctionIsNotHandledByOurBIOS 137 ALIGN JUMP_ALIGN 138 .FunctionIsHandledByOurBIOS: 133 139 stc 140 .FunctionIsNotHandledByOurBIOS: 134 141 ret 135 142 … … 190 197 191 198 ;-------------------------------------------------------------------- 192 ; Return number of Hard Disks in system. 193 ; 194 ; RamVars_GetDriveCounts 195 ; Parameters: 196 ; DS: RAMVARS segment 197 ; Returns: 198 ; AL: Number of hard disks handled by our BIOS 199 ; CX: Total number of hard disks in system 200 ; Corrupts registers: 201 ; AH 202 ;-------------------------------------------------------------------- 203 ALIGN JUMP_ALIGN 204 RamVars_GetDriveCounts: 199 ; RamVars_GetHardDiskCountFromBDAtoCX 200 ; Parameters: 201 ; DS: RAMVARS segment 202 ; Returns: 203 ; CX: Total hard disk count 204 ; Corrupts registers: 205 ; Nothing 206 ;-------------------------------------------------------------------- 207 ALIGN JUMP_ALIGN 208 RamVars_GetHardDiskCountFromBDAtoCX: 205 209 push es 210 push dx 211 206 212 LOAD_BDA_SEGMENT_TO es, cx ; Zero CX 207 mov cl, [es:BDA.bHDCount] ; Total hard drive count 208 mov al, [RAMVARS.bDrvCnt] ; Our drive count 213 call RamVars_GetCountOfKnownDrivesToDL 214 MAX_U dl, [es:BDA.bHDCount] 215 mov cl, dl 216 217 pop dx 209 218 pop es 210 219 ret 220 221 ;-------------------------------------------------------------------- 222 ; RamVars_GetCountOfKnownDrivesToDL 223 ; Parameters: 224 ; DS: RAMVARS segment 225 ; Returns: 226 ; DL: Total hard disk count 227 ; Corrupts registers: 228 ; Nothing 229 ;-------------------------------------------------------------------- 230 ALIGN JUMP_ALIGN 231 RamVars_GetCountOfKnownDrivesToDL: 232 mov dl, [RAMVARS.bFirstDrv] ; Number for our first drive 233 add dl, [RAMVARS.bDrvCnt] ; Our drives 234 and dl, 7Fh ; Clear HD bit for drive count 235 ret
Note:
See TracChangeset
for help on using the changeset viewer.