Ignore:
Timestamp:
Nov 21, 2021, 2:15:32 PM (2 years ago)
Author:
krille_n_
Message:

Changes:

  • Fixed three different bugs all causing the boot menu to show drives using IRQs even though the BIOS had been built without MODULE_IRQ.
  • Fixed two bugs in XTIDECFG where loading a BIOS from file and then loading the old settings from EEPROM would
    • overwrite ROMVARS.wFlags in the loaded BIOS file (in RAM). The possibly resulting mismatch of module flags could make it impossible to change settings for modules included in the BIOS or allow changing settings for modules not included in the BIOS.
    • not copy the color theme over to the loaded BIOS.
  • Also fixed two very minor bugs in XTIDECFG in BiosFile_LoadFileFromDSSItoRamBuffer and BiosFile_SaveRamBufferToFileInDSSI where the error handling in these routines would close whatever file handle that happened to match the error code returned by DOS in AX.
  • Made significant changes to the new flash ROM programming routines to reduce the size. Also fixed a minor bug that would cause the second verification to be skipped and return success when programming a 64 KB block of data.
  • Changed the custom BIOS build file names to the 8.3 format.
  • Changed some help strings in XTIDECFG to clarify things.
  • Other minor optimizations and fixes.
File:
1 edited

Legend:

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

    r614 r621  
    300300IdeControllerMenu_InitializeToIdevarsOffsetInBX:
    301301    lea     ax, [bx+IDEVARS.drvParamsMaster]
    302     mov     [cs:g_MenuitemIdeControllerMasterDrive+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
     302    mov     [g_MenuitemIdeControllerMasterDrive+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
    303303
    304304    lea     ax, [bx+IDEVARS.drvParamsSlave]
    305     mov     [cs:g_MenuitemIdeControllerSlaveDrive+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
     305    mov     [g_MenuitemIdeControllerSlaveDrive+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
    306306
    307307    lea     ax, [bx+IDEVARS.bDevice]
    308     mov     [cs:g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
     308    mov     [g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
    309309
    310310%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    311311%if IDEVARS.wBasePort = 0
    312     mov     [cs:g_MenuitemIdeControllerCommandBlockAddress+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], bx
     312    mov     [g_MenuitemIdeControllerCommandBlockAddress+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], bx
    313313%else
    314314    lea     ax, [bx+IDEVARS.wBasePort]
    315     mov     [cs:g_MenuitemIdeControllerCommandBlockAddress+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
     315    mov     [g_MenuitemIdeControllerCommandBlockAddress+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
    316316%endif
    317317
    318318%if IDEVARS.bSerialPort = 0
    319     mov     [cs:g_MenuitemIdeControllerSerialPort+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], bx
     319    mov     [g_MenuitemIdeControllerSerialPort+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], bx
    320320%else
    321321    lea     ax, [bx+IDEVARS.bSerialPort]
    322     mov     [cs:g_MenuitemIdeControllerSerialPort+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
     322    mov     [g_MenuitemIdeControllerSerialPort+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
    323323%endif
    324324%endif
    325325
    326326    lea     ax, [bx+IDEVARS.bSerialBaud]
    327     mov     [cs:g_MenuitemIdeControllerSerialBaud+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
     327    mov     [g_MenuitemIdeControllerSerialBaud+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
    328328
    329329    lea     ax, [bx+IDEVARS.wControlBlockPort]
    330     mov     [cs:g_MenuitemIdeControllerControlBlockAddress+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
     330    mov     [g_MenuitemIdeControllerControlBlockAddress+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
    331331
    332332    lea     ax, [bx+IDEVARS.bSerialCOMPortChar]
    333     mov     [cs:g_MenuitemIdeControllerSerialCOM+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
     333    mov     [g_MenuitemIdeControllerSerialCOM+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
    334334
    335335    lea     ax, [bx+IDEVARS.bIRQ]
    336     mov     [cs:g_MenuitemIdeControllerEnableInterrupt+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
    337     mov     [cs:g_MenuitemIdeControllerIdeIRQ+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
     336    mov     [g_MenuitemIdeControllerEnableInterrupt+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
     337    mov     [g_MenuitemIdeControllerIdeIRQ+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
    338338
    339339    ret
     
    512512    mov     bx, g_MenuitemMasterSlaveDisableDetection
    513513    call    DisableMenuitemFromCSBX
    514     mov     bx, [cs:g_MenuitemIdeControllerMasterDrive+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
     514    mov     bx, [g_MenuitemIdeControllerMasterDrive+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
    515515    jmp     SHORT DisplayMasterSlaveMenu
    516516
     
    519519    mov     bx, g_MenuitemMasterSlaveDisableDetection
    520520    call    EnableMenuitemFromCSBX
    521     mov     bx, [cs:g_MenuitemIdeControllerSlaveDrive+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
     521    mov     bx, [g_MenuitemIdeControllerSlaveDrive+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
    522522    ; Fall to DisplayMasterSlaveMenu
    523523
     
    566566    ; Standard ATA controllers, including 8-bit mode
    567567.StandardIdeDevice:
    568     ; Enable IRQ for standard ATA
     568    ; Enable IRQ for standard ATA, but only if MODULE_IRQ is included
    569569
    570570    lea     ax, [di-ROMVARS.ideVars0+IDEVARS.wBasePort]
    571571    mov     bl, IDEVARS_size
    572572    div     bl
     573
     574    test    BYTE [es:ROMVARS.wFlags+1], FLG_ROMVARS_MODULE_IRQ >> 8
     575    jz      SHORT .DoNotEnableIrq
     576
     577    mov     bx, .rgbDefaultIrqForStdIde         ; Enable interrupt for primary and secondary IDE
    573578    push    ax
    574     mov     bx, .rgbDefaultIrqForStdIde         ; Enable interrupt for primary and secondary IDE
    575579    xlat
    576580    mov     [es:di+IDEVARS.bIRQ-IDEVARS.wBasePort], al
    577581    pop     ax
    578     sub     bx, BYTE .rgbDefaultIrqForStdIde - .rgbLowByteOfStdIdeInterfacePorts
    579     xlat                                        ; DS=CS so no segment override needed
     582
     583.DoNotEnableIrq:
     584    mov     bx, .rgbLowByteOfStdIdeInterfacePorts
     585    xlat
    580586    mov     ah, 1                               ; DEVICE_ATA_*_PORT >> 8
    581587    mov     bh, 3                               ; DEVICE_ATA_*_PORTCTRL >> 8
Note: See TracChangeset for help on using the changeset viewer.