- Timestamp:
- Jun 15, 2013, 1:39:33 PM (11 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Inc/RamVars.inc
r526 r555 37 37 struc RAMVARS 38 38 %ifdef RELOCATE_INT13H_STACK 39 resb 25239 resb 252 40 40 .dwStackChangeDSDI: 41 .wStackChangeDI resb 2 ; Used during stack42 .wStackChangeDS resb 2 ; switching only43 .rgbTopOfStack: ; 256 bytes of stack44 .fpInt13hEntryStack resb 441 .wStackChangeDI resb 2 ; Used during stack 42 .wStackChangeDS resb 2 ; switching only 43 .rgbTopOfStack: ; 256 bytes of stack 44 .fpInt13hEntryStack resb 4 45 45 %endif 46 . wDrvDetectSignature: ; Signature when BIOS is in drive detection mode47 . fpOldI13h resb 4 ; Far pointer to old INT 13h handler48 .wSignature resb 2 ; Sign for finding stolen 1...64 kiB49 .bTimeoutTicksLeft resb 150 .bLastTimeoutUpdate resb 146 .fpOldI13h resb 4 ; Far pointer to old INT 13h handler 47 .wDrvDetectSignature resb 2 ; Signature when BIOS is in drive detection mode 48 .wSignature resb 2 ; Sign for finding stolen 1...64 kiB 49 .bTimeoutTicksLeft resb 1 50 .bLastTimeoutUpdate resb 1 51 51 52 52 .wFirstDrvAndCount: 53 .bFirstDrv resb 1 ; Number of first drive for this BIOS54 .wDrvCntAndFlopCnt: ; Both the hard disk and floppy counts in one word55 ; (yes, misaligned, but it is only used this way during initialization)56 .bDrvCnt resb 1 ; Number of drives handled by this BIOS53 .bFirstDrv resb 1 ; Number of first drive for this BIOS 54 .wDrvCntAndFlopCnt: ; Both the hard disk and floppy counts in one word 55 ; (yes, misaligned, but it is only used this way during initialization) 56 .bDrvCnt resb 1 ; Number of drives handled by this BIOS 57 57 58 58 ; Variables for drive number translation 59 59 %ifdef NEED_XLATEVARS 60 .xlateVars resb XLATEVARS_size60 .xlateVars resb XLATEVARS_size 61 61 %endif 62 62 endstruc -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm
r542 r555 79 79 80 80 ;-------------------------------------------------------------------- 81 ; Int 13h software interrupt handler. 82 ; Jumps to specific function defined in AH. 83 ; 84 ; Note to developers: Do not make recursive INT 13h calls! 85 ; 86 ; Int13h_DiskFunctionsHandler 81 ; Int 13h (Hard Drive) to Int 40h (Floppy Drive) 82 ; We must not call previous INT 13h for floppy drives since it 83 ; does not work on Windows 98 (when using HSFLOP.PDR driver) for some reason. 84 ; 85 ; DirectCallToFloppyHandler40h 87 86 ; Parameters: 88 87 ; AH: Bios function … … 92 91 ; Depends on function 93 92 ;-------------------------------------------------------------------- 93 DirectCallToFloppyHandler40h: 94 ; With serial floppy support, we handle all traffic for function 08h, 95 ; as we need to wrap both hard disk and floppy drive counts. 96 %ifdef MODULE_SERIAL_FLOPPY 97 cmp ah, GET_DRIVE_PARAMETERS ; 08h 98 je SHORT WeHandleTheFloppyFunction 99 %endif 100 101 int BIOS_DISKETTE_INTERRUPT_40h 102 retf 2 ; Skip FLAGS from stack 103 104 105 ;-------------------------------------------------------------------- 106 ; Int 13h software interrupt handler. 107 ; Jumps to specific function defined in AH. 108 ; 109 ; Note to developers: Do not make recursive INT 13h calls! 110 ; 111 ; Int13h_DiskFunctionsHandler 112 ; Parameters: 113 ; AH: Bios function 114 ; DL: Drive number 115 ; Other: Depends on function 116 ; Returns: 117 ; Depends on function 118 ;-------------------------------------------------------------------- 94 119 ALIGN JUMP_ALIGN 95 120 Int13h_DiskFunctionsHandler: 121 test dl, dl ; Floppy Drive? 122 jns SHORT DirectCallToFloppyHandler40h 123 WeHandleTheFloppyFunction: 124 96 125 %ifndef RELOCATE_INT13H_STACK 97 126 sti ; Enable interrupts 98 %endif 127 %endif 99 128 cld ; String instructions to increment pointers 100 129 CREATE_FRAME_INTPACK_TO_SSBP SIZE_OF_IDEPACK_WITHOUT_INTPACK … … 138 167 jz SHORT .OurFunction ; We handle all function 0h requests (resets) 139 168 140 %ifndef MODULE_SERIAL_FLOPPY 141 ; Without floppy support, we handle only hard disk traffic for function 08h. 142 test dl, dl 143 jns SHORT Int13h_DirectCallToAnotherBios 144 %endif 145 ; With floppy support, we handle all traffic for function 08h, as we need to wrap both hard disk and floppy drive counts. 146 cmp ah, 8 169 ; We handle all traffic for function 08h, as we need to wrap both hard disk and floppy drive counts. 170 cmp ah, GET_DRIVE_PARAMETERS ; 08h 147 171 je SHORT .OurFunction 148 172 ; Fall to Int13h_DirectCallToAnotherBios -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm
r526 r555 97 97 98 98 99 100 ; This defines what is called when resetting our drives at the end of drive detection.101 AH0h_ResetAllOurHardDisksAtTheEndOfDriveInitialization equ ResetHardDisksHandledByOurBIOS.ErrorCodeNotUsed102 103 99 ;-------------------------------------------------------------------- 104 100 ; ResetHardDisksHandledByOurBIOS -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm
r553 r555 79 79 ; DS: RAMVARS segment 80 80 ;-------------------------------------------------------------------- 81 .InitializeBiosAndDetectDrives: 81 82 %ifdef MODULE_HOTKEYS 82 83 call TimerTicks_ReadFromBdaToAX … … 97 98 jb SHORT .WaitUntilTimeToCloseHotkeyBar 98 99 %endif 100 ; Fall to .ResetAllDrives 101 102 103 ;-------------------------------------------------------------------- 104 ; .ResetAllDrives 105 ; Parameters: 106 ; DS: RAMVARS segment 107 ; ES: BDA and interrupt vector segment (zero) 108 ; Returns: 109 ; Nothing 110 ;-------------------------------------------------------------------- 111 .ResetAllDrives: 112 ; Reset all drives in the system, not just our drives. 113 xor ax, ax ; Disk Controller Reset 114 mov dl, 80h ; Reset all hard drives and floppy drives 115 int BIOS_DISK_INTERRUPT_13h 116 ;call ResetHardDisksHandledByOurBIOS.ErrorCodeNotUsed ; Our drives only 99 117 ; Fall to SelectDriveToBootFrom 100 118 -
trunk/XTIDE_Universal_BIOS/Src/Initialization/Initialize.asm
r553 r555 88 88 call Interrupts_InitializeInterruptVectors ; HotkeyBar requires INT 40h so install handlers before drive detection 89 89 call DetectDrives_FromAllIDEControllers 90 mov [RAMVARS.wDrvDetectSignature], es ; No longer in drive detection mode (set normal timeouts) 90 91 ; Fall to .StoreDptPointersToIntVectors 91 92 92 93 %ifdef MODULE_COMPATIBLE_TABLES94 93 ;-------------------------------------------------------------------- 95 94 ; .StoreDptPointersToIntVectors … … 102 101 ; AX, CX, DX, SI, DI 103 102 ;-------------------------------------------------------------------- 103 %ifdef MODULE_COMPATIBLE_TABLES 104 104 .StoreDptPointersToIntVectors: 105 105 %ifndef USE_AT … … 125 125 mov [es:HD1_DPT_POINTER_46h*4+2], ax 126 126 .CompatibleDPTsCreated: 127 ; Fall to .ResetDetectedDrives128 127 %endif ; MODULE_COMPATIBLE_TABLES 129 130 131 ;--------------------------------------------------------------------132 ; .ResetDetectedDrives133 ; Parameters:134 ; DS: RAMVARS segment135 ; ES: BDA and interrupt vector segment (zero)136 ; Returns:137 ; Nothing138 ; Corrupts registers:139 ; All, except DS and ES140 ;--------------------------------------------------------------------141 .ResetDetectedDrives:142 call Idepack_FakeToSSBP143 call AH0h_ResetAllOurHardDisksAtTheEndOfDriveInitialization144 add sp, BYTE SIZE_OF_IDEPACK_WITHOUT_INTPACK145 128 ret
Note:
See TracChangeset
for help on using the changeset viewer.