Merge pull request #4209 from Cacodemon345/novell_keycard
Add Novell NetWare 2.x Card Key emulation
This commit is contained in:
@@ -24,6 +24,7 @@ extern "C" {
|
||||
#include <86box/isamem.h>
|
||||
#include <86box/isartc.h>
|
||||
#include <86box/unittester.h>
|
||||
#include <86box/novell_cardkey.h>
|
||||
}
|
||||
|
||||
#include "qt_deviceconfig.hpp"
|
||||
@@ -46,7 +47,10 @@ SettingsOtherPeripherals::onCurrentMachineChanged(int machineId)
|
||||
ui->checkBoxISABugger->setChecked((machineHasIsa && (bugger_enabled > 0)) ? true : false);
|
||||
ui->checkBoxPOSTCard->setChecked(postcard_enabled > 0 ? true : false);
|
||||
ui->checkBoxUnitTester->setChecked(unittester_enabled > 0 ? true : false);
|
||||
ui->checkBoxKeyCard->setChecked((machineHasIsa && (novell_keycard_enabled > 0)) ? true : false);
|
||||
ui->checkBoxISABugger->setEnabled(machineHasIsa);
|
||||
ui->checkBoxKeyCard->setEnabled(machineHasIsa);
|
||||
ui->pushButtonConfigureKeyCard->setEnabled(novell_keycard_enabled > 0);
|
||||
ui->pushButtonConfigureUT->setEnabled(unittester_enabled > 0);
|
||||
ui->comboBoxRTC->setEnabled(machineHasIsa);
|
||||
ui->pushButtonConfigureRTC->setEnabled(machineHasIsa);
|
||||
@@ -115,10 +119,11 @@ void
|
||||
SettingsOtherPeripherals::save()
|
||||
{
|
||||
/* Other peripherals category */
|
||||
bugger_enabled = ui->checkBoxISABugger->isChecked() ? 1 : 0;
|
||||
postcard_enabled = ui->checkBoxPOSTCard->isChecked() ? 1 : 0;
|
||||
unittester_enabled = ui->checkBoxUnitTester->isChecked() ? 1 : 0;
|
||||
isartc_type = ui->comboBoxRTC->currentData().toInt();
|
||||
bugger_enabled = ui->checkBoxISABugger->isChecked() ? 1 : 0;
|
||||
postcard_enabled = ui->checkBoxPOSTCard->isChecked() ? 1 : 0;
|
||||
unittester_enabled = ui->checkBoxUnitTester->isChecked() ? 1 : 0;
|
||||
novell_keycard_enabled = ui->checkBoxKeyCard->isChecked() ? 1 : 0;
|
||||
isartc_type = ui->comboBoxRTC->currentData().toInt();
|
||||
|
||||
/* ISA memory boards. */
|
||||
for (int i = 0; i < ISAMEM_MAX; i++) {
|
||||
@@ -213,3 +218,14 @@ SettingsOtherPeripherals::on_pushButtonConfigureUT_clicked()
|
||||
{
|
||||
DeviceConfig::ConfigureDevice(&unittester_device);
|
||||
}
|
||||
|
||||
void SettingsOtherPeripherals::on_pushButtonConfigureKeyCard_clicked()
|
||||
{
|
||||
DeviceConfig::ConfigureDevice(&novell_keycard_device);
|
||||
}
|
||||
|
||||
void SettingsOtherPeripherals::on_checkBoxKeyCard_stateChanged(int arg1)
|
||||
{
|
||||
ui->pushButtonConfigureKeyCard->setEnabled(arg1 != 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,10 @@ private slots:
|
||||
void on_checkBoxUnitTester_stateChanged(int arg1);
|
||||
void on_pushButtonConfigureUT_clicked();
|
||||
|
||||
void on_pushButtonConfigureKeyCard_clicked();
|
||||
|
||||
void on_checkBoxKeyCard_stateChanged(int arg1);
|
||||
|
||||
private:
|
||||
Ui::SettingsOtherPeripherals *ui;
|
||||
int machineId { 0 };
|
||||
|
||||
@@ -37,15 +37,15 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBoxRTC">
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@@ -72,15 +72,15 @@
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="comboBoxCard2">
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
@@ -113,15 +113,15 @@
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="comboBoxCard1">
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
@@ -133,28 +133,28 @@
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="comboBoxCard3">
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="comboBoxCard4">
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
@@ -196,15 +196,15 @@
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBoxUnitTester">
|
||||
<property name="text">
|
||||
<string>86Box Unit Tester</string>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>86Box Unit Tester</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@@ -216,6 +216,40 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBoxKeyCard">
|
||||
<property name="text">
|
||||
<string>Novell NetWare 2.x Key Card</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonConfigureKeyCard">
|
||||
<property name="text">
|
||||
<string>Configure</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
|
||||
Reference in New Issue
Block a user