]> git.sur5r.net Git - cc65/blobdiff - src/sim65/chips/ram.c
Working
[cc65] / src / sim65 / chips / ram.c
index 639b05bfabc964763031bc8470b72b616cf59f10..5a77bc7448995b0808a63f503f3511812cf972dd 100644 (file)
@@ -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ö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 */