Changeset 493 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Device


Ignore:
Timestamp:
Dec 21, 2012, 8:44:25 AM (12 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

Separated MODULE_8BIT_IDE into the basic part used by XTIDE rev 1 and rev 2 which is PIO based, and MODULE_8BIT_IDE_ADVANCED for JRIDE and XTCF support which requires memory mapping and/or DMA. This allows for creating an 8KB image with boot menu support (but no hotkeys) for the XTIDE rev 1. Cleaned up how we reset the drive translation information, ensuring it is properly set between boot attempt on a primary and secondary drive - as a result we clean it when needed, rather than trying to always keep it clean. Also fixed translation bugs in int13h.asm where I had previously missed converting some MODULE_HOTKEYS into MODULE_DRIVEXLATE.

Location:
trunk/XTIDE_Universal_BIOS/Src/Device/IDE
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm

    r480 r493  
    8787    call    Idepack_FakeToSSBP
    8888
    89 %ifdef MODULE_8BIT_IDE
     89%ifdef MODULE_8BIT_IDE_ADVANCED
    9090    ; Enable 8-bit PIO mode for 8-bit ATA and XT-CF
    9191    push    si
     
    9494    call    AH9h_SetModeFromALtoXTCF
    9595    pop     si
    96 %endif ; MODULE_8BIT_IDE
     96%endif ; MODULE_8BIT_IDE_ADVANCED
    9797
    9898    ; Prepare to output Identify Device command
     
    172172    cmp     bl, FLG_STATUS_DRQ              ; Data transfer started?
    173173    jne     SHORT .WaitUntilNonTransferCommandCompletes
    174 %ifdef MODULE_8BIT_IDE
     174%ifdef MODULE_8BIT_IDE_ADVANCED
    175175    cmp     BYTE [di+DPT_ATA.bDevice], DEVICE_8BIT_XTCF_MEMMAP
    176176    jae     SHORT JrIdeTransfer_StartWithCommandInAL    ; DEVICE_8BIT_XTCF_MEMMAP or DEVICE_8BIT_JRIDE_ISA
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIO.asm

    r491 r493  
    5858    je      SHORT .ReverseA0andA3fromRegisterIndexInDX
    5959    jb      SHORT .InputToALfromRegisterInDX    ; Standard IDE controllers and XTIDE rev 1
     60       
     61%ifdef MODULE_8BIT_IDE_ADVANCED
    6062    cmp     al, DEVICE_8BIT_JRIDE_ISA
    6163    jne     SHORT .ShlRegisterIndexInDX         ; All XT-CF modes
     
    6870    pop     ds
    6971    ret
    70 
     72%endif
     73       
    7174.ReverseA0andA3fromRegisterIndexInDX:
    7275    mov     dl, [cs:bx+g_rgbSwapA0andA3fromIdeRegisterIndex]
     
    103106    cmp     bl, DEVICE_8BIT_XTIDE_REV2
    104107    jbe     SHORT .OutputALtoControlBlockRegisterInDX   ; Standard IDE controllers and XTIDE rev 1
     108       
     109%ifdef MODULE_8BIT_IDE_ADVANCED
    105110    cmp     bl, DEVICE_8BIT_JRIDE_ISA
    106111    jne     SHORT .ShlRegisterIndexInDX     ; All XT-CF modes
     
    115120    eSHL_IM dx, 1
    116121    jmp     SHORT OutputALtoRegisterInDX
     122%endif
    117123
    118124.OutputALtoControlBlockRegisterInDX:
     
    141147    je      SHORT .ReverseA0andA3fromRegisterIndexInDX
    142148    jb      SHORT OutputALtoRegisterInDX    ; Standard IDE controllers and XTIDE rev 1
     149
     150%ifdef MODULE_8BIT_IDE_ADVANCED
    143151    cmp     bl, DEVICE_8BIT_JRIDE_ISA
    144152    jne     SHORT .ShlRegisterIndexInDX     ; All XT-CF modes
     
    154162    pop     ds
    155163    ret
    156 
     164%endif
     165       
    157166.ReverseA0andA3fromRegisterIndexInDX:
    158167    mov     bx, dx
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm

    r491 r493  
    218218    xchg    ax, bx                              ; Lookup table offset to AX
    219219    mov     bl, [di+DPT_ATA.bDevice]
    220 %ifdef MODULE_8BIT_IDE
     220%ifdef MODULE_8BIT_IDE_ADVANCED
    221221    mov     dl, bl
    222222%endif
     
    226226
    227227    ; Normalize pointer for PIO-transfers and convert to physical address for DMA transfers
    228 %ifdef MODULE_8BIT_IDE
     228%ifdef MODULE_8BIT_IDE_ADVANCED
    229229    cmp     dl, DEVICE_8BIT_XTCF_DMA
    230230    jb      SHORT IdeTransfer_NormalizePointerInESSI
     
    281281%endif                  ; 26    29/26
    282282    ret
    283 %endif ; MODULE_8BIT_IDE
     283%endif ; MODULE_8BIT_IDE_ADVANCED
    284284    ; Fall to IdeTransfer_NormalizePointerInESSI if no MODULE_8BIT_IDE
    285285
     
    308308        dw      IdePioBlock_ReadFromXtideRev1       ; 3, DEVICE_8BIT_XTIDE_REV1
    309309        dw      IdePioBlock_ReadFromXtideRev2       ; 4, DEVICE_8BIT_XTIDE_REV2
     310%ifdef MODULE_8BIT_IDE_ADVANCED
    310311        dw      IdePioBlock_ReadFrom8bitDataPort    ; 5, DEVICE_8BIT_XTCF_PIO8
    311312        dw      IdeDmaBlock_ReadFromXTCF            ; 6, DEVICE_8BIT_XTCF_DMA
     313%endif
    312314%endif
    313315
     
    320322        dw      IdePioBlock_WriteToXtideRev1        ; 3, DEVICE_8BIT_XTIDE_REV1
    321323        dw      IdePioBlock_WriteToXtideRev2        ; 4, DEVICE_8BIT_XTIDE_REV2
     324%ifdef MODULE_8BIT_IDE_ADVANCED     
    322325        dw      IdePioBlock_WriteTo8bitDataPort     ; 5, DEVICE_8BIT_XTCF_PIO8
    323326        dw      IdeDmaBlock_WriteToXTCF             ; 6, DEVICE_8BIT_XTCF_DMA
    324327%endif
     328%endif
Note: See TracChangeset for help on using the changeset viewer.