Merge pull request #4829 from 86Box/tc1995

Add a proper 1MB capable ATI 28800-6 BIOS
This commit is contained in:
Miran Grča
2024-09-15 19:56:35 +02:00
committed by GitHub
3 changed files with 58 additions and 20 deletions

View File

@@ -326,6 +326,7 @@ extern const device_t ati18800_device;
/* ATi 28800 */
extern const device_t ati28800_device;
extern const device_t ati28800_wonder1024d_xl_plus_device;
extern const device_t ati28800k_device;
extern const device_t ati28800k_spc4620p_device;
extern const device_t ati28800k_spc6033p_device;

View File

@@ -36,10 +36,11 @@
#include <86box/vid_svga.h>
#include <86box/vid_svga_render.h>
#define VGAWONDERXL 1
#ifdef USE_XL24
# define VGAWONDERXL24 2
#endif /* USE_XL24 */
#define VGAWONDERXL 1
#define VGAWONDERXLPLUS 2
#if defined(DEV_BRANCH) && defined(USE_XL24)
# define VGAWONDERXL24 3
#endif
#define BIOS_ATIKOR_PATH "roms/video/ati28800/atikorvga.bin"
#define BIOS_ATIKOR_4620P_PATH_L "roms/machines/spc4620p/31005h.u8"
@@ -52,13 +53,14 @@
#define BIOS_VGAXL_EVEN_PATH "roms/video/ati28800/xleven.bin"
#define BIOS_VGAXL_ODD_PATH "roms/video/ati28800/xlodd.bin"
#ifdef USE_XL24
#if defined(DEV_BRANCH) && defined(USE_XL24)
# define BIOS_XL24_EVEN_PATH "roms/video/ati28800/112-14318-102.bin"
# define BIOS_XL24_ODD_PATH "roms/video/ati28800/112-14319-102.bin"
#endif /* USE_XL24 */
#endif
#define BIOS_ROM_PATH "roms/video/ati28800/bios.bin"
#define BIOS_VGAXL_ROM_PATH "roms/video/ati28800/ATI_VGAWonder_XL.bin"
#define BIOS_ROM_PATH "roms/video/ati28800/bios.bin"
#define BIOS_VGAXL_ROM_PATH "roms/video/ati28800/ATI_VGAWonder_XL.bin"
#define BIOS_VGAXL_PLUS_ROM_PATH "roms/video/ati28800/VGAWonder1024D_XL_Plus_VGABIOS_U19.BIN"
typedef struct ati28800_t {
svga_t svga;
@@ -183,7 +185,7 @@ ati28800_out(uint16_t addr, uint8_t val, void *priv)
case 0x3C7:
case 0x3C8:
case 0x3C9:
if (ati28800->type == 1)
if ((ati28800->type == VGAWONDERXL) || (ati28800->type == VGAWONDERXLPLUS))
sc1148x_ramdac_out(addr, 0, val, svga->ramdac, svga);
else
svga_out(addr, val, svga);
@@ -339,7 +341,7 @@ ati28800_in(uint16_t addr, void *priv)
case 0x3C7:
case 0x3C8:
case 0x3C9:
if (ati28800->type == 1)
if ((ati28800->type == VGAWONDERXL) || (ati28800->type == VGAWONDERXLPLUS))
return sc1148x_ramdac_in(addr, 0, svga->ramdac, svga);
return svga_in(addr, svga);
@@ -609,7 +611,17 @@ ati28800_init(const device_t *info)
ati28800->svga.ramdac = device_add(&sc11486_ramdac_device);
break;
#ifdef USE_XL24
case VGAWONDERXLPLUS:
ati28800->id = 6;
rom_init(&ati28800->bios_rom,
BIOS_VGAXL_PLUS_ROM_PATH,
0xc0000, 0x8000, 0x7fff,
0, MEM_MAPPING_EXTERNAL);
ati28800->svga.ramdac = device_add(&sc11483_ramdac_device);
ati28800->memory = 1024;
break;
#if defined(DEV_BRANCH) && defined(USE_XL24)
case VGAWONDERXL24:
ati28800->id = 6;
rom_init_interleaved(&ati28800->bios_rom,
@@ -618,7 +630,7 @@ ati28800_init(const device_t *info)
0xc0000, 0x10000, 0xffff,
0, MEM_MAPPING_EXTERNAL);
break;
#endif /* USE_XL24 */
#endif
default:
ati28800->id = 5;
@@ -653,11 +665,15 @@ ati28800_init(const device_t *info)
ati_eeprom_load(&ati28800->eeprom, "ati28800xl.nvr", 0);
break;
#ifdef USE_XL24
case VGAWONDERXLPLUS:
ati_eeprom_load(&ati28800->eeprom, "ati28800_wonder1024d_xl_plus.nvr", 0);
break;
#if defined(DEV_BRANCH) && defined(USE_XL24)
case VGAWONDERXL24:
ati_eeprom_load(&ati28800->eeprom, "ati28800xl24.nvr", 0);
break;
#endif /* USE_XL24 */
#endif
default:
ati_eeprom_load(&ati28800->eeprom, "ati28800.nvr", 0);
@@ -685,13 +701,19 @@ compaq_ati28800_available(void)
return (rom_present(BIOS_VGAXL_ROM_PATH));
}
#ifdef USE_XL24
static int
ati28800_wonder1024d_xl_plus_available(void)
{
return (rom_present(BIOS_VGAXL_PLUS_ROM_PATH));
}
#if defined(DEV_BRANCH) && defined(USE_XL24)
static int
ati28800_wonderxl24_available(void)
{
return (rom_present(BIOS_XL24_EVEN_PATH) && rom_present(BIOS_XL24_ODD_PATH));
}
#endif /* USE_XL24 */
#endif
static void
ati28800_close(void *priv)
@@ -749,7 +771,7 @@ static const device_config_t ati28800_config[] = {
}
};
#ifdef USE_XL24
#if defined(DEV_BRANCH) && defined(USE_XL24)
static const device_config_t ati28800_wonderxl_config[] = {
{
.name = "memory",
@@ -778,7 +800,7 @@ static const device_config_t ati28800_wonderxl_config[] = {
.type = CONFIG_END
}
};
#endif /* USE_XL24 */
#endif
// clang-format on
const device_t ati28800_device = {
@@ -851,7 +873,21 @@ const device_t compaq_ati28800_device = {
.config = ati28800_config
};
#ifdef USE_XL24
const device_t ati28800_wonder1024d_xl_plus_device = {
.name = "ATI 28800-6 (ATI VGA Wonder 1024D XL Plus)",
.internal_name = "ati28800_wonder1024d_xl_plus",
.flags = DEVICE_ISA,
.local = VGAWONDERXLPLUS,
.init = ati28800_init,
.close = ati28800_close,
.reset = NULL,
{ .available = ati28800_wonder1024d_xl_plus_available },
.speed_changed = ati28800_speed_changed,
.force_redraw = ati28800_force_redraw,
.config = NULL
};
#if defined(DEV_BRANCH) && defined(USE_XL24)
const device_t ati28800_wonderxl24_device = {
.name = "ATI-28800 (VGA Wonder XL24)",
.internal_name = "ati28800w",
@@ -865,4 +901,4 @@ const device_t ati28800_wonderxl24_device = {
.force_redraw = ati28800_force_redraw,
.config = ati28800_wonderxl_config
};
#endif /* USE_XL24 */
#endif

View File

@@ -60,6 +60,7 @@ video_cards[] = {
{ &ati18800_vga88_device },
{ &ati28800_device },
{ &compaq_ati28800_device },
{ &ati28800_wonder1024d_xl_plus_device },
#ifdef USE_XL24
{ &ati28800_wonderxl24_device },
#endif /* USE_XL24 */