Changeset 624 in xtideuniversalbios


Ignore:
Timestamp:
Oct 2, 2022, 7:30:02 PM (2 years ago)
Author:
Krister Nordvall
Message:

Changes:

  • The BIOS version string has been changed to show the repository revision number instead of the useless "v2.0.0 beta 3+" string. In other words, the seemingly never ending beta is finally over! The version string is now updated by TortoiseSVN client side hook scripts (residing in \Tools) to be used when committing changes to the repository. It should also be possible to use these scripts with other subversion clients under Windows since they are essentially just regular batch (cmd) files!
  • The eSEG_STR macro has been changed to always disable interrupts. The workaround used for the buggy, early revisions of the 8088/8086 CPUs apparently does not work. Many thanks to Jim Leonard (Trixter) for reporting this problem!
  • Minor optimizations to the eBSF and eBSR macros.
Location:
trunk
Files:
3 added
9 edited

Legend:

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

    r589 r624  
    88; JMP_WAIT_FOR_RETRACE_IF_NECESSARY_THEN
    99;   Parameters:
    10 ;       %1:     Instruction that accessed CGA memory
     10;       %1:     Instruction that accesses CGA memory
    1111;       AL:     Character to output
    1212;       AH:     Attribute to output (stosw only)
  • trunk/Assembly_Library/Inc/Emulate.inc

    r623 r624  
    188188;       %2:     Source WORD operand where to search bit (not CX or same as %1!)
    189189;   Returns:
     190;       %1:     Index of lowest order bit from %2
     191;       ZF:     Set if %2 is zero
     192;               Cleared if %2 is non-zero
     193;   Corrupts registers:
     194;       Nothing
     195;--------------------------------------------------------------------
     196%macro eBSF 2
     197%ifndef USE_386
     198    FSIS    ], %2               ; %2 is a memory operand?
     199    %if strpos
     200        cmp     WORD %2, BYTE 0 ; Source operand is zero?
     201        je      SHORT %%Return  ;  If so, return with ZF set
     202    %else                       ; No, %2 is a register
     203        test    %2, %2
     204        jz      SHORT %%Return
     205    %endif
     206
     207    push    cx
     208
     209%ifdef USE_NEC_V
     210    mov     cx, -1
     211
     212ALIGN JUMP_ALIGN
     213%%BitLoop:
     214    inc     cx
     215    eTEST1  %2, cl
     216    jz      SHORT %%BitLoop
     217    mov     %1, cx
     218
     219%else ; ~USE_NEC_V
     220    mov     cx, 1<<15
     221    mov     %1, -1
     222
     223ALIGN JUMP_ALIGN
     224%%BitLoop:
     225    rol     cx, 1               ; Prepare to test next bit
     226    inc     %1                  ; Increment bit index
     227    test    %2, cx              ; Bit set?
     228    jz      SHORT %%BitLoop
     229%endif
     230
     231    pop     cx
     232
     233%%Return:
     234;-----------------------------------
     235%else ; USE_386
     236    bsf     %1, %2
     237%endif
     238%endmacro
     239
     240
     241;--------------------------------------------------------------------
     242; Emulates BSR (Bit Scan Reverse) instruction when necessary.
     243; BSR is used to find index of most significant bit.
     244;
     245; eBSR
     246;   Parameters:
     247;       %1:     Destination WORD Register for bit index (not CX or same as %2!)
     248;       %2:     Source WORD operand where to search bit (not CX or same as %1!)
     249;   Returns:
    190250;       %1:     Index of highest order bit from %2
    191251;       ZF:     Set if %2 is zero
     
    194254;       Nothing
    195255;--------------------------------------------------------------------
    196 %macro eBSF 2
     256%macro eBSR 2
    197257%ifndef USE_386
    198     cmp     WORD %2, BYTE 0     ; Source operand is zero?
    199     je      SHORT %%Return      ;  If so, return with ZF set
    200 
    201     ; Set destination to zero and load mask for bit 0
     258    FSIS    ], %2               ; %2 is a memory operand?
     259    %if strpos
     260        cmp     WORD %2, BYTE 0 ; Source operand is zero?
     261        je      SHORT %%Return  ;  If so, return with ZF set
     262    %else                       ; No, %2 is a register
     263        test    %2, %2
     264        jz      SHORT %%Return
     265    %endif
     266
    202267    push    cx
    203     xor     %1, %1
    204     mov     cx, 1
     268
     269%ifdef USE_NEC_V
     270    mov     cx, 16
    205271
    206272ALIGN JUMP_ALIGN
    207273%%BitLoop:
    208     test    %2, cx              ; Bit set?
    209     jnz     SHORT %%PopAndReturn;  If so, return with ZF cleared
    210     shl     cx, 1               ; Prepare to test next bit
    211     inc     %1                  ; Increment bit index
    212     jmp     SHORT %%BitLoop     ; Loop until bit found
    213 %%PopAndReturn:
    214     pop     cx
    215 %%Return:
    216 ;-----------------------------------
    217 %else
    218     bsf     %1, %2
    219 %endif
    220 %endmacro
    221 
    222 
    223 ;--------------------------------------------------------------------
    224 ; Emulates BSR (Bit Scan Reverse) instruction when necessary.
    225 ; BSR is used to find index of most significant bit.
    226 ;
    227 ; eBSR
    228 ;   Parameters:
    229 ;       %1:     Destination WORD Register for bit index (not CX or same as %2!)
    230 ;       %2:     Source WORD operand where to search bit (not CX or same as %1!)
    231 ;   Returns:
    232 ;       %1:     Index of highest order bit from %2
    233 ;       ZF:     Set if %2 is zero
    234 ;               Cleared if %2 is non-zero
    235 ;   Corrupts registers:
    236 ;       Nothing
    237 ;--------------------------------------------------------------------
    238 %macro eBSR 2
    239 %ifndef USE_386
    240     cmp     WORD %2, BYTE 0     ; Source operand is zero?
    241     je      SHORT %%Return      ;  If so, return with ZF set
    242 
    243     ; Load mask for highest order bit
    244     push    cx
    245     mov     cx, 1<<15
    246     mov     %1, 15
     274    dec     cx
     275    eTEST1  %2, cl
     276    jz      SHORT %%BitLoop
     277    mov     %1, cx
     278
     279%else ; ~USE_NEC_V
     280    mov     cx, 1
     281    mov     %1, 16
    247282
    248283ALIGN JUMP_ALIGN
    249284%%BitLoop:
     285    ror     cx, 1               ; Prepare to test next bit
     286    dec     %1                  ; Decrement bit index
    250287    test    %2, cx              ; Bit set?
    251     jnz     SHORT %%PopAndReturn;  If so, return with ZF cleared
    252     shr     cx, 1               ; Prepare to test next bit
    253     dec     %1                  ; Decrement bit index
    254     jmp     SHORT %%BitLoop     ; Loop until bit found
    255 %%PopAndReturn:
     288    jz      SHORT %%BitLoop
     289%endif
     290
    256291    pop     cx
    257 %%Return:
    258 ;-----------------------------------
    259 %else
     292
     293%%Return:
     294;-----------------------------------
     295%else ; USE_386
    260296    bsr     %1, %2
    261297%endif
     
    539575;       %2:     Source segment override (destination is always ES)
    540576;       %3:     String instruction
     577;       %4:     An exclamation mark (!) if the state of the IF must
     578;               be preserved (can not be used together with CMPS or
     579;               SCAS instructions), otherwise it will be set on
     580;               return from the macro (i.e. interrupts will be on)
    541581;       CX:     Repeat count
    542582;   Returns:
    543 ;       FLAGS for cmps and scas only
     583;       FLAGS for CMPS and SCAS only
    544584;   Corrupts registers:
    545585;       FLAGS
    546586;--------------------------------------------------------------------
    547 %macro eSEG_STR 3
    548 %ifndef USE_186 ; 8088/8086 has string instruction restart bug when more than one prefix
    549     %%Loop:
    550         %1                      ; REP is the prefix that can be lost
    551         %2                      ; SEG is the prefix that won't be lost
    552         %3                      ; String instruction
    553 FSIS    cmps, %3
     587%macro eSEG_STR 3-4
     588%ifndef USE_186 ; 8088/8086 has string instruction restart bug when using more than one prefix
     589%ifidn %4, !                ; Preserve the IF
     590    FSIS    cmps, %3
    554591%ifn strpos
    555592    FSIS    scas, %3
    556593%endif
    557 %if strpos                      ; Must preserve FLAGS
    558         jcxz    %%End           ; Jump to end if no repeats left (preserves FLAGS)
    559         jmp     SHORT %%Loop    ; Loop while repeats left
    560     %%End:
    561 %else                           ; No need to preserve FLAGS
    562         inc     cx
    563         loop    %%Loop
    564 %endif
    565 %else   ; No bug on V20/V30 and later, don't know about 188/186
     594%if strpos
     595    %error "The state of the IF can not be preserved when using CMPS or SCAS!"
     596%endif
     597    pushf
     598    cli
     599    %1                      ; REP is the prefix that can be lost
     600    %2                      ; SEG is the prefix that won't be lost
     601    %3                      ; String instruction
     602    popf
     603%else                       ; No need to preserve the IF
     604    cli
     605    %1
     606    %2
     607    %3
     608    sti
     609%endif
     610%else   ; No bug on V20/V30/188/186 and later
    566611    %2
    567612    %1 %3
  • trunk/Assembly_Library/Src/Display/DisplayFormat.asm

    r592 r624  
    366366
    367367    cmp     si, BYTE 7Fh        ; well within the boundaries of ROMVARS_size
    368     jb      .notFormatted
     368    jb      SHORT .notFormatted
    369369
    370370    dec     bp
     
    373373    inc     bp                  ; will be decremented after the call is done
    374374    inc     bp
    375     jmp     .done
     375    jmp     SHORT .done
    376376
    377377.notFormatted:
  • trunk/BIOS_Drive_Information_Tool/Src/Strings.asm

    r613 r624  
    2222
    2323g_szProgramName:    db  "BIOS Drive Information Tool v1.0.3",CR,LF
    24                     db  "(C) 2012-2021 by XTIDE Universal BIOS Team",CR,LF
     24                    db  "(C) 2012-2022 by XTIDE Universal BIOS Team",CR,LF
    2525                    db  "Released under GNU GPL v2",CR,LF
    2626                    db  "http://xtideuniversalbios.org/",CR,LF,NULL
     
    3737g_szLBA:            db  "LBA   ",NULL
    3838g_szFormatCHS:      db  " Cylinders    : %5u, Heads: %3u, Sectors: %2u",NULL
    39 g_szWillBeModified: db  "Will be modified to:",CR,LF,NULL       
     39g_szWillBeModified: db  "Will be modified to:",CR,LF,NULL
    4040g_szChsSectors:     db  " CHS   sectors: ",NULL
    4141g_szLBA28:          db  " LBA28 sectors: ",NULL
     
    4444g_szPIO:            db  " PIO mode     : Max %u, Min cycle times: %u ns, with IORDY %d ns",CR,LF,NULL
    4545g_szXUB:            db  "XTIDE Universal BIOS %s generates following L-CHS...",CR,LF,NULL
    46 g_szXUBversion:     db  ROM_VERSION_STRING  ; This one is NULL terminated
     46g_szXUBversion:     db  "r"
     47                    db  ROM_VERSION_STRING
     48                    db  BUILD_DATE_STRING,NULL
    4749
    4850g_szOldInfoHeader:  db  "Old INT 13h information from AH=08h and AH=15h...",CR,LF,NULL
  • trunk/Serial_Server/win32/Win32.cpp

    r602 r624  
    3333#include "../library/FlatImage.h"
    3434
    35 #include "../../XTIDE_Universal_BIOS/Inc/Version.inc"
    36 
    3735char *bannerStrings[] = {
    3836    "SerDrive - XTIDE Universal BIOS Serial Drive Server",
    39     "Copyright (C) 2012-2019 by XTIDE Universal BIOS Team",
     37    "Copyright (C) 2012-2022 by XTIDE Universal BIOS Team",
    4038    "Released under GNU GPL v2, with ABSOLUTELY NO WARRANTY",
    41     ROM_VERSION_STRING,
    4239    "",
    4340    NULL };
  • trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc

    r614 r624  
    142142    .rgbSign            resb    6   ; Signature for XTIDE Configurator Program (must be even length)
    143143    .szTitle            resb    31  ; BIOS title string
    144     .szVersion          resb    25  ; BIOS version string
     144    .szVersion          resb    19  ; BIOS version string (supports up to r9999)
    145145
    146146    .wFlags             resb    2   ; Word for ROM flags
     
    154154    .bIdleTimeout       resb    1   ; Standby timer value
    155155
     156                        alignb  2   ; WORD align the IDEVARS structures
    156157    .ideVarsBegin:
    157158    .ideVars0           resb    IDEVARS_size
  • trunk/XTIDE_Universal_BIOS/Inc/Version.inc

    r614 r624  
    1 ; /*
    21; Project name  :   XTIDE Universal BIOS
    32; Description   :   Version information.
     
    2019
    2120; Flash signature revisions:
     21; XUB209    Shortened the BIOS version string (ROMVARS.szVersion) and WORD aligned the IDEVARS structures
    2222; XUB208    Added option to skip slave drive detection
    2323; XTIDE207  Added device type DEVICE_8BIT_XTIDE_REV2_OLIVETTI
     
    2727;
    2828
    29 ;--------------------------------------------------------------------------------
    30 ;
    31 ; Assembler Version
    32 ;
    33 
    3429%ifndef VERSION_INC
    3530%define VERSION_INC
    3631
    3732
    38 %define TITLE_STRING_START  "-=XTIDE Universal BIOS "
     33%define TITLE_STRING_START      "-=XTIDE Universal BIOS "
    3934%ifdef USE_AT
    4035    %ifdef USE_386
    41         %define TITLE_STRING_END    "(386)=-",NULL
     36        %define TITLE_STRING_END    "(386)=-"
    4237    %else
    43         %define TITLE_STRING_END    "(AT)=-",NULL
     38        %define TITLE_STRING_END    "(AT)=-"
    4439    %endif
    4540%elifdef USE_186
    46     %define TITLE_STRING_END    "(XT+)=-",NULL
     41    %define TITLE_STRING_END    "(XT+)=-"
    4742%else
    48     %define TITLE_STRING_END    "(XT)=-",NULL
     43    %define TITLE_STRING_END    "(XT)=-"
    4944%endif
    5045
    51 %define TITLE_STRING            TITLE_STRING_START, TITLE_STRING_END
    52 %define ROM_VERSION_STRING      "v2.0.0",BETA,"3+ (",__DATE__,")",NULL
    53 %define FLASH_SIGNATURE         "XUB208"    ; Do not terminate with NULL
     46%define TITLE_STRING            TITLE_STRING_START,TITLE_STRING_END,NULL
     47%define ROM_VERSION_STRING      incbin "Revision.inc"   ; This file must include a trailing space
     48; Note!
     49; NASM will throw weird errors when using ROM_VERSION_STRING if it's not a single statement on its own line.
     50; This is likely due to the "unusual" way it is defined above. Make sure to not have any additional strings
     51; on the same line, either before or after. In fact, do not even put a preceding label on the same line!
     52%define BUILD_DATE_STRING       "(",__DATE__,")"
     53%define FLASH_SIGNATURE         "XUB209"    ; Do not terminate with NULL
    5454
    5555
    5656%endif ; VERSION_INC
    57 
    58 %if 0           ; equivalent of a NASM comment block
    59 ;*/
    60 
    61 //--------------------------------------------------------------------------------
    62 //
    63 // C/C++ Version
    64 //
    65 
    66 #define BETA " Beta "
    67 
    68 #define ROM_VERSION_STRING      "v2.0.0" BETA "3 (" __DATE__ ")"
    69 
    70 /*
    71 %endif
    72 ;*/
  • trunk/XTIDE_Universal_BIOS/Src/Main.asm

    r621 r624  
    7171    at  ROMVARS.rgbSign,    db  FLASH_SIGNATURE
    7272    at  ROMVARS.szTitle,    db  TITLE_STRING
    73     at  ROMVARS.szVersion,  db  ROM_VERSION_STRING
     73    at  ROMVARS.szVersion,  db  "r"
     74                            db  ROM_VERSION_STRING
     75                            db  BUILD_DATE_STRING,NULL
    7476
    7577;---------------------------;
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm

    r623 r624  
    2525
    2626; Menu title
    27 g_szProgramTitle:                   db  "Configuration and Flashing program for XTIDE Universal BIOS v2.0.0.",LF,CR,NULL
     27g_szProgramTitle:                   db  "Configuration and Flashing program for XTIDE Universal BIOS r"
     28                                    db  ROM_VERSION_STRING
     29                                    db  LF,CR,NULL
    2830g_sXtideUniversalBiosSignature:     db  FLASH_SIGNATURE     ; No need to terminate with NULL.
    2931g_szBiosIsNotLoaded:                db  "BIOS is not loaded!",NULL
     
    9698g_szNfoMainFlash:       db  "Flash loaded BIOS image to EEPROM.",NULL
    9799g_szNfoMainSave:        db  "Save BIOS changes back to original file from which it was loaded.",NULL
    98 g_szNfoMainLicense:     db  "XTIDE Universal BIOS and XTIDECFG Copyright (C) 2009-2010 by Tomi Tilli, 2011-2021 by XTIDE Universal BIOS Team."
     100g_szNfoMainLicense:     db  "XTIDE Universal BIOS and XTIDECFG Copyright (C) 2009-2010 by Tomi Tilli, 2011-2022 by XTIDE Universal BIOS Team."
    99101                        db  " Released under GNU GPL v2, with ABSOLUTELY NO WARRANTY. Press ENTER for more details...",NULL
    100102g_szNfoMainHomePage:    db  "Visit http://xtideuniversalbios.org (home page) and http://forum.vcfed.org (support)",NULL
    101103
    102104g_szHelpMainLicense:    db  "XTIDE Universal BIOS and XTIDECFG Configuration program are Copyright 2009-2010 by Tomi Tilli,"
    103                         db  " 2011-2021 by XTIDE Universal BIOS Team. Released under GNU GPL v2. This software comes with ABSOLUTELY NO WARRANTY."
     105                        db  " 2011-2022 by XTIDE Universal BIOS Team. Released under GNU GPL v2. This software comes with ABSOLUTELY NO WARRANTY."
    104106                        db  " This is free software, and you are welcome to redistribute it under certain conditions."
    105107                        db  " See the LICENSE.TXT file that was included with this distribution,"
Note: See TracChangeset for help on using the changeset viewer.