Added the Everex Maxi Magic EV-165A, closes #2956.

This commit is contained in:
OBattler
2024-03-05 20:36:33 +01:00
parent 244038b84c
commit 2fff98423b

View File

@@ -97,6 +97,7 @@
#define ISAMEM_RAMPAGEXT_CARD 11
#define ISAMEM_ABOVEBOARD_CARD 12
#define ISAMEM_BRAT_CARD 13
#define ISAMEM_EV165A_CARD 14
#define ISAMEM_DEBUG 0
@@ -452,6 +453,18 @@ isamem_init(const device_t *info)
dev->frame_addr = 0xE0000;
break;
case ISAMEM_EV165A_CARD: /* Everex Maxi Magic EV-165A */
dev->base_addr = device_get_config_hex16("base");
dev->total_size = device_get_config_int("size");
dev->start_addr = device_get_config_int("start");
tot = device_get_config_int("length");
if (!!device_get_config_int("speed"))
dev->flags |= FLAG_FAST;
if (!!device_get_config_int("ems"))
dev->flags |= FLAG_EMS;
dev->frame_addr = 0xE0000;
break;
case ISAMEM_RAMPAGEXT_CARD: /* AST RAMpage/XT */
case ISAMEM_ABOVEBOARD_CARD: /* Intel AboveBoard */
case ISAMEM_BRAT_CARD: /* BocaRAM/AT */
@@ -1238,6 +1251,115 @@ static const device_t ev159_device = {
.config = ev159_config
};
static const device_config_t ev165a_config[] = {
// clang-format off
{
.name = "size",
.description = "Memory Size",
.type = CONFIG_SPINNER,
.default_string = "",
.default_int = 512,
.file_filter = "",
.spinner = {
.min = 0,
.max = 2048,
.step = 512
},
.selection = { { 0 } }
},
{
.name = "start",
.description = "Start Address",
.type = CONFIG_SPINNER,
.default_string = "",
.default_int = 0,
.file_filter = "",
.spinner = {
.min = 0,
.max = 896,
.step = 128
},
.selection = { { 0 } }
},
{
.name = "length",
.description = "Contiguous Size",
.type = CONFIG_SPINNER,
.default_string = "",
.default_int = 0,
.file_filter = "",
.spinner = {
.min = 0,
.max = 16384,
.step = 128
},
.selection = { { 0 } }
},
{
.name = "speed",
.description = "Transfer Speed",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.selection = {
{ .description = "Standard (150ns)", .value = 0 },
{ .description = "High-Speed (120ns)", .value = 1 },
{ .description = "" }
}
},
{
.name = "ems",
.description = "EMS mode",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.selection = {
{ .description = "Disabled", .value = 0 },
{ .description = "Enabled", .value = 1 },
{ .description = "" }
},
},
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x0258,
.file_filter = "",
.spinner = { 0 },
.selection = {
{ .description = "208H", .value = 0x0208 },
{ .description = "218H", .value = 0x0218 },
{ .description = "258H", .value = 0x0258 },
{ .description = "268H", .value = 0x0268 },
{ .description = "2A8H", .value = 0x02A8 },
{ .description = "2B8H", .value = 0x02B8 },
{ .description = "2E8H", .value = 0x02E8 },
{ .description = "" }
},
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
};
static const device_t ev165a_device = {
.name = "Everex Magi Magic EV-165A",
.internal_name = "ev159",
.flags = DEVICE_ISA,
.local = ISAMEM_EV165A_CARD,
.init = isamem_init,
.close = isamem_close,
.reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = ev165a_config
};
#if defined(DEV_BRANCH) && defined(USE_ISAMEM_BRAT)
static const device_config_t brat_config[] = {
// clang-format off
@@ -1560,6 +1682,7 @@ static const struct {
{ &a6pak_device },
{ &ems5150_device },
{ &ev159_device },
{ &ev165a_device },
#if defined(DEV_BRANCH) && defined(USE_ISAMEM_BRAT)
{ &brat_device },
#endif