diff --git a/src/include/86box/video.h b/src/include/86box/video.h index 32e1ace03..d7369af28 100644 --- a/src/include/86box/video.h +++ b/src/include/86box/video.h @@ -387,6 +387,7 @@ extern const device_t gd5426_vlb_device; extern const device_t gd5426_onboard_device; extern const device_t gd5428_isa_device; extern const device_t gd5428_vlb_onboard_device; +extern const device_t gd5428_vlb_onboard_tandy_device; extern const device_t gd5428_vlb_device; extern const device_t gd5428_diamond_speedstar_pro_b1_vlb_device; extern const device_t gd5428_boca_isa_device; diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index fd7f5b1f0..f1006ffb4 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -7893,7 +7893,7 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE | MACHINE_SOUND | MACHINE_GAMEPORT | MACHINE_APM, + .flags = MACHINE_IDE | MACHINE_SOUND | MACHINE_GAMEPORT, .ram = { .min = 2048, .max = 32768, @@ -8620,7 +8620,7 @@ const machine_t machines[] = { .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, - .vid_device = &gd5428_vlb_onboard_device, + .vid_device = &gd5428_onboard_vlb_device, .snd_device = NULL, .net_device = NULL }, @@ -8670,7 +8670,7 @@ const machine_t machines[] = { }, /* Has a VLSI VL82C113A SCAMP Combination I/O which holds the KBC. */ { - .name = "[VLSI 82C486] Tandy Sensation! II (25-1651)/3100/MMPC", + .name = "[VLSI 82C486] Tandy Sensation! II (25-1651)", .internal_name = "sensation2", .type = MACHINE_TYPE_486_S2, .chipset = MACHINE_CHIPSET_VLSI_VL82C486, @@ -8690,7 +8690,7 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM, + .flags = MACHINE_IDE | MACHINE_VIDEO, .ram = { .min = 2048, .max = 65536, @@ -8708,7 +8708,7 @@ const machine_t machines[] = { .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, - .vid_device = &gd5428_vlb_onboard_device, + .vid_device = &gd5428_vlb_onboard_tandy_device, .snd_device = NULL, .net_device = NULL }, diff --git a/src/sound/snd_sensation.c b/src/sound/snd_sensation.c index ea87c8391..aeb58fb46 100644 --- a/src/sound/snd_sensation.c +++ b/src/sound/snd_sensation.c @@ -808,6 +808,7 @@ sensation_visdac_read(uint16_t port, void *priv) sensation_t *visdac = (sensation_t *) priv; uint8_t ret; + ret = 0xff; switch (port & 0xF) { case 0x00: diff --git a/src/video/vid_cl54xx.c b/src/video/vid_cl54xx.c index 71ded9010..c02f5191a 100644 --- a/src/video/vid_cl54xx.c +++ b/src/video/vid_cl54xx.c @@ -1330,7 +1330,10 @@ gd54xx_in(uint16_t addr, void *priv) /* Scratch Pad 1 (Memory size for 5402/542x) */ ret = svga->seqregs[0x0a] & ~0x1a; if (svga->crtc[0x27] == CIRRUS_ID_CLGD5402) { - ret |= 0x01; /*512K of memory*/ + if ((gd54xx->vram_size >> 10) == 512) + ret |= 0x01; /*512K of memory*/ + else + ret &= 0xfe; /*256K of memory*/ } else if (svga->crtc[0x27] > CIRRUS_ID_CLGD5402) { switch (gd54xx->vram_size >> 10) { case 512: @@ -4439,12 +4442,12 @@ gd54xx_init(const device_t *info) gd54xx->vram_size = vram << 10; } else { if (id <= CIRRUS_ID_CLGD5428) { - if ((id == CIRRUS_ID_CLGD5426) && (info->local & 0x200)) + if ((id == CIRRUS_ID_CLGD5428) && (info->local & 0x200) && (info->local & 0x1000)) + vram = 1024; + else if ((id == CIRRUS_ID_CLGD5426) && (info->local & 0x200)) vram = 1024; else if (id == CIRRUS_ID_CLGD5401) vram = 256; - else if (id == CIRRUS_ID_CLGD5402) - vram = 512; else vram = device_get_config_int("memory"); @@ -4780,6 +4783,25 @@ gd54xx_force_redraw(void *priv) } // clang-format off +static const device_config_t gd5402_config[] = { + { + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 512, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "256 KB", .value = 256 }, + { .description = "512 KB", .value = 512 }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { .name = "", .description = "", .type = CONFIG_END } +}; + static const device_config_t gd542x_config[] = { { .name = "memory", @@ -5027,7 +5049,7 @@ const device_t gd5402_isa_device = { .available = gd5402_available, .speed_changed = gd54xx_speed_changed, .force_redraw = gd54xx_force_redraw, - .config = NULL, + .config = gd5402_config, }; const device_t gd5402_onboard_device = { @@ -5041,7 +5063,7 @@ const device_t gd5402_onboard_device = { .available = NULL, .speed_changed = gd54xx_speed_changed, .force_redraw = gd54xx_force_redraw, - .config = NULL, + .config = gd5402_config, }; const device_t gd5402_onboard_commodore_device = { @@ -5055,7 +5077,7 @@ const device_t gd5402_onboard_commodore_device = { .available = NULL, .speed_changed = gd54xx_speed_changed, .force_redraw = gd54xx_force_redraw, - .config = NULL, + .config = gd5402_config, }; const device_t gd5420_isa_device = { @@ -5281,7 +5303,7 @@ const device_t gd5428_onboard_device = { .available = gd5428_isa_available, .speed_changed = gd54xx_speed_changed, .force_redraw = gd54xx_force_redraw, - .config = gd5426_config + .config = gd542x_config }; const device_t gd5428_vlb_onboard_device = { @@ -5299,7 +5321,7 @@ const device_t gd5428_vlb_onboard_device = { }; const device_t gd5428_onboard_vlb_device = { - .name = "Cirrus Logic GD5428 (VLB) (On-Board) (Dell)", + .name = "Cirrus Logic GD5428 (VLB) (On-Board) (1MB)", .internal_name = "cl_gd5428_onboard_vlb", .flags = DEVICE_VLB, .local = CIRRUS_ID_CLGD5428 | 0x200, @@ -5312,6 +5334,20 @@ const device_t gd5428_onboard_vlb_device = { .config = gd542x_config }; +const device_t gd5428_vlb_onboard_tandy_device = { + .name = "Cirrus Logic GD5428 (VLB) (On-Board) (Tandy)", + .internal_name = "cl_gd5428_vlb_onboard_tandy", + .flags = DEVICE_VLB, + .local = CIRRUS_ID_CLGD5428 | 0x200 | 0x1000, + .init = gd54xx_init, + .close = gd54xx_close, + .reset = gd54xx_reset, + .available = NULL, + .speed_changed = gd54xx_speed_changed, + .force_redraw = gd54xx_force_redraw, + .config = NULL +}; + const device_t gd5429_isa_device = { .name = "Cirrus Logic GD5429 (ISA)", .internal_name = "cl_gd5429_isa",