Merge branch 'master' of https://github.com/86Box/86Box
This commit is contained in:
@@ -173,8 +173,8 @@ int gfxcard[2] = { 0, 0 }; /* (C) graphic
|
|||||||
int show_second_monitors = 1; /* (C) show non-primary monitors */
|
int show_second_monitors = 1; /* (C) show non-primary monitors */
|
||||||
int sound_is_float = 1; /* (C) sound uses FP values */
|
int sound_is_float = 1; /* (C) sound uses FP values */
|
||||||
int voodoo_enabled = 0; /* (C) video option */
|
int voodoo_enabled = 0; /* (C) video option */
|
||||||
int ibm8514_enabled = 0; /* (C) video option */
|
int ibm8514_standalone_enabled = 0; /* (C) video option */
|
||||||
int xga_enabled = 0; /* (C) video option */
|
int xga_standalone_enabled = 0; /* (C) video option */
|
||||||
uint32_t mem_size = 0; /* (C) memory size (Installed on system board)*/
|
uint32_t mem_size = 0; /* (C) memory size (Installed on system board)*/
|
||||||
uint32_t isa_mem_size = 0; /* (C) memory size (ISA Memory Cards) */
|
uint32_t isa_mem_size = 0; /* (C) memory size (ISA Memory Cards) */
|
||||||
int cpu_use_dynarec = 0; /* (C) cpu uses/needs Dyna */
|
int cpu_use_dynarec = 0; /* (C) cpu uses/needs Dyna */
|
||||||
|
|||||||
19
src/config.c
19
src/config.c
@@ -564,9 +564,16 @@ load_video(void)
|
|||||||
free(p);
|
free(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (((gfxcard[0] == VID_INTERNAL) && machine_has_flags(machine, MACHINE_VIDEO_8514A)) || video_card_get_flags(gfxcard[0]) == VIDEO_FLAG_TYPE_8514)
|
||||||
|
ini_section_delete_var(cat, "8514a");
|
||||||
|
if (((gfxcard[0] == VID_INTERNAL) && machine_has_flags(machine, MACHINE_VIDEO_XGA)) || video_card_get_flags(gfxcard[0]) == VIDEO_FLAG_TYPE_XGA)
|
||||||
|
ini_section_delete_var(cat, "xga");
|
||||||
|
|
||||||
voodoo_enabled = !!ini_section_get_int(cat, "voodoo", 0);
|
voodoo_enabled = !!ini_section_get_int(cat, "voodoo", 0);
|
||||||
ibm8514_enabled = !!ini_section_get_int(cat, "8514a", 0);
|
ibm8514_standalone_enabled = !!ini_section_get_int(cat, "8514a", 0);
|
||||||
xga_enabled = !!ini_section_get_int(cat, "xga", 0);
|
ibm8514_active = ibm8514_standalone_enabled;
|
||||||
|
xga_standalone_enabled = !!ini_section_get_int(cat, "xga", 0);
|
||||||
|
xga_active = xga_standalone_enabled;
|
||||||
show_second_monitors = !!ini_section_get_int(cat, "show_second_monitors", 1);
|
show_second_monitors = !!ini_section_get_int(cat, "show_second_monitors", 1);
|
||||||
video_fullscreen_scale_maximized = !!ini_section_get_int(cat, "video_fullscreen_scale_maximized", 0);
|
video_fullscreen_scale_maximized = !!ini_section_get_int(cat, "video_fullscreen_scale_maximized", 0);
|
||||||
|
|
||||||
@@ -2352,15 +2359,15 @@ save_video(void)
|
|||||||
else
|
else
|
||||||
ini_section_set_int(cat, "voodoo", voodoo_enabled);
|
ini_section_set_int(cat, "voodoo", voodoo_enabled);
|
||||||
|
|
||||||
if (ibm8514_enabled == 0)
|
if (ibm8514_standalone_enabled == 0)
|
||||||
ini_section_delete_var(cat, "8514a");
|
ini_section_delete_var(cat, "8514a");
|
||||||
else
|
else
|
||||||
ini_section_set_int(cat, "8514a", ibm8514_enabled);
|
ini_section_set_int(cat, "8514a", ibm8514_standalone_enabled);
|
||||||
|
|
||||||
if (xga_enabled == 0)
|
if (xga_standalone_enabled == 0)
|
||||||
ini_section_delete_var(cat, "xga");
|
ini_section_delete_var(cat, "xga");
|
||||||
else
|
else
|
||||||
ini_section_set_int(cat, "xga", xga_enabled);
|
ini_section_set_int(cat, "xga", xga_standalone_enabled);
|
||||||
|
|
||||||
if (gfxcard[1] == 0)
|
if (gfxcard[1] == 0)
|
||||||
ini_section_delete_var(cat, "gfxcard_2");
|
ini_section_delete_var(cat, "gfxcard_2");
|
||||||
|
|||||||
@@ -356,7 +356,7 @@ softresetx86(void)
|
|||||||
if (soft_reset_mask)
|
if (soft_reset_mask)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (ibm8514_enabled || xga_enabled)
|
if (ibm8514_active || xga_active)
|
||||||
vga_on = 1;
|
vga_on = 1;
|
||||||
|
|
||||||
reset_common(0);
|
reset_common(0);
|
||||||
|
|||||||
@@ -130,8 +130,8 @@ extern int isamem_type[]; /* (C) enable ISA mem cards */
|
|||||||
extern int isartc_type; /* (C) enable ISA RTC card */
|
extern int isartc_type; /* (C) enable ISA RTC card */
|
||||||
extern int sound_is_float; /* (C) sound uses FP values */
|
extern int sound_is_float; /* (C) sound uses FP values */
|
||||||
extern int voodoo_enabled; /* (C) video option */
|
extern int voodoo_enabled; /* (C) video option */
|
||||||
extern int ibm8514_enabled; /* (C) video option */
|
extern int ibm8514_standalone_enabled; /* (C) video option */
|
||||||
extern int xga_enabled; /* (C) video option */
|
extern int xga_standalone_enabled; /* (C) video option */
|
||||||
extern uint32_t mem_size; /* (C) memory size (Installed on system board) */
|
extern uint32_t mem_size; /* (C) memory size (Installed on system board) */
|
||||||
extern uint32_t isa_mem_size; /* (C) memory size (ISA Memory Cards) */
|
extern uint32_t isa_mem_size; /* (C) memory size (ISA Memory Cards) */
|
||||||
extern int cpu; /* (C) cpu type */
|
extern int cpu; /* (C) cpu type */
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
#ifndef VIDEO_XGA_DEVICE_H
|
#ifndef VIDEO_XGA_DEVICE_H
|
||||||
#define VIDEO_XGA_DEVICE_H
|
#define VIDEO_XGA_DEVICE_H
|
||||||
extern int xga_has_vga;
|
|
||||||
|
|
||||||
#ifdef EMU_DEVICE_H
|
#ifdef EMU_DEVICE_H
|
||||||
extern const device_t xga_device;
|
extern const device_t xga_device;
|
||||||
|
|||||||
@@ -208,7 +208,8 @@ extern double cpuclock;
|
|||||||
extern int emu_fps;
|
extern int emu_fps;
|
||||||
extern int frames;
|
extern int frames;
|
||||||
extern int readflash;
|
extern int readflash;
|
||||||
extern int ibm8514_has_vga;
|
extern int ibm8514_active;
|
||||||
|
extern int xga_active;
|
||||||
|
|
||||||
/* Function handler pointers. */
|
/* Function handler pointers. */
|
||||||
extern void (*video_recalctimings)(void);
|
extern void (*video_recalctimings)(void);
|
||||||
|
|||||||
@@ -49,11 +49,11 @@ SettingsDisplay::~SettingsDisplay()
|
|||||||
void
|
void
|
||||||
SettingsDisplay::save()
|
SettingsDisplay::save()
|
||||||
{
|
{
|
||||||
gfxcard[0] = ui->comboBoxVideo->currentData().toInt();
|
gfxcard[0] = ui->comboBoxVideo->currentData().toInt();
|
||||||
gfxcard[1] = ui->comboBoxVideoSecondary->currentData().toInt();
|
gfxcard[1] = ui->comboBoxVideoSecondary->currentData().toInt();
|
||||||
voodoo_enabled = ui->checkBoxVoodoo->isChecked() ? 1 : 0;
|
voodoo_enabled = ui->checkBoxVoodoo->isChecked() ? 1 : 0;
|
||||||
ibm8514_enabled = ui->checkBox8514->isChecked() ? 1 : 0;
|
ibm8514_standalone_enabled = ui->checkBox8514->isChecked() ? 1 : 0;
|
||||||
xga_enabled = ui->checkBoxXga->isChecked() ? 1 : 0;
|
xga_standalone_enabled = ui->checkBoxXga->isChecked() ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -102,17 +102,6 @@ SettingsDisplay::onCurrentMachineChanged(int machineId)
|
|||||||
ui->comboBoxVideoSecondary->setEnabled(true);
|
ui->comboBoxVideoSecondary->setEnabled(true);
|
||||||
ui->pushButtonConfigureSecondary->setEnabled(true);
|
ui->pushButtonConfigureSecondary->setEnabled(true);
|
||||||
}
|
}
|
||||||
if (gfxcard[0] == VID_INTERNAL) {
|
|
||||||
if (video_get_type_monitor(0) != VIDEO_FLAG_TYPE_8514)
|
|
||||||
ibm8514_has_vga = 0;
|
|
||||||
if (video_get_type_monitor(0) != VIDEO_FLAG_TYPE_XGA)
|
|
||||||
xga_has_vga = 0;
|
|
||||||
} else {
|
|
||||||
if (video_card_get_flags(gfxcard[0]) != VIDEO_FLAG_TYPE_8514)
|
|
||||||
ibm8514_has_vga = 0;
|
|
||||||
if (video_card_get_flags(gfxcard[0]) != VIDEO_FLAG_TYPE_XGA)
|
|
||||||
xga_has_vga = 0;
|
|
||||||
}
|
|
||||||
ui->comboBoxVideo->setCurrentIndex(selectedRow);
|
ui->comboBoxVideo->setCurrentIndex(selectedRow);
|
||||||
if (gfxcard[1] == 0)
|
if (gfxcard[1] == 0)
|
||||||
ui->pushButtonConfigureSecondary->setEnabled(false);
|
ui->pushButtonConfigureSecondary->setEnabled(false);
|
||||||
@@ -134,12 +123,10 @@ SettingsDisplay::on_pushButtonConfigureVoodoo_clicked()
|
|||||||
void
|
void
|
||||||
SettingsDisplay::on_pushButtonConfigureXga_clicked()
|
SettingsDisplay::on_pushButtonConfigureXga_clicked()
|
||||||
{
|
{
|
||||||
if (!xga_has_vga) {
|
if (machine_has_bus(machineId, MACHINE_BUS_MCA) > 0) {
|
||||||
if (machine_has_bus(machineId, MACHINE_BUS_MCA) > 0) {
|
DeviceConfig::ConfigureDevice(&xga_device, 0, qobject_cast<Settings *>(Settings::settings));
|
||||||
DeviceConfig::ConfigureDevice(&xga_device, 0, qobject_cast<Settings *>(Settings::settings));
|
} else {
|
||||||
} else {
|
DeviceConfig::ConfigureDevice(&xga_isa_device, 0, qobject_cast<Settings *>(Settings::settings));
|
||||||
DeviceConfig::ConfigureDevice(&xga_isa_device, 0, qobject_cast<Settings *>(Settings::settings));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -159,18 +146,21 @@ SettingsDisplay::on_comboBoxVideo_currentIndexChanged(int index)
|
|||||||
}
|
}
|
||||||
ui->pushButtonConfigureVoodoo->setEnabled(machineHasPci && ui->checkBoxVoodoo->isChecked());
|
ui->pushButtonConfigureVoodoo->setEnabled(machineHasPci && ui->checkBoxVoodoo->isChecked());
|
||||||
|
|
||||||
bool hasIsa16 = machine_has_bus(machineId, MACHINE_BUS_ISA16) > 0;
|
bool machineHasIsa16 = machine_has_bus(machineId, MACHINE_BUS_ISA16) > 0;
|
||||||
bool has_MCA = machine_has_bus(machineId, MACHINE_BUS_MCA) > 0;
|
bool machineHasMca = machine_has_bus(machineId, MACHINE_BUS_MCA) > 0;
|
||||||
ui->checkBox8514->setEnabled((hasIsa16 || has_MCA) && !ibm8514_has_vga);
|
|
||||||
if (hasIsa16 || has_MCA) {
|
|
||||||
ui->checkBox8514->setChecked(ibm8514_enabled);
|
|
||||||
}
|
|
||||||
|
|
||||||
ui->checkBoxXga->setEnabled((hasIsa16 || has_MCA) && !xga_has_vga);
|
bool videoCardHas8514 = ((videoCard[0] == VID_INTERNAL) ? machine_has_flags(machineId, MACHINE_VIDEO_8514A) : (video_card_get_flags(videoCard[0]) == VIDEO_FLAG_TYPE_8514));
|
||||||
if (hasIsa16 || has_MCA)
|
bool videoCardHasXga = ((videoCard[0] == VID_INTERNAL) ? machine_has_flags(machineId, MACHINE_VIDEO_XGA) : (video_card_get_flags(videoCard[0]) == VIDEO_FLAG_TYPE_XGA));
|
||||||
ui->checkBoxXga->setChecked(xga_enabled);
|
|
||||||
|
|
||||||
ui->pushButtonConfigureXga->setEnabled((hasIsa16 || has_MCA) && ui->checkBoxXga->isChecked() && !xga_has_vga);
|
ui->checkBox8514->setEnabled((machineHasIsa16 || machineHasMca) && !videoCardHas8514);
|
||||||
|
if (machineHasIsa16 || machineHasMca)
|
||||||
|
ui->checkBox8514->setChecked(ibm8514_standalone_enabled && !videoCardHas8514);
|
||||||
|
|
||||||
|
ui->checkBoxXga->setEnabled((machineHasIsa16 || machineHasMca) && !videoCardHasXga);
|
||||||
|
if (machineHasIsa16 || machineHasMca)
|
||||||
|
ui->checkBoxXga->setChecked(xga_standalone_enabled && !videoCardHasXga);
|
||||||
|
|
||||||
|
ui->pushButtonConfigureXga->setEnabled((machineHasIsa16 || machineHasMca) && ui->checkBoxXga->isChecked() && !videoCardHasXga);
|
||||||
|
|
||||||
int c = 2;
|
int c = 2;
|
||||||
|
|
||||||
@@ -190,7 +180,13 @@ SettingsDisplay::on_comboBoxVideo_currentIndexChanged(int index)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (video_card_available(c) && device_is_valid(video_dev, machineId) && !(video_card_get_flags(c) == video_card_get_flags(videoCard[0]) && (video_card_get_flags(c) != VIDEO_FLAG_TYPE_SPECIAL))) {
|
int primaryFlags = video_card_get_flags(videoCard[0]);
|
||||||
|
int secondaryFlags = video_card_get_flags(c);
|
||||||
|
if (video_card_available(c)
|
||||||
|
&& device_is_valid(video_dev, machineId)
|
||||||
|
&& !((secondaryFlags == primaryFlags) && (secondaryFlags != VIDEO_FLAG_TYPE_SPECIAL))
|
||||||
|
&& !(((primaryFlags == VIDEO_FLAG_TYPE_8514) || (primaryFlags == VIDEO_FLAG_TYPE_XGA)) && (secondaryFlags != VIDEO_FLAG_TYPE_MDA) && (secondaryFlags != VIDEO_FLAG_TYPE_SPECIAL))
|
||||||
|
&& !((primaryFlags != VIDEO_FLAG_TYPE_MDA) && (primaryFlags != VIDEO_FLAG_TYPE_SPECIAL) && ((secondaryFlags == VIDEO_FLAG_TYPE_8514) || (secondaryFlags == VIDEO_FLAG_TYPE_XGA)))) {
|
||||||
ui->comboBoxVideoSecondary->addItem(name, c);
|
ui->comboBoxVideoSecondary->addItem(name, c);
|
||||||
if (c == curVideoCard_2)
|
if (c == curVideoCard_2)
|
||||||
ui->comboBoxVideoSecondary->setCurrentIndex(ui->comboBoxVideoSecondary->count() - 1);
|
ui->comboBoxVideoSecondary->setCurrentIndex(ui->comboBoxVideoSecondary->count() - 1);
|
||||||
@@ -214,7 +210,7 @@ SettingsDisplay::on_checkBoxVoodoo_stateChanged(int state)
|
|||||||
void
|
void
|
||||||
SettingsDisplay::on_checkBoxXga_stateChanged(int state)
|
SettingsDisplay::on_checkBoxXga_stateChanged(int state)
|
||||||
{
|
{
|
||||||
ui->pushButtonConfigureXga->setEnabled((state == Qt::Checked) && !xga_has_vga);
|
ui->pushButtonConfigureXga->setEnabled(state == Qt::Checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ ibm8514_log(const char *fmt, ...)
|
|||||||
dev->changedvram[(((addr)) & (dev->vram_mask)) >> 12] = changeframecount; \
|
dev->changedvram[(((addr)) & (dev->vram_mask)) >> 12] = changeframecount; \
|
||||||
}
|
}
|
||||||
|
|
||||||
int ibm8514_has_vga = 0;
|
int ibm8514_active = 0;
|
||||||
|
|
||||||
int
|
int
|
||||||
ibm8514_cpu_src(svga_t *svga)
|
ibm8514_cpu_src(svga_t *svga)
|
||||||
@@ -4224,7 +4224,7 @@ ibm8514_recalctimings(svga_t *svga)
|
|||||||
svga->clock = (cpuclock * (double) (1ULL << 32)) / 25175000.0;
|
svga->clock = (cpuclock * (double) (1ULL << 32)) / 25175000.0;
|
||||||
}
|
}
|
||||||
svga->render8514 = ibm8514_render_8bpp;
|
svga->render8514 = ibm8514_render_8bpp;
|
||||||
ibm8514_log("BPP=%d, Pitch = %d, rowoffset = %d, crtc13 = %02x, mode = %d, highres bit = %02x, has_vga? = %d.\n", dev->bpp, dev->pitch, dev->rowoffset, svga->crtc[0x13], dev->ibm_mode, dev->accel.advfunc_cntl & 4, ibm8514_has_vga);
|
ibm8514_log("BPP=%d, Pitch = %d, rowoffset = %d, crtc13 = %02x, mode = %d, highres bit = %02x, has_vga? = %d.\n", dev->bpp, dev->pitch, dev->rowoffset, svga->crtc[0x13], dev->ibm_mode, dev->accel.advfunc_cntl & 4, !ibm8514_standalone_enabled);
|
||||||
}
|
}
|
||||||
ibm8514_log("8514 enabled, hdisp=%d, vtotal=%d, htotal=%d, dispend=%d, rowoffset=%d, split=%d, vsyncstart=%d, split=%08x\n", dev->hdisp, dev->vtotal, dev->htotal, dev->dispend, dev->rowoffset, dev->split, dev->vsyncstart, dev->split);
|
ibm8514_log("8514 enabled, hdisp=%d, vtotal=%d, htotal=%d, dispend=%d, rowoffset=%d, split=%d, vsyncstart=%d, split=%08x\n", dev->hdisp, dev->vtotal, dev->htotal, dev->dispend, dev->rowoffset, dev->split, dev->vsyncstart, dev->split);
|
||||||
}
|
}
|
||||||
@@ -4351,7 +4351,7 @@ const device_t ibm8514_mca_device = {
|
|||||||
void
|
void
|
||||||
ibm8514_device_add(void)
|
ibm8514_device_add(void)
|
||||||
{
|
{
|
||||||
if (!ibm8514_enabled || (ibm8514_enabled && ibm8514_has_vga))
|
if (!ibm8514_standalone_enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (machine_has_bus(machine, MACHINE_BUS_MCA))
|
if (machine_has_bus(machine, MACHINE_BUS_MCA))
|
||||||
|
|||||||
@@ -207,9 +207,9 @@ svga_out(uint16_t addr, uint8_t val, void *priv)
|
|||||||
svga_recalctimings(svga);
|
svga_recalctimings(svga);
|
||||||
break;
|
break;
|
||||||
case 0x3c3:
|
case 0x3c3:
|
||||||
if (xga_enabled)
|
if (xga_active)
|
||||||
xga->on = (val & 0x01) ? 0 : 1;
|
xga->on = (val & 0x01) ? 0 : 1;
|
||||||
if (ibm8514_enabled)
|
if (ibm8514_active)
|
||||||
dev->on = (val & 0x01) ? 0 : 1;
|
dev->on = (val & 0x01) ? 0 : 1;
|
||||||
|
|
||||||
vga_on = val & 0x01;
|
vga_on = val & 0x01;
|
||||||
@@ -517,7 +517,7 @@ svga_set_ramdac_type(svga_t *svga, int type)
|
|||||||
svga->ramdac_type = type;
|
svga->ramdac_type = type;
|
||||||
|
|
||||||
for (int c = 0; c < 256; c++) {
|
for (int c = 0; c < 256; c++) {
|
||||||
if (ibm8514_enabled) {
|
if (ibm8514_active) {
|
||||||
if (svga->ramdac_type == RAMDAC_8BIT)
|
if (svga->ramdac_type == RAMDAC_8BIT)
|
||||||
dev->pallook[c] = makecol32(svga->vgapal[c].r, svga->vgapal[c].g, svga->vgapal[c].b);
|
dev->pallook[c] = makecol32(svga->vgapal[c].r, svga->vgapal[c].g, svga->vgapal[c].b);
|
||||||
else
|
else
|
||||||
@@ -706,12 +706,12 @@ svga_recalctimings(svga_t *svga)
|
|||||||
svga->recalctimings_ex(svga);
|
svga->recalctimings_ex(svga);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ibm8514_enabled) {
|
if (ibm8514_active) {
|
||||||
if (!dev->local)
|
if (!dev->local)
|
||||||
ibm8514_recalctimings(svga);
|
ibm8514_recalctimings(svga);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xga_enabled)
|
if (xga_active)
|
||||||
xga_recalctimings(svga);
|
xga_recalctimings(svga);
|
||||||
|
|
||||||
if (svga->hdisp >= 2048)
|
if (svga->hdisp >= 2048)
|
||||||
@@ -815,11 +815,11 @@ svga_poll(void *priv)
|
|||||||
int ret;
|
int ret;
|
||||||
int old_ma;
|
int old_ma;
|
||||||
|
|
||||||
if (ibm8514_enabled && dev->on) {
|
if (ibm8514_active && dev->on) {
|
||||||
ibm8514_poll(dev, svga);
|
ibm8514_poll(dev, svga);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (xga_enabled && xga->on) {
|
if (xga_active && xga->on) {
|
||||||
xga_poll(xga, svga);
|
xga_poll(xga, svga);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1231,7 +1231,7 @@ svga_write_common(uint32_t addr, uint8_t val, uint8_t linear, void *priv)
|
|||||||
cycles -= svga->monitor->mon_video_timing_write_b;
|
cycles -= svga->monitor->mon_video_timing_write_b;
|
||||||
|
|
||||||
if (!linear) {
|
if (!linear) {
|
||||||
if (xga_enabled) {
|
if (xga_active) {
|
||||||
if (((xga->op_mode & 7) >= 4) && (xga->aperture_cntl >= 1)) {
|
if (((xga->op_mode & 7) >= 4) && (xga->aperture_cntl >= 1)) {
|
||||||
if (val == 0xa5) { /*Memory size test of XGA*/
|
if (val == 0xa5) { /*Memory size test of XGA*/
|
||||||
xga->test = val;
|
xga->test = val;
|
||||||
@@ -1438,7 +1438,7 @@ svga_read_common(uint32_t addr, uint8_t linear, void *priv)
|
|||||||
cycles -= svga->monitor->mon_video_timing_read_b;
|
cycles -= svga->monitor->mon_video_timing_read_b;
|
||||||
|
|
||||||
if (!linear) {
|
if (!linear) {
|
||||||
if (xga_enabled) {
|
if (xga_active) {
|
||||||
if (((xga->op_mode & 7) >= 4) && (xga->aperture_cntl >= 1)) {
|
if (((xga->op_mode & 7) >= 4) && (xga->aperture_cntl >= 1)) {
|
||||||
if (xga->test == 0xa5) { /*Memory size test of XGA*/
|
if (xga->test == 0xa5) { /*Memory size test of XGA*/
|
||||||
xga->on = 1;
|
xga->on = 1;
|
||||||
|
|||||||
@@ -370,6 +370,7 @@ video_reset(int card)
|
|||||||
void
|
void
|
||||||
video_post_reset(void)
|
video_post_reset(void)
|
||||||
{
|
{
|
||||||
|
int ibm8514_has_vga = 0;
|
||||||
if (gfxcard[0] == VID_INTERNAL)
|
if (gfxcard[0] == VID_INTERNAL)
|
||||||
ibm8514_has_vga = (video_get_type_monitor(0) == VIDEO_FLAG_TYPE_8514);
|
ibm8514_has_vga = (video_get_type_monitor(0) == VIDEO_FLAG_TYPE_8514);
|
||||||
else if (gfxcard[0] != VID_NONE)
|
else if (gfxcard[0] != VID_NONE)
|
||||||
@@ -378,14 +379,12 @@ video_post_reset(void)
|
|||||||
ibm8514_has_vga = 0;
|
ibm8514_has_vga = 0;
|
||||||
|
|
||||||
if (ibm8514_has_vga)
|
if (ibm8514_has_vga)
|
||||||
ibm8514_enabled = 1;
|
ibm8514_active = 1;
|
||||||
|
|
||||||
if (ibm8514_enabled) {
|
if (ibm8514_standalone_enabled)
|
||||||
if (!ibm8514_has_vga)
|
ibm8514_device_add();
|
||||||
ibm8514_device_add();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (xga_enabled)
|
if (xga_standalone_enabled)
|
||||||
xga_device_add();
|
xga_device_add();
|
||||||
|
|
||||||
/* Reset the graphics card (or do nothing if it was already done
|
/* Reset the graphics card (or do nothing if it was already done
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ static uint8_t xga_ext_inb(uint16_t addr, void *priv);
|
|||||||
static void xga_writew(uint32_t addr, uint16_t val, void *priv);
|
static void xga_writew(uint32_t addr, uint16_t val, void *priv);
|
||||||
static uint16_t xga_readw(uint32_t addr, void *priv);
|
static uint16_t xga_readw(uint32_t addr, void *priv);
|
||||||
|
|
||||||
int xga_has_vga = 0;
|
int xga_active = 0;
|
||||||
|
|
||||||
#ifdef ENABLE_XGA_LOG
|
#ifdef ENABLE_XGA_LOG
|
||||||
int xga_do_log = ENABLE_XGA_LOG;
|
int xga_do_log = ENABLE_XGA_LOG;
|
||||||
@@ -2133,7 +2133,7 @@ xga_mem_read(uint32_t addr, xga_t *xga, UNUSED(svga_t *svga))
|
|||||||
|
|
||||||
addr &= 0x1fff;
|
addr &= 0x1fff;
|
||||||
if (addr < 0x1800) {
|
if (addr < 0x1800) {
|
||||||
if (!xga_has_vga)
|
if (xga_standalone_enabled)
|
||||||
temp = xga->bios_rom.rom[addr];
|
temp = xga->bios_rom.rom[addr];
|
||||||
else
|
else
|
||||||
temp = xga->vga_bios_rom.rom[addr];
|
temp = xga->vga_bios_rom.rom[addr];
|
||||||
@@ -2938,7 +2938,7 @@ xga_pos_in(uint16_t addr, void *priv)
|
|||||||
xga_t *xga = &svga->xga;
|
xga_t *xga = &svga->xga;
|
||||||
uint8_t ret = 0xff;
|
uint8_t ret = 0xff;
|
||||||
|
|
||||||
if (xga_has_vga) {
|
if (!xga_standalone_enabled) {
|
||||||
switch (addr) {
|
switch (addr) {
|
||||||
case 0x0100:
|
case 0x0100:
|
||||||
case 0x0101:
|
case 0x0101:
|
||||||
@@ -3053,7 +3053,7 @@ xga_pos_out(uint16_t addr, uint8_t val, void *priv)
|
|||||||
svga_t *svga = (svga_t *) priv;
|
svga_t *svga = (svga_t *) priv;
|
||||||
xga_t *xga = &svga->xga;
|
xga_t *xga = &svga->xga;
|
||||||
|
|
||||||
if (xga_has_vga) {
|
if (!xga_standalone_enabled) {
|
||||||
switch (addr) {
|
switch (addr) {
|
||||||
case 0x0106:
|
case 0x0106:
|
||||||
xga->pos_idx = (xga->pos_idx & 0x00ff) | (val << 8);
|
xga->pos_idx = (xga->pos_idx & 0x00ff) | (val << 8);
|
||||||
@@ -3148,7 +3148,7 @@ xga_init(const device_t *info)
|
|||||||
xga->rom_addr = 0;
|
xga->rom_addr = 0;
|
||||||
rom_init(&xga->bios_rom, xga->type ? XGA2_BIOS_PATH : XGA_BIOS_PATH, 0xc0000, 0x2000, 0x1fff, 0, MEM_MAPPING_EXTERNAL);
|
rom_init(&xga->bios_rom, xga->type ? XGA2_BIOS_PATH : XGA_BIOS_PATH, 0xc0000, 0x2000, 0x1fff, 0, MEM_MAPPING_EXTERNAL);
|
||||||
} else {
|
} else {
|
||||||
if (xga_has_vga) {
|
if (!xga_standalone_enabled) {
|
||||||
rom_init(&xga->vga_bios_rom, INMOS_XGA_BIOS_PATH, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
rom_init(&xga->vga_bios_rom, INMOS_XGA_BIOS_PATH, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||||
} else
|
} else
|
||||||
video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_xga_isa);
|
video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_xga_isa);
|
||||||
@@ -3168,7 +3168,7 @@ xga_init(const device_t *info)
|
|||||||
NULL, MEM_MAPPING_EXTERNAL, svga);
|
NULL, MEM_MAPPING_EXTERNAL, svga);
|
||||||
mem_mapping_add(&xga->memio_mapping, 0, 0, xga_memio_readb, xga_memio_readw, xga_memio_readl,
|
mem_mapping_add(&xga->memio_mapping, 0, 0, xga_memio_readb, xga_memio_readw, xga_memio_readl,
|
||||||
xga_memio_writeb, xga_memio_writew, xga_memio_writel,
|
xga_memio_writeb, xga_memio_writew, xga_memio_writel,
|
||||||
xga_has_vga ? xga->vga_bios_rom.rom : xga->bios_rom.rom, MEM_MAPPING_EXTERNAL, svga);
|
!xga_standalone_enabled ? xga->vga_bios_rom.rom : xga->bios_rom.rom, MEM_MAPPING_EXTERNAL, svga);
|
||||||
|
|
||||||
mem_mapping_disable(&xga->video_mapping);
|
mem_mapping_disable(&xga->video_mapping);
|
||||||
mem_mapping_disable(&xga->linear_mapping);
|
mem_mapping_disable(&xga->linear_mapping);
|
||||||
@@ -3181,7 +3181,7 @@ xga_init(const device_t *info)
|
|||||||
mca_add(xga_mca_read, xga_mca_write, xga_mca_feedb, xga_mca_reset, svga);
|
mca_add(xga_mca_read, xga_mca_write, xga_mca_feedb, xga_mca_reset, svga);
|
||||||
} else {
|
} else {
|
||||||
io_sethandler(0x0100, 0x0008, xga_pos_in, NULL, NULL, NULL, NULL, NULL, svga);
|
io_sethandler(0x0100, 0x0008, xga_pos_in, NULL, NULL, NULL, NULL, NULL, svga);
|
||||||
if (xga_has_vga)
|
if (!xga_standalone_enabled)
|
||||||
io_sethandler(0x0106, 0x0002, NULL, NULL, NULL, xga_pos_out, NULL, NULL, svga);
|
io_sethandler(0x0106, 0x0002, NULL, NULL, NULL, xga_pos_out, NULL, NULL, svga);
|
||||||
|
|
||||||
io_sethandler(0x2100 + (xga->instance << 4), 0x0010, xga_ext_inb, NULL, NULL, xga_ext_outb, NULL, NULL, svga);
|
io_sethandler(0x2100 + (xga->instance << 4), 0x0010, xga_ext_inb, NULL, NULL, xga_ext_outb, NULL, NULL, svga);
|
||||||
@@ -3209,8 +3209,7 @@ svga_xga_init(const device_t *info)
|
|||||||
|
|
||||||
svga->bpp = 8;
|
svga->bpp = 8;
|
||||||
svga->miscout = 1;
|
svga->miscout = 1;
|
||||||
xga_has_vga = 1;
|
xga_active = 1;
|
||||||
xga_enabled = 1;
|
|
||||||
|
|
||||||
return xga_init(info);
|
return xga_init(info);
|
||||||
}
|
}
|
||||||
@@ -3411,7 +3410,7 @@ const device_t inmos_isa_device = {
|
|||||||
void
|
void
|
||||||
xga_device_add(void)
|
xga_device_add(void)
|
||||||
{
|
{
|
||||||
if (!xga_enabled || (xga_has_vga && xga_enabled))
|
if (!xga_standalone_enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (machine_has_bus(machine, MACHINE_BUS_MCA))
|
if (machine_has_bus(machine, MACHINE_BUS_MCA))
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#include <86box/win.h>
|
#include <86box/win.h>
|
||||||
|
|
||||||
#define MACHINE_HAS_IDE (machine_has_flags(machine, MACHINE_IDE_QUAD))
|
#define MACHINE_HAS_IDE (machine_has_flags(machine, MACHINE_IDE_QUAD))
|
||||||
#define MACHINE_HAS_SCSI (machine_has_flags(machine, MACHINE_SCSI_DUAL))
|
#define MACHINE_HAS_SCSI (machine_has_flags(machine, MACHINE_SCSI))
|
||||||
|
|
||||||
#define CASSETTE_FIRST 0
|
#define CASSETTE_FIRST 0
|
||||||
#define CARTRIDGE_FIRST CASSETTE_FIRST + 1
|
#define CARTRIDGE_FIRST CASSETTE_FIRST + 1
|
||||||
|
|||||||
@@ -371,8 +371,8 @@ win_settings_init(void)
|
|||||||
temp_gfxcard[0] = gfxcard[0];
|
temp_gfxcard[0] = gfxcard[0];
|
||||||
temp_gfxcard[1] = gfxcard[1];
|
temp_gfxcard[1] = gfxcard[1];
|
||||||
temp_voodoo = voodoo_enabled;
|
temp_voodoo = voodoo_enabled;
|
||||||
temp_ibm8514 = ibm8514_enabled;
|
temp_ibm8514 = ibm8514_standalone_enabled;
|
||||||
temp_xga = xga_enabled;
|
temp_xga = xga_standalone_enabled;
|
||||||
|
|
||||||
/* Input devices category */
|
/* Input devices category */
|
||||||
temp_mouse = mouse_type;
|
temp_mouse = mouse_type;
|
||||||
@@ -501,8 +501,8 @@ win_settings_changed(void)
|
|||||||
i = i || (gfxcard[0] != temp_gfxcard[0]);
|
i = i || (gfxcard[0] != temp_gfxcard[0]);
|
||||||
i = i || (gfxcard[1] != temp_gfxcard[1]);
|
i = i || (gfxcard[1] != temp_gfxcard[1]);
|
||||||
i = i || (voodoo_enabled != temp_voodoo);
|
i = i || (voodoo_enabled != temp_voodoo);
|
||||||
i = i || (ibm8514_enabled != temp_ibm8514);
|
i = i || (ibm8514_standalone_enabled != temp_ibm8514);
|
||||||
i = i || (xga_enabled != temp_xga);
|
i = i || (xga_standalone_enabled != temp_xga);
|
||||||
|
|
||||||
/* Input devices category */
|
/* Input devices category */
|
||||||
i = i || (mouse_type != temp_mouse);
|
i = i || (mouse_type != temp_mouse);
|
||||||
@@ -592,11 +592,11 @@ win_settings_save(void)
|
|||||||
time_sync = temp_sync;
|
time_sync = temp_sync;
|
||||||
|
|
||||||
/* Video category */
|
/* Video category */
|
||||||
gfxcard[0] = temp_gfxcard[0];
|
gfxcard[0] = temp_gfxcard[0];
|
||||||
gfxcard[1] = temp_gfxcard[1];
|
gfxcard[1] = temp_gfxcard[1];
|
||||||
voodoo_enabled = temp_voodoo;
|
voodoo_enabled = temp_voodoo;
|
||||||
ibm8514_enabled = temp_ibm8514;
|
ibm8514_standalone_enabled = temp_ibm8514;
|
||||||
xga_enabled = temp_xga;
|
xga_standalone_enabled = temp_xga;
|
||||||
|
|
||||||
/* Input devices category */
|
/* Input devices category */
|
||||||
mouse_type = temp_mouse;
|
mouse_type = temp_mouse;
|
||||||
|
|||||||
@@ -522,7 +522,7 @@ ui_sb_update_panes(void)
|
|||||||
xta_int = machine_has_flags(machine, MACHINE_XTA) ? 1 : 0;
|
xta_int = machine_has_flags(machine, MACHINE_XTA) ? 1 : 0;
|
||||||
esdi_int = machine_has_flags(machine, MACHINE_ESDI) ? 1 : 0;
|
esdi_int = machine_has_flags(machine, MACHINE_ESDI) ? 1 : 0;
|
||||||
ide_int = machine_has_flags(machine, MACHINE_IDE_QUAD) ? 1 : 0;
|
ide_int = machine_has_flags(machine, MACHINE_IDE_QUAD) ? 1 : 0;
|
||||||
scsi_int = machine_has_flags(machine, MACHINE_SCSI_DUAL) ? 1 : 0;
|
scsi_int = machine_has_flags(machine, MACHINE_SCSI) ? 1 : 0;
|
||||||
|
|
||||||
c_mfm = hdd_count(HDD_BUS_MFM);
|
c_mfm = hdd_count(HDD_BUS_MFM);
|
||||||
c_esdi = hdd_count(HDD_BUS_ESDI);
|
c_esdi = hdd_count(HDD_BUS_ESDI);
|
||||||
|
|||||||
Reference in New Issue
Block a user