From 1ee39c8f0aaf28430932d320a97efba48fe312b0 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Sat, 15 Jan 2022 19:05:34 -0500 Subject: [PATCH] Preliminary AST SixPakPlus --- src/device/isamem.c | 30 ++++++++++++++++++++++++++++++ src/device/isartc.c | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/src/device/isamem.c b/src/device/isamem.c index 3e3f04abe..7ca12db14 100644 --- a/src/device/isamem.c +++ b/src/device/isamem.c @@ -89,6 +89,7 @@ #define ISAMEM_IBMAT_CARD 2 #define ISAMEM_GENAT_CARD 3 #define ISAMEM_P5PAK_CARD 4 +#define ISAMEM_A6PAK_CARD 5 #define ISAMEM_EMS5150_CARD 6 #define ISAMEM_EV159_CARD 10 #define ISAMEM_RAMPAGEXT_CARD 11 @@ -413,6 +414,7 @@ isamem_init(const device_t *info) case ISAMEM_IBMXT_CARD: /* IBM PC/XT Memory Expansion Card */ case ISAMEM_GENXT_CARD: /* Generic PC/XT Memory Expansion Card */ case ISAMEM_P5PAK_CARD: /* Paradise Systems 5-PAK */ + case ISAMEM_A6PAK_CARD: /* AST SixPakPlus */ dev->total_size = device_get_config_int("size"); dev->start_addr = device_get_config_int("start"); tot = dev->total_size; @@ -806,6 +808,33 @@ static const device_t p5pak_device = { }; +static const device_config_t a6pak_config[] = +{ + { + "size", "Memory Size", CONFIG_SPINNER, "", 64, "", + { 0, 576, 64 }, + { { 0 } } + }, + { + "start", "Start Address", CONFIG_SPINNER, "", 256, "", + { 64, 512, 64 }, + { { 0 } } + }, + { + "", "", -1 + } +}; + +static const device_t a6pak_device = { + "AST SixPakPlus", + DEVICE_ISA, + ISAMEM_A6PAK_CARD, + isamem_init, isamem_close, NULL, + { NULL }, NULL, NULL, + a6pak_config +}; + + static const device_config_t ems5150_config[] = { { @@ -1169,6 +1198,7 @@ static const struct { { "ibmat", &ibmat_device }, { "genericat", &genericat_device }, { "p5pak", &p5pak_device }, + { "a6pak", &a6pak_device }, { "ems5150", &ems5150_device }, { "ev159", &ev159_device }, #ifdef USE_ISAMEM_BRAT diff --git a/src/device/isartc.c b/src/device/isartc.c index 93ec69cfe..bc1fa795b 100644 --- a/src/device/isartc.c +++ b/src/device/isartc.c @@ -86,6 +86,7 @@ #define ISARTC_EV170 0 #define ISARTC_DTK 1 #define ISARTC_P5PAK 2 +#define ISARTC_A6PAK 3 #define ISARTC_DEBUG 0 @@ -536,6 +537,7 @@ isartc_init(const device_t *info) break; case ISARTC_P5PAK: /* Paradise Systems 5PAK */ + case ISARTC_A6PAK: /* AST SixPakPlus */ dev->flags |= FLAG_YEAR80; dev->base_addr = 0x02c0; dev->base_addrsz = 32; @@ -704,6 +706,42 @@ static const device_t p5pak_device = { }; +static const device_config_t a6pak_config[] = { + { + "irq", "IRQ", CONFIG_SELECTION, "", -1, "", { 0 }, + { + { + "Disabled", -1 + }, + { + "IRQ2", 2 + }, + { + "IRQ3", 3 + }, + { + "IRQ5", 5 + }, + { + "" + } + }, + }, + { + "", "", -1 + } +}; + +static const device_t a6pak_device = { + "AST SixPakPlus", + DEVICE_ISA, + ISARTC_A6PAK, + isartc_init, isartc_close, NULL, + { NULL }, NULL, NULL, + a6pak_config +}; + + static const struct { const char *internal_name; const device_t *dev; @@ -712,6 +750,7 @@ static const struct { { "ev170", &ev170_device }, { "pii147", &pii147_device }, { "p5pak", &p5pak_device }, + { "a6pak", &a6pak_device }, { "", NULL }, };