Video and emulator GUI changes of the day (October 28th, 2024)

IBM 8514/A (MCA/ISA).
Added a configure button to the QT frontend for the amount of memory used by said add-on chips.

XGA:
Forgot a change about the 4mb aperture.
This commit is contained in:
TC1995
2024-10-28 22:14:58 +01:00
parent b170886599
commit 4f472445f2
6 changed files with 59 additions and 6 deletions

View File

@@ -0,0 +1,25 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Emulation of the 8514/A card from IBM for the MCA bus and
* generic ISA bus clones without vendor extensions.
*
*
*
* Authors: TheCollector1995
*
* Copyright 2024 TheCollector1995.
*/
#ifndef VIDEO_8514A_DEVICE_H
#define VIDEO_8514A_DEVICE_H
#ifdef EMU_DEVICE_H
extern const device_t ibm8514_mca_device;
extern const device_t gen8514_isa_device;
#endif
#endif /*VIDEO_XGA_DEVICE_H*/

View File

@@ -24,6 +24,7 @@ extern "C" {
#include <86box/device.h> #include <86box/device.h>
#include <86box/machine.h> #include <86box/machine.h>
#include <86box/video.h> #include <86box/video.h>
#include <86box/vid_8514a_device.h>
#include <86box/vid_xga_device.h> #include <86box/vid_xga_device.h>
} }
@@ -53,6 +54,7 @@ SettingsDisplay::save()
// TODO // TODO
for (uint8_t i = 1; i < GFXCARD_MAX; i ++) for (uint8_t i = 1; i < GFXCARD_MAX; i ++)
gfxcard[i] = ui->comboBoxVideoSecondary->currentData().toInt(); gfxcard[i] = ui->comboBoxVideoSecondary->currentData().toInt();
voodoo_enabled = ui->checkBoxVoodoo->isChecked() ? 1 : 0; voodoo_enabled = ui->checkBoxVoodoo->isChecked() ? 1 : 0;
ibm8514_standalone_enabled = ui->checkBox8514->isChecked() ? 1 : 0; ibm8514_standalone_enabled = ui->checkBox8514->isChecked() ? 1 : 0;
xga_standalone_enabled = ui->checkBoxXga->isChecked() ? 1 : 0; xga_standalone_enabled = ui->checkBoxXga->isChecked() ? 1 : 0;
@@ -127,6 +129,16 @@ SettingsDisplay::on_pushButtonConfigureVoodoo_clicked()
DeviceConfig::ConfigureDevice(&voodoo_device, 0, qobject_cast<Settings *>(Settings::settings)); DeviceConfig::ConfigureDevice(&voodoo_device, 0, qobject_cast<Settings *>(Settings::settings));
} }
void
SettingsDisplay::on_pushButtonConfigure8514_clicked()
{
if (machine_has_bus(machineId, MACHINE_BUS_MCA) > 0) {
DeviceConfig::ConfigureDevice(&ibm8514_mca_device, 0, qobject_cast<Settings *>(Settings::settings));
} else {
DeviceConfig::ConfigureDevice(&gen8514_isa_device, 0, qobject_cast<Settings *>(Settings::settings));
}
}
void void
SettingsDisplay::on_pushButtonConfigureXga_clicked() SettingsDisplay::on_pushButtonConfigureXga_clicked()
{ {
@@ -166,6 +178,8 @@ SettingsDisplay::on_comboBoxVideo_currentIndexChanged(int index)
ui->checkBox8514->setEnabled(machineSupports8514); ui->checkBox8514->setEnabled(machineSupports8514);
ui->checkBox8514->setChecked(ibm8514_standalone_enabled && machineSupports8514); ui->checkBox8514->setChecked(ibm8514_standalone_enabled && machineSupports8514);
ui->pushButtonConfigure8514->setEnabled(ui->checkBox8514->isEnabled() && ui->checkBox8514->isChecked());
ui->checkBoxXga->setEnabled(machineSupportsXga); ui->checkBoxXga->setEnabled(machineSupportsXga);
ui->checkBoxXga->setChecked(xga_standalone_enabled && machineSupportsXga); ui->checkBoxXga->setChecked(xga_standalone_enabled && machineSupportsXga);
@@ -238,6 +252,12 @@ SettingsDisplay::on_checkBoxVoodoo_stateChanged(int state)
ui->pushButtonConfigureVoodoo->setEnabled(state == Qt::Checked); ui->pushButtonConfigureVoodoo->setEnabled(state == Qt::Checked);
} }
void
SettingsDisplay::on_checkBox8514_stateChanged(int state)
{
ui->pushButtonConfigure8514->setEnabled(state == Qt::Checked);
}
void void
SettingsDisplay::on_checkBoxXga_stateChanged(int state) SettingsDisplay::on_checkBoxXga_stateChanged(int state)
{ {

View File

@@ -29,9 +29,11 @@ private slots:
private slots: private slots:
void on_checkBoxVoodoo_stateChanged(int state); void on_checkBoxVoodoo_stateChanged(int state);
void on_checkBox8514_stateChanged(int state);
void on_checkBoxXga_stateChanged(int state); void on_checkBoxXga_stateChanged(int state);
void on_comboBoxVideo_currentIndexChanged(int index); void on_comboBoxVideo_currentIndexChanged(int index);
void on_pushButtonConfigureVoodoo_clicked(); void on_pushButtonConfigureVoodoo_clicked();
void on_pushButtonConfigure8514_clicked();
void on_pushButtonConfigureXga_clicked(); void on_pushButtonConfigureXga_clicked();
void on_pushButtonConfigure_clicked(); void on_pushButtonConfigure_clicked();

View File

@@ -106,6 +106,13 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="2">
<widget class="QPushButton" name="pushButtonConfigure8514">
<property name="text">
<string>Configure</string>
</property>
</widget>
</item>
<item row="6" column="2"> <item row="6" column="2">
<widget class="QPushButton" name="pushButtonConfigureXga"> <widget class="QPushButton" name="pushButtonConfigureXga">
<property name="text"> <property name="text">

View File

@@ -35,6 +35,7 @@
#include <86box/thread.h> #include <86box/thread.h>
#include <86box/video.h> #include <86box/video.h>
#include <86box/vid_8514a.h> #include <86box/vid_8514a.h>
#include <86box/vid_8514a_device.h>
#include <86box/vid_xga.h> #include <86box/vid_xga.h>
#include <86box/vid_svga.h> #include <86box/vid_svga.h>
#include <86box/vid_svga_render.h> #include <86box/vid_svga_render.h>

View File

@@ -3487,15 +3487,13 @@ xga_init(const device_t *info)
xga->rom_addr = 0xc0000 + (((xga->pos_regs[2] & 0xf0) >> 4) * 0x2000); xga->rom_addr = 0xc0000 + (((xga->pos_regs[2] & 0xf0) >> 4) * 0x2000);
xga->instance = (xga->pos_regs[2] & 0x0e) >> 1; xga->instance = (xga->pos_regs[2] & 0x0e) >> 1;
xga->pos_regs[2] |= 0x01; xga->pos_regs[2] |= 0x01;
if (mem_size >= 15360) { xga->pos_regs[4] |= 0x01;
xga->pos_regs[4] |= 0x01; if (mem_size >= 15360)
xga->pos_regs[5] = 0; xga->pos_regs[5] = 0;
} else { else {
xga->pos_regs[5] = ((mem_size * 64) >> 0x10) + 1; xga->pos_regs[5] = ((mem_size * 64) >> 0x10) + 1;
if (xga->pos_regs[5] == 0x10) { if (xga->pos_regs[5] == 0x10)
xga->pos_regs[5] = 0x00; xga->pos_regs[5] = 0x00;
xga->pos_regs[4] |= 0x01;
}
} }
xga->base_addr_1mb = (xga->pos_regs[5] & 0x0f) << 20; xga->base_addr_1mb = (xga->pos_regs[5] & 0x0f) << 20;
xga->linear_base = ((xga->pos_regs[4] & 0xfe) * 0x1000000) + (xga->instance << 22); xga->linear_base = ((xga->pos_regs[4] & 0xfe) * 0x1000000) + (xga->instance << 22);