Changeset 491 in xtideuniversalbios


Ignore:
Timestamp:
Dec 15, 2012, 2:46:29 PM (9 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes:

  • Added a new define (USE_UNDOC_INTEL) that enables optimizations possible by using undocumented instructions available on all Intel processors and truly compatible clones. AFAIK the only exceptions are the NEC V-series and the Sony CXQ70108 processors so this option should be safe for use on the AT builds.
  • Building BIOSDRVS or the BIOS without MODULE_STRINGS_COMPRESSED would fail due to the recent code exclusions so I changed them a bit. Also fixed the mistaken change to Main.asm
  • Changed the Tandy specific info in Configuration_FullMode.txt so it matches the info in the Wiki.
  • Optimizations and fixes in general.
Location:
trunk
Files:
40 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Inc/Emulate.inc

    r489 r491  
    5757
    5858;==========================================================================
     59
     60;--------------------------------------------------------------------
     61; The undocumented instruction SALC (Set AL According to CF).
     62; Available on all Intel processors and truly compatible clones.
     63; Does not work on the NEC V20/V30 or Sony CXQ70108 processors.
     64;
     65; eSALC
     66;   Parameters:
     67;       Nothing
     68;   Returns:
     69;       AL:     FFh if CF=1
     70;               00h if CF=0
     71;   Corrupts registers:
     72;       Nothing
     73;--------------------------------------------------------------------
     74%macro eSALC 0
     75    db      0D6h
     76%endmacro
     77
     78
     79;--------------------------------------------------------------------
     80; The AAD instruction (ASCII Adjust before Division).
     81; Available on all Intel processors and truly compatible clones.
     82; Does not work on the NEC V20/V30 or Sony CXQ70108 processors
     83; unless %1 is 10 (0Ah).
     84;
     85; eAAD
     86;   Parameters:
     87;       %1:     Any 8 bit number (0...255)
     88;   Returns:
     89;       AL:     AH * %1 + AL
     90;       AH:     0
     91;       Flags:  Set according to result
     92;   Corrupts registers:
     93;       Nothing
     94;--------------------------------------------------------------------
     95%macro eAAD 1
     96%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
     97    %if %1 > 255
     98        %error Invalid parameter passed to eAAD (%1 > 255)
     99    %else
     100        db      0D5h, %1
     101    %endif
     102%endif
     103%endmacro
     104
     105
     106;--------------------------------------------------------------------
     107; The AAM instruction (ASCII Adjust after Multiplication).
     108; Available on all Intel processors and truly compatible clones.
     109; Does not work on the NEC V20/V30 or Sony CXQ70108 processors
     110; unless %1 is 10 (0Ah).
     111;
     112; eAAM
     113;   Parameters:
     114;       %1:     Any 8 bit number except 0 (1...255)
     115;   Returns:
     116;       AL:     AL MOD %1
     117;       AH:     AL / %1
     118;       Flags:  Set according to result
     119;   Corrupts registers:
     120;       Nothing
     121;--------------------------------------------------------------------
     122%macro eAAM 1
     123%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
     124    %if %1 > 255
     125        %error Invalid parameter passed to eAAM (%1 > 255)
     126    %elif %1 = 0
     127        %error Invalid parameter passed to eAAM (%1 = 0). This would cause a divide-by-zero exception!
     128    %else
     129        db      0D4h, %1
     130    %endif
     131%endif
     132%endmacro
     133
    59134
    60135;--------------------------------------------------------------------
  • trunk/Assembly_Library/Src/Display/CgaSnow.asm

    r489 r491  
    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
     
    9494    ret
    9595
    96 %ifdef INCLUDE_MENU_LIBRARY
     96
    9797;--------------------------------------------------------------------
    9898; CgaSnow_RepMovsb
     
    107107;       AX, CX, DX
    108108;--------------------------------------------------------------------
     109%ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     110    %ifdef MODULE_STRINGS_COMPRESSED
     111        %define EXCLUDE
     112    %endif
     113    %ifdef MODULE_BOOT_MENU
     114        %undef EXCLUDE
     115    %endif
     116%endif
     117
     118%ifndef EXCLUDE
    109119ALIGN DISPLAY_JUMP_ALIGN
    110120CgaSnow_RepMovsb:
     
    123133    ret
    124134%endif
     135%undef EXCLUDE
     136
    125137
    126138;--------------------------------------------------------------------
  • trunk/Assembly_Library/Src/Display/DisplayContext.asm

    r489 r491  
    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
     
    102102
    103103
    104 %ifdef INCLUDE_MENU_LIBRARY
    105 
    106104;--------------------------------------------------------------------
    107105; DisplayContext_Push
     106; DisplayContext_Pop
    108107;   Parameters:
    109108;       Nothing
     
    113112;       AX, DI
    114113;--------------------------------------------------------------------
     114%ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     115    %ifndef MODULE_BOOT_MENU
     116        %define EXCLUDE
     117    %endif
     118%endif
     119
     120%ifndef EXCLUDE
    115121ALIGN DISPLAY_JUMP_ALIGN
    116122DisplayContext_Push:
     
    126132    %endrep
    127133%endif
    128        
     134
    129135    mov     ds, di                  ; Restore DS
    130136    jmp     ax
    131137
    132 ;--------------------------------------------------------------------
    133 ; DisplayContext_Pop
    134 ;   Parameters:
    135 ;       Nothing
    136 ;   Returns:
    137 ;       Nothing
    138 ;   Corrupts registers:
    139 ;       AX, DI
    140 ;--------------------------------------------------------------------
     138
    141139ALIGN DISPLAY_JUMP_ALIGN
    142140DisplayContext_Pop:
     
    145143    pop     ax                      ; Pop return address
    146144
    147 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS       
     145%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    148146    %assign i DISPLAY_CONTEXT_size-2
    149147    %rep DISPLAY_CONTEXT_size / 2
     
    152150    %endrep
    153151%endif
    154        
     152
    155153    push    ax                      ; Push return address
    156154    push    dx
     
    159157    mov     ds, di                  ; Restore DS
    160158    ret
    161 %endif
     159%endif ; EXCLUDE
     160%undef EXCLUDE
     161
    162162
    163163;--------------------------------------------------------------------
     
    189189    pop     ds
    190190    ret
    191 
    192 %endif  ; INCLUDE_MENU_LIBRARY
     191%endif ; EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    193192
    194193
     
    231230%endif
    232231
    233 %ifdef INCLUDE_MENU_LIBRARY
    234 
     232
     233%ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     234    %ifndef MODULE_BOOT_MENU
     235        %define EXCLUDE
     236    %endif
     237%endif
    235238;--------------------------------------------------------------------
    236239; DisplayContext_SetCharOutputFunctionFromAXwithAttribFlagInBL
     
    244247;       BL
    245248;--------------------------------------------------------------------
     249%ifndef EXCLUDE ; 1 of 3
    246250ALIGN DISPLAY_JUMP_ALIGN
    247251DisplayContext_SetCharOutputFunctionFromAXwithAttribFlagInBL:
     
    251255    mov     [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.fnCharOut], ax
    252256    ret
     257%endif
    253258
    254259
     
    263268;       Nothing
    264269;--------------------------------------------------------------------
     270%ifndef EXCLUDE ; 2 of 3
    265271ALIGN DISPLAY_JUMP_ALIGN
    266272DisplayContext_SetCharacterAttributeFromAL:
    267273    mov     [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.bAttribute], al
    268274    ret
     275%endif
    269276
    270277
     
    279286;       Nothing
    280287;--------------------------------------------------------------------
     288%ifndef EXCLUDE ; 3 of 3
    281289ALIGN DISPLAY_JUMP_ALIGN
    282290DisplayContext_SetCharacterOutputParameterFromAX:
    283291    mov     [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.wCharOutParam], ax
    284292    ret
    285        
    286 %endif   ; INCLUDE_MENU_LIBRARY
    287        
     293%endif
     294
     295%undef EXCLUDE
     296
     297
    288298;--------------------------------------------------------------------
    289299; DisplayContext_GetCharacterOutputParameterToDX
     
    295305;       Nothing
    296306;--------------------------------------------------------------------
    297 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG  ; This is currently unused (dead code)
     307%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG
    298308ALIGN DISPLAY_JUMP_ALIGN
    299309DisplayContext_GetCharacterOutputParameterToDX:
     
    322332%endif
    323333
    324        
     334
    325335;--------------------------------------------------------------------
    326336; DisplayContext_GetByteOffsetToAXfromCharacterOffsetInAX
  • trunk/Assembly_Library/Src/Display/DisplayCursor.asm

    r489 r491  
    3737    ret
    3838
    39 %ifdef INCLUDE_MENU_LIBRARY
     39
    4040;--------------------------------------------------------------------
    4141; DisplayCursor_SetShapeFromAX
     
    4848;       Nothing
    4949;--------------------------------------------------------------------
     50%ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     51    %ifndef MODULE_BOOT_MENU
     52        %define EXCLUDE
     53    %endif
     54%endif
     55
     56%ifndef EXCLUDE
    5057ALIGN DISPLAY_JUMP_ALIGN
    5158DisplayCursor_SetShapeFromAX:
     
    5360    ret
    5461%endif
    55        
     62%undef EXCLUDE
     63
     64
    5665;--------------------------------------------------------------------
    5766; DisplayCursor_SetCoordinatesFromAX
  • trunk/Assembly_Library/Src/Display/DisplayPrint.asm

    r489 r491  
    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
     
    109109
    110110
    111 %ifndef MODULE_STRINGS_COMPRESSED
    112111;--------------------------------------------------------------------
    113112; DisplayPrint_WordFromAXWithBaseInBX
     
    122121;       AX, DX
    123122;--------------------------------------------------------------------
     123%ifndef MODULE_STRINGS_COMPRESSED
    124124ALIGN DISPLAY_JUMP_ALIGN
    125125DisplayPrint_WordFromAXWithBaseInBX:
     
    152152g_rgcDigitToCharacter:  db  "0123456789ABCDEF"
    153153
     154%endif ; MODULE_STRINGS_COMPRESSED
     155
    154156;--------------------------------------------------------------------
    155157; DisplayPrint_QWordFromSSBPwithBaseInBX
     
    164166;       AX, DX, [SS:BP]
    165167;--------------------------------------------------------------------
    166 %ifndef EXCLUDE_FROM_XTIDECFG   ; Not used in XTIDECFG
     168%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG
    167169ALIGN DISPLAY_JUMP_ALIGN
    168170DisplayPrint_QWordFromSSBPwithBaseInBX:
     
    181183    mov     cx, bx              ; Character count to CX
    182184    jmp     SHORT PrintAllPushedDigits
    183 %endif  ; EXCLUDE_FROM_XTIDECFG
    184 
    185 %endif  ; MODULE_STRINGS_COMPRESSED
     185%endif
    186186
    187187
     
    220220
    221221
    222 %ifdef INCLUDE_MENU_LIBRARY
    223222;--------------------------------------------------------------------
    224223; DisplayPrint_ClearScreenWithCharInALandAttributeInAH
     
    233232;       AX, DX
    234233;--------------------------------------------------------------------
     234%ifdef INCLUDE_MENU_LIBRARY
    235235ALIGN DISPLAY_JUMP_ALIGN
    236236DisplayPrint_ClearScreenWithCharInALandAttributeInAH:
     
    251251    ret
    252252%endif
    253        
     253
     254
    254255;--------------------------------------------------------------------
    255256; DisplayPrint_ClearAreaWithHeightInAHandWidthInAL
  • trunk/Assembly_Library/Src/File/FileIO.asm

    r446 r491  
    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
    1818;
    19        
     19
    2020
    2121; Section containing code
     
    3737ALIGN JUMP_ALIGN
    3838FileIO_CreateWithPathInDSSIandAttributesInCX:
    39     xchg    dx, si      ; Path now in DS:DX
    4039    mov     ah, CREATE_OR_TRUNCATE_FILE
    41     jmp     SHORT CreateOrOpenFile
    42 
     40    SKIP2B  bx
     41    ; Fall to FileIO_OpenWithPathInDSSIandFileAccessInAL
    4342
    4443;--------------------------------------------------------------------
     
    5554;       AX, BX
    5655;--------------------------------------------------------------------
    57 ALIGN JUMP_ALIGN
    5856FileIO_OpenWithPathInDSSIandFileAccessInAL:
     57    mov     ah, OPEN_EXISTING_FILE
    5958    xchg    dx, si      ; Path now in DS:DX
    60     mov     ah, OPEN_EXISTING_FILE
    61 CreateOrOpenFile:
    6259    int     DOS_INTERRUPT_21h
    6360    xchg    si, dx
     
    8784    ret
    8885
    89 ;--------------------------------------------------------------------
    90 ; File position is updated so next read will start where
    91 ; previous read stopped.
    92 ;
    93 ; FileIO_ReadCXbytesToDSSIusingHandleFromBX
    94 ;   Parameters:
    95 ;       BX:     File handle
    96 ;       CX:     Number of bytes to read
    97 ;       DS:SI:  Ptr to destination buffer
    98 ;   Returns:
    99 ;       AX:     Number of bytes actually read if successful (0 if at EOF before call)
    100 ;               DOS error code if CF set
    101 ;       CF:     Clear if successful
    102 ;               Set if error
    103 ;   Corrupts registers:
    104 ;       Nothing
    105 ;--------------------------------------------------------------------
    106 ALIGN JUMP_ALIGN
    107 FileIO_ReadCXbytesToDSSIusingHandleFromBX:
    108     xchg    dx, si              ; DS:DX now points to destination buffer
    109     mov     ah, READ_FROM_FILE_OR_DEVICE
    110     int     DOS_INTERRUPT_21h
    111     xchg    si, dx
    112     ret
    113 
    11486
    11587;--------------------------------------------------------------------
     
    134106    ret
    135107
     108
     109;--------------------------------------------------------------------
     110; File position is updated so next read will start where
     111; previous read stopped.
     112;
     113; FileIO_ReadCXbytesToDSSIusingHandleFromBX
     114;   Parameters:
     115;       BX:     File handle
     116;       CX:     Number of bytes to read
     117;       DS:SI:  Ptr to destination buffer
     118;   Returns:
     119;       AX:     Number of bytes actually read if successful (0 if at EOF before call)
     120;               DOS error code if CF set
     121;       CF:     Clear if successful
     122;               Set if error
     123;   Corrupts registers:
     124;       Nothing
     125;--------------------------------------------------------------------
     126ALIGN JUMP_ALIGN
     127FileIO_ReadCXbytesToDSSIusingHandleFromBX:
     128    mov     ah, READ_FROM_FILE_OR_DEVICE
     129    SKIP2B  f
     130    ; Fall to FileIO_WriteCXbytesFromDSSIusingHandleFromBX
     131
    136132;--------------------------------------------------------------------
    137133; File position is updated so next write will start where
    138134; previous write stopped.
    139135;
    140 ; FileIO_WriteCXbytesFromDSSIusingHandleFromBX:
     136; FileIO_WriteCXbytesFromDSSIusingHandleFromBX
    141137;   Parameters:
    142138;       BX:     File handle
     
    151147;       Nothing
    152148;--------------------------------------------------------------------
    153 ALIGN JUMP_ALIGN
    154149FileIO_WriteCXbytesFromDSSIusingHandleFromBX:
    155     xchg    dx, si              ; DS:DX now points to source buffer
    156150    mov     ah, WRITE_TO_FILE_OR_DEVICE
     151    xchg    dx, si              ; DS:DX now points to buffer
    157152    int     DOS_INTERRUPT_21h
    158153    xchg    si, dx
     
    232227
    233228;--------------------------------------------------------------------
    234 ; FileIO_GetFileSizeToDXAXusingHandleFromBXandResetFilePosition:
     229; FileIO_GetFileSizeToDXAXusingHandleFromBXandResetFilePosition
    235230;   Parameters:
    236231;       BX:     File handle
     
    287282
    288283;--------------------------------------------------------------------
    289 ; FileIO_SeekFromOriginInALtoOffsetInDXAXusingHandleFromBX:
     284; FileIO_SeekFromOriginInALtoOffsetInDXAXusingHandleFromBX
    290285;   Parameters:
    291286;       AL:     SEEK_FROM.(origin)
  • trunk/Assembly_Library/Src/Menu/Dialog/DialogProgress.asm

    r376 r491  
    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
    1818;
    19        
     19
    2020
    2121; Section containing code
     
    9999    mov     [si+PROGRESS_DIALOG_IO.wStartTimeTicks], ax
    100100
    101     ; 0 = 65536 but it needs to be adjusted to 65535 prevent division by zero
     101    ; 0 = 65536 but it needs to be adjusted to 65535 to prevent division by zero
    102102    cmp     WORD [si+PROGRESS_DIALOG_IO.wMaxProgressValue], BYTE 0
    103103    jne     SHORT CalculateProgressNeededBeforeUpdatingCharacter
     
    288288    div     cx          ; AX = Estimated ticks left
    289289    xchg    dx, ax
    290     SKIP2B  f   ; cmp ax, <next instruction>
     290    SKIP2B  ax
    291291.PreventDivisionByZero:
    292292    xor     dx, dx
     
    309309    mov     bp, sp
    310310    mov     si, g_szTimeFormat
    311     call    TimerTicks_GetMinutesToAXfromTicksInDX
     311    call    TimerTicks_GetMinutesToAXandRemainderTicksToDXfromTicksInDX
    312312    push    ax
    313313    call    TimerTicks_GetSecondsToAXfromTicksInDX
  • trunk/Assembly_Library/Src/Menu/MenuScrollbars.asm

    r376 r491  
    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
    1818;
    19        
     19
    2020
    2121; Section containing code
     
    7979;       AX:     Item line for last thumb character
    8080;   Corrupts registers:
    81 ;       CX, DX
     81;       DX
    8282;--------------------------------------------------------------------
    8383ALIGN MENU_JUMP_ALIGN
     
    9595;       AX:     Item line for first thumb character
    9696;   Corrupts registers:
    97 ;       CX, DX
     97;       DX
    9898;--------------------------------------------------------------------
    9999ALIGN MENU_JUMP_ALIGN
  • trunk/Assembly_Library/Src/Menu/MenuTime.asm

    r376 r491  
    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
    1818;
    19        
     19
    2020
    2121; Section containing code
     
    101101;       AX:     Seconds until timeout
    102102;   Corrupts registers:
    103 ;       AX
     103;       Nothing
    104104;--------------------------------------------------------------------
    105105ALIGN MENU_JUMP_ALIGN
     
    116116    xchg    dx, ax
    117117    call    TimerTicks_GetSecondsToAXfromTicksInDX
    118     SKIP2B  f   ; cmp ax, <next instruction>
     118    SKIP2B  dx
    119119.TimeoutHasOccurredSoMakeSureTicksAreNotBelowZero:
    120120    xor     ax, ax
  • trunk/Assembly_Library/Src/Serial/SerialServer.asm

    r376 r491  
    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
    1818;
    19        
     19
    2020
    2121%include "SerialServer.inc"
     
    7575
    7676        mov     al,83h
    77         add     dl,Serial_UART_lineControl
     77        add     dl, Serial_UART_lineControl ; Clears CF
    7878        out     dx,al
    7979
     
    8282        out     dx,al
    8383
     84%ifdef USE_UNDOC_INTEL
     85        eSALC   ; Clear AL using CF
     86%else
    8487        xor     ax,ax
     88%endif
    8589        inc     dx              ; divisor high
    8690        push    dx
     
    103107
    104108        pop     dx              ; base, interrupts disabled
     109%ifdef USE_UNDOC_INTEL
     110        eSALC   ; Clear AL using CF
     111%else
    105112        xor     ax,ax
     113%endif
    106114        out     dx,al
    107115
  • trunk/Assembly_Library/Src/String/Char.asm

    r489 r491  
    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
     
    2929;       %3:     Last accepted value in range
    3030;   Returns:
    31 ;       CF:     Set if character is range
     31;       CF:     Set if character in range
    3232;               (Jumps to Char_CharIsNotValid if before range)
    3333;   Corrupts registers:
     
    5151;       Nothing
    5252;--------------------------------------------------------------------
     53%ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     54    %ifndef MODULE_HOTKEYS
     55        %define EXCLUDE
     56    %endif
     57%endif
     58
     59%ifndef EXCLUDE
    5360ALIGN STRING_JUMP_ALIGN
    5461Char_IsLowerCaseLetterInAL:
    5562    IS_BETWEEN_IMMEDIATES al, 'a', 'z'
    5663    ret
     64%endif
     65%undef EXCLUDE
     66
    5767
    5868;--------------------------------------------------------------------
     
    7282    ret
    7383%endif
     84
    7485
    7586;--------------------------------------------------------------------
     
    94105%endif
    95106
     107
    96108;--------------------------------------------------------------------
    97109; Char_IsDecimalDigitInAL
     
    110122    ret
    111123%endif
     124
    112125
    113126;--------------------------------------------------------------------
     
    141154%endif
    142155
     156
    143157;--------------------------------------------------------------------
    144158; Char_CharIsValid
     
    159173%endif
    160174
     175
     176%ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     177    %ifndef MODULE_HOTKEYS
     178        %define EXCLUDE
     179    %endif
     180    %ifndef MODULE_STRINGS_COMPRESSED
     181        %undef EXCLUDE
     182    %endif
     183%endif
     184
     185%ifndef EXCLUDE
    161186ALIGN STRING_JUMP_ALIGN
    162187Char_CharIsNotValid:
    163188    clc
    164189    ret
     190%endif
     191%undef EXCLUDE
    165192
    166193
     
    181208%endif
    182209
    183                
     210
    184211;--------------------------------------------------------------------
    185212; Char_ALtoUpperCaseLetter
     
    191218;       Nothing
    192219;--------------------------------------------------------------------
    193 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS       
     220%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    194221ALIGN STRING_JUMP_ALIGN
    195222Char_ALtoUpperCaseLetter:
     
    200227%endif
    201228
    202        
     229
    203230;--------------------------------------------------------------------
    204231; Char_ChangeCaseInAL
     
    210237;       Nothing
    211238;--------------------------------------------------------------------
     239%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    212240Char_ChangeCaseInAL:
    213241    xor     al, 32
    214242.Return:
    215243    ret
     244%endif
     245
    216246
    217247;--------------------------------------------------------------------
  • trunk/Assembly_Library/Src/Time/TimerTicks.asm

    r489 r491  
    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 ;       
    19 
    20 ; System timer ticks 18.2 times per second = 54.9 ms / tick
    21 TICKS_PER_HOUR          EQU     65520
     18;
     19
     20; With a PIT input clock of 1193181.6666... Hz and a maximum
     21; 16 bit divisor of 65536 (if PIT programmed with 0) we get:
     22;
     23; Clock / Divisor = ~18.2065 ticks per second
     24; Clock * SecondsPerMinute / Divisor = ~1092 ticks per minute
     25; Clock * SecondsPerHour / Divisor = ~65543 ticks per hour
     26;
     27; Since 65543 can't fit in a 16 bit register we use the
     28; maximum possible instead and disregard the last ~8 ticks.
     29
     30TICKS_PER_HOUR          EQU     65535
    2231TICKS_PER_MINUTE        EQU     1092
    2332TICKS_PER_SECOND        EQU     18
     
    2837
    2938;--------------------------------------------------------------------
    30 ; TimerTicks_GetHoursToAXfromTicksInDXAX
    31 ; TimerTicks_GetMinutesToAXfromTicksInDX
    32 ; TimerTicks_GetSecondsToAXfromTicksInDX
     39; TimerTicks_GetHoursToAXandRemainderTicksToDXfromTicksInDXAX
     40; TimerTicks_GetMinutesToAXandRemainderTicksToDXfromTicksInDX
     41; TimerTicks_GetSecondsToAXandRemainderTicksToDXfromTicksInDX
    3342;   Parameters
    3443;       DX(:AX):    Timer ticks to convert
     
    4251%ifndef EXCLUDE_FROM_XTIDECFG
    4352ALIGN JUMP_ALIGN
    44 TimerTicks_GetHoursToAXfromTicksInDXAX:
     53TimerTicks_GetHoursToAXandRemainderTicksToDXfromTicksInDXAX:
    4554    mov     cx, TICKS_PER_HOUR
    4655    div     cx      ; Divide DX:AX by CX, Hours to AX, remainder ticks to DX
     
    4958
    5059ALIGN JUMP_ALIGN
    51 TimerTicks_GetMinutesToAXfromTicksInDX:
     60TimerTicks_GetMinutesToAXandRemainderTicksToDXfromTicksInDX:
    5261    xor     ax, ax
    5362    xchg    ax, dx  ; Ticks now in DX:AX
     
    5766%endif ; EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    5867
    59 %ifdef INCLUDE_MENU_LIBRARY
    60 ALIGN JUMP_ALIGN
    61 TimerTicks_GetSecondsToAXfromTicksInDX:
     68%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG
     69ALIGN JUMP_ALIGN
     70TimerTicks_GetSecondsToAXandRemainderTicksToDXfromTicksInDX:
     71    ; This procedure can handle at most 4607 ticks in DX (almost 256 seconds)
     72    ; More than 4607 ticks will generate a divide overflow exception!
    6273    xchg    ax, dx  ; Ticks now in AX
    6374    mov     cl, TICKS_PER_SECOND
     
    6879%endif
    6980
     81
     82%ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     83    %ifndef MODULE_BOOT_MENU
     84        %define EXCLUDE
     85    %endif
     86%endif
     87;--------------------------------------------------------------------
     88; TimerTicks_GetSecondsToAXfromTicksInDX
     89;   Parameters
     90;       DX:         Timer ticks to convert
     91;   Returns:
     92;       AX:         Seconds
     93;   Corrupts registers:
     94;       DX
     95;--------------------------------------------------------------------
     96%ifndef EXCLUDE ; 1 of 3
     97ALIGN JUMP_ALIGN
     98TimerTicks_GetSecondsToAXfromTicksInDX:
     99    mov     ax, 3600    ; Approximately 65536 / (Clock / Divisor)
     100    mul     dx
     101    xchg    dx, ax
     102    ret
     103%endif
     104
     105
    70106;--------------------------------------------------------------------
    71107; First tick might take 0...54.9 ms and remaining ticks
     
    82118;       AX
    83119;--------------------------------------------------------------------
    84 %ifdef INCLUDE_MENU_LIBRARY     
     120%ifndef EXCLUDE ; 2 of 3
    85121ALIGN JUMP_ALIGN
    86122TimerTicks_InitializeTimeoutFromAX:
     
    90126    ret
    91127%endif
     128
    92129
    93130;--------------------------------------------------------------------
     
    102139;       Nothing
    103140;--------------------------------------------------------------------
    104 %ifdef INCLUDE_MENU_LIBRARY     
     141%ifndef EXCLUDE ; 3 of 3
    105142ALIGN JUMP_ALIGN
    106143TimerTicks_GetTimeoutTicksLeftToAXfromDSBX:
     
    114151%endif
    115152
     153%undef EXCLUDE
     154
     155
    116156;--------------------------------------------------------------------
    117157; TimerTicks_GetElapsedToAXandResetDSBX
     
    134174%endif
    135175
     176
    136177;--------------------------------------------------------------------
    137178; TimerTicks_GetElapsedToAXfromDSBX
     
    161202;       Nothing
    162203;--------------------------------------------------------------------
     204%ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     205    %ifndef MODULE_BOOT_MENU OR MODULE_HOTKEYS
     206        %define EXCLUDE
     207    %endif
     208%endif
     209
     210%ifndef EXCLUDE
    163211ALIGN JUMP_ALIGN
    164212TimerTicks_ReadFromBdaToAX:
     
    170218    pop     ds
    171219    ret
     220%endif
     221%undef EXCLUDE
  • trunk/Assembly_Library/Src/Util/Registers.asm

    r489 r491  
    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
    1818;
    19        
     19
    2020; Section containing code
    2121SECTION .text
     
    5252;       Nothing
    5353;--------------------------------------------------------------------
     54%ifdef INCLUDE_MENU_LIBRARY
    5455ALIGN JUMP_ALIGN
    55 %ifdef INCLUDE_MENU_LIBRARY     
    5656Registers_CopySSBPtoESDI:
    5757    COPY_SSBP_TO_ESDI
  • trunk/Assembly_Library/Src/Util/Size.asm

    r489 r491  
    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%ifdef INCLUDE_MENU_LIBRARY
     
    6868    ; Convert remainder to tenths
    6969    xchg    bx, ax                      ; Store AX
    70     mov     ax, 10
    71     mul     cx                          ; DX:AX = remainder * 10
    72     eSHR_IM ax, 10                      ; Divide AX by 1024
     70    mov     ax, 5
     71    mul     cx                          ; DX:AX = remainder * (10 / 2)
     72%ifdef USE_186
     73    shr     ax, 9                       ; Divide AX by (1024 / 2)
     74%else
     75    shr     ax, 1
     76    mov     al, ah
     77    cbw
     78%endif
    7379    xchg    cx, ax                      ; CX = tenths
    7480    xchg    ax, bx
     
    124130;--------------------------------------------------------------------
    125131ALIGN UTIL_SIZE_JUMP_ALIGN
    126 Size_ConvertSectorCountInBXDXAXtoKiB:               ; unused entrypoint ok
     132Size_ConvertSectorCountInBXDXAXtoKiB:   ; unused entrypoint ok
    127133Size_DivideBXDXAXbyTwo:
    128134    shr     bx, 1                   ; Divide sector count by 2...
  • trunk/XTIDE_Universal_BIOS/Inc/Controllers/XTCF.inc

    r487 r491  
    55
    66;
    7 ; XTIDE Universal BIOS and Associated Tools 
     7; XTIDE Universal BIOS and Associated Tools
    88; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
    99;
     
    1212; the Free Software Foundation; either version 2 of the License, or
    1313; (at your option) any later version.
    14 ; 
     14;
    1515; This program is distributed in the hope that it will be useful,
    1616; but WITHOUT ANY WARRANTY; without even the implied warranty of
    1717; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    18 ; GNU General Public License for more details.     
     18; GNU General Public License for more details.
    1919; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
    2020;
     
    3434; Possible base addresses. Note that all XT-CF IDE registers are SHL 1 compared
    3535; to standard IDE registers.
     36XTCF_BASE_PORT_DETECTION_SEED       EQU     140h    ; Not a valid base address but needed for autodetection
    3637XTCF_BASE_PORT_1                    EQU     200h
    3738XTCF_BASE_PORT_2                    EQU     240h
     
    4243; XT-CF Control Register (do not SHL 1 these!)
    4344XTCF_CONTROL_REGISTER               EQU     1Fh
    44 XTCT_CONTROL_REGISTER_INVERTED_in   EQU     1Eh
     45XTCF_CONTROL_REGISTER_INVERTED_in   EQU     1Eh
    4546
    4647; Control Register contents:
     
    4849; Control Register holds high byte from Sector Window segment if >= A0h
    4950; (First possible segment for Sector Window is A000h)
    50 ; 
     51;
    5152; 8-bit PIO transfers (port I/O) are used if Control Register is zero.
    5253; Any other value means DMA transfers (using DMA channel 3).
  • trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc

    r488 r491  
    4545    .twLbaSectors           resb    6   ; 48-bit sector count for LBA addressing
    4646%endif
    47                             alignb  2   ; WORD alignent for DPT_SERIAL or DPT_ATA
     47                            alignb  2   ; WORD alignment for DPT_SERIAL or DPT_ATA
    4848endstruc
    4949
     
    133133; first! DPT_ATA.bDevice uses small values so there will be no problems.
    134134%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    135 %if DPT_SERIAL.bSerialPort <> DPT_ATA.bDevice
    136     %error "DPT_ATA.bDevice and DPT_SERIAL.bSerialPort must be in same offsets!"
     135    %if DPT_SERIAL.bSerialPort <> DPT_ATA.bDevice
     136        %error "DPT_ATA.bDevice and DPT_SERIAL.bSerialPort must be in same offsets!"
     137    %endif
    137138%endif
    138 %endif
    139 %endif
     139%endif ; MODULE_SERIAL
    140140
    141141
  • trunk/XTIDE_Universal_BIOS/Inc/IDE_8bit.inc

    r445 r491  
    5555    shl     cx, 5
    5656%else
    57     UNROLL_SECTORS_IN_CX_TO_QWORDS
    58     shr     cx, 1
     57;   UNROLL_SECTORS_IN_CX_TO_QWORDS
     58;   shr     cx, 1
     59    mov     ch, cl      ; 2 bytes shorter but possibly slower
     60    mov     cl, 3
     61    shr     cx, cl
    5962%endif
    6063%endmacro
  • trunk/XTIDE_Universal_BIOS/Inc/ModuleDependency.inc

    r477 r491  
    1 ; /*
    21; Project name  :   XTIDE Universal BIOS
    32; Description   :   Dependencies for optional modules.
    43
    54;
    6 ; XTIDE Universal BIOS and Associated Tools 
     5; XTIDE Universal BIOS and Associated Tools
    76; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
    87;
     
    1110; the Free Software Foundation; either version 2 of the License, or
    1211; (at your option) any later version.
    13 ; 
     12;
    1413; This program is distributed in the hope that it will be useful,
    1514; but WITHOUT ANY WARRANTY; without even the implied warranty of
    1615; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    17 ; GNU General Public License for more details.     
     16; GNU General Public License for more details.
    1817; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
    1918;
     
    3130    %endif
    3231%endif
    33 
    3432
    3533
     
    5351    %include "HotkeyBar.inc"        ; For Hotkeys
    5452    %ifdef MODULE_BOOT_MENU
    55         %include "BootMenu.inc"         ; For Boot Menu
     53        %include "BootMenu.inc"     ; For Boot Menu
    5654    %endif
    5755%endif
     
    6058    %include "IntController.inc"
    6159%endif
    62 
    6360
    6461
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeDmaBlock.asm

    r486 r491  
    7474;--------------------------------------------------------------------
    7575TransferBlockToOrFromXTCF:
    76     ; 8-bit DMA transfers must be done withing 64k physical page.
     76    ; 8-bit DMA transfers must be done within 64k physical page.
    7777    ; XT-CF support maximum of 64 sector (32768 bytes) blocks in DMA mode
    7878    ; so we never need to separate transfer to more than 2 separate DMA operations.
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIO.asm

    r473 r491  
    5353IdeIO_InputToALfromIdeRegisterInDL:
    5454    xor     dh, dh  ; IDE Register index now in DX
    55 
     55    mov     bx, dx  ; and BX
    5656    mov     al, [di+DPT_ATA.bDevice]
    5757    cmp     al, DEVICE_8BIT_XTIDE_REV2
     
    6363
    6464.InputToALfromMemoryMappedRegisterInDX:
    65     mov     bx, JRIDE_COMMAND_BLOCK_REGISTER_WINDOW_OFFSET
    66     add     bx, dx
    6765    push    ds
    6866    mov     ds, [di+DPT.wBasePort]  ; Segment for JR-IDE/ISA
    69     mov     al, [bx]
     67    mov     al, [bx+JRIDE_COMMAND_BLOCK_REGISTER_WINDOW_OFFSET]
    7068    pop     ds
    7169    ret
    7270
    7371.ReverseA0andA3fromRegisterIndexInDX:
    74     mov     bx, dx
    7572    mov     dl, [cs:bx+g_rgbSwapA0andA3fromIdeRegisterIndex]
    7673    SKIP2B  bx  ; Skip shl dx, 1
    7774
    7875.ShlRegisterIndexInDX:
    79     shl     dx, 1
     76    eSHL_IM dx, 1
    8077    ; Fall to .InputToALfromRegisterInDX
    8178
     
    116113.ShlRegisterIndexInDX:
    117114    add     dl, OFFSET_TO_CONTROL_BLOCK_REGISTERS
    118     shl     dx, 1
     115    eSHL_IM dx, 1
    119116    jmp     SHORT OutputALtoRegisterInDX
    120117
     
    164161
    165162.ShlRegisterIndexInDX:
    166     shl     dx, 1
     163    eSHL_IM dx, 1
    167164    ; Fall to OutputALtoRegisterInDX
    168165
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm

    r480 r491  
    231231
    232232    ; Convert ES:SI to physical address
    233     xor     dx, dx
    234     mov     ax, es
     233%ifdef USE_186          ; Bytes EU Cycles(286)
     234    mov     ax, es      ; 2     2
     235    rol     ax, 4       ; 3     9
     236    mov     dx, ax      ; 2     2
     237    and     ax, BYTE 0Fh; 3     3
     238    xor     dx, ax      ; 2     2
     239    add     si, dx      ; 2     2
     240    adc     al, ah      ; 2     2
     241    mov     es, ax      ; 2     2
     242    ;------------------------------------
     243                        ; 18    24
     244%else ; 808x
     245
     246%if 0
     247                        ; Bytes EU Cycles(808x)
     248    mov     al, 4       ; 2     4
     249    mov     dx, es      ; 2     2
     250    xchg    cx, ax      ; 1     3
     251    rol     dx, cl      ; 2     24
     252    mov     cx, dx      ; 2     2
     253    xchg    cx, ax      ; 1     3
     254    and     ax, BYTE 0Fh; 3     4
     255    xor     dx, ax      ; 2     3
     256    add     si, dx      ; 2     3
     257    adc     al, ah      ; 2     3
     258    mov     es, ax      ; 2     2
     259    ;------------------------------------
     260                        ; 21    53
     261;
     262; Judging by the Execution Unit cycle count the above block of code is
     263; apparently slower. However, the shifts and rotates in the block below
     264; execute faster than the Bus Interface Unit on an 8088 can fetch them,
     265; thus causing the EU to starve. The difference in true execution speed
     266; (if any) might not be worth the extra 5 bytes.
     267; In other words, we could use a real world test here.
     268;
     269%endif ; 0
     270                        ; Bytes EU Cycles(808x/286)
     271    xor     dx, dx      ; 2     3/2
     272    mov     ax, es      ; 2     2/2
    235273%rep 4
    236     shl     ax, 1
    237     rcl     dx, 1
     274    shl     ax, 1       ; 8     8/8
     275    rcl     dx, 1       ; 8     8/8
    238276%endrep
    239     add     si, ax
    240     adc     dl, dh
    241     mov     es, dx
     277    add     si, ax      ; 2     3/2
     278    adc     dl, dh      ; 2     3/2
     279    mov     es, dx      ; 2     2/2
     280    ;------------------------------------
     281%endif                  ; 26    29/26
    242282    ret
    243283%endif ; MODULE_8BIT_IDE
     
    266306%ifdef MODULE_8BIT_IDE
    267307        dw      IdePioBlock_ReadFrom8bitDataPort    ; 2, DEVICE_8BIT_ATA
    268         dw      IdePioBlock_ReadFromXtideRev1       ; 3, DEVICE_8BIT_XTIDE_REV1     
     308        dw      IdePioBlock_ReadFromXtideRev1       ; 3, DEVICE_8BIT_XTIDE_REV1
    269309        dw      IdePioBlock_ReadFromXtideRev2       ; 4, DEVICE_8BIT_XTIDE_REV2
    270310        dw      IdePioBlock_ReadFrom8bitDataPort    ; 5, DEVICE_8BIT_XTCF_PIO8
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeWait.asm

    r489 r491  
    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
     
    9393;       AL, BX, CX, DX
    9494;--------------------------------------------------------------------
    95 .IdePollBsyAndFlgInAH:
     95PollBsyAndFlgInAH:
    9696    call    IdeIO_InputStatusRegisterToAL       ; Discard contents of first read
    9797
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm

    r489 r491  
    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
     
    155155    mov     dl, ROMVARS.ideVars0                        ; starting Idevars offset
    156156
    157     ; Get count of ALL Idevars structures, not just the ones that are configured.  This may seem odd, 
     157    ; Get count of ALL Idevars structures, not just the ones that are configured.  This may seem odd,
    158158    ; but it catches the .ideVarsSerialAuto structure, which would not be scanned if the count from
    159159    ; RamVars_GetIdeControllerCountToCX was used.  Unused controllers won't make a difference, since no DPT
     
    174174
    175175.done:
    176 .NoForeignDrivesToReset:
    177176    ret
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH1Eh_XTCF.asm

    r477 r491  
    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
     
    6363    call    AccessDPT_IsThisDeviceXTCF
    6464    jne     SHORT XTCFnotFound
    65     and     ax, BYTE 7Fh                ; Subcommand now in AX
     65    and     ax, BYTE 7Fh                ; Subcommand now in AX (clears AH and CF)
    6666    jz      SHORT .ReturnWithSuccess    ; IS_THIS_DRIVE_XTCF
    6767
     
    7070    jnz     SHORT .SkipReadXtcfControlRegisterToDH
    7171    mov     dx, [di+DPT.wBasePort]
    72     add     dl, XTCF_CONTROL_REGISTER
     72    add     dl, XTCF_CONTROL_REGISTER   ; Will never overflow (keeps CF cleared)
    7373    in      al, dx
    7474    mov     [bp+IDEPACK.intpack+INTPACK.dh], al
    7575.ReturnWithSuccess:
    76     xor     ah, ah
    77     ret
     76    ret     ; With AH and CF cleared
     77
    7878.SkipReadXtcfControlRegisterToDH:
    79 
    8079    ; WRITE_DH_TO_XTCF_CONTROL_REGISTER
    8180    dec     ax                          ; Subcommand
     
    122121    mov     BYTE [di+DPT_ATA.bDevice], DEVICE_8BIT_XTCF_PIO8
    123122    ; Fall to .Enable8bitPioMode
    124    
     123
    125124    ; We always need to enable 8-bit mode since 16-bit mode is restored
    126     ; when controller is reset (AH=0h or Dh)
    127 .Enable8bitPioMode: 
     125    ; when controller is reset (AH=00h or 0Dh)
     126.Enable8bitPioMode:
    128127    jmp     AH23h_Enable8bitPioMode
    129128
     
    143142AH1Eh_DetectXTCFwithBasePortInDX:
    144143    push    dx
    145     add     dl, XTCT_CONTROL_REGISTER_INVERTED_in   ; set DX to XT-CF config register (inverted)
     144    add     dl, XTCF_CONTROL_REGISTER_INVERTED_in   ; set DX to XT-CF config register (inverted)
    146145    in      al, dx      ; get value
    147146    mov     ah, al      ; save in ah
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH24h_HSetBlocks.asm

    r473 r491  
    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
     
    5959;--------------------------------------------------------------------
    6060AH24h_SetBlockSize:
     61%ifdef MODULE_8BIT_IDE
    6162    ; XT-CF does not support largest block size in DMA mode.
    62 %ifdef MODULE_8BIT_IDE
    63     call    AccessDPT_IsThisDeviceXTCF
    64     cmp     ah, DEVICE_8BIT_XTCF_DMA
    65     jne     SHORT .NoNeedToLimitBlockSize
    6663    cmp     al, XTCF_DMA_MODE_MAX_BLOCK_SIZE
    67     ja      SHORT AH1Eh_LoadInvalidCommandToAHandSetCF
     64    jbe     SHORT .NoNeedToLimitBlockSize
     65    cmp     BYTE [di+DPT_ATA.bDevice], DEVICE_8BIT_XTCF_DMA
     66    je      SHORT AH1Eh_LoadInvalidCommandToAHandSetCF
    6867.NoNeedToLimitBlockSize:
    6968%endif ; MODULE_8BIT_IDE
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/AtaID.asm

    r487 r491  
    3636    ; corrupted. We start by making sure P-CHS values are valid.
    3737    ; If they are, we assume the ATA ID to be valid. Fortunately we can do
    38     ; futher checking for ATA-5 and later since they contain signature and
     38    ; further checking for ATA-5 and later since they contain signature and
    3939    ; checksum bytes. Those are not available for ATA-4 and older.
    4040
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm

    r474 r491  
    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
     
    153153;--------------------------------------------------------------------
    154154StartDetectionWithDriveSelectByteInBHandStringInCX:
     155%ifdef MODULE_8BIT_IDE
    155156    ; Autodetect port for XT-CF
    156 %ifdef MODULE_8BIT_IDE
    157157    call    DetectDrives_DoesIdevarsInCSBPbelongToXTCF
    158158    jne     SHORT .SkipXTCFportDetection
     
    165165    ; for next drive (another XT-CF card on same system)
    166166.DetectNextPort:
    167     call    BootVars_GetNextXTCFportToDetectToDX
    168     cmp     dx, XTCF_BASE_PORT_4
     167    mov     dx, [es:BOOTVARS.wNextXTCFportToScan]
     168    xor     dl, 40h
     169    jnz     SHORT .StoreNextXTCFportToScan
     170    inc     dh
     171    cmp     dh, XTCF_BASE_PORT_4 >> 8
    169172    ja      SHORT .SkipXTCFportDetection        ; XT-CF not found from any port
     173.StoreNextXTCFportToScan:
     174    mov     [es:BOOTVARS.wNextXTCFportToScan], dx
    170175
    171176    call    AH1Eh_DetectXTCFwithBasePortInDX
     
    178183    jmp     SHORT .DriveDetectionStringPrintedOnScreen
    179184
    180     ; Print detect string for devices that do not support autodetection     
     185    ; Print detect string for devices that do not support autodetection
    181186.SkipXTCFportDetection:
    182187    push    dx
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/Interrupts.asm

    r489 r491  
    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
     
    9797.InitializeHardwareIrqHandlers:
    9898    call    RamVars_GetIdeControllerCountToCX
    99     mov     di, ROMVARS.ideVars0            ; CS:SI points to first IDEVARS
     99    mov     di, ROMVARS.ideVars0+IDEVARS.bIRQ   ; CS:SI points to first IDEVARS
    100100.IdeControllerLoop:
    101     mov     al, [cs:di+IDEVARS.bIRQ]
     101    mov     al, [cs:di]
    102102    add     di, BYTE IDEVARS_size           ; Increment to next controller
    103103    call    .InstallLowOrHighIrqHandler
  • trunk/XTIDE_Universal_BIOS/Src/Main.asm

    r489 r491  
    8080    at  ROMVARS.wDisplayMode,   dw  DEFAULT_TEXT_MODE
    8181%ifdef MODULE_BOOT_MENU
    82         at  ROMVARS.wBootTimeout,   dw  BOOT_MENU_DEFAULT_TIMEOUT
     82    at  ROMVARS.wBootTimeout,   dw  BOOT_MENU_DEFAULT_TIMEOUT
    8383%endif
    8484    at  ROMVARS.bIdeCnt,        db  2                       ; Number of supported controllers
     
    8888    at  ROMVARS.bIdleTimeout,   db  0                       ; Standby timer disabled by default
    8989
    90     at  ROMVARS.ideVars0+IDEVARS.wBasePort,         dw  300h        ; Controller Command Block base port
    91     at  ROMVARS.ideVars0+IDEVARS.wControlBlockPort, dw  310h    ; Controller Control Block base port
     90    at  ROMVARS.ideVars0+IDEVARS.wBasePort,         dw  DEVICE_ATA_PRIMARY_PORT         ; Controller Command Block base port
     91    at  ROMVARS.ideVars0+IDEVARS.wControlBlockPort, dw  DEVICE_ATA_PRIMARY_PORTCTRL     ; Controller Control Block base port
    9292    at  ROMVARS.ideVars0+IDEVARS.bDevice,           db  DEVICE_16BIT_ATA
    9393    at  ROMVARS.ideVars0+IDEVARS.bIRQ,              db  0
     
    126126    at  ROMVARS.wDisplayMode,   dw  DEFAULT_TEXT_MODE
    127127%ifdef MODULE_BOOT_MENU
    128         at  ROMVARS.wBootTimeout,   dw  BOOT_MENU_DEFAULT_TIMEOUT
     128    at  ROMVARS.wBootTimeout,   dw  BOOT_MENU_DEFAULT_TIMEOUT
    129129%endif
    130130    at  ROMVARS.bIdeCnt,        db  2                       ; Number of supported controllers
  • trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrint.asm

    r489 r491  
    7676;--------------------------------------------------------------------
    7777BootMenuPrint_TitleStrings:
    78     xor     di,di                       ; Null character will be eaten 
     78    xor     di,di                       ; Null character will be eaten
    7979    mov     si, g_szBootMenuTitle
    8080    jmp     DetectPrint_RomFoundAtSegment.BootMenuEntry
    8181
    82        
     82
    8383;--------------------------------------------------------------------
    8484; BootMenuPrint_RefreshInformation
     
    203203    jz      SHORT BootMenuPrint_RefreshInformation.FormatRelay
    204204
    205 %include "BootMenuPrintCfg.asm"         ; inline of code to fill out remainder of information string
     205%include "BootMenuPrintCfg.asm"     ; Inline of code to fill out remainder of information string
    206206    jmp     DetectPrint_FormatCSSIfromParamsInSSBP
    207207
    208208
    209209FloppyTypes:
    210 .rgbCapacityMultiplier equ 20           ; Multiplier to reduce word sized values to byte size
     210.rgbCapacityMultiplier equ 120      ; Multiplier to reduce word sized values to byte size
    211211.rgbCapacity:
    212212    db      360   / FloppyTypes.rgbCapacityMultiplier    ;  type 1
  • trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrintCfg.asm

    r473 r491  
    5151;       CS:BX:  Ptr to IDEVARS
    5252;   Returns:
    53 ;       Nothing (jumps to next push below)
     53;       Nothing (falls to next push below)
    5454;   Corrupts registers:
    5555;       AX, CX, DX
     
    8686.PushBlockSizeFromAX:
    8787    push    ax
     88    ; Fall to .PushDeviceType
    8889
    8990;--------------------------------------------------------------------
    90 ; PushDeviceType
    91 ;   Parameters:
    92 ;       DS:DI:  Ptr to DPT
    93 ;       CS:BX:  Ptr to IDEVARS
    94 ;   Returns:
    95 ;       Nothing (jumps to next push below)
    96 ;   Corrupts registers:
    97 ;       AX, DX
    98 ;--------------------------------------------------------------------
    99 .PushDeviceType:
    100     mov     al,g_szDeviceTypeValues_Displacement
    101 %ifdef MODULE_SERIAL
    102     mov     ah, [cs:bx+IDEVARS.bDevice]
    103     test    BYTE [di+DPT.bFlagsHigh], FLGH_DPT_SERIAL_DEVICE
    104     eCMOVZ  ah, [di+DPT_ATA.bDevice]    ; DPT_ATA contains up to date device information for IDE drives
    105     mul     ah
    106 %else   
    107     mul     BYTE [di+DPT_ATA.bDevice]
    108 %endif
    109 
    110     shr     ax,1            ; divide by 2 since IDEVARS.bDevice is multiplied by 2
    111 
    112     add     ax, g_szDeviceTypeValues
    113     push    ax
    114 
    115 ;--------------------------------------------------------------------
    116 ; PushIRQ
     91; .PushDeviceType
    11792;   Parameters:
    11893;       DS:DI:  Ptr to DPT
     
    12196;       Nothing (falls to next push below)
    12297;   Corrupts registers:
    123 ;       AX, DX
     98;       AX
     99;--------------------------------------------------------------------
     100.PushDeviceType:
     101%ifndef MODULE_SERIAL
     102    mov     al, g_szDeviceTypeValues_Displacement
     103    mul     BYTE [di+DPT_ATA.bDevice]
     104%else
     105    mov     ah, [cs:bx+IDEVARS.bDevice]
     106    test    BYTE [di+DPT.bFlagsHigh], FLGH_DPT_SERIAL_DEVICE    ; Clears CF
     107    eCMOVZ  ah, [di+DPT_ATA.bDevice]    ; DPT_ATA contains up to date device information for IDE drives
     108%ifdef USE_UNDOC_INTEL
     109    eSALC   ; Clear AL using CF (from TEST above)
     110    eAAD    g_szDeviceTypeValues_Displacement
     111%else
     112    mov     al, g_szDeviceTypeValues_Displacement
     113    mul     ah
     114%endif ; USE_UNDOC_INTEL
     115%endif ; MODULE_SERIAL
     116
     117%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
     118    %if (COUNT_OF_ALL_IDE_DEVICES * 2 * g_szDeviceTypeValues_Displacement) > 255
     119        %error "The USE_UNDOC_INTEL block in .PushDeviceType needs to be removed (would cause an overflow)!"
     120    %endif
     121%endif
     122
     123    shr     ax, 1   ; Divide by 2 since IDEVARS.bDevice is multiplied by 2
     124    add     ax, g_szDeviceTypeValues
     125    push    ax
     126    ; Fall to .PushIRQ
     127
     128;--------------------------------------------------------------------
     129; .PushIRQ
     130;   Parameters:
     131;       DS:DI:  Ptr to DPT
     132;       CS:BX:  Ptr to IDEVARS
     133;   Returns:
     134;       Nothing (falls to next push below)
     135;   Corrupts registers:
     136;       AX
    124137;--------------------------------------------------------------------
    125138.PushIRQ:
     
    127140    cbw
    128141    push    ax
     142    ; Fall to .PushResetStatus
    129143
    130144;--------------------------------------------------------------------
    131 ; PushResetStatus
     145; .PushResetStatus
    132146;   Parameters:
    133147;       DS:DI:  Ptr to DPT
  • trunk/XTIDE_Universal_BIOS/Src/Menus/HotkeyBar.asm

    r410 r491  
    327327HotkeyBar_StoreHotkeyToBootvarsForDriveLetterInDL:
    328328    eMOVZX  ax, dl
    329     call    Char_ChangeCaseInAL ; Upper case drive letter to lower case keystroke
     329    xor     al, 32  ; Upper case drive letter to lower case keystroke
    330330    jmp     SHORT HotkeyBar_StoreHotkeyToBootvarsIfValidKeystrokeInAX
    331331
     
    376376    call    Char_IsLowerCaseLetterInAL
    377377    jnc     SHORT .KeystrokeIsNotValidHotkey
    378     call    Char_ChangeCaseInAL     ; We want to print upper case letters
     378    xor     al, 32                  ; We want to print upper case letters
    379379
    380380    ; Clear HD First flag to assume Floppy Drive hotkey
  • trunk/XTIDE_Universal_BIOS/Src/Strings.asm

    r489 r491  
    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
    1616; GNU General Public License for more details.
    17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html       
    18 ;       
     17; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
     18;
    1919
    2020%ifdef MODULE_STRINGS_COMPRESSED_PRECOMPRESS
     
    2424; Section containing code
    2525SECTION .text
    26 
    27 ; POST drive detection strings
    28 g_szDashForZero:    db  "- ",NULL   ; Required by Display Library
    29 g_szRomAt:          db  LF,CR
    30                     db  "%s @ %x",LF,CR                     ; -=XTIDE ... =- @ Segment
    31                     db  "%s",LF,CR                          ; version string
    32                     db  "Released under GNU GPL v2",LF,CR   
    33                     db  LF,CR,NULL
    34 %ifdef MODULE_BOOT_MENU
    35 g_szBootMenuTitle:  db  "%s%c",LF,CR                        ; -=XTIDE ... =- and null (eaten)
    36                     db  "%s",NULL                           ; version string
    37 %endif
    38 g_szDriveName:      db  "%z",LF,CR,NULL
    3926
    4027; The following strings are used by DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP
     
    4734g_szDetectOuter:        db  "%s at %s: ",NULL
    4835%ifdef MODULE_SERIAL
    49 g_szDetectCOM:          db  "COM%c%s",NULL
     36g_szDetectCOM:          db  "COM%c%s",NULL
    5037g_szDetectCOMAuto:      db  " Detect",NULL
    5138g_szDetectCOMSmall:     db  "/%u%u00",NULL                  ; IDE Master at COM1/9600:
     
    5340%endif
    5441g_szDetectEnd:
    55 g_szDetectPort:         db  "%x",NULL                       ; IDE Master at 1F0h:
     42g_szDetectPort:         db  "%x",NULL                       ; IDE Master at 1F0h:
    5643
    5744%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    5845    %if ((g_szDetectEnd-$$) & 0xff00) <> ((g_szDetectStart-$$) & 0xff00)
    59         %error "g_szDetect* strings must start on the same 256 byte page, required by DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP.  Please move this block up or down within strings.asm"
    60     %endif
    61 %endif
     46        %error "g_szDetect* strings must start on the same 256 byte page, required by DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP.  Please move this block up or down within Strings.asm"
     47    %endif
     48%endif
     49
     50
     51; POST drive detection strings
     52g_szDashForZero:    db  "- ",NULL   ; Required by Display Library
     53g_szRomAt:          db  LF,CR
     54                    db  "%s @ %x",LF,CR                     ; -=XTIDE ... =- @ Segment
     55                    db  "%s",LF,CR                          ; version string
     56                    db  "Released under GNU GPL v2",LF,CR
     57                    db  LF,CR,NULL
     58%ifdef MODULE_BOOT_MENU
     59g_szBootMenuTitle:  db  "%s%c",LF,CR                        ; -=XTIDE ... =- and null (eaten)
     60                    db  "%s",NULL                           ; version string
     61%endif
     62g_szDriveName:      db  "%z",LF,CR,NULL
    6263
    6364
     
    7071
    7172%ifdef MODULE_HOTKEYS
    72 
    7373; Hotkey Bar strings
    7474g_szFDD:        db  "FDD [%c]",NULL         ; "FDD [A]"
     
    8181
    8282%ifdef MODULE_BOOT_MENU
    83 
    8483; Boot Menu Floppy Disk strings
    8584;
     
    8988;
    9089g_szFddStart:
    91 g_szFddUnknown: db  "Unknown",NULL
    92 g_szFddSizeOr:  db  "5",ONE_QUARTER,QUOTATION_MARK," or 3",ONE_HALF,QUOTATION_MARK," DD",NULL
    93 g_szFddSize:    db  "%s",QUOTATION_MARK,", %u kiB",NULL ; 3½", 1440 kiB
    94 g_szFddThreeHalf:       db  "3",ONE_HALF,NULL
     90g_szFddUnknown:     db  "Unknown",NULL
     91g_szFddSizeOr:      db  "5",ONE_QUARTER,QUOTATION_MARK," or 3",ONE_HALF,QUOTATION_MARK," DD",NULL
     92g_szFddSize:        db  "%s",QUOTATION_MARK,", %u kiB",NULL ; 3½", 1440 kiB
     93g_szFddThreeHalf:   db  "3",ONE_HALF,NULL
    9594g_szFddEnd:
    96 g_szFddFiveQuarter:     db  "5",ONE_QUARTER,NULL
     95g_szFddFiveQuarter: db  "5",ONE_QUARTER,NULL
    9796
    9897%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    9998    %if ((g_szFddStart-$$) & 0xff00) <> ((g_szFddEnd-$$) & 0xff00)
    100         %error "g_szFdd* strings must start on the same 256 byte page, required by the BootMenuPrint_RefreshInformation routines for floppy drives.  Please move this block up or down within strings.asm"
     99        %error "g_szFdd* strings must start on the same 256 byte page, required by the BootMenuPrint_RefreshInformation routines for floppy drives.  Please move this block up or down within Strings.asm"
    101100    %endif
    102101%endif
     
    123122%endif
    124123
     124
    125125g_szDeviceTypeValues:
    126 g_szDeviceTypeValues_16bit:     db      " 16",NULL
    127 g_szDeviceTypeValues_32bit:     db      " 32",NULL
    128 g_szDeviceTypeValues_8bit:      db      "  8",NULL
    129 g_szDeviceTypeValues_XTIDEr1:   db      "D8 ",NULL  ; Dual 8-bit
    130 g_szDeviceTypeValues_XTIDEr2:   db      "X8 ",NULL  ; A0<->A3 swapped 8-bit
    131 g_szDeviceTypeValues_XTCFpio8:  db      "T8 ",NULL  ; True 8-bit
    132 g_szDeviceTypeValues_XTCFdma:   db      "8MA",NULL  ; DMA 8-bit
    133 g_szDeviceTypeValues_XTCFmem:   db      "M8 ",NULL  ; Memory Mapped 8-bit
    134 g_szDeviceTypeValues_JrIde:     db      "M8 ",NULL
    135 g_szDeviceTypeValues_Serial:    db      "SER",NULL
     126g_szDeviceTypeValues_16bit:     db  " 16",NULL
     127g_szDeviceTypeValues_32bit:     db  " 32",NULL
     128g_szDeviceTypeValues_8bit:      db  "  8",NULL
     129g_szDeviceTypeValues_XTIDEr1:   db  "D8 ",NULL  ; Dual 8-bit
     130g_szDeviceTypeValues_XTIDEr2:   db  "X8 ",NULL  ; A0<->A3 swapped 8-bit
     131g_szDeviceTypeValues_XTCFpio8:  db  "T8 ",NULL  ; True 8-bit
     132g_szDeviceTypeValues_XTCFdma:   db  "8MA",NULL  ; DMA 8-bit
     133g_szDeviceTypeValues_XTCFmem:   db  "M8 ",NULL  ; Memory Mapped 8-bit
     134g_szDeviceTypeValues_JrIde:     db  "M8 ",NULL
     135g_szDeviceTypeValues_Serial:    db  "SER",NULL
    136136
    137137g_szDeviceTypeValues_Displacement equ (g_szDeviceTypeValues_32bit - g_szDeviceTypeValues)
     
    172172%endif
    173173
    174 g_szSelectionTimeout:   db      DOUBLE_BOTTOM_LEFT_CORNER,DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL,"%ASelection in %2-u s",NULL
    175 
     174
     175g_szSelectionTimeout:   db  DOUBLE_BOTTOM_LEFT_CORNER,DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL,"%ASelection in %2-u s",NULL
    176176
    177177
     
    180180g_szCapacityNum:        db  "%5-u.%u %ciB",NULL
    181181g_szInformation:        db  "%s",LF,CR
    182     db  "Addr. ",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",SINGLE_VERTICAL,  "IRQ",SINGLE_VERTICAL,"Reset",LF,CR
    183     db     "%s",SINGLE_VERTICAL, "%5-u",SINGLE_VERTICAL, "%s",SINGLE_VERTICAL," %2-I",SINGLE_VERTICAL,"%5-x" ,NULL
     182    db  "Addr. ",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",SINGLE_VERTICAL,"IRQ",SINGLE_VERTICAL,"Reset",LF,CR
     183    db  "%s",SINGLE_VERTICAL,"%5-u",SINGLE_VERTICAL,"%s",SINGLE_VERTICAL," %2-I",SINGLE_VERTICAL,"%5-x",NULL
    184184
    185185
     
    199199%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    200200    %if ((g_szBootMenuPrintStart-$$) & 0xff00) <> ((g_szBootMenuPrintEnd-$$) & 0xff00)
    201         %error "g_szBootMenuPrint* strings must start on the same 256 byte page, required by the BootMenuPrint_* routines.  Please move this block up or down within strings.asm"
     201        %error "g_szBootMenuPrint* strings must start on the same 256 byte page, required by the BootMenuPrint_* routines.  Please move this block up or down within Strings.asm"
    202202    %endif
    203203%endif
     
    221221;  * There can only be 32 of these (0-31).
    222222;  * Keeping the list short is good - this translates to a table in the compressed version.
    223 ;    An error will be reported if a character or format is no longer being used by any 
     223;    An error will be reported if a character or format is no longer being used by any
    224224;    strings above.
    225225;  * Please keep items sequential for ease of further editing.
  • trunk/XTIDE_Universal_BIOS/Src/StringsCompressed.asm

    r489 r491  
    1313
    1414;
    15 ; XTIDE Universal BIOS and Associated Tools 
     15; XTIDE Universal BIOS and Associated Tools
    1616; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
    1717;
     
    2020; the Free Software Foundation; either version 2 of the License, or
    2121; (at your option) any later version.
    22 ; 
     22;
    2323; This program is distributed in the hope that it will be useful,
    2424; but WITHOUT ANY WARRANTY; without even the implied warranty of
    2525; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    2626; GNU General Public License for more details.
    27 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html       
    28 ;       
     27; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
     28;
    2929
    3030%ifdef MODULE_STRINGS_COMPRESSED_PRECOMPRESS
     
    3434; Section containing code
    3535SECTION .text
     36
     37; The following strings are used by DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP
     38; To support an optimization in that code, these strings must start on the same 256 byte page,
     39; which is checked at assembly time below.
     40;
     41g_szDetectStart:
     42g_szDetectMaster:       ; db    "Master",NULL
     43                        ; db     4dh,  61h,  73h,  74h,  65h,  72h,  00h    ; uncompressed
     44                          db     53h,  67h,  79h,  7ah,  6bh, 0b8h          ; compressed
     45
     46g_szDetectSlave:        ; db    "Slave ",NULL
     47                        ; db     53h,  6ch,  61h,  76h,  65h,  20h,  00h    ; uncompressed
     48                          db     59h,  72h,  67h,  7ch,  6bh,  00h          ; compressed
     49
     50g_szDetectOuter:        ; db    "%s at %s: ",NULL
     51                        ; db     25h,  73h,  20h,  61h,  74h,  20h,  25h,  73h,  3ah,  20h,  00h    ; uncompressed
     52                          db     3dh,  20h,  67h, 0fah,  3dh,  40h,  00h                            ; compressed
     53
     54%ifdef MODULE_SERIAL
     55g_szDetectCOM:          ; db    "COM%c%s",NULL
     56                        ; db     43h,  4fh,  4dh,  25h,  63h,  25h,  73h,  00h    ; uncompressed
     57                          db     49h,  55h,  53h,  3ch,  1dh                      ; compressed
     58
     59g_szDetectCOMAuto:      ; db    " Detect",NULL
     60                        ; db     20h,  44h,  65h,  74h,  65h,  63h,  74h,  00h    ; uncompressed
     61                          db     20h,  4ah,  6bh,  7ah,  6bh,  69h, 0bah          ; compressed
     62
     63g_szDetectCOMSmall:     ; db    "/%u%u00",NULL                  ; IDE Master at COM1/9600:
     64                        ; db     2fh,  25h,  75h,  25h,  75h,  30h,  30h,  00h    ; uncompressed
     65                          db     2ah,  35h,  35h,  33h,  13h                      ; compressed
     66
     67g_szDetectCOMLarge:     ; db    "/%u.%uK",NULL                  ; IDE Master at COM1/19.2K:
     68                        ; db     2fh,  25h,  75h,  2eh,  25h,  75h,  4bh,  00h    ; uncompressed
     69                          db     2ah,  35h,  29h,  35h,  91h                      ; compressed
     70
     71%endif
     72g_szDetectEnd:
     73g_szDetectPort:         ; db    "%x",NULL                       ; IDE Master at 1F0h:
     74                        ; db     25h,  78h,  00h    ; uncompressed
     75                          db     17h                ; compressed
     76
     77
     78%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
     79%if ((g_szDetectEnd-$$) & 0xff00) <> ((g_szDetectStart-$$) & 0xff00)
     80%error "g_szDetect* strings must start on the same 256 byte page, required by DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP.  Please move this block up or down within Strings.asm"
     81%endif
     82%endif
     83
    3684
    3785; POST drive detection strings
     
    4896      db     3dh,  20h, 0c6h,  37h,  39h                            ; compressed
    4997
    50     ; db    "%s",LF,CR                          ; version string 
     98    ; db    "%s",LF,CR                          ; version string
    5199    ; db     25h,  73h,  0ah,  0dh    ; uncompressed
    52100      db     3dh,  39h                ; compressed
    53101
    54     ; db  "Released under GNU GPL v2",LF,CR
    55     ; db  52h,  65h,  6ch,  65h,  61h,  73h,  65h,  64h,  20h,  75h,  6eh,  64h,  65h,  72h,  20h,  47h,  4eh,  55h,  20h,  47h,  50h,  4ch,  20h,  76h,  32h,  0ah,  0dh    ; uncompressed
    56       db  58h,  6bh,  72h,  6bh,  67h,  79h,  6bh, 0eah,  7bh,  74h,  6ah,  6bh, 0f8h,  4dh,  54h, 0dbh,  4dh,  56h, 0d2h,  7ch,  2ch,  39h                                  ; compressed
     102    ; db    "Released under GNU GPL v2",LF,CR
     103    ; db    52h,  65h,  6ch,  65h,  61h,  73h,  65h,  64h,  20h,  75h,  6eh,  64h,  65h,  72h,  20h,  47h,  4eh,  55h,  20h,  47h,  50h,  4ch,  20h,  76h,  32h,  0ah,  0dh    ; uncompressed
     104      db    58h,  6bh,  72h,  6bh,  67h,  79h,  6bh, 0eah,  7bh,  74h,  6ah,  6bh, 0f8h,  4dh,  54h, 0dbh,  4dh,  56h, 0d2h,  7ch,  2ch,  39h                                  ; compressed
    57105
    58106    ; db    LF,CR,NULL
     
    75123
    76124
    77 ; The following strings are used by DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP
    78 ; To support an optimization in that code, these strings must start on the same 256 byte page,
    79 ; which is checked at assembly time below.
    80 ;
    81 g_szDetectStart:
    82 g_szDetectMaster:       ; db    "Master",NULL
    83                         ; db     4dh,  61h,  73h,  74h,  65h,  72h,  00h    ; uncompressed
    84                           db     53h,  67h,  79h,  7ah,  6bh, 0b8h          ; compressed
    85 
    86 g_szDetectSlave:        ; db    "Slave ",NULL
    87                         ; db     53h,  6ch,  61h,  76h,  65h,  20h,  00h    ; uncompressed
    88                           db     59h,  72h,  67h,  7ch,  6bh,  00h          ; compressed
    89 
    90 g_szDetectOuter:        ; db    "%s at %s: ",NULL
    91                         ; db     25h,  73h,  20h,  61h,  74h,  20h,  25h,  73h,  3ah,  20h,  00h    ; uncompressed
    92                           db     3dh,  20h,  67h, 0fah,  3dh,  40h,  00h                            ; compressed
    93 
    94 %ifdef MODULE_SERIAL
    95 g_szDetectCOM:          ; db  "COM%c%s",NULL
    96                         ; db   43h,  4fh,  4dh,  25h,  63h,  25h,  73h,  00h    ; uncompressed
    97                           db   49h,  55h,  53h,  3ch,  1dh                      ; compressed
    98 
    99 g_szDetectCOMAuto:      ; db    " Detect",NULL
    100                         ; db     20h,  44h,  65h,  74h,  65h,  63h,  74h,  00h    ; uncompressed
    101                           db     20h,  4ah,  6bh,  7ah,  6bh,  69h, 0bah          ; compressed
    102 
    103 g_szDetectCOMSmall:     ; db    "/%u%u00",NULL                  ; IDE Master at COM1/9600:
    104                         ; db     2fh,  25h,  75h,  25h,  75h,  30h,  30h,  00h    ; uncompressed
    105                           db     2ah,  35h,  35h,  33h,  13h                      ; compressed
    106 
    107 g_szDetectCOMLarge:     ; db    "/%u.%uK",NULL                  ; IDE Master at COM1/19.2K:
    108                         ; db     2fh,  25h,  75h,  2eh,  25h,  75h,  4bh,  00h    ; uncompressed
    109                           db     2ah,  35h,  29h,  35h,  91h                      ; compressed
    110 
    111 %endif
    112 g_szDetectEnd:
    113 g_szDetectPort:         ; db    "%x",NULL                       ; IDE Master at 1F0h:
    114                         ; db     25h,  78h,  00h    ; uncompressed
    115                           db     17h                ; compressed
    116 
    117 
    118 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    119 %if ((g_szDetectEnd-$$) & 0xff00) <> ((g_szDetectStart-$$) & 0xff00)
    120 %error "g_szDetect* strings must start on the same 256 byte page, required by DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP.  Please move this block up or down within strings.asm"
    121 %endif
    122 %endif
    123 
    124125
    125126; Boot loader strings
     
    143144
    144145%ifdef MODULE_HOTKEYS
    145 
    146146; Hotkey Bar strings
    147147g_szFDD:        ; db    "FDD [%c]",NULL         ; "FDD [A]"
     
    172172
    173173%ifdef MODULE_BOOT_MENU
    174 
    175174; Boot Menu Floppy Disk strings
    176175;
     
    180179;
    181180g_szFddStart:
    182 g_szFddUnknown: ; db    "Unknown",NULL
    183                 ; db     55h,  6eh,  6bh,  6eh,  6fh,  77h,  6eh,  00h    ; uncompressed
    184                   db     5bh,  74h,  71h,  74h,  75h,  7dh, 0b4h          ; compressed
    185 
    186 g_szFddSizeOr:  ; db    "5",ONE_QUARTER,QUOTATION_MARK," or 3",ONE_HALF,QUOTATION_MARK," DD",NULL
    187                 ; db     35h, 0ach,  22h,  20h,  6fh,  72h,  20h,  33h, 0abh,  22h,  20h,  44h,  44h,  00h    ; uncompressed
    188                   db     2eh,  21h,  26h,  20h,  75h, 0f8h,  2dh,  22h,  26h,  20h,  4ah,  8ah                ; compressed
    189 
    190 g_szFddSize:    ; db    "%s",QUOTATION_MARK,", %u kiB",NULL ; 3½", 1440 kiB
    191                 ; db     25h,  73h,  22h,  2ch,  20h,  25h,  75h,  20h,  6bh,  69h,  42h,  00h    ; uncompressed
    192                   db     3dh,  26h,  27h,  20h,  35h,  20h,  71h,  6fh,  88h                      ; compressed
    193 
    194 g_szFddThreeHalf:       ; db  "3",ONE_HALF,NULL
    195                         ; db  33h, 0abh,  00h    ; uncompressed
    196                           db  2dh,  02h          ; compressed
     181g_szFddUnknown:     ; db    "Unknown",NULL
     182                    ; db     55h,  6eh,  6bh,  6eh,  6fh,  77h,  6eh,  00h    ; uncompressed
     183                      db     5bh,  74h,  71h,  74h,  75h,  7dh, 0b4h          ; compressed
     184
     185g_szFddSizeOr:      ; db    "5",ONE_QUARTER,QUOTATION_MARK," or 3",ONE_HALF,QUOTATION_MARK," DD",NULL
     186                    ; db     35h, 0ach,  22h,  20h,  6fh,  72h,  20h,  33h, 0abh,  22h,  20h,  44h,  44h,  00h    ; uncompressed
     187                      db     2eh,  21h,  26h,  20h,  75h, 0f8h,  2dh,  22h,  26h,  20h,  4ah,  8ah                ; compressed
     188
     189g_szFddSize:        ; db    "%s",QUOTATION_MARK,", %u kiB",NULL ; 3½", 1440 kiB
     190                    ; db     25h,  73h,  22h,  2ch,  20h,  25h,  75h,  20h,  6bh,  69h,  42h,  00h    ; uncompressed
     191                      db     3dh,  26h,  27h,  20h,  35h,  20h,  71h,  6fh,  88h                      ; compressed
     192
     193g_szFddThreeHalf:   ; db    "3",ONE_HALF,NULL
     194                    ; db    33h, 0abh,  00h    ; uncompressed
     195                      db    2dh,  02h          ; compressed
    197196
    198197g_szFddEnd:
    199 g_szFddFiveQuarter:     ; db  "5",ONE_QUARTER,NULL
    200                         ; db  35h, 0ach,  00h    ; uncompressed
    201                           db  2eh,  01h          ; compressed
     198g_szFddFiveQuarter: ; db    "5",ONE_QUARTER,NULL
     199                    ; db    35h, 0ach,  00h    ; uncompressed
     200                      db    2eh,  01h          ; compressed
    202201
    203202
    204203%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    205204%if ((g_szFddStart-$$) & 0xff00) <> ((g_szFddEnd-$$) & 0xff00)
    206 %error "g_szFdd* strings must start on the same 256 byte page, required by the BootMenuPrint_RefreshInformation routines for floppy drives.  Please move this block up or down within strings.asm"
     205%error "g_szFdd* strings must start on the same 256 byte page, required by the BootMenuPrint_RefreshInformation routines for floppy drives.  Please move this block up or down within Strings.asm"
    207206%endif
    208207%endif
     
    238237%endif
    239238
     239
    240240g_szDeviceTypeValues:
    241 g_szDeviceTypeValues_16bit:     ; db        " 16",NULL
    242                                 ; db        20h,  31h,  36h,  00h    ; uncompressed
    243                                   db        20h,  2bh,  0fh          ; compressed
    244 
    245 g_szDeviceTypeValues_32bit:     ; db        " 32",NULL
    246                                 ; db        20h,  33h,  32h,  00h    ; uncompressed
    247                                   db        20h,  2dh,  0ch          ; compressed
    248 
    249 g_szDeviceTypeValues_8bit:      ; db        "  8",NULL
    250                                 ; db        20h,  20h,  38h,  00h    ; uncompressed
    251                                   db        20h,  20h,  10h          ; compressed
    252 
    253 g_szDeviceTypeValues_XTIDEr1:   ; db        "D8 ",NULL  ; Dual 8-bit
    254                                 ; db        44h,  38h,  20h,  00h    ; uncompressed
    255                                   db        4ah,  30h,  00h          ; compressed
    256 
    257 g_szDeviceTypeValues_XTIDEr2:   ; db        "X8 ",NULL  ; A0<->A3 swapped 8-bit
    258                                 ; db        58h,  38h,  20h,  00h    ; uncompressed
    259                                   db        5eh,  30h,  00h          ; compressed
    260 
    261 g_szDeviceTypeValues_XTCFpio8:  ; db        "T8 ",NULL  ; True 8-bit
    262                                 ; db        54h,  38h,  20h,  00h    ; uncompressed
    263                                   db        5ah,  30h,  00h          ; compressed
    264 
    265 g_szDeviceTypeValues_XTCFdma:   ; db        "8MA",NULL  ; DMA 8-bit
    266                                 ; db        38h,  4dh,  41h,  00h    ; uncompressed
    267                                   db        30h,  53h,  87h          ; compressed
    268 
    269 g_szDeviceTypeValues_XTCFmem:   ; db        "M8 ",NULL  ; Memory Mapped 8-bit
    270                                 ; db        4dh,  38h,  20h,  00h    ; uncompressed
    271                                   db        53h,  30h,  00h          ; compressed
    272 
    273 g_szDeviceTypeValues_JrIde:     ; db        "M8 ",NULL
    274                                 ; db        4dh,  38h,  20h,  00h    ; uncompressed
    275                                   db        53h,  30h,  00h          ; compressed
    276 
    277 g_szDeviceTypeValues_Serial:    ; db        "SER",NULL
    278                                 ; db        53h,  45h,  52h,  00h    ; uncompressed
    279                                   db        59h,  4bh,  98h          ; compressed
     241g_szDeviceTypeValues_16bit:     ; db    " 16",NULL
     242                                ; db    20h,  31h,  36h,  00h    ; uncompressed
     243                                  db    20h,  2bh,  0fh          ; compressed
     244
     245g_szDeviceTypeValues_32bit:     ; db    " 32",NULL
     246                                ; db    20h,  33h,  32h,  00h    ; uncompressed
     247                                  db    20h,  2dh,  0ch          ; compressed
     248
     249g_szDeviceTypeValues_8bit:      ; db    "  8",NULL
     250                                ; db    20h,  20h,  38h,  00h    ; uncompressed
     251                                  db    20h,  20h,  10h          ; compressed
     252
     253g_szDeviceTypeValues_XTIDEr1:   ; db    "D8 ",NULL  ; Dual 8-bit
     254                                ; db    44h,  38h,  20h,  00h    ; uncompressed
     255                                  db    4ah,  30h,  00h          ; compressed
     256
     257g_szDeviceTypeValues_XTIDEr2:   ; db    "X8 ",NULL  ; A0<->A3 swapped 8-bit
     258                                ; db    58h,  38h,  20h,  00h    ; uncompressed
     259                                  db    5eh,  30h,  00h          ; compressed
     260
     261g_szDeviceTypeValues_XTCFpio8:  ; db    "T8 ",NULL  ; True 8-bit
     262                                ; db    54h,  38h,  20h,  00h    ; uncompressed
     263                                  db    5ah,  30h,  00h          ; compressed
     264
     265g_szDeviceTypeValues_XTCFdma:   ; db    "8MA",NULL  ; DMA 8-bit
     266                                ; db    38h,  4dh,  41h,  00h    ; uncompressed
     267                                  db    30h,  53h,  87h          ; compressed
     268
     269g_szDeviceTypeValues_XTCFmem:   ; db    "M8 ",NULL  ; Memory Mapped 8-bit
     270                                ; db    4dh,  38h,  20h,  00h    ; uncompressed
     271                                  db    53h,  30h,  00h          ; compressed
     272
     273g_szDeviceTypeValues_JrIde:     ; db    "M8 ",NULL
     274                                ; db    4dh,  38h,  20h,  00h    ; uncompressed
     275                                  db    53h,  30h,  00h          ; compressed
     276
     277g_szDeviceTypeValues_Serial:    ; db    "SER",NULL
     278                                ; db    53h,  45h,  52h,  00h    ; uncompressed
     279                                  db    59h,  4bh,  98h          ; compressed
    280280
    281281
     
    317317%endif
    318318
    319 g_szSelectionTimeout:   ; db        DOUBLE_BOTTOM_LEFT_CORNER,DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL,"%ASelection in %2-u s",NULL
    320                         ; db        0c8h, 0b5h,  25h,  41h,  53h,  65h,  6ch,  65h,  63h,  74h,  69h,  6fh,  6eh,  20h,  69h,  6eh,  20h,  25h,  32h,  2dh,  75h,  20h,  73h,  00h    ; uncompressed
    321                           db         31h,  32h,  3bh,  59h,  6bh,  72h,  6bh,  69h,  7ah,  6fh,  75h, 0f4h,  6fh, 0f4h,  3ah,  20h, 0b9h                                              ; compressed
    322 
     319
     320g_szSelectionTimeout:   ; db    DOUBLE_BOTTOM_LEFT_CORNER,DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL,"%ASelection in %2-u s",NULL
     321                        ; db    0c8h, 0b5h,  25h,  41h,  53h,  65h,  6ch,  65h,  63h,  74h,  69h,  6fh,  6eh,  20h,  69h,  6eh,  20h,  25h,  32h,  2dh,  75h,  20h,  73h,  00h    ; uncompressed
     322                          db     31h,  32h,  3bh,  59h,  6bh,  72h,  6bh,  69h,  7ah,  6fh,  75h, 0f4h,  6fh, 0f4h,  3ah,  20h, 0b9h                                              ; compressed
    323323
    324324
     
    337337                          db     3dh,  39h                ; compressed
    338338
    339     ; db    "Addr. ",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",SINGLE_VERTICAL,  "IRQ",SINGLE_VERTICAL,"Reset",LF,CR
     339    ; db    "Addr. ",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",SINGLE_VERTICAL,"IRQ",SINGLE_VERTICAL,"Reset",LF,CR
    340340    ; db     41h,  64h,  64h,  72h,  2eh,  20h, 0b3h,  42h,  6ch,  6fh,  63h,  6bh, 0b3h,  42h,  75h,  73h, 0b3h,  49h,  52h,  51h, 0b3h,  52h,  65h,  73h,  65h,  74h,  0ah,  0dh    ; uncompressed
    341341      db     47h,  6ah,  6ah,  78h,  29h,  20h,  23h,  48h,  72h,  75h,  69h,  71h,  23h,  48h,  7bh,  79h,  23h,  4fh,  58h,  57h,  23h,  58h,  6bh,  79h,  6bh,  7ah,  39h          ; compressed
    342342
    343     ; db       "%s",SINGLE_VERTICAL, "%5-u",SINGLE_VERTICAL, "%s",SINGLE_VERTICAL," %2-I",SINGLE_VERTICAL,"%5-x" ,NULL
    344     ; db        25h,  73h, 0b3h,  25h,  35h,  2dh,  75h, 0b3h,  25h,  73h, 0b3h,  20h,  25h,  32h,  2dh,  49h, 0b3h,  25h,  35h,  2dh,  78h,  00h    ; uncompressed
    345       db        3dh,  23h,  36h,  23h,  3dh,  23h,  20h,  34h,  23h,  18h                                                                            ; compressed
     343    ; db    "%s",SINGLE_VERTICAL,"%5-u",SINGLE_VERTICAL,"%s",SINGLE_VERTICAL," %2-I",SINGLE_VERTICAL,"%5-x",NULL
     344    ; db     25h,  73h, 0b3h,  25h,  35h,  2dh,  75h, 0b3h,  25h,  73h, 0b3h,  20h,  25h,  32h,  2dh,  49h, 0b3h,  25h,  35h,  2dh,  78h,  00h    ; uncompressed
     345      db     3dh,  23h,  36h,  23h,  3dh,  23h,  20h,  34h,  23h,  18h                                                                            ; compressed
    346346
    347347
     
    374374%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    375375%if ((g_szBootMenuPrintStart-$$) & 0xff00) <> ((g_szBootMenuPrintEnd-$$) & 0xff00)
    376 %error "g_szBootMenuPrint* strings must start on the same 256 byte page, required by the BootMenuPrint_* routines.  Please move this block up or down within strings.asm"
     376%error "g_szBootMenuPrint* strings must start on the same 256 byte page, required by the BootMenuPrint_* routines.  Please move this block up or down within Strings.asm"
    377377%endif
    378378%endif
     
    396396;  * There can only be 32 of these (0-31).
    397397;  * Keeping the list short is good - this translates to a table in the compressed version.
    398 ;    An error will be reported if a character or format is no longer being used by any 
     398;    An error will be reported if a character or format is no longer being used by any
    399399;    strings above.
    400400;  * Please keep items sequential for ease of further editing.
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AccessDPT.asm

    r473 r491  
    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
     
    6767AccessDPT_GetDeviceControlByteToAL:
    6868%ifdef MODULE_IRQ
     69
     70%ifndef USE_UNDOC_INTEL
    6971    xor     al, al
    70     test    BYTE [di+DPT.bFlagsLow], FLGL_DPT_ENABLE_IRQ
     72%endif
     73
     74    test    BYTE [di+DPT.bFlagsLow], FLGL_DPT_ENABLE_IRQ    ; Clears CF
     75
     76%ifdef USE_UNDOC_INTEL
     77    eSALC   ; Clears AL using CF while preserving flags
     78%endif
     79
    7180    jnz     SHORT .EnableDeviceIrq
    7281    or      al, FLG_DEVCONTROL_nIEN ; Disable IRQ
     
    7483%else
    7584    mov     al, FLG_DEVCONTROL_nIEN ; Disable IRQ
    76 %endif
     85%endif ; MODULE_IRQ
    7786    ret
    7887
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AtaGeometry.asm

    r445 r491  
    8181AtaGeometry_GetLCHStoAXBLBHfromAtaInfoInESSIandTranslateModeInDX:
    8282    call    AtaGeometry_GetPCHStoAXBLBHfromAtaInfoInESSI
    83     ; Fall to AtaGeometry_GetLCHStoAXBLBHfromPCHSinAXBLBH
     83    ; Fall to AtaGeometry_GetLCHStoAXBLBHfromPCHSinAXBLBHandTranslateModeInDX
    8484
    8585AtaGeometry_GetLCHStoAXBLBHfromPCHSinAXBLBHandTranslateModeInDX:
    8686    ; Check if user defined translate mode
    87     test    dx, dx
    88     jnz     SHORT .CheckIfLargeTranslationWanted
     87    dec     dx                      ; Set ZF if TRANSLATEMODE_LARGE, SF if TRANSLATEMODE_NORMAL
     88    jns     SHORT .CheckIfLargeTranslationWanted
    8989    MIN_U   ax, MAX_LCHS_CYLINDERS  ; TRANSLATEMODE_NORMAL maximum cylinders
    9090    inc     dx
    9191.CheckIfLargeTranslationWanted:
    92     dec     dx                      ; Set ZF if TRANSLATEMODE_LARGE
    9392    jz      SHORT ConvertPCHfromAXBLtoRevisedEnhancedCHinAXBL
    9493    dec     dx                      ; Set ZF if TRANSLATEMODE_ASSISTED_LBA
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/BootVars.asm

    r489 r491  
    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
     
    3333BootVars_Initialize:
    3434%ifdef MODULE_8BIT_IDE
    35     mov     WORD [es:BOOTVARS.wNextXTCFportToScan], XTCF_BASE_PORT_1
     35    mov     WORD [es:BOOTVARS.wNextXTCFportToScan], XTCF_BASE_PORT_DETECTION_SEED
    3636%endif
    3737
     
    7272
    7373%endif ; MODULE_HOTKEYS
    74 
    75 
    76 %ifdef MODULE_8BIT_IDE
    77 ;--------------------------------------------------------------------
    78 ; BootVars_GetNextXTCFportToDetectToDX
    79 ;   Parameters:
    80 ;       ES:     BDA Segment
    81 ;   Returns:
    82 ;       DX:     Next XT-CF port to detect
    83 ;   Corrupts registers:
    84 ;       AX
    85 ;--------------------------------------------------------------------
    86 BootVars_GetNextXTCFportToDetectToDX:
    87     mov     dx, [es:BOOTVARS.wNextXTCFportToScan]
    88     test    dl, dl
    89     jz      SHORT .NextOneIs240hor340h
    90     add     WORD [es:BOOTVARS.wNextXTCFportToScan], XTCF_BASE_PORT_3 - XTCF_BASE_PORT_2
    91     ret
    92 .NextOneIs240hor340h:
    93     mov     BYTE [es:BOOTVARS.wNextXTCFportToScan], XTCF_BASE_PORT_2 & 0FFh ; 40h
    94     ret     
    95 %endif ; MODULE_8BIT_IDE
  • trunk/XTIDE_Universal_BIOS/makefile

    r489 r491  
    3434# USE_386                     Use instructions supported by 386 and later                          #
    3535# USE_AT                      Use features supported on AT and later systems (not available on XT) #
     36# USE_UNDOC_INTEL             Optimizations for Intel CPU:s - do NOT use on NEC V20/V30/Sony CPU:s #
    3637#                                                                                                  #
    3738####################################################################################################
     
    99100DEFINES_XT = $(DEFINES_COMMON) ELIMINATE_CGA_SNOW MODULE_8BIT_IDE MODULE_SERIAL MODULE_SERIAL_FLOPPY
    100101DEFINES_XTPLUS = $(DEFINES_COMMON) $(DEFINES_XT) USE_186
    101 DEFINES_AT = $(DEFINES_COMMON) USE_AT USE_286 RELOCATE_INT13H_STACK MODULE_IRQ MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_ADVANCED_ATA
     102DEFINES_AT = $(DEFINES_COMMON) USE_AT USE_286 USE_UNDOC_INTEL RELOCATE_INT13H_STACK MODULE_IRQ MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_ADVANCED_ATA
    102103
    103104DEFINES_XT_LARGE = $(DEFINES_XT) $(DEFINES_COMMON_LARGE)
     
    108109DEFINES_386_8K = $(DEFINES_AT) USE_386
    109110
    110 DEFINES_ALL_FEATURES = MODULE_8BIT_IDE MODULE_ADVANCED_ATA MODULE_BOOT_MENU MODULE_EBIOS MODULE_HOTKEYS MODULE_IRQ MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_STRINGS_COMPRESSED MODULE_FEATURE_SETS 
     111DEFINES_ALL_FEATURES = MODULE_8BIT_IDE MODULE_ADVANCED_ATA MODULE_BOOT_MENU MODULE_EBIOS MODULE_HOTKEYS MODULE_IRQ MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_STRINGS_COMPRESSED MODULE_FEATURE_SETS
    111112
    112113
     
    225226    @perl ..\tools\checksum.pl $(TARGET)_386.bin $(ROMSIZE)
    226227
    227 unused: 
     228unused:
    228229    @echo "All Features"
    229230    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_ALL_FEATURES) $(DEFS_XT) $(DEFS_XT_PLUS) $(DEFS_AT) $(DEFS_XT_LARGE) $(DEFS_XTPLUS_LARGE) $(DEFS_AT_LARGE) $(DEFS_XT_TINY) $(DEFS_386_8K) -o"$(TARGET)_unused.asm" -l"$(TARGET)_unused.lst"
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/Help/Configuration_FullMode.txt

    r370 r491  
    33Lite mode supports only one IDE controller (2 drives) and stores parameters to the top of the interrupt vectors (30:0h) so no Conventional memory needs to be reserved. Lite mode cannot be used if some software requires the top of interrupt vectors. Usually this is not a problem since only IBM ROM BASIC uses them.
    44
    5 Tandy 1000 models with 640 kiB or less memory need to use Lite mode since the top of Conventional memory gets dynamically reserved by video hardware. This happens only with Tandy integrated video controller and not when using expansion graphics cards. It is possible to use Full mode if reserving RAM for video memory + what is required for XTIDE Universal BIOS. This would mean 129 kiB but most software should work with 65 kiB reserved.
     5Tandy 1000 models with 640 kiB or less memory need to use Lite mode since the top of Conventional memory gets dynamically reserved by video hardware. This happens only with Tandy integrated video controller and not when using expansion graphics cards. It is possible to use Full mode if reserving RAM for video memory + what is required for XTIDE Universal BIOS. This would mean 65 kiB but most software should work with 33 kiB reserved.
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/IdeControllerMenu.asm

    r483 r491  
    388388    ja      SHORT .EnableMenuitemFromCSBX
    389389    jmp     SHORT .DisableMenuitemFromCSBX
    390    
     390
    391391
    392392;--------------------------------------------------------------------
     
    452452.DisableIRQchannelSelection:
    453453    mov     bx, g_MenuitemIdeControllerIdeIRQ
    454     jz      SHORT .DisableMenuitemFromCSBX
    455454    jmp     SHORT .DisableMenuitemFromCSBX
    456455
Note: See TracChangeset for help on using the changeset viewer.