diff --git a/src/include/86box/video.h b/src/include/86box/video.h index a83aa9371..01fdb5850 100644 --- a/src/include/86box/video.h +++ b/src/include/86box/video.h @@ -388,6 +388,7 @@ extern const device_t gd5426_onboard_isa_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_pb450_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; @@ -410,6 +411,7 @@ extern const device_t gd5434_vlb_device; extern const device_t gd5434_pci_device; extern const device_t gd5436_pci_device; extern const device_t gd5436_onboard_pci_device; +extern const device_t gd5436_onboard_pci_ics_device; extern const device_t gd5440_pci_device; extern const device_t gd5440_onboard_pci_device; extern const device_t gd5446_pci_device; diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 2c22e4079..25fb1c42a 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -11070,7 +11070,7 @@ const machine_t machines[] = { .device = &sb486pv_device, .kbd_device = NULL, .fdc_device = NULL, - .vid_device = &gd5436_onboard_pci_device, + .vid_device = &gd5436_onboard_pci_ics_device, .snd_device = NULL, .net_device = NULL }, @@ -11213,7 +11213,7 @@ const machine_t machines[] = { .device = &pb450_device, .kbd_device = NULL, .fdc_device = NULL, - .vid_device = &gd5428_vlb_onboard_device, + .vid_device = &gd5428_vlb_onboard_pb450_device, .snd_device = NULL, .net_device = NULL }, diff --git a/src/video/vid_ati_mach8.c b/src/video/vid_ati_mach8.c index 58a54fb48..d4c98294b 100644 --- a/src/video/vid_ati_mach8.c +++ b/src/video/vid_ati_mach8.c @@ -7744,6 +7744,40 @@ static const device_config_t mach32_pci_config[] = { }, { .name = "", .description = "", .type = CONFIG_END } }; + +static const device_config_t mach32_pci_onboard_config[] = { + { + .name = "ramdac", + .description = "RAMDAC type", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = ATI_68860, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "ATI 68860", .value = ATI_68860 }, + { .description = "ATI 68875", .value = ATI_68875 }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 2048, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "1 MB", .value = 1024 }, + { .description = "2 MB", .value = 2048 }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { .name = "", .description = "", .type = CONFIG_END } +}; // clang-format on const device_t mach8_vga_isa_device = { @@ -7827,5 +7861,5 @@ const device_t mach32_onboard_pci_device = { .available = NULL, .speed_changed = mach_speed_changed, .force_redraw = mach_force_redraw, - .config = mach32_pci_config + .config = mach32_pci_onboard_config }; diff --git a/src/video/vid_cl54xx.c b/src/video/vid_cl54xx.c index 91ec82912..611909cb0 100644 --- a/src/video/vid_cl54xx.c +++ b/src/video/vid_cl54xx.c @@ -4439,6 +4439,8 @@ gd54xx_init(const device_t *info) vram = 1024; else if ((id == CIRRUS_ID_CLGD5426) && (info->local & 0x200) && (info->local & 0x1000)) vram = 1024; + else if ((id == CIRRUS_ID_CLGD5420) && (info->local & 0x200)) + vram = 512; else if (id == CIRRUS_ID_CLGD5401) vram = 256; else @@ -4446,7 +4448,10 @@ gd54xx_init(const device_t *info) gd54xx->vram_size = vram << 10; } else { - vram = device_get_config_int("memory"); + if ((id == CIRRUS_ID_CLGD5436) && (info->local & 0x200) && (info->local & 0x1000)) + vram = 1; + else + vram = device_get_config_int("memory"); gd54xx->vram_size = vram << 20; } } @@ -4834,6 +4839,25 @@ static const device_config_t gd5426_config[] = { { .name = "", .description = "", .type = CONFIG_END } }; +static const device_config_t gd5428_1mb_config[] = { + { + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 2048, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "1 MB", .value = 1024 }, + { .description = "2 MB", .value = 2048 }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { .name = "", .description = "", .type = CONFIG_END } +}; + static const device_config_t gd5429_config[] = { { .name = "memory", @@ -4969,13 +4993,12 @@ static const device_config_t gd5434_onboard_config[] = { .description = "Memory size", .type = CONFIG_SELECTION, .default_string = NULL, - .default_int = 4, + .default_int = 2, .file_filter = NULL, .spinner = { 0 }, .selection = { { .description = "1 MB", .value = 1 }, { .description = "2 MB", .value = 2 }, - { .description = "4 MB", .value = 4 }, { .description = "" } }, .bios = { { 0 } } @@ -5098,7 +5121,7 @@ const device_t gd5420_onboard_device = { .available = NULL, .speed_changed = gd54xx_speed_changed, .force_redraw = gd54xx_force_redraw, - .config = gd542x_config, + .config = NULL, }; const device_t gd5422_isa_device = { @@ -5341,6 +5364,20 @@ const device_t gd5428_onboard_vlb_device = { .config = gd542x_config }; +const device_t gd5428_vlb_onboard_pb450_device = { + .name = "Cirrus Logic GD5428 (VLB) (On-Board) (PB450)", + .internal_name = "cl_gd5428_vlb_onboard_pb450", + .flags = DEVICE_VLB, + .local = CIRRUS_ID_CLGD5428 | 0x200, + .init = gd54xx_init, + .close = gd54xx_close, + .reset = gd54xx_reset, + .available = NULL, + .speed_changed = gd54xx_speed_changed, + .force_redraw = gd54xx_force_redraw, + .config = gd5428_1mb_config +}; + const device_t gd5428_vlb_onboard_tandy_device = { .name = "Cirrus Logic GD5428 (VLB) (On-Board) (Tandy)", .internal_name = "cl_gd5428_vlb_onboard_tandy", @@ -5536,7 +5573,21 @@ const device_t gd5436_onboard_pci_device = { .available = NULL, .speed_changed = gd54xx_speed_changed, .force_redraw = gd54xx_force_redraw, - .config = gd5434_config + .config = gd5434_onboard_config +}; + +const device_t gd5436_onboard_pci_ics_device = { + .name = "Cirrus Logic GD5436 (PCI) (On-Board) (ICS)", + .internal_name = "cl_gd5436_onboard_pci_ics", + .flags = DEVICE_PCI, + .local = CIRRUS_ID_CLGD5436 | 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 gd5436_pci_device = { diff --git a/src/video/vid_s3.c b/src/video/vid_s3.c index 37ade5ad1..07573e772 100644 --- a/src/video/vid_s3.c +++ b/src/video/vid_s3.c @@ -11606,6 +11606,14 @@ s3_init(const device_t *info) if (vram) vram_size = vram << 20; + else if (info->local == S3_86C805_ONBOARD) { + vram_size = 1024 << 10; + vram = 1; + } + else if (info->local == S3_PHOENIX_TRIO32_ONBOARD) { + vram_size = 1024 << 10; + vram = 1; + } else vram_size = 512 << 10; @@ -12651,6 +12659,36 @@ static const device_config_t s3_trio64v_config[] = { { .name = "", .description = "", .type = CONFIG_END } }; +static const device_config_t s3_trio64v_onboard_config[] = { + { + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 2, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "1 MB", .value = 1 }, + { .description = "2 MB", .value = 2 }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { + .name = "colorkey", + .description = "Video chroma-keying", + .type = CONFIG_BINARY, + .default_string = NULL, + .default_int = 1, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } + }, + { .name = "", .description = "", .type = CONFIG_END } +}; + static const device_config_t s3_standard_config[] = { { .name = "memory", @@ -12793,7 +12831,7 @@ const device_t s3_86c805_onboard_vlb_device = { .available = NULL, .speed_changed = s3_speed_changed, .force_redraw = s3_force_redraw, - .config = s3_9fx_config + .config = NULL }; const device_t s3_spea_mirage_86c805_vlb_device = { @@ -13172,7 +13210,7 @@ const device_t s3_phoenix_trio32_onboard_vlb_device = { .available = NULL, .speed_changed = s3_speed_changed, .force_redraw = s3_force_redraw, - .config = s3_phoenix_trio32_config + .config = NULL }; const device_t s3_phoenix_trio32_vlb_device = { @@ -13200,7 +13238,7 @@ const device_t s3_phoenix_trio32_onboard_pci_device = { .available = NULL, .speed_changed = s3_speed_changed, .force_redraw = s3_force_redraw, - .config = s3_phoenix_trio32_config + .config = s3_9fx_config }; const device_t s3_phoenix_trio32_pci_device = { @@ -13270,7 +13308,7 @@ const device_t s3_phoenix_trio64_onboard_pci_device = { .available = NULL, .speed_changed = s3_speed_changed, .force_redraw = s3_force_redraw, - .config = s3_standard_config + .config = s3_9fx_config }; const device_t s3_phoenix_trio64_pci_device = { @@ -13312,7 +13350,7 @@ const device_t s3_phoenix_trio64vplus_onboard_pci_device = { .available = NULL, .speed_changed = s3_speed_changed, .force_redraw = s3_force_redraw, - .config = s3_trio64v_config + .config = s3_trio64v_onboard_config }; const device_t s3_phoenix_trio64vplus_pci_device = { @@ -13494,5 +13532,5 @@ const device_t s3_trio64v2_dx_onboard_pci_device = { .available = NULL, .speed_changed = s3_speed_changed, .force_redraw = s3_force_redraw, - .config = s3_trio64v_config + .config = s3_trio64v_onboard_config }; diff --git a/src/video/vid_s3_virge.c b/src/video/vid_s3_virge.c index b53dd5e8c..88194688e 100644 --- a/src/video/vid_s3_virge.c +++ b/src/video/vid_s3_virge.c @@ -5336,6 +5336,10 @@ s3_virge_init(const device_t *info) virge->dithering_enabled = device_get_config_int("dithering"); if (virge->type >= S3_VIRGE_GX2) virge->memory_size = 4; + else if (virge->type == S3_VIRGE_325 && info->local & 0x100) + virge->memory_size = 2; + else if (virge->type == S3_VIRGE_DX && info->local & 0x100) + virge->memory_size = 2; else virge->memory_size = device_get_config_int("memory"); @@ -5749,6 +5753,43 @@ static const device_config_t s3_virge_config[] = { // clang-format on }; +static const device_config_t s3_virge_onboard_config[] = { + // clang-format off + { + .name = "bilinear", + .description = "Bilinear filtering", + .type = CONFIG_BINARY, + .default_int = 1, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } + }, + { + .name = "colorkey", + .description = "Video chroma-keying", + .type = CONFIG_BINARY, + .default_string = NULL, + .default_int = 1, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } + }, + { + .name = "dithering", + .description = "Dithering", + .type = CONFIG_BINARY, + .default_int = 1, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + static const device_config_t s3_virge_stb_config[] = { // clang-format off { @@ -5933,7 +5974,7 @@ const device_t s3_virge_325_onboard_pci_device = { .available = NULL, .speed_changed = s3_virge_speed_changed, .force_redraw = s3_virge_force_redraw, - .config = s3_virge_config + .config = s3_virge_onboard_config }; const device_t s3_diamond_stealth_2000_pci_device = { @@ -6017,7 +6058,7 @@ const device_t s3_virge_375_onboard_pci_device = { .available = NULL, .speed_changed = s3_virge_speed_changed, .force_redraw = s3_virge_force_redraw, - .config = s3_virge_config + .config = s3_virge_onboard_config }; const device_t s3_diamond_stealth_2000pro_pci_device = { diff --git a/src/video/vid_tgui9440.c b/src/video/vid_tgui9440.c index f91fc3f96..426474a76 100644 --- a/src/video/vid_tgui9440.c +++ b/src/video/vid_tgui9440.c @@ -4294,7 +4294,7 @@ const device_t tgui9660_onboard_pci_device = { .available = NULL, .speed_changed = tgui_speed_changed, .force_redraw = tgui_force_redraw, - .config = tgui96xx_config + .config = tgui9440_config }; const device_t tgui9680_pci_device = {