- Timestamp:
- Feb 13, 2013, 6:12:04 PM (12 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc
r500 r503 120 120 STANDARD_CONTROL_BLOCK_OFFSET EQU 200h 121 121 XTIDE_CONTROL_BLOCK_OFFSET EQU 8h 122 XTCF_CONTROL_BLOCK_OFFSET EQU XTIDE_CONTROL_BLOCK_OFFSET122 XTCF_CONTROL_BLOCK_OFFSET EQU (XTIDE_CONTROL_BLOCK_OFFSET << 1) 123 123 124 124 ; Default values for Port and PortCtrl, shared with the configurator … … 134 134 135 135 DEVICE_ATA_TERTIARY_PORT EQU 1E8h 136 DEVICE_ATA_TERTIARY_PORTCTRL EQU ( (DEVICE_ATA_TERTIARY_PORT + STANDARD_CONTROL_BLOCK_OFFSET) & ~0Fh) ; 3E0h136 DEVICE_ATA_TERTIARY_PORTCTRL EQU (DEVICE_ATA_TERTIARY_PORT + STANDARD_CONTROL_BLOCK_OFFSET) 137 137 138 138 DEVICE_ATA_QUATERNARY_PORT EQU 168h 139 DEVICE_ATA_QUATERNARY_PORTCTRL EQU ( (DEVICE_ATA_QUATERNARY_PORT + STANDARD_CONTROL_BLOCK_OFFSET) & ~0Fh) ; 360h139 DEVICE_ATA_QUATERNARY_PORTCTRL EQU (DEVICE_ATA_QUATERNARY_PORT + STANDARD_CONTROL_BLOCK_OFFSET) 140 140 141 141 -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIO.asm
r501 r503 125 125 126 126 .ShlRegisterIndexInDX: 127 add dl, XTCF_CONTROL_BLOCK_OFFSET128 127 shl dx, 1 128 add dx, BYTE XTCF_CONTROL_BLOCK_OFFSET 129 129 jmp SHORT OutputALtoRegisterInDX 130 130 -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm
r501 r503 38 38 ;-------------------------------------------------------------------- 39 39 AH0h_HandlerForDiskControllerReset: 40 xor bx, bx ; Zero BH to assume no errors 41 or bl, dl ; Copy requested drive to BL 40 ; Reset foreign Floppy and Hard Drives (those handled by other BIOSes) 41 xor bx, bx ; Zero BH to assume no errors 42 or bl, dl ; Copy requested drive to BL 43 xor ah, ah ; Disk Controller Reset 44 call Int13h_CallPreviousInt13hHandler ; Reset floppy drives only or floppy drives and foreign hard disks 45 call BackupErrorCodeFromTheRequestedDriveToBH 42 46 43 47 %ifdef MODULE_SERIAL_FLOPPY … … 60 64 call BackupErrorCodeFromTheRequestedDriveToBH ; only one drive), but doing it again is not harmful. 61 65 %endif 62 63 ; Reset foreign Floppy and Hard Drives (those handled by other BIOSes)64 call ResetForeignDrives65 66 test bl, bl ; If we were called with a floppy disk, then we are done, 66 67 jns SHORT .SkipHardDiskReset ; don't do hard disks. … … 77 78 mov ah, bh 78 79 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH 79 80 81 ;--------------------------------------------------------------------82 ; ResetForeignDrives83 ; Parameters:84 ; BL: Requested Floppy or Hard Drive (DL when entering AH=00h)85 ; DS: RAMVARS segment86 ; Returns:87 ; BH: Error code from requested drive (if available)88 ; Corrupts registers:89 ; AX, DL90 ;--------------------------------------------------------------------91 ResetForeignDrives:92 ; If there are drives after our drives, those are already reset93 ; since our INT 13h was called by some other BIOS.94 ; We only need to reset drives from the previous INT 13h handler.95 ; There could be more in chain but let the previous one handle them.96 mov dl, [RAMVARS.bFirstDrv]97 or dl, 80h ; We may not have our drives at all so change 0 to 80h!98 MIN_U dl, bl99 100 xor ah, ah ; Disk Controller Reset101 call Int13h_CallPreviousInt13hHandler102 ;;; fall-through to BackupErrorCodeFromTheRequestedDriveToBH103 80 104 81
Note:
See TracChangeset
for help on using the changeset viewer.