Changeset 445 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs


Ignore:
Timestamp:
Aug 29, 2012, 12:59:23 PM (12 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes:

  • A speed optimization to the eSHL_IM macro for 386 and higher. This change breaks emulation in the sense that the macro will fail when given a memory operand as the first parameter.
  • Memory_SumCXbytesFromESSItoAL now returns with the zero flag set/cleared according to the result.
  • Unrolled all the 8 bit READ transfer loops to do 16 bytes per iteration. Added a new macro (UNROLL_SECTORS_IN_CX_TO_OWORDS) as part of it. Size wise this is expensive but I think it should be worth the ROM space. The WRITE transfer loops were left as is since writes are rare anyway (<10% of all disk I/O IIRC).
  • Minor optimizations and fixes here and there.
Location:
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AtaGeometry.asm

    r423 r445  
    44;
    55;                   These algorithms are taken from: http://www.mossywell.com/boot-sequence
    6 ;                   Take a look at it for more detailed information.       
     6;                   Take a look at it for more detailed information.
    77;
    88;                   This file is shared with BIOS Drive Information Tool.
    99
    1010;
    11 ; XTIDE Universal BIOS and Associated Tools 
     11; XTIDE Universal BIOS and Associated Tools
    1212; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
    1313;
     
    1616; the Free Software Foundation; either version 2 of the License, or
    1717; (at your option) any later version.
    18 ; 
     18;
    1919; This program is distributed in the hope that it will be useful,
    2020; but WITHOUT ANY WARRANTY; without even the implied warranty of
    2121; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    22 ; GNU General Public License for more details.     
     22; GNU General Public License for more details.
    2323; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
    2424;
    25        
     25
    2626; Section containing code
    2727SECTION .text
     
    3333;       ES:SI:  Ptr to 512-byte ATA information read from the drive
    3434;   Returns:
    35 ;       BX:DX:AX:   48-bit sectohr count
     35;       BX:DX:AX:   48-bit sector count
    3636;       CL:         FLGL_DPT_LBA48 if LBA48 supported
    3737;                   Zero if only LBA28 is supported
     
    239239    jbe     SHORT ReturnLCHSinAXBLBH
    240240    shr     ax, 1       ; Halve cylinders
    241     shl     bl, 1       ; Double heads
     241    eSHL_IM bl, 1       ; Double heads
    242242    inc     cx          ; Increment bit shift count
    243243    mov     dl, TRANSLATEMODE_LARGE
     
    300300    cmp     ax, cx
    301301    jbe     SHORT .NumberOfHeadsNowInCX
    302     shl     cx, 1                       ; Double number of heads
    303     test    ch, ch                      ; Reached 256 heads?
    304     jz      SHORT .CompareNextValidNumberOfHeads
    305     dec     cx                          ;  If so, limit heads to 255
     302    eSHL_IM cl, 1                       ; Double number of heads
     303    jnz     SHORT .CompareNextValidNumberOfHeads    ; Reached 256 heads?
     304    dec     cl                          ;  If so, limit heads to 255
    306305.NumberOfHeadsNowInCX:
    307306    mov     bx, cx                      ; Number of heads are returned in BL
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm

    r422 r445  
    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
     
    145145
    146146    ; Compare user defined and ATA-ID sector count and select smaller
    147     xor     dx, dx
    148     xchg    bx, dx      ; User defined LBA now in BX:DX:AX
     147    mov     dx, bx
     148    xor     bx, bx      ; User defined LBA now in BX:DX:AX
    149149    cmp     bx, [di+DPT.twLbaSectors+4]
    150150    jb      SHORT .StoreUserDefinedSectorCountToDPT
Note: See TracChangeset for help on using the changeset viewer.