Add NVR on Epson Equity LT

It's a HD146818 chip mapped at 11B4h-11B5h. The century byte is at 1Ah.
The IRQ line doesn't seem to be hooked on.
This commit is contained in:
Lubomir Rintel
2022-09-15 16:10:30 +02:00
parent 1eb7478ab9
commit b9241aff7a
2 changed files with 27 additions and 2 deletions

View File

@@ -97,6 +97,7 @@ extern const device_t ami_1994_nvr_device;
extern const device_t ami_1995_nvr_device;
extern const device_t via_nvr_device;
extern const device_t p6rp4_nvr_device;
extern const device_t elt_nvr_device;
#endif
extern void rtc_tick(void);

View File

@@ -280,6 +280,7 @@
#define REGD_VRT 0x80
#define RTC_CENTURY_AT 0x32 /* century register for AT etc */
#define RTC_CENTURY_PS 0x37 /* century register for PS/1 PS/2 */
#define RTC_CENTURY_ELT 0x1A /* century register for Epson Equity LT */
#define RTC_ALDAY 0x7D /* VIA VT82C586B - alarm day */
#define RTC_ALMONTH 0x7E /* VIA VT82C586B - alarm month */
#define RTC_CENTURY_VIA 0x7F /* century register for VIA VT82C586B */
@@ -1043,6 +1044,10 @@ nvr_at_init(const device_t *info)
nvr->irq = 8;
local->cent = RTC_CENTURY_VIA;
break;
case 8: /* Epson Equity LT */
nvr->irq = -1;
local->cent = RTC_CENTURY_ELT;
break;
}
local->read_addr = 1;
@@ -1067,8 +1072,13 @@ nvr_at_init(const device_t *info)
timer_load_count(nvr);
/* Set up the I/O handler for this device. */
io_sethandler(0x0070, 2,
nvr_read, NULL, NULL, nvr_write, NULL, NULL, nvr);
if (info->local == 8) {
io_sethandler(0x11b4, 2,
nvr_read, NULL, NULL, nvr_write, NULL, NULL, nvr);
} else {
io_sethandler(0x0070, 2,
nvr_read, NULL, NULL, nvr_write, NULL, NULL, nvr);
}
if (info->local & 0x10) {
io_sethandler(0x0072, 2,
nvr_read, NULL, NULL, nvr_write, NULL, NULL, nvr);
@@ -1299,3 +1309,17 @@ const device_t amstrad_megapc_nvr_device = {
.force_redraw = NULL,
.config = NULL
};
const device_t elt_nvr_device = {
.name = "Epson Equity LT NVRAM",
.internal_name = "elt_nvr",
.flags = DEVICE_ISA,
.local = 8,
.init = nvr_at_init,
.close = nvr_at_close,
.reset = nvr_at_reset,
{ .available = NULL },
.speed_changed = nvr_at_speed_changed,
.force_redraw = NULL,
.config = NULL
};