Changeset 473 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Inc
- Timestamp:
- Oct 10, 2012, 6:22:23 PM (12 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Inc
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Inc/BootVars.inc
r422 r473 37 37 .dwPostStack resb 4 ; POST stack pointer when entering INT 19h 38 38 39 %ifdef MODULE_8BIT_IDE 40 .wNextXTCFportToScan resb 2 ; Needed for XT-CF port autodetection 41 %endif 42 39 43 .clearToZeroFromThisPoint: 40 44 %ifdef MODULE_HOTKEYS 41 45 .hotkeyVars resb HOTKEYVARS_size 42 46 %endif 43 47 44 48 .rgDrvDetectInfo: ; Array containing DRVDETECTINFO structs 45 49 endstruc -
trunk/XTIDE_Universal_BIOS/Inc/Controllers/XTCF.inc
r472 r473 23 23 %define XTCF_INC 24 24 25 XTCF_DMA_MODE_MAX_BLOCK_SIZE EQU 64 ; Sectors 26 OFFSET_TO_CONTROL_BLOCK_REGISTERS EQU 8 27 25 28 ; Possible base addresses. Note that all XT-CF IDE registers are SHL 1 compared 26 29 ; to standard IDE registers. … … 42 45 ; 8-bit PIO transfers (port I/O) are used if Control Register is zero. 43 46 ; Any other value means DMA transfers (using DMA channel 3). 47 XTCF_8BIT_PIO_MODE EQU 0 48 XTCF_MEMORY_MAPPED_MODE EQU 0A0h 49 44 50 45 51 -
trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc
r472 r473 24 24 ; Base DPT for all device types 25 25 struc DPT 26 ; General Disk Parameter Table related (Bytes 0...3)26 ; General Disk Parameter Table related 27 27 .wFlags: 28 28 .bFlagsLow resb 1 … … 30 30 .bIdevarsOffset resb 1 ; Offset to IDEVARS for this drive 31 31 .bInitError resb 1 ; Flags for AH=09h initialization errors 32 .wBasePort resb 2 ; Segment for JR-IDE/ISA 32 33 33 ; CHS variables (Bytes 4...8)34 ; CHS variables 34 35 .wLchsCylinders resb 2 ; (1...1027, yes 1027) 35 36 .wLchsHeadsAndSectors: … … 43 44 .wPchsCylinders resb 2 44 45 .twLbaSectors resb 6 ; 48-bit sector count for LBA addressing 45 %endif46 47 %ifdef MODULE_8BIT_IDE48 .wXTCFport resb 2 ; Autodetected XT-CF port49 46 %endif 50 47 alignb 2 ; WORD alignent for DPT_SERIAL or DPT_ATA … … 96 93 FLG_INITERROR_FAILED_TO_SET_PIO_MODE EQU (1<<5) 97 94 FLG_INITERROR_FAILED_TO_INITIALIZE_STANDBY_TIMER EQU (1<<6) 98 FLG_INITERROR_FAILED_TO_ ENABLE_8BIT_PIO_MODEEQU (1<<7)95 FLG_INITERROR_FAILED_TO_SET_XTCF_MODE EQU (1<<7) 99 96 100 97 101 98 102 99 ; DPT for ATA devices 103 struc DPT_ATA ; 10/18 bytes + 2 bytes = 12/20 bytes100 struc DPT_ATA 104 101 .dpt resb DPT_size 102 .bDevice resb 1 ; Device Type from IDEVARS (overrided when 32-bit controller detected) 105 103 .bBlockSize resb 1 ; Current block size in sectors (do not set to zero!) 106 .bDevice resb 1 ; Device Type from IDEVARS (overrided when 32-bit controller detected)107 104 endstruc 108 105 … … 112 109 ; EBDA must be reserved for DPTs when using these! 113 110 %ifdef MODULE_ADVANCED_ATA 114 struc DPT_ADVANCED_ATA ; 12/20 bytes + 8 bytes = 20/28 bytes111 struc DPT_ADVANCED_ATA 115 112 .dpt_ata resb DPT_ATA_size 116 113 .wControllerID resb 2 ; Controller specific ID WORD (from Advanced Controller detection) … … 125 122 ; DPT for Serial devices 126 123 %ifdef MODULE_SERIAL 127 struc DPT_SERIAL ; 8/18 bytes + 2 bytes = 10/20 bytes124 struc DPT_SERIAL 128 125 .dpt resb DPT_size 129 126 .wSerialPortAndBaud: -
trunk/XTIDE_Universal_BIOS/Inc/DeviceIDE.inc
r444 r473 32 32 33 33 %ifdef MODULE_FEATURE_SETS 34 TIMEOUT_BSYEQU TIMEOUT_MOTOR_STARTUP35 TIMEOUT_DRDYEQU TIMEOUT_MOTOR_STARTUP34 TIMEOUT_BSY EQU TIMEOUT_MOTOR_STARTUP 35 TIMEOUT_DRDY EQU TIMEOUT_MOTOR_STARTUP 36 36 %else 37 TIMEOUT_BSYEQU (2600/55) ; 2600 ms38 TIMEOUT_DRDYEQU (2600/55) ; 2600 ms37 TIMEOUT_BSY EQU (2600/55) ; 2600 ms 38 TIMEOUT_DRDY EQU (2600/55) ; 2600 ms 39 39 %endif 40 40 -
trunk/XTIDE_Universal_BIOS/Inc/IdeIO.inc
r400 r473 21 21 %define IDE_IO_INC 22 22 23 JRIDE_SECTOR_ACCESS_WINDOW_OFFSET EQU 3C00h ; 512 byte IDE Sector Access Window24 JRIDE_COMMAND_BLOCK_REGISTER_WINDOW_OFFSET EQU 3E00h ; 8 byte CS0 IDE Register Window25 JRIDE_CONTROL_BLOCK_REGISTER_WINDOW_OFFSET EQU 3E08h ; 8 byte CS1 IDE Register Window26 JRIDE_SECTOR_ACCESS_WINDOW_SIZE EQU 512 ; 512 bytes27 28 29 23 ;-------------------------------------------------------------------- 30 ; OUTPUT_AL_TO_IDE_REGISTER_IN_DL 31 ; JUMP_TO_OUTPUT_AL_TO_IDE_REGISTER_IN_DL 32 ; OUTPUT_AL_TO_IDE_CONTROL_BLOCK_REGISTER_IN_DL 24 ; OUTPUT_AL_TO_IDE_REGISTER 25 ; OUTPUT_AL_TO_IDE_CONTROL_BLOCK_REGISTER 33 26 ; Parameters: 34 27 ; AL: Byte to output … … 42 35 ;-------------------------------------------------------------------- 43 36 %macro OUTPUT_AL_TO_IDE_REGISTER 1 44 %ifnidni %1, dl 45 mov dl, %1 37 %ifndef MODULE_8BIT_IDE ; Standard IDE controllers only 38 39 %ifnidni %1, dx 40 mov dx, %1 41 %endif 42 add dx, [di+DPT.wBasePort] 43 out dx, al 44 45 %else ; Register translations required 46 47 %ifnidni %1, dl 48 mov dl, %1 49 %endif 50 call IdeIO_OutputALtoIdeRegisterInDL 51 46 52 %endif 47 call IdeIO_OutputALtoIdeRegisterInDL48 53 %endmacro 49 54 50 %macro JUMP_TO_OUTPUT_AL_TO_IDE_REGISTER 151 %ifnidni %1, dl52 mov dl, %153 %endif54 jmp IdeIO_OutputALtoIdeRegisterInDL55 %endmacro56 55 57 56 %macro OUTPUT_AL_TO_IDE_CONTROL_BLOCK_REGISTER 1 58 %ifnidni %1, dl 59 mov dl, %1 57 %ifndef MODULE_8BIT_IDE ; Standard IDE controllers only 58 59 %ifnidni %1, dx 60 mov dx, %1 61 %endif 62 eMOVZX bx, BYTE [di+DPT.bIdevarsOffset] 63 add dx, [cs:bx+IDEVARS.wControlBlockPort] 64 out dx, al 65 66 %else ; Register translations required 67 68 %ifnidni %1, dl 69 mov dl, %1 70 %endif 71 call IdeIO_OutputALtoIdeControlBlockRegisterInDL 72 60 73 %endif 61 call IdeIO_OutputALtoIdeControlBlockRegisterInDL62 74 %endmacro 63 75 … … 74 86 ;-------------------------------------------------------------------- 75 87 %macro INPUT_TO_AL_FROM_IDE_REGISTER 1 76 %ifnidni %1, dl 77 mov dl, %1 88 %ifndef MODULE_8BIT_IDE ; Standard IDE controllers only 89 90 %ifnidni %1, dx 91 mov dx, %1 92 %endif 93 add dx, [di+DPT.wBasePort] 94 in al, dx 95 96 %else ; Register translations required 97 98 %ifnidni %1, dl 99 mov dl, %1 100 %endif 101 call IdeIO_InputToALfromIdeRegisterInDL 102 78 103 %endif 79 call IdeIO_InputToALfromIdeRegisterInDL80 104 %endmacro 81 105 -
trunk/XTIDE_Universal_BIOS/Inc/IdeRegisters.inc
r437 r473 103 103 FEATURE_ENABLE_8BIT_PIO_TRANSFER_MODE EQU 01h ; CFA feature set only 104 104 FEATURE_ENABLE_WRITE_CACHE EQU 02h 105 FEATURE_DISABLE_8BIT_PIO_TRANSFER_MODE EQU 81h ; CFA feature set only 105 106 FEATURE_DISABLE_WRITE_CACHE EQU 82h ; Can also be used to flush cache 106 107 FEATURE_SET_TRANSFER_MODE EQU 03h ; Transfer mode goes to the Sector Count Register -
trunk/XTIDE_Universal_BIOS/Inc/ModuleDependency.inc
r471 r473 32 32 %endif 33 33 34 %ifdef MODULE_JRIDE35 %ifndef MODULE_8BIT_IDE36 %define MODULE_8BIT_IDE37 %endif38 %endif39 40 34 41 35 … … 44 38 %include "IDE_8bit.inc" ; For IDE 8-bit data port macros 45 39 %include "XTCF.inc" ; For Lo-tech XT-CF 40 %include "JRIDE_ISA.inc" ; For JR-IDE/ISA 46 41 %endif 47 42 … … 104 99 %endif 105 100 106 %ifdef MODULE_JRIDE107 MAIN_FLG_MODULE_JRIDE EQU FLG_ROMVARS_MODULE_JRIDE108 %else109 MAIN_FLG_MODULE_JRIDE EQU 0110 %endif111 112 101 %ifdef MODULE_SERIAL 113 102 MAIN_FLG_MODULE_SERIAL EQU FLG_ROMVARS_MODULE_SERIAL … … 134 123 %endif 135 124 136 MASK_ROMVARS_INCLUDED_MODULES EQU MAIN_FLG_MODULE_8BIT_IDE | MAIN_FLG_MODULE_ADVANCED_ATA | MAIN_FLG_MODULE_BOOT_MENU | MAIN_FLG_MODULE_EBIOS | MAIN_FLG_MODULE_HOTKEYS | MAIN_FLG_MODULE_IRQ | MAIN_FLG_MODULE_ JRIDE | MAIN_FLG_MODULE_SERIAL | MAIN_FLG_MODULE_SERIAL_FLOPPY | MAIN_FLG_MODULE_STRINGS_COMPRESSED | MAIN_FLG_MODULE_FEATURE_SETS125 MASK_ROMVARS_INCLUDED_MODULES EQU MAIN_FLG_MODULE_8BIT_IDE | MAIN_FLG_MODULE_ADVANCED_ATA | MAIN_FLG_MODULE_BOOT_MENU | MAIN_FLG_MODULE_EBIOS | MAIN_FLG_MODULE_HOTKEYS | MAIN_FLG_MODULE_IRQ | MAIN_FLG_MODULE_SERIAL | MAIN_FLG_MODULE_SERIAL_FLOPPY | MAIN_FLG_MODULE_STRINGS_COMPRESSED | MAIN_FLG_MODULE_FEATURE_SETS -
trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc
r437 r473 72 72 FLG_ROMVARS_MODULE_FEATURE_SETS EQU (1<<5) 73 73 FLG_ROMVARS_MODULE_8BIT_IDE EQU (1<<6) 74 FLG_ROMVARS_MODULE_JRIDE EQU (1<<7) 74 75 75 FLG_ROMVARS_MODULE_ADVANCED_ATA EQU (1<<8) 76 76 FLG_ROMVARS_MODULE_BOOT_MENU EQU (1<<9) … … 91 91 ;;; Word 0 92 92 .wSerialPortAndBaud: ; Serial connection port (low, divided by 4) and baud rate divisor (high) 93 .w Port:; IDE Base Port for Command Block (usual) Registers93 .wBasePort: ; IDE Base Port for Command Block (usual) Registers 94 94 .bSerialPort resb 1 95 95 .bSerialBaud resb 1 96 96 97 97 ;;; Word 1 98 .wPortCtrl: 98 .wControlBlockPort: 99 .bXTCFcontrolRegister: ; XT-CF autodetects ports 99 100 .bSerialUnused resb 1 ; IDE Base Port for Control Block Registers 100 101 … … 104 105 ;;; Word 2 105 106 .bDevice resb 1 ; Device type 106 107 107 .bIRQ resb 1 ; Interrupt Request Number 108 108 … … 137 137 138 138 ; Device types for IDEVARS.bDevice 139 ; IDE Devices are grouped so device numbers cannot be changed without modifying code elsewhere! 139 140 ; 140 DEVICE_8BIT_JRIDE_ISA EQU (0<<1) ; JR-IDE/ISA (must be 0) 141 DEVICE_8BIT_XTCF EQU (1<<1) ; Lo-tech XT-CF 142 DEVICE_8BIT_XTIDE_REV2 EQU (2<<1) ; Or rev 1 with swapped A0 and A3 (must be 1 or 2) 143 DEVICE_8BIT_XTIDE_REV1 EQU (3<<1) ; Must be 4 144 COUNT_OF_8BIT_IDE_DEVICES EQU 4 145 146 DEVICE_16BIT_ATA EQU (COUNT_OF_8BIT_IDE_DEVICES<<1) 147 DEVICE_32BIT_ATA EQU ((COUNT_OF_8BIT_IDE_DEVICES+1)<<1) 148 COUNT_OF_16BIT_IDE_DEVICES EQU 2 149 COUNT_OF_ALL_IDE_DEVICES EQU (COUNT_OF_8BIT_IDE_DEVICES + COUNT_OF_16BIT_IDE_DEVICES) 150 141 COUNT_OF_STANDARD_IDE_DEVICES EQU 2 142 COUNT_OF_8BIT_IDE_DEVICES EQU 6 143 COUNT_OF_ALL_IDE_DEVICES EQU (COUNT_OF_8BIT_IDE_DEVICES + COUNT_OF_STANDARD_IDE_DEVICES) 144 ; Standard port mapped I/O 145 DEVICE_16BIT_ATA EQU (0<<1) 146 DEVICE_32BIT_ATA EQU (1<<1) 147 DEVICE_8BIT_XTIDE_REV1 EQU (COUNT_OF_STANDARD_IDE_DEVICES<<1) 148 ; Address lines A0 and A3 are swapped 149 DEVICE_8BIT_XTIDE_REV2 EQU ((COUNT_OF_STANDARD_IDE_DEVICES+1)<<1) ; Or rev 1 with swapped A0 and A3 150 ; IDE Register offsets are SHL 1 151 DEVICE_8BIT_XTCF_PIO8 EQU ((COUNT_OF_STANDARD_IDE_DEVICES+2)<<1) ; XT-CF using 8-bit PIO mode 152 DEVICE_8BIT_XTCF_DMA EQU ((COUNT_OF_STANDARD_IDE_DEVICES+3)<<1) ; XT-CF using DMA 153 DEVICE_8BIT_XTCF_MEMMAP EQU ((COUNT_OF_STANDARD_IDE_DEVICES+4)<<1) ; XT-CF using Memory Mapped transfers (not I/O) 154 ; Memory Mapped I/O 155 DEVICE_8BIT_JRIDE_ISA EQU ((COUNT_OF_STANDARD_IDE_DEVICES+5)<<1) ; JR-IDE/ISA (Memory Mapped I/O) 156 ; Virtual devices 151 157 DEVICE_SERIAL_PORT EQU (COUNT_OF_ALL_IDE_DEVICES<<1) 152 158 -
trunk/XTIDE_Universal_BIOS/Inc/Version.inc
r461 r473 42 42 43 43 %define TITLE_STRING TITLE_STRING_START, TITLE_STRING_END 44 %define ROM_VERSION_STRING "v2.0.0",BETA,"2 (",__DATE__,")",NULL45 %define FLASH_SIGNATURE "XTIDE20 1" ; Do not terminate with NULL44 %define ROM_VERSION_STRING "v2.0.0",BETA,"2+ (",__DATE__,")",NULL 45 %define FLASH_SIGNATURE "XTIDE203" ; Do not terminate with NULL 46 46 47 47
Note:
See TracChangeset
for help on using the changeset viewer.