From 30af261c5b035fd4e48f8b4b5c96dc776eebc9b5 Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 16 Oct 2023 03:29:29 +0200 Subject: [PATCH] Writes to NVR time registers no longer schedule a NVR write to disk, should reduce the emulator's writes to disk and therefore, % drops. --- src/nvr_at.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/nvr_at.c b/src/nvr_at.c index 581eccf71..c66799579 100644 --- a/src/nvr_at.c +++ b/src/nvr_at.c @@ -580,7 +580,8 @@ nvr_reg_common_write(uint16_t reg, uint8_t val, nvr_t *nvr, local_t *local) return; if (nvr->regs[reg] != val) { nvr->regs[reg] = val; - nvr_dosave = 1; + if ((reg >= 0x0d) && ((local->cent == 0xff) || (reg != local->cent))) + nvr_dosave = 1; } } @@ -643,7 +644,7 @@ nvr_reg_write(uint16_t reg, uint8_t val, void *priv) /* Update internal clock. */ time_get(nvr, &tm); nvr_time_set(&tm); - nvr_dosave = 1; + // nvr_dosave = 1; } } }