From 97ba1cd8e0e60018e5d55122f12cf2aa340cc5e5 Mon Sep 17 00:00:00 2001 From: OBattler Date: Thu, 28 Mar 2024 00:18:30 +0100 Subject: [PATCH] Moved the ATi VGA Wonder 18800 out of the Dev branch. --- CMakeLists.txt | 1 - src/include/86box/video.h | 2 -- src/video/CMakeLists.txt | 4 ---- src/video/vid_ati18800.c | 43 +++++++++++++++++++++++++-------------- src/video/vid_table.c | 2 -- 5 files changed, 28 insertions(+), 24 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5bafadcc1..c0066e04a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -160,7 +160,6 @@ cmake_dependent_option(OLIVETTI "Olivetti M290" cmake_dependent_option(OPEN_AT "OpenAT" ON "DEV_BRANCH" OFF) cmake_dependent_option(OPL4ML "OPL4-ML daughterboard" ON "DEV_BRANCH" OFF) cmake_dependent_option(SIO_DETECT "Super I/O Detection Helper" ON "DEV_BRANCH" OFF) -cmake_dependent_option(VGAWONDER "ATI VGA Wonder (ATI-18800)" ON "DEV_BRANCH" OFF) cmake_dependent_option(XL24 "ATI VGA Wonder XL24 (ATI-28800-6)" ON "DEV_BRANCH" OFF) # Ditto but for Qt diff --git a/src/include/86box/video.h b/src/include/86box/video.h index e56498807..bf36bf7de 100644 --- a/src/include/86box/video.h +++ b/src/include/86box/video.h @@ -320,9 +320,7 @@ extern const device_t mach64gx_pci_device; extern const device_t mach64vt2_device; /* ATi 18800 */ -# if defined(DEV_BRANCH) && defined(USE_VGAWONDER) extern const device_t ati18800_wonder_device; -# endif extern const device_t ati18800_vga88_device; extern const device_t ati18800_device; diff --git a/src/video/CMakeLists.txt b/src/video/CMakeLists.txt index 8fbd62e35..12ba34a02 100644 --- a/src/video/CMakeLists.txt +++ b/src/video/CMakeLists.txt @@ -28,10 +28,6 @@ add_library(vid OBJECT agpgart.c video.c vid_table.c vid_cga.c vid_cga_comp.c vid_ibm_rgb528_ramdac.c vid_sdac_ramdac.c vid_ogc.c vid_mga.c vid_nga.c vid_tvp3026_ramdac.c vid_att2xc498_ramdac.c vid_xga.c) -if(VGAWONDER) - target_compile_definitions(vid PRIVATE USE_VGAWONDER) -endif() - if(XL24) target_compile_definitions(vid PRIVATE USE_XL24) endif() diff --git a/src/video/vid_ati18800.c b/src/video/vid_ati18800.c index b54f6b89e..7f0993ef8 100644 --- a/src/video/vid_ati18800.c +++ b/src/video/vid_ati18800.c @@ -32,21 +32,14 @@ #include <86box/vid_svga.h> #include <86box/vid_svga_render.h> -#if defined(DEV_BRANCH) && defined(USE_VGAWONDER) -# define BIOS_ROM_PATH_WONDER "roms/video/ati18800/VGA_Wonder_V3-1.02.bin" -#endif +#define BIOS_ROM_PATH_WONDER "roms/video/ati18800/VGA_Wonder_V3-1.02.bin" #define BIOS_ROM_PATH_VGA88 "roms/video/ati18800/vga88.bin" #define BIOS_ROM_PATH_EDGE16 "roms/video/ati18800/vgaedge16.vbi" enum { -#if defined(DEV_BRANCH) && defined(USE_VGAWONDER) ATI18800_WONDER = 0, ATI18800_VGA88, ATI18800_EDGE16 -#else - ATI18800_VGA88 = 0, - ATI18800_EDGE16 -#endif }; typedef struct ati18800_t { @@ -257,11 +250,10 @@ ati18800_init(const device_t *info) switch (info->local) { default: -#if defined(DEV_BRANCH) && defined(USE_VGAWONDER) case ATI18800_WONDER: rom_init(&ati18800->bios_rom, BIOS_ROM_PATH_WONDER, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL); + ati18800->memory = device_get_config_int("memory"); break; -#endif case ATI18800_VGA88: rom_init(&ati18800->bios_rom, BIOS_ROM_PATH_VGA88, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL); ati18800->memory = 256; @@ -291,13 +283,11 @@ ati18800_init(const device_t *info) return ati18800; } -#if defined(DEV_BRANCH) && defined(USE_VGAWONDER) static int ati18800_wonder_available(void) { return rom_present(BIOS_ROM_PATH_WONDER); } -#endif static int ati18800_vga88_available(void) @@ -337,7 +327,31 @@ ati18800_force_redraw(void *priv) ati18800->svga.fullchange = changeframecount; } -#if defined(DEV_BRANCH) && defined(USE_VGAWONDER) +static const device_config_t ati18800_wonder_config[] = { + { + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_int = 512, + .selection = { + { + .description = "256 kB", + .value = 256 + }, + { + .description = "512 kB", + .value = 512 + }, + { + .description = "" + } + } + }, + { + .type = CONFIG_END + } +}; + const device_t ati18800_wonder_device = { .name = "ATI-18800", .internal_name = "ati18800w", @@ -349,9 +363,8 @@ const device_t ati18800_wonder_device = { { .available = ati18800_wonder_available }, .speed_changed = ati18800_speed_changed, .force_redraw = ati18800_force_redraw, - .config = NULL + .config = ati18800_wonder_config }; -#endif const device_t ati18800_vga88_device = { .name = "ATI 18800-1", diff --git a/src/video/vid_table.c b/src/video/vid_table.c index 9992eff45..e526216c3 100644 --- a/src/video/vid_table.c +++ b/src/video/vid_table.c @@ -91,9 +91,7 @@ video_cards[] = { { &ati28800_wonderxl24_device }, #endif { &ati18800_device }, -#if defined(DEV_BRANCH) && defined(USE_VGAWONDER) { &ati18800_wonder_device }, -#endif { &cga_device }, { &sega_device }, { &gd5401_isa_device },