diff --git a/src/include/86box/video.h b/src/include/86box/video.h index 1216257bc..a12bdc0a7 100644 --- a/src/include/86box/video.h +++ b/src/include/86box/video.h @@ -329,6 +329,7 @@ extern const device_t gd5428_isa_device; extern const device_t gd5428_vlb_device; extern const device_t gd5428_diamond_speedstar_pro_b1_vlb_device; extern const device_t gd5428_mca_device; +extern const device_t gd5426_mca_device; extern const device_t gd5428_onboard_device; extern const device_t gd5429_isa_device; extern const device_t gd5429_vlb_device; diff --git a/src/video/vid_cl54xx.c b/src/video/vid_cl54xx.c index 174dc5037..709e2a972 100644 --- a/src/video/vid_cl54xx.c +++ b/src/video/vid_cl54xx.c @@ -46,6 +46,7 @@ #define BIOS_GD5420_PATH "roms/video/cirruslogic/5420.vbi" #define BIOS_GD5422_PATH "roms/video/cirruslogic/cl5422.bin" #define BIOS_GD5426_DIAMOND_A1_ISA_PATH "roms/video/cirruslogic/diamond5426.vbi" +#define BIOS_GD5426_MCA_PATH "roms/video/cirruslogic/Reply.BIN" #define BIOS_GD5428_DIAMOND_B1_VLB_PATH "roms/video/cirruslogic/Diamond SpeedStar PRO VLB v3.04.bin" #define BIOS_GD5428_ISA_PATH "roms/video/cirruslogic/5428.bin" #define BIOS_GD5428_MCA_PATH "roms/video/cirruslogic/SVGA141.ROM" @@ -3902,6 +3903,8 @@ static void else { if (gd54xx->vlb) romfn = BIOS_GD5428_PATH; + else if (gd54xx->mca) + romfn = BIOS_GD5426_MCA_PATH; else romfn = BIOS_GD5428_ISA_PATH; } @@ -4115,8 +4118,8 @@ static void gd54xx->unlocked = 1; if (gd54xx->mca) { - gd54xx->pos_regs[0] = 0x7b; - gd54xx->pos_regs[1] = 0x91; + gd54xx->pos_regs[0] = svga->crtc[0x27] == CIRRUS_ID_CLGD5426 ? 0x82 : 0x7b; + gd54xx->pos_regs[1] = svga->crtc[0x27] == CIRRUS_ID_CLGD5426 ? 0x81 : 0x91; mca_add(gd5428_mca_read, gd5428_mca_write, gd5428_mca_feedb, NULL, gd54xx); io_sethandler(0x46e8, 0x0001, gd54xx_in, NULL, NULL, gd54xx_out, NULL, NULL, gd54xx); } @@ -4184,6 +4187,12 @@ gd5428_isa_available(void) return rom_present(BIOS_GD5428_ISA_PATH); } +static int +gd5426_mca_available(void) +{ + return rom_present(BIOS_GD5426_MCA_PATH); +} + static int gd5428_mca_available(void) { @@ -4699,6 +4708,20 @@ const device_t gd5428_mca_device = { .config = NULL }; +const device_t gd5426_mca_device = { + .name = "Cirrus Logic GD5426 (MCA) (Reply Video Adapter)", + .internal_name = "replymcasvga", + .flags = DEVICE_MCA, + .local = CIRRUS_ID_CLGD5426, + .init = gd54xx_init, + .close = gd54xx_close, + .reset = gd54xx_reset, + { .available = gd5426_mca_available }, + .speed_changed = gd54xx_speed_changed, + .force_redraw = gd54xx_force_redraw, + .config = gd5426_config +}; + const device_t gd5428_onboard_device = { .name = "Cirrus Logic GD5428 (ISA) (On-Board)", .internal_name = "cl_gd5428_onboard", diff --git a/src/video/vid_table.c b/src/video/vid_table.c index fdad852fe..94d4601a8 100644 --- a/src/video/vid_table.c +++ b/src/video/vid_table.c @@ -148,6 +148,7 @@ video_cards[] = { { &vga_device }, { &v7_vga_1024i_device }, { &wy700_device }, + { &gd5426_mca_device }, { &gd5428_mca_device }, { &et4000_mca_device }, { &radius_svga_multiview_mca_device },