Add "86Box unit tester" config option + Qt UI checkbox
This is in preparation for making the device actually exist.
This commit is contained in:
@@ -173,6 +173,7 @@ bool serial_passthrough_enabled[SERIAL_MAX] = { 0, 0, 0, 0 }; /* (C) activat
|
||||
pass-through for serial ports */
|
||||
int bugger_enabled = 0; /* (C) enable ISAbugger */
|
||||
int postcard_enabled = 0; /* (C) enable POST card */
|
||||
int unittester_enabled = 0; /* (C) enable unit tester device */
|
||||
int isamem_type[ISAMEM_MAX] = { 0, 0, 0, 0 }; /* (C) enable ISA mem cards */
|
||||
int isartc_type = 0; /* (C) enable ISA RTC card */
|
||||
int gfxcard[2] = { 0, 0 }; /* (C) graphics/video card */
|
||||
|
10
src/config.c
10
src/config.c
@@ -1514,8 +1514,9 @@ load_other_peripherals(void)
|
||||
char *p;
|
||||
char temp[512];
|
||||
|
||||
bugger_enabled = !!ini_section_get_int(cat, "bugger_enabled", 0);
|
||||
postcard_enabled = !!ini_section_get_int(cat, "postcard_enabled", 0);
|
||||
bugger_enabled = !!ini_section_get_int(cat, "bugger_enabled", 0);
|
||||
postcard_enabled = !!ini_section_get_int(cat, "postcard_enabled", 0);
|
||||
unittester_enabled = !!ini_section_get_int(cat, "unittester_enabled", 0);
|
||||
|
||||
for (uint8_t c = 0; c < ISAMEM_MAX; c++) {
|
||||
sprintf(temp, "isamem%d_type", c);
|
||||
@@ -2348,6 +2349,11 @@ save_other_peripherals(void)
|
||||
else
|
||||
ini_section_set_int(cat, "postcard_enabled", postcard_enabled);
|
||||
|
||||
if (unittester_enabled == 0)
|
||||
ini_section_delete_var(cat, "unittester_enabled");
|
||||
else
|
||||
ini_section_set_int(cat, "unittester_enabled", unittester_enabled);
|
||||
|
||||
for (uint8_t c = 0; c < ISAMEM_MAX; c++) {
|
||||
sprintf(temp, "isamem%d_type", c);
|
||||
if (isamem_type[c] == 0)
|
||||
|
@@ -125,6 +125,7 @@ extern int gfxcard[2]; /* (C) graphics/video card */
|
||||
extern char video_shader[512]; /* (C) video */
|
||||
extern int bugger_enabled; /* (C) enable ISAbugger */
|
||||
extern int postcard_enabled; /* (C) enable POST card */
|
||||
extern int unittester_enabled; /* (C) enable unit tester device */
|
||||
extern int isamem_type[]; /* (C) enable ISA mem cards */
|
||||
extern int isartc_type; /* (C) enable ISA RTC card */
|
||||
extern int sound_is_float; /* (C) sound uses FP values */
|
||||
|
@@ -44,6 +44,7 @@ SettingsOtherPeripherals::onCurrentMachineChanged(int machineId)
|
||||
bool machineHasIsa = (machine_has_bus(machineId, MACHINE_BUS_ISA) > 0);
|
||||
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->checkBoxISABugger->setEnabled(machineHasIsa);
|
||||
ui->comboBoxRTC->setEnabled(machineHasIsa);
|
||||
ui->pushButtonConfigureRTC->setEnabled(machineHasIsa);
|
||||
@@ -112,9 +113,10 @@ void
|
||||
SettingsOtherPeripherals::save()
|
||||
{
|
||||
/* Other peripherals category */
|
||||
bugger_enabled = ui->checkBoxISABugger->isChecked() ? 1 : 0;
|
||||
postcard_enabled = ui->checkBoxPOSTCard->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;
|
||||
isartc_type = ui->comboBoxRTC->currentData().toInt();
|
||||
|
||||
/* ISA memory boards. */
|
||||
for (int i = 0; i < ISAMEM_MAX; i++) {
|
||||
|
@@ -190,6 +190,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBoxUnitTester">
|
||||
<property name="text">
|
||||
<string>86Box unit tester</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
Reference in New Issue
Block a user