Add Vendex HeadStart Turbo 888-XT RTC

This commit is contained in:
Cacodemon345
2022-12-20 22:40:40 +06:00
parent 8ad69f2575
commit 6794e527c1
2 changed files with 36 additions and 5 deletions

View File

@@ -82,10 +82,11 @@
#include <86box/pic.h> #include <86box/pic.h>
#include <86box/isartc.h> #include <86box/isartc.h>
#define ISARTC_EV170 0 #define ISARTC_EV170 0
#define ISARTC_DTK 1 #define ISARTC_DTK 1
#define ISARTC_P5PAK 2 #define ISARTC_P5PAK 2
#define ISARTC_A6PAK 3 #define ISARTC_A6PAK 3
#define ISARTC_VENDEX 4
#define ISARTC_DEBUG 0 #define ISARTC_DEBUG 0
@@ -544,6 +545,18 @@ isartc_init(const device_t *info)
dev->year = MM67_AL_DOM; /* year, NON STANDARD */ dev->year = MM67_AL_DOM; /* year, NON STANDARD */
break; break;
case ISARTC_VENDEX: /* Vendex HeadStart Turbo 888-XT RTC */
dev->flags |= FLAG_YEAR80;
dev->base_addr = 0x0300;
dev->base_addrsz = 32;
dev->f_rd = mm67_read;
dev->f_wr = mm67_write;
dev->nvr.reset = mm67_reset;
dev->nvr.start = mm67_start;
dev->nvr.tick = mm67_tick;
dev->year = MM67_AL_DOM; /* year, NON STANDARD */
break;
default: default:
break; break;
} }
@@ -559,7 +572,7 @@ isartc_init(const device_t *info)
dev->f_rd, NULL, NULL, dev->f_wr, NULL, NULL, dev); dev->f_rd, NULL, NULL, dev->f_wr, NULL, NULL, dev);
/* Hook into the NVR backend. */ /* Hook into the NVR backend. */
dev->nvr.fn = isartc_get_internal_name(isartc_type); dev->nvr.fn = (char *)info->internal_name;
dev->nvr.irq = dev->irq; dev->nvr.irq = dev->irq;
if (!is_at) if (!is_at)
nvr_init(&dev->nvr); nvr_init(&dev->nvr);
@@ -709,6 +722,21 @@ static const device_t a6pak_device = {
.config = a6pak_config .config = a6pak_config
}; };
/* Onboard RTC devices */
const device_t vendex_xt_rtc_onboard_device = {
.name = "National Semiconductor MM58167 (Vendex)",
.internal_name = "vendex_xt_rtc",
.flags = DEVICE_ISA,
.local = ISARTC_VENDEX,
.init = isartc_init,
.close = isartc_close,
.reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
};
static const device_t isartc_none_device = { static const device_t isartc_none_device = {
.name = "None", .name = "None",
.internal_name = "none", .internal_name = "none",

View File

@@ -20,6 +20,8 @@
#include <86box/chipset.h> #include <86box/chipset.h>
#include <86box/port_6x.h> #include <86box/port_6x.h>
extern const device_t vendex_xt_rtc_onboard_device;
static void static void
machine_xt_common_init(const machine_t *model) machine_xt_common_init(const machine_t *model)
{ {
@@ -483,6 +485,7 @@ machine_xt_vendex_init(const machine_t *model)
return ret; return ret;
machine_xt_clone_init(model); machine_xt_clone_init(model);
device_add(&vendex_xt_rtc_onboard_device);
return ret; return ret;
} }