#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 (@ 1 MHz, wraps at 71.5 minutes)
- 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
};
// Global variables (exported)
// 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__