Changeset 630 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Inc/IdeIO.inc


Ignore:
Timestamp:
Dec 31, 2024, 3:38:24 PM (8 days ago)
Author:
Krister Nordvall
Message:

Changes:

  • Changed the g_szPCFlashSuccessful string in XTIDECFG to reflect the reality - it turns out ANY key was limited to just ENTER or ESC.
  • Removed the NEC V-specific optimization I added in r602 because NEC's documentation completely fails to mention that the ROL4 instruction also changes the high nibble of AL. Huge thanks to vcfed-member dreNorteR for discovering this and also for suggesting an optimization to the physical address conversion code in IdeTransfer.asm.
  • Made some changes to the OUTPUT_AL_TO_IDE_REGISTER and OUTPUT_AL_TO_IDE_CONTROL_BLOCK_REGISTER macros as an optimization. This saves 15+12 bytes in builds without MODULE_8BIT_IDE (e.g. the PS/2 builds).
  • Other minor optimizations and cleanups.
File:
1 edited

Legend:

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

    r623 r630  
    44;
    55; XTIDE Universal BIOS and Associated Tools
    6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
     6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2024 by XTIDE Universal BIOS Team.
    77;
    88; This program is free software; you can redistribute it and/or modify
     
    3737%ifndef MODULE_8BIT_IDE ; Standard IDE controllers only
    3838
    39     %ifnidni %1, dx
    40         mov     dx, %1
    41     %endif
    42     add     dx, [di+DPT.wBasePort]
     39    %ifdef IO_SEQUENCE
     40        %ifndef previous_parameter
     41            %ifnidni %1, dx
     42                mov     dx, %1
     43            %endif
     44            add     dx, [di+DPT.wBasePort]
     45        %elif previous_parameter + 1 = %1
     46            inc     dx
     47        %elif previous_parameter - 1 = %1
     48            dec     dx
     49        %elif previous_parameter = %1
     50        %else
     51            %ifnidni %1, dx
     52                mov     dx, %1
     53            %endif
     54            add     dx, [di+DPT.wBasePort]
     55        %endif
     56        %define previous_parameter %1
     57
     58    %else ; ~IO_SEQUENCE
     59        %undef previous_parameter
     60        %ifnidni %1, dx
     61            mov     dx, %1
     62        %endif
     63        add     dx, [di+DPT.wBasePort]
     64    %endif
    4365    out     dx, al
    4466
     
    5779%ifndef MODULE_8BIT_IDE ; Standard IDE controllers only
    5880
    59     eMOVZX  bx, [di+DPT.bIdevarsOffset]
    60     %ifnidni %1, dx
    61         mov     dx, %1
    62     %endif
    63     add     dx, [cs:bx+IDEVARS.wControlBlockPort]
     81    %ifdef IO_SEQUENCE
     82        %ifndef previous_parameter
     83            eMOVZX  bx, [di+DPT.bIdevarsOffset]
     84            %ifnidni %1, dx
     85                mov     dx, %1
     86            %endif
     87            add     dx, [cs:bx+IDEVARS.wControlBlockPort]
     88        %elif previous_parameter + 1 = %1
     89            inc     dx
     90        %elif previous_parameter - 1 = %1
     91            dec     dx
     92        %elif previous_parameter = %1
     93        %else
     94            eMOVZX  bx, [di+DPT.bIdevarsOffset]
     95            %ifnidni %1, dx
     96                mov     dx, %1
     97            %endif
     98            add     dx, [cs:bx+IDEVARS.wControlBlockPort]
     99        %endif
     100        %define previous_parameter %1
     101
     102    %else ; ~IO_SEQUENCE
     103        %undef previous_parameter
     104        eMOVZX  bx, [di+DPT.bIdevarsOffset]
     105        %ifnidni %1, dx
     106            mov     dx, %1
     107        %endif
     108        add     dx, [cs:bx+IDEVARS.wControlBlockPort]
     109    %endif
    64110    out     dx, al
    65111
Note: See TracChangeset for help on using the changeset viewer.