- Timestamp:
- Apr 25, 2015, 7:17:41 PM (10 years ago)
- google:author:
- aitotat
- Location:
- trunk/XTIDE_Universal_BIOS
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Inc/Controllers/XTCF.inc
r567 r584 56 56 ; the mode via a call to Int 13h function 1Eh accordingly (see AH1E_XTCF.asm). 57 57 ; 58 XTCF_8BIT_PIO_MODE EQU 00h 59 XTCF_8BIT_PIO_MODE_WITH_BIU_OFFLOAD EQU 01h 60 XTCF_DMA_MODE EQU 02h 58 XTCF_8BIT_PIO_MODE EQU ((DEVICE_8BIT_XTCF_PIO8 >> 1) - XTCF_DEVICE_OFFSET) 59 XTCF_8BIT_PIO_MODE_WITH_BIU_OFFLOAD EQU (XTCF_8BIT_PIO_MODE + 1) 60 XTCF_16BIT_PIO_WITH_BIU_OFFLOAD EQU (XTCF_8BIT_PIO_MODE + 2) ; Lo-tech 8-bit IDE Adapter 61 XTCF_DMA_MODE EQU (XTCF_8BIT_PIO_MODE + 3) 62 61 63 62 64 ; Subcommands for AH=1Eh, Lo-tech XT-CF features. -
trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc
r567 r584 100 100 struc DPT_ATA 101 101 .dpt resb DPT_size 102 .bDevice resb 1 ; Device Type from IDEVARS (overrided when 32-bit controller detected )102 .bDevice resb 1 ; Device Type from IDEVARS (overrided when 32-bit controller detected or XT-CF mode is changed) 103 103 .bBlockSize resb 1 ; Current block size in sectors (do not set to zero!) 104 104 endstruc -
trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc
r567 r584 146 146 ; Device types for IDEVARS.bDevice 147 147 ; IDE Devices are grouped so device numbers cannot be changed without modifying code elsewhere! 148 ; 148 ; (IdeTransfer.asm) 149 149 COUNT_OF_STANDARD_IDE_DEVICES EQU 2 ; 16- and 32-bit controllers 150 COUNT_OF_8BIT_IDE_DEVICES EQU 8150 COUNT_OF_8BIT_IDE_DEVICES EQU 9 151 151 COUNT_OF_ALL_IDE_DEVICES EQU (COUNT_OF_8BIT_IDE_DEVICES + COUNT_OF_STANDARD_IDE_DEVICES) 152 152 ; Standard port mapped I/O … … 158 158 DEVICE_8BIT_XTIDE_REV2 EQU ((COUNT_OF_STANDARD_IDE_DEVICES+2)<<1) ; Or rev 1 with swapped A0 and A3 159 159 ; IDE Register offsets are SHL 1 160 DEVICE_8BIT_XTCF_PIO8 EQU ((COUNT_OF_STANDARD_IDE_DEVICES+3)<<1) ; XT-CF using 8-bit PIO mode 160 XTCF_DEVICE_OFFSET EQU 3 161 DEVICE_8BIT_XTCF_PIO8 EQU ((COUNT_OF_STANDARD_IDE_DEVICES+XTCF_DEVICE_OFFSET)<<1) ; XT-CF using 8-bit PIO mode 161 162 DEVICE_8BIT_XTCF_PIO8_WITH_BIU_OFFLOAD EQU ((COUNT_OF_STANDARD_IDE_DEVICES+4)<<1) ; XT-CF using 8-bit PIO mode, but with 16-bit instructions 162 DEVICE_8BIT_XTCF_DMA EQU ((COUNT_OF_STANDARD_IDE_DEVICES+5)<<1) ; XT-CFv3 using DMA 163 DEVICE_8BIT_XTCF_PIO16_WITH_BIU_OFFLOAD EQU ((COUNT_OF_STANDARD_IDE_DEVICES+5)<<1) ; Lo-tech 8-bit IDE Adapter 164 DEVICE_8BIT_XTCF_DMA EQU ((COUNT_OF_STANDARD_IDE_DEVICES+6)<<1) ; XT-CFv3 using DMA 163 165 ; Memory Mapped I/O 164 DEVICE_8BIT_JRIDE_ISA EQU ((COUNT_OF_STANDARD_IDE_DEVICES+ 6)<<1) ; JR-IDE/ISA (Memory Mapped I/O)165 DEVICE_8BIT_ADP50L EQU ((COUNT_OF_STANDARD_IDE_DEVICES+ 7)<<1) ; SVC ADP50L (Memory Mapped I/O)166 DEVICE_8BIT_JRIDE_ISA EQU ((COUNT_OF_STANDARD_IDE_DEVICES+7)<<1) ; JR-IDE/ISA (Memory Mapped I/O) 167 DEVICE_8BIT_ADP50L EQU ((COUNT_OF_STANDARD_IDE_DEVICES+8)<<1) ; SVC ADP50L (Memory Mapped I/O) 166 168 ; Virtual devices 167 169 DEVICE_SERIAL_PORT EQU (COUNT_OF_ALL_IDE_DEVICES<<1) -
trunk/XTIDE_Universal_BIOS/Inc/Version.inc
r563 r584 17 17 ; GNU General Public License for more details. 18 18 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 19 ; 20 21 ; Flash signature revisions: 22 ; XTIDE205 Added DEVICE_8BIT_XTCF_PIO16_WITH_BIU_OFFLOAD after other XT-CF 23 ; PIO modes (prevents empty indexes in PIO jump tables) 19 24 ; 20 25 … … 43 48 %define TITLE_STRING TITLE_STRING_START, TITLE_STRING_END 44 49 %define ROM_VERSION_STRING "v2.0.0",BETA,"3+ (",__DATE__,")",NULL 45 %define FLASH_SIGNATURE "XTIDE20 4" ; Do not terminate with NULL50 %define FLASH_SIGNATURE "XTIDE205" ; Do not terminate with NULL 46 51 47 52 -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm
r545 r584 89 89 90 90 %ifdef MODULE_8BIT_IDE 91 ; Enable 8-bit PIO mode for 8-bit ATA and XT-CF92 91 push si 92 93 ; Enable 8-bit PIO for DEVICE_8BIT_ATA (no need to verify device type here) 93 94 call AH9h_Enable8bitModeForDevice8bitAta 95 96 ; Set XT-CF mode. No need to check here if device is XT-CF or not. 94 97 %ifdef MODULE_8BIT_IDE_ADVANCED 95 mov al, XTCF_8BIT_PIO_MODE ; initialise with most basic transfer mode96 call AH9h_SetModeFromALtoXTCF 98 call AH1Eh_GetCurrentXTCFmodeToAX ; Reads from DPT_ATA.bDevice that we just stored 99 call AH9h_SetModeFromALtoXTCF ; Enables/disables 8-bit mode when necessary 97 100 %endif ; MODULE_8BIT_IDE_ADVANCED 98 101 pop si … … 106 109 107 110 ; Clean stack and return 108 .FailedToSet8bitMode:109 111 lea sp, [bp+SIZE_OF_IDEPACK_WITHOUT_INTPACK] ; This assumes BP hasn't changed between Idepack_FakeToSSBP and here 110 112 pop bp -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm
r568 r584 350 350 dw IdePioBlock_ReadFromXtideRev1 ; 3, DEVICE_8BIT_XTIDE_REV1 351 351 dw IdePioBlock_ReadFrom16bitDataPort ; 4, DEVICE_8BIT_XTIDE_REV2 352 %ifdef MODULE_8BIT_IDE_ADVANCED 352 353 dw IdePioBlock_ReadFrom8bitDataPort ; 5, DEVICE_8BIT_XTCF_PIO8 353 354 dw IdePioBlock_ReadFrom16bitDataPort ; 6, DEVICE_8BIT_XTCF_PIO8_WITH_BIU_OFFLOAD 354 %ifdef MODULE_8BIT_IDE_ADVANCED355 dw IdeDmaBlock_ReadFromXTCF ; 7, DEVICE_8BIT_XTCF_DMA355 dw IdePioBlock_ReadFrom16bitDataPort ; 7, DEVICE_8BIT_XTCF_PIO16_WITH_BIU_OFFLOAD 356 dw IdeDmaBlock_ReadFromXTCF ; 8, DEVICE_8BIT_XTCF_DMA 356 357 %endif ; MODULE_8BIT_IDE_ADVANCED 357 358 %endif ; MODULE_8BIT_IDE … … 365 366 dw IdePioBlock_WriteToXtideRev1 ; 3, DEVICE_8BIT_XTIDE_REV1 366 367 dw IdePioBlock_WriteToXtideRev2 ; 4, DEVICE_8BIT_XTIDE_REV2 368 %ifdef MODULE_8BIT_IDE_ADVANCED 367 369 dw IdePioBlock_WriteTo8bitDataPort ; 5, DEVICE_8BIT_XTCF_PIO8 368 370 dw IdePioBlock_WriteTo16bitDataPort ; 6, DEVICE_8BIT_XTCF_PIO8_WITH_BIU_OFFLOAD 369 %ifdef MODULE_8BIT_IDE_ADVANCED370 dw IdeDmaBlock_WriteToXTCF ; 7, DEVICE_8BIT_XTCF_DMA371 dw IdePioBlock_WriteTo16bitDataPort ; 7, DEVICE_8BIT_XTCF_PIO16_WITH_BIU_OFFLOAD 372 dw IdeDmaBlock_WriteToXTCF ; 8, DEVICE_8BIT_XTCF_DMA 371 373 %endif ; MODULE_8BIT_IDE_ADVANCED 372 374 %endif ; MODULE_8BIT_IDE -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH1Eh_XTCF.asm
r567 r584 111 111 ; Selected transfer mode is stored in BIOS variable (DPT_ATA.bDevice). 112 112 113 ; Note that when selecting 'DEVICE_8BIT_ PIO_MODE_WITH_BIU_OFFLOAD' mode,113 ; Note that when selecting 'DEVICE_8BIT_XTCF_PIO8_WITH_BIU_OFFLOAD' mode, 114 114 ; the ATA device (i.e. CompactFlash card) will operate in 8-bit mode, but 115 115 ; data will be transferred from its data register using 16-bit CPU instructions … … 134 134 dec ax ; XTCF_8BIT_PIO_MODE_WITH_BIU_OFFLOAD = 1 135 135 jz SHORT .Set8bitPioModeWithBIUOffload 136 dec ax 137 jz SHORT .Set16bitPioModeWithBIUOffload 136 138 137 139 ; XTCF_DMA_MODE = 2 (allow 3 as well for more optimized code) … … 144 146 mov al, XTCF_DMA_MODE_MAX_BLOCK_SIZE 145 147 jmp SHORT AH24h_SetBlockSize 148 149 .Set16bitPioModeWithBIUOffload: 150 pop bx ; Do not enable 8-bit PIO... 151 ePUSH_T bx, AH23h_Disable8bitPioMode ; ...disable it instead 152 mov al, DEVICE_8BIT_XTCF_PIO16_WITH_BIU_OFFLOAD 153 SKIP2B bx 146 154 147 155 .Set8bitPioMode: -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH23h_HFeatures.asm
r526 r584 78 78 ;-------------------------------------------------------------------- 79 79 ; AH23h_Enable8bitPioMode 80 ; AH23h_Disable8bitPioMode 80 81 ; Parameters: 81 82 ; DS:DI: Ptr to DPT (in RAMVARS segment) … … 91 92 mov si, FEATURE_ENABLE_8BIT_PIO_TRANSFER_MODE 92 93 jmp SHORT AH23h_SetControllerFeatures 94 AH23h_Disable8bitPioMode: 95 mov si, FEATURE_DISABLE_8BIT_PIO_TRANSFER_MODE 96 call AH23h_SetControllerFeatures 97 xor ah, ah ; Clear error since modern drives might not understand the command and are 98 ret ; always in 16-bit mode anyway 93 99 %endif -
trunk/XTIDE_Universal_BIOS/Src/Main.asm
r567 r584 136 136 %ifdef MODULE_8BIT_IDE_ADVANCED 137 137 at ROMVARS.ideVars0+IDEVARS.wBasePort, dw DEVICE_XTIDE_DEFAULT_PORT ; Controller Command Block base port 138 at ROMVARS.ideVars0+IDEVARS.bDevice, db DEVICE_8BIT_XTCF_PIO8138 at ROMVARS.ideVars0+IDEVARS.bDevice, db XTCF_8BIT_PIO_MODE_WITH_BIU_OFFLOAD 139 139 %else 140 140 at ROMVARS.ideVars0+IDEVARS.wBasePort, dw DEVICE_XTIDE_DEFAULT_PORT ; Controller Command Block base port
Note:
See TracChangeset
for help on using the changeset viewer.