VAX630: Fix watch chip behavior the first time a file is attached to the NVR device.
This commit is contained in:
parent
d3135b777d
commit
1a48d85d73
1 changed files with 13 additions and 0 deletions
|
@ -542,10 +542,23 @@ return SCPE_OK;
|
||||||
|
|
||||||
/* NVR attach */
|
/* NVR attach */
|
||||||
|
|
||||||
|
/* Valid NVRAM contents are required for the Boot ROM to respect the
|
||||||
|
watch chip's CSRD VRT bit. This empty NVRAM image avoids inconsistent
|
||||||
|
ROM behavior the first time the NVR device is attached (to an empty
|
||||||
|
file). Attaching a already existing file will overwrite this initial
|
||||||
|
contents with whatever the NVRAM file contains. */
|
||||||
|
uint8 nvr_empty_valid[NVRSIZE] = {
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0xFE, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE,
|
||||||
|
0xFF, 0x00, 0x00, 0xFE, 0xFF, 0x00, 0x48, 0x45, 0x41, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
};
|
||||||
|
|
||||||
t_stat nvr_attach (UNIT *uptr, char *cptr)
|
t_stat nvr_attach (UNIT *uptr, char *cptr)
|
||||||
{
|
{
|
||||||
t_stat r;
|
t_stat r;
|
||||||
|
|
||||||
|
memcpy (nvr, nvr_empty_valid, NVRSIZE);
|
||||||
uptr->flags = uptr->flags | (UNIT_ATTABLE | UNIT_BUFABLE);
|
uptr->flags = uptr->flags | (UNIT_ATTABLE | UNIT_BUFABLE);
|
||||||
r = attach_unit (uptr, cptr);
|
r = attach_unit (uptr, cptr);
|
||||||
if (r != SCPE_OK)
|
if (r != SCPE_OK)
|
||||||
|
|
Loading…
Add table
Reference in a new issue