From 5415b8404105ebf15f33c83864b63086832a2d26 Mon Sep 17 00:00:00 2001 From: tiseno100 <58827426+tiseno100@users.noreply.github.com> Date: Mon, 4 May 2020 17:33:36 +0300 Subject: [PATCH] Implemented the ACUMOS AVGA1 meant for the new Phoenix 286 clone --- src/include/86box/video.h | 1 + src/video/vid_cl54xx.c | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/src/include/86box/video.h b/src/include/86box/video.h index 04f81c628..3ae6d3cf2 100644 --- a/src/include/86box/video.h +++ b/src/include/86box/video.h @@ -211,6 +211,7 @@ extern const device_t ati28800_wonderxl24_device; #endif /* Cirrus Logic CL-GD 54xx */ +extern const device_t gd5401_isa_device; extern const device_t gd5402_isa_device; extern const device_t gd5402_onboard_device; extern const device_t gd5420_isa_device; diff --git a/src/video/vid_cl54xx.c b/src/video/vid_cl54xx.c index 9df438696..ddcb5624f 100644 --- a/src/video/vid_cl54xx.c +++ b/src/video/vid_cl54xx.c @@ -36,6 +36,7 @@ #include <86box/vid_svga.h> #include <86box/vid_svga_render.h> +#define BIOS_GD5401_PATH L"roms/video/cirruslogic/avga1.rom" #define BIOS_GD5402_PATH L"roms/video/cirruslogic/avga2.rom" #define BIOS_GD5402_ONBOARD_PATH L"roms/video/machines/cbm_sl386sx25/Commodore386SX-25_AVGA2.bin" #define BIOS_GD5420_PATH L"roms/video/cirruslogic/5420.vbi" @@ -57,6 +58,7 @@ #define BIOS_GD5446_STB_PATH L"roms/video/cirruslogic/stb nitro64v.BIN" #define BIOS_GD5480_PATH L"roms/video/cirruslogic/clgd5480.rom" +#define CIRRUS_ID_CLGD5401 0x88 #define CIRRUS_ID_CLGD5402 0x89 #define CIRRUS_ID_CLGD5420 0x8a #define CIRRUS_ID_CLGD5422 0x8c @@ -2960,6 +2962,11 @@ static void gd54xx->has_bios = 1; switch (id) { + + case CIRRUS_ID_CLGD5401: + romfn = BIOS_GD5401_PATH; + break; + case CIRRUS_ID_CLGD5402: if (info->local & 0x200) romfn = BIOS_GD5402_ONBOARD_PATH; @@ -3133,6 +3140,12 @@ static void return gd54xx; } +static int +gd5401_available(void) +{ + return rom_present(BIOS_GD5401_PATH); +} + static int gd5402_available(void) { @@ -3355,6 +3368,19 @@ static const device_config_t gd5434_config[] = } }; +const device_t gd5401_isa_device = +{ + "Cirrus Logic GD-5401 (ACUMOS AVGA1)", + DEVICE_AT | DEVICE_ISA, + CIRRUS_ID_CLGD5401, + gd54xx_init, gd54xx_close, + NULL, + gd5401_available, + gd54xx_speed_changed, + gd54xx_force_redraw, + NULL, +}; + const device_t gd5402_isa_device = { "Cirrus Logic GD-5402 (ACUMOS AVGA2)",