The NVRAM is now initialized to 0xFF's if the machine is the Award 286 clone, should fix the Award 286 clone with newly generated NVR.

This commit is contained in:
OBattler
2018-08-14 18:07:52 +02:00
parent f9e2216231
commit 4555819ed0
2 changed files with 8 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
/*
/*
* VARCem Virtual ARchaeological Computer EMulator.
* An emulator of (mostly) x86-based PC systems and devices,
* using the ISA,EISA,VLB,MCA and PCI system buses, roughly
@@ -8,7 +8,7 @@
*
* Implement a generic NVRAM/CMOS/RTC device.
*
* Version: @(#)nvr.c 1.0.11 2018/08/04
* Version: @(#)nvr.c 1.0.12 2018/08/14
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>,
* David Hrdlička, <hrdlickadavid@outlook.com>
@@ -257,8 +257,10 @@ nvr_load(void)
if (saved_nvr == NULL) return(0);
/* Clear out any old data. */
// memset(saved_nvr->regs, 0x00, sizeof(saved_nvr->regs));
memset(saved_nvr->regs, 0xff, sizeof(saved_nvr->regs));
if (romset == ROM_AWARD286)
memset(saved_nvr->regs, 0xff, sizeof(saved_nvr->regs));
else
memset(saved_nvr->regs, 0x00, sizeof(saved_nvr->regs));
/* Set the defaults. */
if (saved_nvr->reset != NULL)

View File

@@ -189,7 +189,7 @@
* including the later update (DS12887A) which implemented a
* "century" register to be compatible with Y2K.
*
* Version: @(#)nvr_at.c 1.0.10 2018/08/04
* Version: @(#)nvr_at.c 1.0.11 2018/08/14
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -664,7 +664,7 @@ nvr_at_init(const device_t *info)
nvr = (nvr_t *)malloc(sizeof(nvr_t));
if (nvr == NULL) return(NULL);
/* FIXME: See which is correct, this or 0xFF. */
if (info->local == 0)
if ((info->local == 0) || (romset == ROM_AWARD286))
memset(nvr, 0xff, sizeof(nvr_t));
else
memset(nvr, 0x00, sizeof(nvr_t));