Diff of /src/libxineadec/nosefart/nes6502.h [e466b8] .. [87e73d]  Maximize  Restore

Switch to side-by-side view

--- a/src/libxineadec/nosefart/nes6502.h
+++ b/src/libxineadec/nosefart/nes6502.h
@@ -23,6 +23,9 @@
 ** $Id: nes6502.h,v 1.2 2003/12/05 15:55:01 f1rmb Exp $
 */
 
+/* straitm */
+#include "types.h"
+
 /* NOTE: 16-bit addresses avoided like the plague: use 32-bit values
 **       wherever humanly possible
 */
@@ -47,6 +50,17 @@
 
 #define  NES6502_BANKMASK  ((0x10000 / NES6502_NUMBANKS) - 1)
 
+/* Add memory access control flags. This is a ram shadow memory that holds
+ * for each memory bytes access flags for read, write and execute access.
+ * The nes6502_mem_access holds all new access (all mode all location). It is 
+ * used to determine if the player has loop in playing time calculation.
+ */
+#ifdef NES6502_MEM_ACCESS_CTRL
+extern uint8 nes6502_mem_access;
+# define NES6502_READ_ACCESS 1
+# define NES6502_WRITE_ACCESS 2
+# define NES6502_EXE_ACCESS 4
+#endif /* #ifdef NES6502_MEM_ACCESS_CTRL */
 
 /* P (flag) register bitmasks */
 #define  N_FLAG         0x80
@@ -87,7 +101,10 @@
 
 typedef struct
 {
-   uint8 *mem_page[NES6502_NUMBANKS];  /* memory page pointers */
+   uint8 * mem_page[NES6502_NUMBANKS];  /* memory page pointers */
+#ifdef NES6502_MEM_ACCESS_CTRL
+  uint8 * acc_mem_page[NES6502_NUMBANKS]; /* memory access page pointer */
+#endif
    nes6502_memread *read_handler;
    nes6502_memwrite *write_handler;
    int dma_cycles;
@@ -109,6 +126,12 @@
 extern uint8 nes6502_getbyte(uint32 address);
 extern uint32 nes6502_getcycles(boolean reset_flag);
 extern void nes6502_setdma(int cycles);
+
+#ifdef NES6502_MEM_ACCESS_CTRL
+extern void nes6502_chk_mem_access(uint8 * access, int flags);
+#else
+#define nes6502_chk_mem_access(access,flags)
+#endif
 
 /* Context get/set */
 extern void nes6502_setcontext(nes6502_context *cpu);

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks