diff --git a/src/include/86box/nvr.h b/src/include/86box/nvr.h index 34f11efd4..d10191a79 100644 --- a/src/include/86box/nvr.h +++ b/src/include/86box/nvr.h @@ -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); diff --git a/src/nvr_at.c b/src/nvr_at.c index 9a98968d2..ee2678ab5 100644 --- a/src/nvr_at.c +++ b/src/nvr_at.c @@ -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 +};