From 37bf41ec1713e121aca8848248c21cdbe0018e8c Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 31 Jul 2022 02:23:58 +0200 Subject: [PATCH] MegaPC NVR device. --- src/nvr_at.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/nvr_at.c b/src/nvr_at.c index fc5ae4bde..bb4c38b85 100644 --- a/src/nvr_at.c +++ b/src/nvr_at.c @@ -1050,7 +1050,9 @@ nvr_at_init(const device_t *info) if (info->local == 12) { local->def = 0x00; local->flags |= FLAG_AMI_1992_HACK; - } else + } else if (info->local == 20) + local->def = 0x00; + else local->def = 0xff; nvr->irq = 8; local->cent = RTC_CENTURY_AT; @@ -1297,3 +1299,17 @@ const device_t p6rp4_nvr_device = { .force_redraw = NULL, .config = NULL }; + +const device_t amstrad_megapc_nvr_device = { + .name = "Amstrad MegapC NVRAM", + .internal_name = "amstrad_megapc_nvr", + .flags = DEVICE_ISA | DEVICE_AT, + .local = 20, + .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 +};