Changeset 266 in xtideuniversalbios


Ignore:
Timestamp:
Feb 24, 2012, 3:06:16 PM (13 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Some fixes for JR-IDE/ISA code (still not working).
Location:
trunk/XTIDE_Universal_BIOS/Src/Device
Files:
4 edited

Legend:

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

    r249 r266  
    5656    mov     [di+DPT.bIdevarsOffset], bp
    5757    mov     BYTE [di+DPT_ATA.bSetBlock], 1  ; Block = 1 sector
     58%ifdef ASSEMBLE_SHARED_IDE_DEVICE_FUNCTIONS
    5859    call    IdeDPT_StoreReversedAddressLinesFlagIfNecessary
     60%endif
    5961
    6062    ; Wait until drive motors have reached max speed
     
    108110    ; Output Device Control Byte to enable or disable interrupts
    109111    mov     al, [bp+IDEPACK.bDeviceControl]
     112%ifdef ASSEMBLE_SHARED_IDE_DEVICE_FUNCTIONS ; JR-IDE/ISA
    110113    test    al, FLG_DEVCONTROL_nIEN ; Interrupts disabled?
    111114    jnz     SHORT .DoNotSetInterruptInServiceFlag
     
    118121    pop     ds
    119122.DoNotSetInterruptInServiceFlag:
     123%endif
    120124    OUTPUT_AL_TO_IDE_CONTROL_BLOCK_REGISTER DEVICE_CONTROL_REGISTER_out
    121125
     
    127131    eMOVZX  ax, BYTE [bp+IDEPACK.bLbaLowExt]
    128132    mov     cx, [bp+IDEPACK.wLbaMiddleAndHighExt]
    129     call    OutputSectorCountAndAddress
     133    call    IDEDEVICE%+OutputSectorCountAndAddress
    130134
    131135    ; Output Sector Address Low
    132136    mov     ax, [bp+IDEPACK.wSectorCountAndLbaLow]
    133137    mov     cx, [bp+IDEPACK.wLbaMiddleAndHigh]
    134     call    OutputSectorCountAndAddress
     138    call    IDEDEVICE%+OutputSectorCountAndAddress
    135139
    136140    ; Output command
     
    198202;       AL, BX, DX
    199203;--------------------------------------------------------------------
    200 %ifdef ASSEMBLE_SHARED_IDE_DEVICE_FUNCTIONS
    201 ALIGN JUMP_ALIGN
    202 OutputSectorCountAndAddress:
     204ALIGN JUMP_ALIGN
     205IDEDEVICE%+OutputSectorCountAndAddress:
    203206    OUTPUT_AL_TO_IDE_REGISTER SECTOR_COUNT_REGISTER
    204207
     
    211214    mov     al, ch
    212215    JUMP_TO_OUTPUT_AL_TO_IDE_REGISTER LBA_HIGH_REGISTER
    213 %endif
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeError.asm

    r238 r266  
    3030
    3131    ; Fall to GetBiosErrorCodeToAHfromStatusAndErrorRegistersInAX
    32 
     32%ifndef ASSEMBLE_SHARED_IDE_DEVICE_FUNCTIONS    ; JR-IDE/ISA
     33    jmp     GetBiosErrorCodeToAHfromStatusAndErrorRegistersInAX
     34%endif
    3335
    3436;--------------------------------------------------------------------
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeWait.asm

    r238 r266  
    7676;       AL, BX, CX, DX
    7777;--------------------------------------------------------------------
    78 %ifdef ASSEMBLE_SHARED_IDE_DEVICE_FUNCTIONS
    79 PollBsyAndFlgInAH:
    80     call    IDEDEVICE%+ReadIdeStatusRegisterToAL; Discard contents for first read
     78IDEDEVICE%+PollBsyAndFlgInAH:
     79    INPUT_TO_AL_FROM_IDE_REGISTER   STATUS_REGISTER_in  ; Discard contents for first read
    8180ALIGN JUMP_ALIGN
    8281.PollLoop:
    83     call    IDEDEVICE%+ReadIdeStatusRegisterToAL
     82    INPUT_TO_AL_FROM_IDE_REGISTER   STATUS_REGISTER_in
    8483    test    al, FLG_STATUS_BSY                  ; Controller busy?
    8584    jnz     SHORT .UpdateTimeout                ;  If so, jump to timeout update
     
    9594.ReturnErrorCodeInAH:
    9695    ret
    97 %endif
    9896
    9997
     
    110108;--------------------------------------------------------------------
    111109IDEDEVICE%+PollBsyOnly:
    112     call    IDEDEVICE%+ReadIdeStatusRegisterToAL; Discard contents for first read
     110    INPUT_TO_AL_FROM_IDE_REGISTER   STATUS_REGISTER_in  ; Discard contents for first read
    113111ALIGN JUMP_ALIGN
    114112.PollLoop:
    115     call    IDEDEVICE%+ReadIdeStatusRegisterToAL
     113    INPUT_TO_AL_FROM_IDE_REGISTER   STATUS_REGISTER_in
    116114    test    al, FLG_STATUS_BSY                  ; Controller busy?
    117115    jz      SHORT IDEDEVICE%+Error_GetBiosErrorCodeToAHfromPolledStatusRegisterInAL
     
    119117    jnc     SHORT .PollLoop                     ; Loop if time left (sets CF on timeout)
    120118    jmp     SHORT IDEDEVICE%+Error_GetBiosErrorCodeToAHfromPolledStatusRegisterInAL
    121 
    122 
    123 ;--------------------------------------------------------------------
    124 ; ReadIdeStatusRegisterToAL
    125 ;   Parameters:
    126 ;       DS:DI:  Ptr to DPT (in RAMVARS segment)
    127 ;   Returns:
    128 ;       AL:     IDE Status Register contents
    129 ;   Corrupts registers:
    130 ;       BX, DX
    131 ;--------------------------------------------------------------------
    132 ALIGN JUMP_ALIGN
    133 IDEDEVICE%+ReadIdeStatusRegisterToAL:
    134     JUMP_TO_INPUT_TO_AL_FROM_IDE_REGISTER STATUS_REGISTER_in
  • trunk/XTIDE_Universal_BIOS/Src/Device/MemoryMappedIDE/MemIdeTransfer.asm

    r242 r266  
    160160.WriteLastBlockToDrive:
    161161    mov     ch, [bp+PIOVARS.wWordsLeft+1]       ; Sectors left
    162 %ifndef USE_186
    163     mov     bx, CheckErrorsAfterTransferringLastMemoryMappedBlock
    164     push    bx
    165 %else
    166     push    CheckErrorsAfterTransferringLastMemoryMappedBlock
    167 %endif
     162    ePUSH_T bx, CheckErrorsAfterTransferringLastMemoryMappedBlock
    168163    ; Fall to WriteSingleBlockFromDSSIToSectorAccessWindowInESDI
    169164
Note: See TracChangeset for help on using the changeset viewer.