Changeset 400 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Inc


Ignore:
Timestamp:
Apr 20, 2012, 2:30:16 PM (13 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Moved 8-bit device support to MODULE_8BIT_IDE.
  • JR-IDE/ISA support requires a lot less bytes.
  • AT builds now always use full operating mode.
Location:
trunk/XTIDE_Universal_BIOS/Inc
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc

    r399 r400  
    4949
    5050    ; Bit definitions for DPT.bFlagsHigh
    51     FLGH_DPT_REVERSED_A0_AND_A3                 EQU (1<<0)  ; XTIDE mod, Address lines 0 and 3 reversed
    5251    FLGH_DPT_BLOCK_MODE_SUPPORTED               EQU (1<<1)  ; Use block transfer commands (must be bit 1!)
    5352    FLGH_DPT_SERIAL_DEVICE                      EQU (1<<2)  ; Serial Port Device
     
    7574    .dpt                    resb    DPT_size
    7675    .bBlockSize             resb    1   ; Current block size in sectors (do not set to zero!)
    77     .bInitError             resb    1
     76    .bDevice                resb    1   ; Device Type from IDEVARS (overrided when 32-bit controller detected)
    7877endstruc
    7978
    80 
    81     ; Flags for DPT_ATA.bInitError
    82     FLG_INITERROR_FAILED_TO_SELECT_DRIVE                EQU (1<<0)
    83     FLG_INITERROR_FAILED_TO_INITIALIZE_CHS_PARAMETERS   EQU (1<<1)
    84     FLG_INITERROR_FAILED_TO_SET_WRITE_CACHE             EQU (1<<2)
    85     FLG_INITERROR_FAILED_TO_RECALIBRATE_DRIVE           EQU (1<<3)
    86     FLG_INITERROR_FAILED_TO_SET_BLOCK_MODE              EQU (1<<4)
    87     FLG_INITERROR_FAILED_TO_SET_PIO_MODE                EQU (1<<5)
    88     FLG_INITERROR_FAILED_TO_INITIALIZE_STANDBY_TIMER    EQU (1<<6)
    8979
    9080; Additional variables needed to initialize and reset Advanced IDE Controllers.
     
    9787    .wMinPioCycleTime       resb    2   ; Minimum PIO Cycle Time in ns
    9888    .bPioMode               resb    1   ; Best supported PIO mode
    99     .bDevice                resb    1   ; Device Type from IDEVARS (overrided when 32-bit controller detected)
     89    .bInitError             resb    1   ; Flags for initialization errors
    10090endstruc
    10191%endif
     92
     93    ; Flags for DPT_ADVANCED_ATA.bInitError
     94    FLG_INITERROR_FAILED_TO_SELECT_DRIVE                EQU (1<<0)
     95    FLG_INITERROR_FAILED_TO_INITIALIZE_CHS_PARAMETERS   EQU (1<<1)
     96    FLG_INITERROR_FAILED_TO_SET_WRITE_CACHE             EQU (1<<2)
     97    FLG_INITERROR_FAILED_TO_RECALIBRATE_DRIVE           EQU (1<<3)
     98    FLG_INITERROR_FAILED_TO_SET_BLOCK_MODE              EQU (1<<4)
     99    FLG_INITERROR_FAILED_TO_SET_PIO_MODE                EQU (1<<5)
     100    FLG_INITERROR_FAILED_TO_INITIALIZE_STANDBY_TIMER    EQU (1<<6)
    102101
    103102
  • trunk/XTIDE_Universal_BIOS/Inc/DeviceIDE.inc

    r376 r400  
    2626
    2727; Polling timeout delays (system timer ticks, 1 tick = 54.9 ms)
    28 TIMEOUT_BSY             EQU     (2000/55)   ; 2000 ms
    29 TIMEOUT_DRDY            EQU     (2000/55)   ; 2000 ms
    3028TIMEOUT_DRQ             EQU     255         ;   14 s (some CF cards occasionally have long write delays)
    3129TIMEOUT_IDENTIFY_DEVICE EQU     (500/55)    ;  500 ms
    3230TIMEOUT_MOTOR_STARTUP   EQU     (10000/55)  ;   10 s
    3331
     32%ifdef MODULE_FEATURE_SETS
     33TIMEOUT_BSY             EQU     TIMEOUT_MOTOR_STARTUP
     34TIMEOUT_DRDY            EQU     TIMEOUT_MOTOR_STARTUP
     35%else
     36TIMEOUT_BSY             EQU     (2000/55)   ; 2000 ms
     37TIMEOUT_DRDY            EQU     (2000/55)   ; 2000 ms
     38%endif
    3439
    3540%endif ; DEVICEIDE_INC
  • trunk/XTIDE_Universal_BIOS/Inc/ModuleDependency.inc

    r398 r400  
    3232%endif
    3333
     34%ifdef MODULE_JRIDE
     35    %ifndef MODULE_8BIT_IDE
     36        %define MODULE_8BIT_IDE
     37    %endif
     38%endif
     39
    3440
    3541
    3642; Include module specific .INC files
     43%ifdef MODULE_8BIT_IDE
     44    %include "IDE_8bit.inc"         ; For IDE 8-bit data port macros
     45%endif
     46
    3747%ifdef MODULE_ADVANCED_ATA
    3848    %include "Vision.inc"           ; For QDI Vision QD65xx VLB IDE Controllers
     
    5767
    5868; Included modules for ROMVARS.wFlags
     69%ifdef MODULE_8BIT_IDE
     70    MAIN_FLG_MODULE_8BIT_IDE    EQU FLG_ROMVARS_MODULE_8BIT_IDE
     71%else
     72    MAIN_FLG_MODULE_8BIT_IDE    EQU 0
     73%endif
     74
    5975%ifdef MODULE_ADVANCED_ATA
    6076    MAIN_FLG_MODULE_ADVANCED_ATA    EQU FLG_ROMVARS_MODULE_ADVANCED_ATA
     
    111127%endif
    112128
    113 MASK_ROMVARS_INCLUDED_MODULES   EQU 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
     129%ifdef MODULE_FEATURE_SETS
     130    MAIN_FLG_MODULE_FEATURE_SETS    EQU FLG_ROMVARS_MODULE_FEATURE_SETS
     131%else
     132    MAIN_FLG_MODULE_FEATURE_SETS    EQU 0
     133%endif
     134
     135MASK_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_SETS
  • trunk/XTIDE_Universal_BIOS/Inc/RamVars.inc

    r376 r400  
    2222
    2323; Segment when RAMVARS is stored to top of interrupt vectors.
     24%ifndef USE_AT
    2425LITE_MODE_RAMVARS_SEGMENT   EQU     30h
     26%endif
    2527
    2628
  • trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc

    r398 r400  
    7070                                                ; (Conveniently, this is 8, a fact we exploit when testing the bit)
    7171
    72 FLG_ROMVARS_MODULE_ADVANCED_ATA         EQU (1<<7)  ; Here in case the configuration needs to know functionality is present
    73 FLG_ROMVARS_MODULE_BOOT_MENU            EQU (1<<8)  ; Here in case the configuration needs to know functionality is present
    74 FLG_ROMVARS_MODULE_EBIOS                EQU (1<<9)  ; Here in case the configuration needs to know functionality is present
    75 FLG_ROMVARS_MODULE_HOTKEYS              EQU (1<<10) ; Here in case the configuration needs to know functionality is present
    76 FLG_ROMVARS_MODULE_IRQ                  EQU (1<<11) ; Here in case the configuration needs to know functionality is present
    77 FLG_ROMVARS_MODULE_JRIDE                EQU (1<<12) ; Here in case the configuration needs to know functionality is present
    78 FLG_ROMVARS_MODULE_SERIAL               EQU (1<<13) ; Here in case the configuration needs to know functionality is present
    79 FLG_ROMVARS_MODULE_SERIAL_FLOPPY        EQU (1<<14) ; Here in case the configuration needs to know functionality is present
    80 FLG_ROMVARS_MODULE_STRINGS_COMPRESSED   EQU (1<<15) ; Here in case the configuration needs to know functionality is present
     72; Here in case the configuration needs to know functionality is present
     73FLG_ROMVARS_MODULE_FEATURE_SETS         EQU (1<<5)
     74FLG_ROMVARS_MODULE_8BIT_IDE             EQU (1<<6)
     75FLG_ROMVARS_MODULE_JRIDE                EQU (1<<7)
     76FLG_ROMVARS_MODULE_ADVANCED_ATA         EQU (1<<8)
     77FLG_ROMVARS_MODULE_BOOT_MENU            EQU (1<<9)
     78FLG_ROMVARS_MODULE_EBIOS                EQU (1<<10)
     79FLG_ROMVARS_MODULE_HOTKEYS              EQU (1<<11)
     80FLG_ROMVARS_MODULE_IRQ                  EQU (1<<12)
     81FLG_ROMVARS_MODULE_SERIAL               EQU (1<<13)
     82FLG_ROMVARS_MODULE_SERIAL_FLOPPY        EQU (1<<14)
     83FLG_ROMVARS_MODULE_STRINGS_COMPRESSED   EQU (1<<15)
    8184
    8285
     
    119122;
    120123DEVICE_XTIDE_DEFAULT_PORT               EQU     300h
    121 DEVICE_XTIDE_DEFAULT_PORTCTRL           EQU     DEVICE_XTIDE_DEFAULT_PORT + 8h
     124DEVICE_XTIDE_DEFAULT_PORTCTRL           EQU     (DEVICE_XTIDE_DEFAULT_PORT + 8h)
    122125
    123126DEVICE_ATA_PRIMARY_PORT                 EQU     1F0h
    124 DEVICE_ATA_PRIMARY_PORTCTRL             EQU     DEVICE_ATA_PRIMARY_PORT + 200h
     127DEVICE_ATA_PRIMARY_PORTCTRL             EQU     (DEVICE_ATA_PRIMARY_PORT + 200h)
    125128
    126129DEVICE_ATA_SECONDARY_PORT               EQU     170h
    127 DEVICE_ATA_SECONDARY_PORTCTRL           EQU     DEVICE_ATA_SECONDARY_PORT + 200h
     130DEVICE_ATA_SECONDARY_PORTCTRL           EQU     (DEVICE_ATA_SECONDARY_PORT + 200h)
    128131
    129132DEVICE_ATA_TERTIARY_PORT                EQU     1E8h
    130 DEVICE_ATA_TERTIARY_PORTCTRL            EQU     DEVICE_ATA_TERTIARY_PORT + 200h
     133DEVICE_ATA_TERTIARY_PORTCTRL            EQU     (DEVICE_ATA_TERTIARY_PORT + 200h)
    131134
    132135DEVICE_ATA_QUATERNARY_PORT              EQU     168h
    133 DEVICE_ATA_QUATERNARY_PORTCTRL          EQU     DEVICE_ATA_QUATERNARY_PORT + 200h
     136DEVICE_ATA_QUATERNARY_PORTCTRL          EQU     (DEVICE_ATA_QUATERNARY_PORT + 200h)
    134137
    135138
    136139; Device types for IDEVARS.bDevice
    137140;
    138 DEVICE_XTIDE_REV1                       EQU (0<<1)
    139 DEVICE_XTIDE_REV2                       EQU (1<<1)  ; Or rev 1 with swapped A0 and A3 (chuck mod)
    140 DEVICE_FAST_XTIDE                       EQU (2<<1)  ; (CPLD v2 project)
    141 DEVICE_16BIT_ATA                        EQU (3<<1)
    142 DEVICE_32BIT_ATA                        EQU (4<<1)
    143 DEVICE_SERIAL_PORT                      EQU (5<<1)
    144 DEVICE_JRIDE_ISA                        EQU (6<<1)
     141DEVICE_8BIT_JRIDE_ISA                   EQU (0<<1)  ; JR-IDE/ISA (must be 0)
     142DEVICE_8BIT_FAST_XTIDE                  EQU (1<<1)  ; CPLD v2 project (must be 1 or 2)
     143DEVICE_8BIT_XTIDE_REV2                  EQU (2<<1)  ; Or rev 1 with swapped A0 and A3 (must be 1 or 2)
     144DEVICE_8BIT_XTIDE_REV1                  EQU (3<<1)  ; Must be 4
     145COUNT_OF_8BIT_IDE_DEVICES               EQU 4
     146
     147DEVICE_16BIT_ATA                        EQU (COUNT_OF_8BIT_IDE_DEVICES<<1)
     148DEVICE_32BIT_ATA                        EQU ((COUNT_OF_8BIT_IDE_DEVICES+1)<<1)
     149COUNT_OF_16BIT_IDE_DEVICES              EQU 2
     150COUNT_OF_ALL_IDE_DEVICES                EQU (COUNT_OF_8BIT_IDE_DEVICES + COUNT_OF_16BIT_IDE_DEVICES)
     151
     152DEVICE_SERIAL_PORT                      EQU (COUNT_OF_ALL_IDE_DEVICES<<1)
     153
    145154
    146155
Note: See TracChangeset for help on using the changeset viewer.