]> Shamusworld >> Repos - apple2/blobdiff - src/v65c02.h
Fixed misc. bugs preventing certain games from working, added pause mode.
[apple2] / src / v65c02.h
index 96e62178289424f02493c87a02efd8ed241a4d58..2a189c82c3a11e4176e738df1a064b5e5922ed64 100755 (executable)
@@ -8,7 +8,7 @@
 #ifndef __V65C02_H__
 #define __V65C02_H__
 
-#include "types.h"
+#include <stdint.h>
 
 // Useful defines
 
 
 struct V65C02REGS
 {
-       uint16 pc;                                              // 65C02 PC register
-       uint8 cc;                                               // 65C02 Condition Code register
-       uint8 sp;                                               // 65C02 System stack pointer (bound to $01xx)
-       uint8 a;                                                // 65C02 A register
-       uint8 x;                                                // 65C02 X index register
-       uint8 y;                                                // 65C02 Y register
-       uint32 clock;                                   // 65C02 clock
-       uint8 (* RdMem)(uint16);                // Address of BYTE read routine
-       void (* WrMem)(uint16, uint8);  // Address of BYTE write routine
-       uint16 cpuFlags;                                // v65C02 IRQ/RESET flags
+       uint16_t pc;                                            // 65C02 PC register
+       uint8_t cc;                                             // 65C02 Condition Code register
+       uint8_t sp;                                             // 65C02 System stack pointer (bound to $01xx)
+       uint8_t a;                                              // 65C02 A register
+       uint8_t x;                                              // 65C02 X index register
+       uint8_t y;                                              // 65C02 Y register
+//     uint32_t clock;                                 // 65C02 clock (@ 1 MHz, wraps at 71.5 minutes)
+       uint64_t clock;                                 // 65C02 clock (@ 1 MHz, wraps at 570842 years)
+       uint8_t (* RdMem)(uint16_t);            // Address of BYTE read routine
+       void (* WrMem)(uint16_t, uint8_t);      // Address of BYTE write routine
+       uint16_t cpuFlags;                              // v65C02 IRQ/RESET flags
+       uint64_t overflow;                              // # of cycles we went over last time through
 };
 
 // Global variables (exported)
@@ -49,7 +51,7 @@ extern bool dumpDis;
 
 // Function prototypes
 
-void Execute65C02(V65C02REGS *, uint32);       // Function to execute 65C02 instructions
-uint32 GetCurrentV65C02Clock(void);                            // Get the clock of the currently executing CPU
+void Execute65C02(V65C02REGS *, uint32_t);     // Function to execute 65C02 instructions
+uint64_t GetCurrentV65C02Clock(void);                          // Get the clock of the currently executing CPU
 
 #endif // __V65C02_H__