Working
git-svn-id: svn://svn.cc65.org/cc65/trunk@2109 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -6,10 +6,10 @@
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 2002 Ullrich von Bassewitz */
|
||||
/* Wacholderweg 14 */
|
||||
/* D-70597 Stuttgart */
|
||||
/* EMail: uz@musoftware.de */
|
||||
/* (C) 2002-2003 Ullrich von Bassewitz */
|
||||
/* R<EFBFBD>merstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* */
|
||||
/* */
|
||||
/* This software is provided 'as-is', without any expressed or implied */
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
|
||||
|
||||
int InitChip (const struct SimData* Data);
|
||||
static int InitChip (const struct SimData* Data);
|
||||
/* Initialize the chip, return an error code */
|
||||
|
||||
static void* InitInstance (unsigned Addr, unsigned Range, void* CfgInfo);
|
||||
@@ -77,6 +77,7 @@ static unsigned char Read (void* Data, unsigned Offs);
|
||||
static const struct ChipData RAMData[1] = {
|
||||
{
|
||||
"RAM", /* Name of the chip */
|
||||
CHIPDATA_TYPE_CHIP, /* Type of the chip */
|
||||
CHIPDATA_VER_MAJOR, /* Version information */
|
||||
CHIPDATA_VER_MINOR,
|
||||
|
||||
@@ -132,7 +133,7 @@ int GetChipData (const ChipData** Data, unsigned* Count)
|
||||
|
||||
|
||||
|
||||
int InitChip (const struct SimData* Data)
|
||||
static int InitChip (const struct SimData* Data)
|
||||
/* Initialize the chip, return an error code */
|
||||
{
|
||||
/* Remember the pointer */
|
||||
@@ -187,7 +188,7 @@ static void Write (void* Data, unsigned Offs, unsigned char Val)
|
||||
|
||||
/* Check for a write to a write protected cell */
|
||||
if (D->MemAttr[Offs] & ATTR_WPROT) {
|
||||
Sim->Warning ("Writing to write protected memory at $%04X", D->BaseAddr+Offs);
|
||||
Sim->Break ("Writing to write protected memory at $%04X", D->BaseAddr+Offs);
|
||||
}
|
||||
|
||||
/* Do the write and remember the cell as initialized */
|
||||
@@ -218,7 +219,7 @@ static unsigned char Read (void* Data, unsigned Offs)
|
||||
/* Check for a read from an uninitialized cell */
|
||||
if ((D->MemAttr[Offs] & ATTR_INITIALIZED) == 0) {
|
||||
/* We're reading a memory cell that was never written to */
|
||||
Sim->Warning ("Reading from uninitialized memory at $%04X", D->BaseAddr+Offs);
|
||||
Sim->Break ("Reading from uninitialized memory at $%04X", D->BaseAddr+Offs);
|
||||
}
|
||||
|
||||
/* Read the cell and return the value */
|
||||
|
||||
Reference in New Issue
Block a user