Changeset 556 in xtideuniversalbios
- Timestamp:
- Jun 16, 2013, 4:23:00 PM (11 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm
r555 r556 79 79 80 80 ;-------------------------------------------------------------------- 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 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 86 87 ; Parameters: 87 88 ; AH: Bios function … … 91 92 ; Depends on function 92 93 ;-------------------------------------------------------------------- 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_FLOPPY97 cmp ah, GET_DRIVE_PARAMETERS ; 08h98 je SHORT WeHandleTheFloppyFunction99 %endif100 101 int BIOS_DISKETTE_INTERRUPT_40h102 retf 2 ; Skip FLAGS from stack103 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_DiskFunctionsHandler112 ; Parameters:113 ; AH: Bios function114 ; DL: Drive number115 ; Other: Depends on function116 ; Returns:117 ; Depends on function118 ;--------------------------------------------------------------------119 94 ALIGN JUMP_ALIGN 120 95 Int13h_DiskFunctionsHandler: 121 test dl, dl ; Floppy Drive?122 jns SHORT DirectCallToFloppyHandler40h123 WeHandleTheFloppyFunction:124 125 96 %ifndef RELOCATE_INT13H_STACK 126 97 sti ; Enable interrupts 127 %endif 98 %endif 128 99 cld ; String instructions to increment pointers 129 100 CREATE_FRAME_INTPACK_TO_SSBP SIZE_OF_IDEPACK_WITHOUT_INTPACK … … 167 138 jz SHORT .OurFunction ; We handle all function 0h requests (resets) 168 139 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 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, GET_DRIVE_PARAMETERS 171 147 je SHORT .OurFunction 172 148 ; Fall to Int13h_DirectCallToAnotherBios … … 198 174 push bp 199 175 mov bp, [bp+IDEPACK.intpack+INTPACK.bp] 200 int BIOS_DISK_INTERRUPT_13h ; Can safely do as much recursion as it wants 176 177 test dl, dl 178 js SHORT .CallHardDiskHandler 179 int BIOS_DISKETTE_INTERRUPT_40h ; Windows 98 requires we call INT 40h for floppy drives (reason unknown) 180 SKIP2B bp ; Skip INT 13h 181 .CallHardDiskHandler: 182 int BIOS_DISK_INTERRUPT_13h ; Can safely do as much recursion as it wants 201 183 202 184 ; Store returned values to INTPACK -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm
r555 r556 31 31 sti ; Enable interrupts 32 32 cld ; String instructions to increment pointers 33 %ifndef USE_AT 33 34 call Int13hBiosInit_RestoreSystemHandler ; Needed if initialization was started on INT 13h instead on 19h 35 %endif 34 36 LOAD_BDA_SEGMENT_TO es, ax ; Load BDA segment (zero) to ES 35 37 ; Fall to .PrepareBootLoaderStack … … 114 116 mov dl, 80h ; Reset all hard drives and floppy drives 115 117 int BIOS_DISK_INTERRUPT_13h 116 ;call ResetHardDisksHandledByOurBIOS.ErrorCodeNotUsed ; Our drives only117 118 ; Fall to SelectDriveToBootFrom 118 119 -
trunk/XTIDE_Universal_BIOS/Src/Initialization/Initialize.asm
r555 r556 37 37 push ds 38 38 39 %ifndef USE_186 40 push ax 41 LOAD_BDA_SEGMENT_TO ds, ax 42 %else 39 %ifdef USE_AT 43 40 push BYTE 0 44 41 pop ds 42 %else 43 push ax ; We use AX to install very late init handler 44 LOAD_BDA_SEGMENT_TO ds, ax 45 45 %endif 46 46 … … 53 53 mov [BIOS_BOOT_LOADER_INTERRUPT_19h*4+2], cs 54 54 55 ; Very late initialization for XT builds only 56 %ifndef USE_AT 57 push es 55 58 ; Install special INT 13h hander that initializes XTIDE Universal BIOS 56 59 ; when our INT 19h is not called … … 60 63 mov WORD [BIOS_DISK_INTERRUPT_13h*4], Int13hBiosInit_Handler 61 64 mov [BIOS_DISK_INTERRUPT_13h*4+2], cs 65 pop es 66 %endif 62 67 63 68 .SkipRomInitialization: 64 %ifndef USE_ 18669 %ifndef USE_AT 65 70 pop ax 66 71 %endif -
trunk/XTIDE_Universal_BIOS/Src/Main.asm
r552 r556 145 145 146 146 %ifdef MODULE_8BIT_IDE_ADVANCED 147 at ROMVARS.ideVars1+IDEVARS.wBasePort, dw DEVICE_XTIDE_DEFAULT_PORT ; Controller Command Block base port 147 148 at ROMVARS.ideVars1+IDEVARS.bDevice, db DEVICE_8BIT_XTCF_PIO8 148 149 %endif … … 257 258 258 259 ; INT 13h Hard Disk BIOS functions 260 %ifndef USE_AT 259 261 %include "Int13hBiosInit.asm" 262 %endif 260 263 %include "Int13h.asm" ; For Int 13h, Disk functions 261 264 %include "AH0h_HReset.asm" -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm
r547 r556 77 77 mov WORD [RAMVARS.wDrvDetectSignature], RAMVARS_DRV_DETECT_SIGNATURE 78 78 mov WORD [RAMVARS.wSignature], RAMVARS_RAM_SIGNATURE 79 ;; There used to be a DriveXlate_Reset call here. It isn't necessary, as we reset 80 ;; when entering the boot menu and also before transferring control at boot time and 81 ;; for ROM boots (in int19h.asm). 79 %ifdef MODULE_DRIVEXLATE 80 call DriveXlate_Reset 81 %endif 82 82 83 83 pop es
Note:
See TracChangeset
for help on using the changeset viewer.