From 78adae497f4214515e404c2b1f5e30bd73d602cd Mon Sep 17 00:00:00 2001 From: SarahW Date: Sun, 25 Feb 2018 11:47:01 +0000 Subject: [PATCH] Video card can now be changed on Acer 386SX25/N, Packard Bell PB520R, and Packard Bell PB570. --- src/model.c | 6 +++--- src/vid_oti067.c | 2 ++ src/video.c | 19 +++++++++++++++---- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/model.c b/src/model.c index cff18ee..e0719a7 100644 --- a/src/model.c +++ b/src/model.c @@ -136,7 +136,7 @@ MODEL models[] = {"[8086] Amstrad PC3086", ROM_PC3086, "pc3086", { {"", cpus_8086}, {"", NULL}, {"", NULL}}, MODEL_GFX_DISABLE_HW|MODEL_AMSTRAD, 640, 640, 0, ams_init, NULL}, {"[8086] Olivetti M24", ROM_OLIM24, "olivetti_m24", { {"", cpus_8086}, {"", NULL}, {"", NULL}}, MODEL_GFX_FIXED|MODEL_OLIM24, 128, 640, 128, olim24_init, NULL}, {"[8086] Sinclair PC200", ROM_PC200, "pc200", { {"", cpus_8086}, {"", NULL}, {"", NULL}}, MODEL_GFX_DISABLE_HW|MODEL_AMSTRAD, 512, 640, 128, ams_init, NULL}, - {"[8086] Tandy 1000 SL/2", ROM_TANDY1000SL2, "tandy1000sl2", { {"", cpus_8086}, {"", NULL}, {"", NULL}}, MODEL_GFX_DISABLE_SW, 512, 768, 128, tandy1ksl2_init, NULL}, + {"[8086] Tandy 1000 SL/2", ROM_TANDY1000SL2, "tandy1000sl2", { {"", cpus_8086}, {"", NULL}, {"", NULL}}, MODEL_GFX_FIXED, 512, 768, 128, tandy1ksl2_init, NULL}, {"[8088] Toshiba 1200", ROM_T1200, "t1200", { {"", cpus_8086}, {"", NULL}, {"", NULL}}, MODEL_GFX_FIXED, 1024, 2048,1024, xt_t1200_init, &t1000_device}, {"[8086] VTech Laser XT3", ROM_LXT3, "lxt3", { {"", cpus_8086}, {"", NULL}, {"", NULL}}, MODEL_GFX_NONE, 512, 1152, 128, xt_laserxt_init, NULL}, @@ -246,14 +246,14 @@ int model_has_fixed_gfx(int model) { int gfx_flags = models[model].flags & MODEL_GFX_MASK; - return (gfx_flags == MODEL_GFX_FIXED || gfx_flags == MODEL_GFX_DISABLE_SW); + return (gfx_flags == MODEL_GFX_FIXED); } int model_has_optional_gfx(int model) { int gfx_flags = models[model].flags & MODEL_GFX_MASK; - return (gfx_flags == MODEL_GFX_DISABLE_HW); + return (gfx_flags == MODEL_GFX_DISABLE_HW || gfx_flags == MODEL_GFX_DISABLE_SW); } void common_init() diff --git a/src/vid_oti067.c b/src/vid_oti067.c index 4a2cbc8..7ae5a8d 100644 --- a/src/vid_oti067.c +++ b/src/vid_oti067.c @@ -179,11 +179,13 @@ void oti067_enable_disable(void *p, int enable) mem_mapping_disable(&oti067->bios_rom.mapping); io_removehandler(0x03c0, 0x0020, oti067_in, NULL, NULL, oti067_out, NULL, NULL, oti067); io_removehandler(0x46e8, 0x0001, oti067_pos_in, NULL, NULL, oti067_pos_out, NULL, NULL, oti067); + mem_mapping_disable(&oti067->svga.mapping); if (enable) { mem_mapping_enable(&oti067->bios_rom.mapping); io_sethandler(0x03c0, 0x0020, oti067_in, NULL, NULL, oti067_out, NULL, NULL, oti067); io_sethandler(0x46e8, 0x0001, oti067_pos_in, NULL, NULL, oti067_pos_out, NULL, NULL, oti067); + mem_mapping_enable(&oti067->svga.mapping); } } diff --git a/src/video.c b/src/video.c index e0d85f2..0c923b4 100644 --- a/src/video.c +++ b/src/video.c @@ -671,12 +671,13 @@ void video_init() break; case ROM_ACER386: - if (gfxcard == GFX_BUILTIN) + device_add(&oti067_acer386_device); + if (gfxcard != GFX_BUILTIN) { - device_add(&oti067_acer386_device); - return; + svga_set_override(svga_get_pri(), 1); + break; } - break; + return; case ROM_IBMPS1_2011: case ROM_IBMPS2_M30_286: @@ -705,10 +706,20 @@ void video_init() case ROM_PB570: device_add(&gd5430_pb570_device); + if (gfxcard != GFX_BUILTIN) + { + svga_set_override(svga_get_pri(), 1); + break; + } return; case ROM_PB520R: device_add(&gd5434_pb520r_device); + if (gfxcard != GFX_BUILTIN) + { + svga_set_override(svga_get_pri(), 1); + break; + } return; } device_add(video_cards[video_old_to_new(gfxcard)].device);