ECP DMA jumpers, configuration via MBDMA where supported, and the Radisys Configuration device.

This commit is contained in:
OBattler
2025-08-13 12:52:24 +02:00
parent 71a1d2a3b6
commit a276ae94f8
15 changed files with 19659 additions and 18538 deletions

View File

@@ -49,6 +49,8 @@ SettingsPorts::~SettingsPorts()
void
SettingsPorts::save()
{
jumpered_internal_ecp_dma = ui->comboBoxLptECPDMA->currentData().toInt();
for (int i = 0; i < PARALLEL_MAX; i++) {
auto *cbox = findChild<QComboBox *>(QString("comboBoxLpt%1").arg(i + 1));
auto *checkBox = findChild<QCheckBox *>(QString("checkBoxParallel%1").arg(i + 1));
@@ -73,7 +75,52 @@ SettingsPorts::onCurrentMachineChanged(int machineId)
{
this->machineId = machineId;
int c = 0;
int c = 0;
auto *lptEcpDmaModel = ui->comboBoxLptECPDMA->model();
auto removeRowsEcpDma = lptEcpDmaModel->rowCount();
int has_jumpers = !!machine_has_jumpered_ecp_dma(machineId, DMA_ANY);
int selectedRow = -2;
int first = -2;
for (int i = 0; i < 9; ++i) {
int j = machine_map_jumpered_ecp_dma(i);
if ((has_jumpers && ((j == DMA_NONE) || !machine_has_jumpered_ecp_dma(machineId, j))) ||
(!has_jumpers && (j != DMA_NONE)))
continue;
if (first == -2)
first = j;
QString name = tr(machine_get_jumpered_ecp_dma_name(i));
pclog("Found valid DMA channel: %s\n", name.toUtf8().data());
int row = lptEcpDmaModel->rowCount();
lptEcpDmaModel->insertRow(row);
auto idx = lptEcpDmaModel->index(row, 0);
lptEcpDmaModel->setData(idx, name, Qt::DisplayRole);
lptEcpDmaModel->setData(idx, j, Qt::UserRole);
if (j == jumpered_internal_ecp_dma)
selectedRow = row - removeRowsEcpDma;
c++;
}
if (selectedRow == -2)
selectedRow = first;
lptEcpDmaModel->removeRows(0, removeRowsEcpDma);
ui->comboBoxLptECPDMA->setCurrentIndex(-1);
ui->comboBoxLptECPDMA->setCurrentIndex(selectedRow);
if ((c == 1) || !has_jumpers)
ui->comboBoxLptECPDMA->setEnabled(false);
else
ui->comboBoxLptECPDMA->setEnabled(true);
// LPT Device
QComboBox * cbox[PARALLEL_MAX] = { 0 };

View File

@@ -27,15 +27,35 @@
<number>0</number>
</property>
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayoutLptDevs">
<layout class="QGridLayout" name="gridLayoutLptECPDMA">
<item row="0" column="0">
<widget class="QLabel" name="labelLptECPDMA">
<property name="text">
<string>Internal LPT ECP DMA:</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QComboBox" name="comboBoxLptECPDMA">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maxVisibleItems">
<number>30</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelLpt1">
<property name="text">
<string>LPT1 Device:</string>
</property>
</widget>
</item>
<item row="0" column="2">
<item row="1" column="2">
<widget class="QComboBox" name="comboBoxLpt1">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@@ -48,21 +68,21 @@
</property>
</widget>
</item>
<item row="0" column="3">
<item row="1" column="3">
<widget class="QPushButton" name="pushButtonConfigureLpt1">
<property name="text">
<string>Configure</string>
</property>
</widget>
</item>
<item row="1" column="0">
<item row="2" column="0">
<widget class="QLabel" name="labelLpt2">
<property name="text">
<string>LPT2 Device:</string>
</property>
</widget>
</item>
<item row="1" column="2">
<item row="2" column="2">
<widget class="QComboBox" name="comboBoxLpt2">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@@ -75,21 +95,21 @@
</property>
</widget>
</item>
<item row="1" column="3">
<item row="2" column="3">
<widget class="QPushButton" name="pushButtonConfigureLpt2">
<property name="text">
<string>Configure</string>
</property>
</widget>
</item>
<item row="2" column="0">
<item row="3" column="0">
<widget class="QLabel" name="labelLpt3">
<property name="text">
<string>LPT3 Device:</string>
</property>
</widget>
</item>
<item row="2" column="2">
<item row="3" column="2">
<widget class="QComboBox" name="comboBoxLpt3">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@@ -102,21 +122,21 @@
</property>
</widget>
</item>
<item row="2" column="3">
<item row="3" column="3">
<widget class="QPushButton" name="pushButtonConfigureLpt3">
<property name="text">
<string>Configure</string>
</property>
</widget>
</item>
<item row="3" column="0">
<item row="4" column="0">
<widget class="QLabel" name="labelLpt4">
<property name="text">
<string>LPT4 Device:</string>
</property>
</widget>
</item>
<item row="3" column="2">
<item row="4" column="2">
<widget class="QComboBox" name="comboBoxLpt4">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@@ -129,7 +149,7 @@
</property>
</widget>
</item>
<item row="3" column="3">
<item row="4" column="3">
<widget class="QPushButton" name="pushButtonConfigureLpt4">
<property name="text">
<string>Configure</string>