Changeset 631 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS_Configurator_v2/Src


Ignore:
Timestamp:
Feb 1, 2025, 12:45:33 PM (10 hours ago)
Author:
Krister Nordvall
Message:

Changes:

  • Fixed a bug in XTIDECFG where changing the COM port for a virtual serial device would not work at all. Thanks to Jaroslaw Jablonski for reporting this problem.
  • Added a couple of macros to the library, LPUSH and LPOP, which creates the long (two bytes) encoding of PUSH and POP respectively. They are pretty much useless except LPOP can be used to differentiate between 808x and NEC V CPUs.
Location:
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/IdeControllerMenu.asm

    r625 r631  
    44;
    55; XTIDE Universal BIOS and Associated Tools
    6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team.
     6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2025 by XTIDE Universal BIOS Team.
    77;
    88; This program is free software; you can redistribute it and/or modify
     
    133133    at  MENUITEM.bType,             db  TYPE_MENUITEM_HEX
    134134    at  MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,        dw  NULL
    135     at  MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,              dw  g_szDlgIdeCmdPort
     135    at  MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,              dw  g_szDlgIdeSerialPort
    136136    at  MENUITEM.itemValue + ITEM_VALUE.wMinValue,                  dw  8h
    137137    at  MENUITEM.itemValue + ITEM_VALUE.wMaxValue,                  dw  3F8h
     
    578578    push    ax
    579579    xlat
    580     mov     [es:di+IDEVARS.bIRQ-IDEVARS.wBasePort], al
     580    mov     [es:di+IDEVARS.bIRQ], al
    581581    pop     ax
    582582
     
    639639    ; XT-CF does not support IRQ so it must be disabled (IRQ setting is not visible for XT-CF)
    640640    ; XTIDE does not use IRQs by default
    641     mov     BYTE [es:di+IDEVARS.bIRQ-IDEVARS.wBasePort], 0
     641    mov     BYTE [es:di+IDEVARS.bIRQ], 0
    642642
    643643.WriteNonSerial:
     
    658658
    659659.ChangingToSerial:
    660 ;
    661 ; For serial drives, we pack the port number and baud rate into a single byte, and thus
    662 ; we need to take care to properly read/write just the bits we need.  In addition, since
    663 ; we use the Port/PortCtrl bytes in a special way for serial drives, we need to properly
    664 ; default the values stored in both these words when switching in and out of the Serial
    665 ; device choice.
    666 ;
    667     mov     al, SERIAL_DEFAULT_COM
    668     mov     BYTE [es:di+IDEVARS.bSerialBaud-IDEVARS.wBasePort], SERIAL_DEFAULT_BAUD
    669     mov     [es:di+IDEVARS.bIRQ-IDEVARS.wBasePort], ah  ; Clear .bIRQ to keep the boot menu from printing it
    670 
     660    mov     al, ah                              ; Clear AL to point to the default COM port in the PackedCOMPortAddresses table
     661    mov     BYTE [es:di+IDEVARS.bSerialBaud], SERIAL_DEFAULT_BAUD
     662    mov     [es:di+IDEVARS.bIRQ], ah            ; Clear .bIRQ to keep the boot menu from printing it
    671663    sub     di, IDEVARS.wBasePort - IDEVARS.bSerialCOMPortChar
     664    mov     BYTE [es:di], SERIAL_DEFAULT_COM
    672665    call    IdeControllerMenu_SerialWriteCOM
    673     stosb
    674666
    675667.Done:
     
    685677;
    686678;   Parameters:
    687 ;       AL:     COM port
     679;       AX:     COM port menu choice index
    688680;       ES:DI:  Ptr to IDEVARS.bSerialCOMPortChar
    689681;       DS:SI:  MENUITEM pointer
    690682;   Returns:
    691 ;       Nothing
     683;       AX:     COM port menu choice index
    692684;   Corrupts registers:
    693685;       BX
     
    695687ALIGN JUMP_ALIGN
    696688IdeControllerMenu_SerialWriteCOM:
    697     push    ax
    698     push    si
    699 
    700     mov     bx, PackedCOMPortAddresses - 1
    701     mov     si, g_rgbChoiceToValueLookupForCOM - 2
    702 
    703 .Loop:
    704     inc     bx
    705     inc     si
    706     inc     si
    707 
    708     mov     ah, [bx]
    709     cmp     ah, SERIAL_DEFAULT_CUSTOM_PORT >> 2
    710     je      SHORT .NotFound
    711 
    712     cmp     al, [si]
    713     jne     SHORT .Loop
    714 
    715 .NotFound:
    716     mov     [es:di+IDEVARS.bSerialPort-IDEVARS.bSerialCOMPortChar], ah
    717 
    718     pop     si
    719     pop     ax
     689    xchg    bx, ax
     690    mov     al, [bx+PackedCOMPortAddresses]
     691    mov     [es:di+IDEVARS.bSerialPort-IDEVARS.bSerialCOMPortChar], al
     692    xchg    bx, ax
    720693    ret
    721694
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm

    r630 r631  
    44;
    55; XTIDE Universal BIOS and Associated Tools
    6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2024 by XTIDE Universal BIOS Team.
     6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2025 by XTIDE Universal BIOS Team.
    77;
    88; This program is free software; you can redistribute it and/or modify
     
    9898g_szNfoMainFlash:       db  "Flash loaded BIOS image to EEPROM.",NULL
    9999g_szNfoMainSave:        db  "Save BIOS changes back to original file from which it was loaded.",NULL
    100 g_szNfoMainLicense:     db  "XTIDE Universal BIOS and XTIDECFG Copyright (C) 2009-2010 by Tomi Tilli, 2011-2024 by XTIDE Universal BIOS Team."
     100g_szNfoMainLicense:     db  "XTIDE Universal BIOS and XTIDECFG Copyright (C) 2009-2010 by Tomi Tilli, 2011-2025 by XTIDE Universal BIOS Team."
    101101                        db  " Released under GNU GPL v2, with ABSOLUTELY NO WARRANTY. Press ENTER for more details...",NULL
    102102g_szNfoMainHomePage:    db  "Visit http://xtideuniversalbios.org (home page) and http://forum.vcfed.org (support)",NULL
    103103
    104104g_szHelpMainLicense:    db  "XTIDE Universal BIOS and XTIDECFG Configuration program are Copyright 2009-2010 by Tomi Tilli,"
    105                         db  " 2011-2024 by XTIDE Universal BIOS Team. Released under GNU GPL v2. This software comes with ABSOLUTELY NO WARRANTY."
     105                        db  " 2011-2025 by XTIDE Universal BIOS Team. Released under GNU GPL v2. This software comes with ABSOLUTELY NO WARRANTY."
    106106                        db  " This is free software, and you are welcome to redistribute it under certain conditions."
    107107                        db  " See the LICENSE.TXT file that was included with this distribution,"
     
    250250g_szDlgIdeEnIRQ:            db  "Enable interrupt?",NULL
    251251g_szDlgIdeIRQ:              db  "Enter IRQ channel (2...7 for 8-bit controllers, 2...15 for any other controller).",NULL
     252g_szDlgIdeSerialPort:       db  "Enter serial port I/O address.",NULL
    252253g_szUnsupportedDevice:      db  "There is no support for this device type in the currently loaded BIOS."
    253254                            db  " You must load a BIOS built with the proper module included to be able to use this type of device.",NULL
Note: See TracChangeset for help on using the changeset viewer.