Changeset 412 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Device/IDE


Ignore:
Timestamp:
Apr 28, 2012, 4:08:03 PM (13 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes:

  • Minor optimizations to the JR-IDE/ISA code.
  • Some cleanups (the MemoryMappedIDE folder and Bootmenu_SwapDrives.txt were deleted).
Location:
trunk/XTIDE_Universal_BIOS/Src/Device/IDE
Files:
2 edited

Legend:

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

    r400 r412  
    33
    44;
    5 ; XTIDE Universal BIOS and Associated Tools 
     5; XTIDE Universal BIOS and Associated Tools
    66; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
    77;
     
    1010; the Free Software Foundation; either version 2 of the License, or
    1111; (at your option) any later version.
    12 ; 
     12;
    1313; This program is distributed in the hope that it will be useful,
    1414; but WITHOUT ANY WARRANTY; without even the implied warranty of
    1515; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16 ; GNU General Public License for more details.     
     16; GNU General Public License for more details.
    1717; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
    18 ;       
     18;
    1919
    2020; Section containing code
     
    4242    jmp     SHORT OutputToJrIdeRegister
    4343.OutputToIoMappedIde:
    44 %endif
    45 %endif
     44%endif  ; MODULE_JRIDE
     45%endif  ; MODULE_8BIT_IDE
    4646
    4747    mov     bl, IDEVARS.wPortCtrl
     
    6868    jnz     SHORT OutputALtoIOmappedIdeRegisterInDL
    6969
     70%if JRIDE_COMMAND_BLOCK_REGISTER_WINDOW_OFFSET & 0FFh = 0
     71    mov     dh, JRIDE_COMMAND_BLOCK_REGISTER_WINDOW_OFFSET >> 8
     72%else
    7073    add     dx, JRIDE_COMMAND_BLOCK_REGISTER_WINDOW_OFFSET
     74%endif
    7175OutputToJrIdeRegister:
    7276    mov     bx, dx
     
    7579ALIGN JUMP_ALIGN
    7680OutputALtoIOmappedIdeRegisterInDL:
    77 %endif
    78 %endif
     81%endif  ; MODULE_JRIDE
     82%endif  ; MODULE_8BIT_IDE
    7983
    8084    mov     bl, IDEVARS.wPort
     
    116120    jnz     SHORT .InputToALfromIOmappedIdeRegisterInDL
    117121
     122%if JRIDE_COMMAND_BLOCK_REGISTER_WINDOW_OFFSET & 0FFh = 0
     123    mov     dh, JRIDE_COMMAND_BLOCK_REGISTER_WINDOW_OFFSET >> 8
     124%else
    118125    add     dx, JRIDE_COMMAND_BLOCK_REGISTER_WINDOW_OFFSET
     126%endif
    119127    mov     bx, dx
    120128    mov     al, [cs:bx]
    121129    ret
    122130.InputToALfromIOmappedIdeRegisterInDL:
    123 %endif
    124 %endif
     131%endif  ; MODULE_JRIDE
     132%endif  ; MODULE_8BIT_IDE
    125133    mov     bl, IDEVARS.wPort
    126134    call    GetIdePortToDX
     
    172180%else   ; Only standard IDE devices
    173181    xor     bh, bh
     182    add     bl, [di+DPT.bIdevarsOffset]         ; CS:BX now points port address
    174183    xor     dh, dh
    175     add     bl, [di+DPT.bIdevarsOffset]     ; CS:BX now points port address
    176     add     dx, [cs:bx]                     ; DX now has port address
     184    add     dx, [cs:bx]                         ; DX now has port address
    177185    ret
    178186%endif
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/JrIdeTransfer.asm

    r400 r412  
    33
    44;
    5 ; XTIDE Universal BIOS and Associated Tools 
     5; XTIDE Universal BIOS and Associated Tools
    66; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
    77;
     
    1010; the Free Software Foundation; either version 2 of the License, or
    1111; (at your option) any later version.
    12 ; 
     12;
    1313; This program is distributed in the hope that it will be useful,
    1414; but WITHOUT ANY WARRANTY; without even the implied warranty of
    1515; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16 ; GNU General Public License for more details.     
     16; GNU General Public License for more details.
    1717; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
    18 ;               
     18;
    1919
    2020; Structure containing variables for PIO transfer functions.
     
    9393
    9494    mov     cx, [bp+MEMPIOVARS.wSectorsInBlock]
    95 
    96 ALIGN JUMP_ALIGN
    97 .ReadNextBlockFromDrive:
    9895    cmp     [bp+MEMPIOVARS.bSectorsLeft], cl
    9996    jbe     SHORT .ReadLastBlockFromDrive
     97
     98ALIGN JUMP_ALIGN
     99.ReadNextBlockFromDrive:
    100100    call    ReadSingleBlockFromSectorAccessWindowInDSSItoESDI
    101101    call    WaitUntilReadyToTransferNextBlock
     
    104104    ; Increment number of successfully read sectors
    105105    mov     cx, [bp+MEMPIOVARS.wSectorsInBlock]
     106    add     [bp+MEMPIOVARS.bSectorsDone], cl
    106107    sub     [bp+MEMPIOVARS.bSectorsLeft], cl
    107     add     [bp+MEMPIOVARS.bSectorsDone], cl
    108     jmp     SHORT .ReadNextBlockFromDrive
     108    ja      SHORT .ReadNextBlockFromDrive
    109109
    110110ALIGN JUMP_ALIGN
     
    123123    lds     di, [bp+MEMPIOVARS.fpDPT]           ; DPT now in DS:DI
    124124%ifdef USE_386
    125     movzx   cx, BYTE [bp+MEMPIOVARS.bSectorsDone]
     125    movzx   cx, [bp+MEMPIOVARS.bSectorsDone]
    126126%else
    127127    mov     ch, 0
     
    158158
    159159    mov     cx, [bp+MEMPIOVARS.wSectorsInBlock]
    160 
    161 ALIGN JUMP_ALIGN
    162 .WriteNextBlockToDrive:
    163160    cmp     [bp+MEMPIOVARS.bSectorsLeft], cl
    164161    jbe     SHORT .WriteLastBlockToDrive
     162
     163ALIGN JUMP_ALIGN
     164.WriteNextBlockToDrive:
    165165    call    WriteSingleBlockFromDSSIToSectorAccessWindowInESDI
    166166    call    WaitUntilReadyToTransferNextBlock
     
    169169    ; Increment number of successfully written WORDs
    170170    mov     cx, [bp+MEMPIOVARS.wSectorsInBlock]
     171    add     [bp+MEMPIOVARS.bSectorsDone], cl
    171172    sub     [bp+MEMPIOVARS.bSectorsLeft], cl
    172     add     [bp+MEMPIOVARS.bSectorsDone], cl
    173     jmp     SHORT .WriteNextBlockToDrive
     173    ja      SHORT .WriteNextBlockToDrive
    174174
    175175ALIGN JUMP_ALIGN
     
    255255
    256256%if JRIDE_SECTOR_ACCESS_WINDOW_SIZE <> 512
    257     %error "JRIDE_SECTOR_ACCESS_WINDOW_SIZE is no longer equal to 512. MemIdeTransfer.asm needs changes."
     257    %error "JRIDE_SECTOR_ACCESS_WINDOW_SIZE is no longer equal to 512. JrIdeTransfer.asm needs changes."
    258258%endif
Note: See TracChangeset for help on using the changeset viewer.