Changeset 493 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src
- Timestamp:
- Dec 21, 2012, 8:44:25 AM (12 years ago)
- google:author:
- gregli@hotmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm
r480 r493 87 87 call Idepack_FakeToSSBP 88 88 89 %ifdef MODULE_8BIT_IDE 89 %ifdef MODULE_8BIT_IDE_ADVANCED 90 90 ; Enable 8-bit PIO mode for 8-bit ATA and XT-CF 91 91 push si … … 94 94 call AH9h_SetModeFromALtoXTCF 95 95 pop si 96 %endif ; MODULE_8BIT_IDE 96 %endif ; MODULE_8BIT_IDE_ADVANCED 97 97 98 98 ; Prepare to output Identify Device command … … 172 172 cmp bl, FLG_STATUS_DRQ ; Data transfer started? 173 173 jne SHORT .WaitUntilNonTransferCommandCompletes 174 %ifdef MODULE_8BIT_IDE 174 %ifdef MODULE_8BIT_IDE_ADVANCED 175 175 cmp BYTE [di+DPT_ATA.bDevice], DEVICE_8BIT_XTCF_MEMMAP 176 176 jae SHORT JrIdeTransfer_StartWithCommandInAL ; DEVICE_8BIT_XTCF_MEMMAP or DEVICE_8BIT_JRIDE_ISA -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIO.asm
r491 r493 58 58 je SHORT .ReverseA0andA3fromRegisterIndexInDX 59 59 jb SHORT .InputToALfromRegisterInDX ; Standard IDE controllers and XTIDE rev 1 60 61 %ifdef MODULE_8BIT_IDE_ADVANCED 60 62 cmp al, DEVICE_8BIT_JRIDE_ISA 61 63 jne SHORT .ShlRegisterIndexInDX ; All XT-CF modes … … 68 70 pop ds 69 71 ret 70 72 %endif 73 71 74 .ReverseA0andA3fromRegisterIndexInDX: 72 75 mov dl, [cs:bx+g_rgbSwapA0andA3fromIdeRegisterIndex] … … 103 106 cmp bl, DEVICE_8BIT_XTIDE_REV2 104 107 jbe SHORT .OutputALtoControlBlockRegisterInDX ; Standard IDE controllers and XTIDE rev 1 108 109 %ifdef MODULE_8BIT_IDE_ADVANCED 105 110 cmp bl, DEVICE_8BIT_JRIDE_ISA 106 111 jne SHORT .ShlRegisterIndexInDX ; All XT-CF modes … … 115 120 eSHL_IM dx, 1 116 121 jmp SHORT OutputALtoRegisterInDX 122 %endif 117 123 118 124 .OutputALtoControlBlockRegisterInDX: … … 141 147 je SHORT .ReverseA0andA3fromRegisterIndexInDX 142 148 jb SHORT OutputALtoRegisterInDX ; Standard IDE controllers and XTIDE rev 1 149 150 %ifdef MODULE_8BIT_IDE_ADVANCED 143 151 cmp bl, DEVICE_8BIT_JRIDE_ISA 144 152 jne SHORT .ShlRegisterIndexInDX ; All XT-CF modes … … 154 162 pop ds 155 163 ret 156 164 %endif 165 157 166 .ReverseA0andA3fromRegisterIndexInDX: 158 167 mov bx, dx -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm
r491 r493 218 218 xchg ax, bx ; Lookup table offset to AX 219 219 mov bl, [di+DPT_ATA.bDevice] 220 %ifdef MODULE_8BIT_IDE 220 %ifdef MODULE_8BIT_IDE_ADVANCED 221 221 mov dl, bl 222 222 %endif … … 226 226 227 227 ; Normalize pointer for PIO-transfers and convert to physical address for DMA transfers 228 %ifdef MODULE_8BIT_IDE 228 %ifdef MODULE_8BIT_IDE_ADVANCED 229 229 cmp dl, DEVICE_8BIT_XTCF_DMA 230 230 jb SHORT IdeTransfer_NormalizePointerInESSI … … 281 281 %endif ; 26 29/26 282 282 ret 283 %endif ; MODULE_8BIT_IDE 283 %endif ; MODULE_8BIT_IDE_ADVANCED 284 284 ; Fall to IdeTransfer_NormalizePointerInESSI if no MODULE_8BIT_IDE 285 285 … … 308 308 dw IdePioBlock_ReadFromXtideRev1 ; 3, DEVICE_8BIT_XTIDE_REV1 309 309 dw IdePioBlock_ReadFromXtideRev2 ; 4, DEVICE_8BIT_XTIDE_REV2 310 %ifdef MODULE_8BIT_IDE_ADVANCED 310 311 dw IdePioBlock_ReadFrom8bitDataPort ; 5, DEVICE_8BIT_XTCF_PIO8 311 312 dw IdeDmaBlock_ReadFromXTCF ; 6, DEVICE_8BIT_XTCF_DMA 313 %endif 312 314 %endif 313 315 … … 320 322 dw IdePioBlock_WriteToXtideRev1 ; 3, DEVICE_8BIT_XTIDE_REV1 321 323 dw IdePioBlock_WriteToXtideRev2 ; 4, DEVICE_8BIT_XTIDE_REV2 324 %ifdef MODULE_8BIT_IDE_ADVANCED 322 325 dw IdePioBlock_WriteTo8bitDataPort ; 5, DEVICE_8BIT_XTCF_PIO8 323 326 dw IdeDmaBlock_WriteToXTCF ; 6, DEVICE_8BIT_XTCF_DMA 324 327 %endif 328 %endif -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm
r471 r493 93 93 call RamVars_GetSegmentToDS 94 94 95 %ifdef MODULE_ HOTKEYS95 %ifdef MODULE_DRIVEXLATE 96 96 call DriveXlate_ToOrBack 97 97 mov [RAMVARS.xlateVars+XLATEVARS.bXlatedDrv], dl … … 179 179 mov [bp+IDEPACK.intpack+INTPACK.si], si 180 180 mov [bp+IDEPACK.intpack+INTPACK.bx], bx 181 %ifdef MODULE_ HOTKEYS181 %ifdef MODULE_DRIVEXLATE 182 182 mov [bp+IDEPACK.intpack+INTPACK.dh], dh 183 183 %else … … 190 190 call RamVars_GetSegmentToDS 191 191 192 %ifdef MODULE_ HOTKEYS192 %ifdef MODULE_DRIVEXLATE 193 193 cmp dl, [RAMVARS.xlateVars+XLATEVARS.bXlatedDrv] ; DL is still drive number? 194 194 je SHORT .ExchangeInt13hHandlers … … 395 395 dw UnsupportedFunction ; 1Ch, ESDI Special Functions (PS/2) 396 396 dw UnsupportedFunction ; 1Dh, 397 %ifdef MODULE_8BIT_IDE 397 %ifdef MODULE_8BIT_IDE_ADVANCED 398 398 dw AH1Eh_HandlerForXTCFfeatures ; 1Eh, Lo-tech XT-CF features (XTIDE Universal BIOS) 399 399 %else -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH23h_HFeatures.asm
r474 r493 76 76 77 77 78 %ifdef MODULE_8BIT_IDE79 78 ;-------------------------------------------------------------------- 80 79 ; AH23h_Enable8bitPioMode … … 88 87 ; AL, BX, CX, DX, SI 89 88 ;-------------------------------------------------------------------- 89 %ifdef MODULE_8BIT_IDE 90 90 AH23h_Enable8bitPioMode: 91 91 mov si, FEATURE_ENABLE_8BIT_PIO_TRANSFER_MODE 92 92 jmp SHORT AH23h_SetControllerFeatures 93 %endif ; MODULE_8BIT_IDE93 %endif -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH24h_HSetBlocks.asm
r491 r493 59 59 ;-------------------------------------------------------------------- 60 60 AH24h_SetBlockSize: 61 %ifdef MODULE_8BIT_IDE 61 %ifdef MODULE_8BIT_IDE_ADVANCED 62 62 ; XT-CF does not support largest block size in DMA mode. 63 63 cmp al, XTCF_DMA_MODE_MAX_BLOCK_SIZE … … 66 66 je SHORT AH1Eh_LoadInvalidCommandToAHandSetCF 67 67 .NoNeedToLimitBlockSize: 68 %endif ; MODULE_8BIT_IDE 68 %endif ; MODULE_8BIT_IDE_ADVANCED 69 69 70 70 push bx -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm
r480 r493 107 107 108 108 ;;; Set XT-CF mode 109 %ifdef MODULE_8BIT_IDE 109 %ifdef MODULE_8BIT_IDE_ADVANCED 110 110 call AccessDPT_GetIdevarsToCSBX 111 111 mov al, [cs:bx+IDEVARS.bXTCFcontrolRegister] … … 113 113 STORE_ERROR_FLAG_TO_DPT FLG_INITERROR_FAILED_TO_SET_XTCF_MODE 114 114 .DoNotSetXTCFmode: 115 116 115 %endif ; MODULE_8BIT_IDE_ADVANCED 116 117 %ifdef MODULE_8BIT_IDE 117 118 ;;; Set 8-bit PIO mode 118 119 call AH9h_Enable8bitModeForDevice8bitAta … … 266 267 267 268 268 %ifdef MODULE_8BIT_IDE 269 %ifdef MODULE_8BIT_IDE_ADVANCED 269 270 ;-------------------------------------------------------------------- 270 271 ; AH9h_SetModeFromALtoXTCF … … 284 285 jne SHORT IgnoreInvalidCommandError 285 286 jmp AH1Eh_ChangeXTCFmodeBasedOnControlRegisterInAL 286 287 287 %endif ; MODULE_8BIT_IDE_ADVANCED 288 289 %ifdef MODULE_8BIT_IDE 288 290 ;-------------------------------------------------------------------- 289 291 ; AH9h_Enable8bitModeForDevice8bitAta … … 302 304 jne SHORT IgnoreInvalidCommandError 303 305 jmp AH23h_Enable8bitPioMode 304 %endif ; MODULE_8BIT_IDE306 %endif -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm
r492 r493 121 121 call HotkeyBar_ScanHotkeysFromKeyBufferAndStoreToBootvars 122 122 cmp al, ROM_BOOT_HOTKEY_SCANCODE 123 jz JumpToBootSector_or_RomBoot; CF clear so ROM boot123 jz .RomBoot ; CF clear so ROM boot 124 124 %ifdef MODULE_BOOT_MENU 125 125 cmp al, BOOT_MENU_HOTKEY_SCANCODE … … 135 135 .BootMenu: 136 136 call BootMenu_DisplayAndReturnDriveInDLRomBootClearCF 137 jnc JumpToBootSector_or_RomBoot; CF clear so ROM boot137 jnc .RomBoot ; CF clear so ROM boot 138 138 139 139 mov dh, dl ; Setup for secondary drive … … 158 158 %endif 159 159 160 %ifndef MODULE_BOOT_MENU 161 clc ; fall through with flag for ROM boot. Boot Menu goes back to menu and doesn't fall through. 162 %endif 160 .RomBoot: 161 %ifdef MODULE_DRIVEXLATE 162 call DriveXlate_Reset ; Clean up any drive mappings before Rom Boot 163 %endif 164 clc 165 ;; fall through to JumpToBootSector_or_RomBoot 163 166 164 167 ;-------------------------------------------------------------------- -
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm
r492 r493 162 162 ;-------------------------------------------------------------------- 163 163 StartDetectionWithDriveSelectByteInBHandStringInCX: 164 %ifdef MODULE_8BIT_IDE 164 %ifdef MODULE_8BIT_IDE_ADVANCED 165 165 ; Autodetect port for XT-CF 166 166 call DetectDrives_DoesIdevarsInCSBPbelongToXTCF … … 195 195 .SkipXTCFportDetection: 196 196 push dx 197 %endif ; MODULE_8BIT_IDE 197 %endif ; MODULE_8BIT_IDE_ADVANCED 198 198 199 199 call DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP … … 203 203 %endif 204 204 205 %ifdef MODULE_8BIT_IDE 205 %ifdef MODULE_8BIT_IDE_ADVANCED 206 206 pop dx 207 207 %endif … … 282 282 283 283 284 %ifdef MODULE_8BIT_IDE 284 %ifdef MODULE_8BIT_IDE_ADVANCED 285 285 ;-------------------------------------------------------------------- 286 286 ; DetectDrives_DoesIdevarsInCSBPbelongToXTCF … … 303 303 NoSlaveDriveAvailable: 304 304 ret 305 %endif ; MODULE_8BIT_IDE 305 %endif ; MODULE_8BIT_IDE_ADVANCED -
trunk/XTIDE_Universal_BIOS/Src/Main.asm
r492 r493 128 128 at ROMVARS.wBootTimeout, dw BOOT_MENU_DEFAULT_TIMEOUT 129 129 %endif 130 %ifdef MODULE_8BIT_IDE_ADVANCED 130 131 at ROMVARS.bIdeCnt, db 2 ; Number of supported controllers 132 %else 133 at ROMVARS.bIdeCnt, db 1 134 %endif 131 135 at ROMVARS.bBootDrv, db 80h ; Boot Menu default drive 132 136 at ROMVARS.bMinFddCnt, db 0 ; Do not force minimum number of floppy drives … … 140 144 at ROMVARS.ideVars0+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags, db DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION) 141 145 146 %ifdef MODULE_8BIT_IDE_ADVANCED 142 147 at ROMVARS.ideVars1+IDEVARS.bXTCFcontrolRegister, db XTCF_8BIT_PIO_MODE 143 148 at ROMVARS.ideVars1+IDEVARS.bDevice, db DEVICE_8BIT_XTCF_PIO8 144 149 at ROMVARS.ideVars1+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags, db DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION) 145 150 at ROMVARS.ideVars1+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags, db DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION) 151 %else 152 at ROMVARS.ideVars1+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags, db DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION) 153 at ROMVARS.ideVars1+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags, db DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION) 154 %endif 146 155 147 156 at ROMVARS.ideVars2+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags, db DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION) … … 227 236 %endif 228 237 %include "IdeCommand.asm" 229 %ifdef MODULE_8BIT_IDE 238 %ifdef MODULE_8BIT_IDE_ADVANCED 230 239 %include "JrIdeTransfer.asm" ; Must be included after IdeCommand.asm 231 240 %include "IdeDmaBlock.asm" … … 261 270 %include "AH11h_HRecal.asm" ; Required by Int13h_Jump.asm 262 271 %include "AH15h_HSize.asm" ; Required by Int13h_Jump.asm 263 %ifdef MODULE_8BIT_IDE 272 %ifdef MODULE_8BIT_IDE_ADVANCED 264 273 %include "AH1Eh_XTCF.asm" 265 274 %endif -
trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuEvent.asm
r492 r493 161 161 EventItemHighlightedFromCX: 162 162 push cx 163 call DriveXlate_Reset164 163 call BootMenu_GetDriveToDXforMenuitemInCX 165 164 jnc .noDriveSwap … … 209 208 ;-------------------------------------------------------------------- 210 209 CloseBootMenu: 211 call DriveXlate_Reset212 210 CALL_MENU_LIBRARY Close 213 211 ; Fall to BootMenuEvent_Completed -
trunk/XTIDE_Universal_BIOS/Src/Menus/DriveXlate.asm
r492 r493 144 144 ; Nothing 145 145 ; Corrupts registers: 146 ; Nothing146 ; AX, DI, DL 147 147 ;-------------------------------------------------------------------- 148 148 DriveXlate_Reset: 149 mov WORD [RAMVARS.xlateVars+XLATEVARS.wFDandHDswap], 8000h 150 ret 151 149 xor dl, dl ; no translation for a floppy 150 ;; fall through to DriveXlate_SetDriveToSwap 152 151 153 152 ;-------------------------------------------------------------------- … … 161 160 ; Nothing 162 161 ; Corrupts registers: 163 ; Nothing162 ; AX, DI 164 163 ;-------------------------------------------------------------------- 165 164 DriveXlate_SetDriveToSwap: 165 mov ax, 8000h ; Default mapping (no translation) 166 166 test dl, dl ; Floppy drive? 167 167 js SHORT .SetHardDriveToSwap 168 169 ; Set Floppy Drive to swap 170 mov [RAMVARS.xlateVars+XLATEVARS.bFDSwap], dl 168 mov al, dl ; Store floppy translation 169 SKIP2B di 170 .SetHardDriveToSwap: 171 mov ah, dl ; Store HD translation 172 mov WORD [RAMVARS.xlateVars+XLATEVARS.wFDandHDswap], ax 171 173 ret 172 173 .SetHardDriveToSwap:174 mov [RAMVARS.xlateVars+XLATEVARS.bHDSwap], dl175 ret -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AccessDPT.asm
r491 r493 104 104 105 105 106 %ifdef MODULE_8BIT_IDE 106 %ifdef MODULE_8BIT_IDE_ADVANCED 107 107 ;-------------------------------------------------------------------- 108 108 ; AccessDPT_IsThisDeviceXTCF … … 125 125 .DeviceIsXTCF: 126 126 ret 127 %endif ; MODULE_8BIT_IDE 127 %endif ; MODULE_8BIT_IDE_ADVANCED 128 128 129 129 -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/BootVars.asm
r492 r493 32 32 ;-------------------------------------------------------------------- 33 33 BootVars_Initialize: 34 %ifdef MODULE_8BIT_IDE 34 %ifdef MODULE_8BIT_IDE_ADVANCED 35 35 mov WORD [es:BOOTVARS.wNextXTCFportToScan], XTCF_BASE_PORT_DETECTION_SEED 36 36 %endif -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm
r473 r493 245 245 mov [di+DPT.bIdevarsOffset], bp ; IDEVARS must start in first 256 bytes of ROM 246 246 247 %ifdef MODULE_8BIT_IDE 247 %ifdef MODULE_8BIT_IDE_ADVANCED 248 248 call DetectDrives_DoesIdevarsInCSBPbelongToXTCF 249 249 jne SHORT .DeviceUsesPortSpecifiedInIDEVARS … … 251 251 ret 252 252 .DeviceUsesPortSpecifiedInIDEVARS: 253 %endif ; MODULE_8BIT_IDE 253 %endif ; MODULE_8BIT_IDE_ADVANCED 254 254 255 255 mov ax, [cs:bp+IDEVARS.wBasePort] -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm
r492 r493 94 94 mov [RAMVARS.wNewStackOffset], ax 95 95 %endif 96 ; Fall to .InitializeDriveTranslationAndReturn 97 98 ;-------------------------------------------------------------------- 99 ; .InitializeDriveTranslationAndReturn 100 ; Parameters: 101 ; DS: RAMVARS segment 102 ; Returns: 103 ; Nothing 104 ; Corrupts registers: 105 ; AX 106 ;-------------------------------------------------------------------- 107 .InitializeDriveTranslationAndReturn: 96 97 ;; There used to be a DriveXlate_Reset call here. It isn't necessary, as we reset 98 ;; when entering the boot menu and also before transferring control at boot time and 99 ;; for ROM boots (in int19h.asm). 100 108 101 pop es 109 %ifdef MODULE_DRIVEXLATE 110 jmp DriveXlate_Reset 111 %else 112 ret 113 %endif 114 102 ret 115 103 116 104 ;--------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.