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:
10
src/nvr.c
10
src/nvr.c
@@ -1,4 +1,4 @@
|
|||||||
/*
|
/*
|
||||||
* VARCem Virtual ARchaeological Computer EMulator.
|
* VARCem Virtual ARchaeological Computer EMulator.
|
||||||
* An emulator of (mostly) x86-based PC systems and devices,
|
* An emulator of (mostly) x86-based PC systems and devices,
|
||||||
* using the ISA,EISA,VLB,MCA and PCI system buses, roughly
|
* using the ISA,EISA,VLB,MCA and PCI system buses, roughly
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* Implement a generic NVRAM/CMOS/RTC device.
|
* 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>,
|
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>,
|
||||||
* David Hrdlička, <hrdlickadavid@outlook.com>
|
* David Hrdlička, <hrdlickadavid@outlook.com>
|
||||||
@@ -257,8 +257,10 @@ nvr_load(void)
|
|||||||
if (saved_nvr == NULL) return(0);
|
if (saved_nvr == NULL) return(0);
|
||||||
|
|
||||||
/* Clear out any old data. */
|
/* Clear out any old data. */
|
||||||
// memset(saved_nvr->regs, 0x00, sizeof(saved_nvr->regs));
|
if (romset == ROM_AWARD286)
|
||||||
memset(saved_nvr->regs, 0xff, sizeof(saved_nvr->regs));
|
memset(saved_nvr->regs, 0xff, sizeof(saved_nvr->regs));
|
||||||
|
else
|
||||||
|
memset(saved_nvr->regs, 0x00, sizeof(saved_nvr->regs));
|
||||||
|
|
||||||
/* Set the defaults. */
|
/* Set the defaults. */
|
||||||
if (saved_nvr->reset != NULL)
|
if (saved_nvr->reset != NULL)
|
||||||
|
|||||||
@@ -189,7 +189,7 @@
|
|||||||
* including the later update (DS12887A) which implemented a
|
* including the later update (DS12887A) which implemented a
|
||||||
* "century" register to be compatible with Y2K.
|
* "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>
|
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
* Miran Grca, <mgrca8@gmail.com>
|
* Miran Grca, <mgrca8@gmail.com>
|
||||||
@@ -664,7 +664,7 @@ nvr_at_init(const device_t *info)
|
|||||||
nvr = (nvr_t *)malloc(sizeof(nvr_t));
|
nvr = (nvr_t *)malloc(sizeof(nvr_t));
|
||||||
if (nvr == NULL) return(NULL);
|
if (nvr == NULL) return(NULL);
|
||||||
/* FIXME: See which is correct, this or 0xFF. */
|
/* 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));
|
memset(nvr, 0xff, sizeof(nvr_t));
|
||||||
else
|
else
|
||||||
memset(nvr, 0x00, sizeof(nvr_t));
|
memset(nvr, 0x00, sizeof(nvr_t));
|
||||||
|
|||||||
Reference in New Issue
Block a user