]> Shamusworld >> Repos - stargem2/blobdiff - src/v6809.h
Some more fixes to the V6809 core to prevent clock destruction, fixes to
[stargem2] / src / v6809.h
index d371f06f380c8675136d35f02f5d32bd2f1dcf63..4655ef5809dfe3d3172302551661a99413cd7f0a 100755 (executable)
@@ -44,17 +44,18 @@ struct V6809REGS
        uint8 a;                                                // 6809 A register
        uint8 b;                                                // 6809 B register
        uint8 dp;                                               // 6809 Direct Page register
-       uint32 clock;                                   // 6809 clock
-//uint32 _reserved;//  uint8 (* Fetch)(uint16&);               // Address of uint8 fetch routine
+//     uint32 clock;                                   // 6809 clock (@ 1 MHz, wraps at 71.5 minutes)
+       uint64 clock;                                   // 6809 clock (@ 1 MHz, wraps at 570842 years)
        uint8 (* RdMem)(uint16);                // Address of uint8 read routine
        void (* WrMem)(uint16, uint8);  // Address of uint8 write routine
        uint32 cpuFlags;                                // v6809 IRQ/RESET flags
+       uint32 clockOverrun;
 };
 
 // Function prototypes
 
 void Execute6809(V6809REGS *, uint32);                 // Function to execute 6809 instructions
-uint32 GetCurrentV6809Clock(void);                             // Get the clock of the currently executing CPU
+uint64 GetCurrentV6809Clock(void);                             // Get the clock of the currently executing CPU
 uint16 GetCurrentV6809PC(void);                                        // Get the PC of the currently executing CPU
 void SetLine(uint32 line);                                             // Set a line of the currently executing CPU
 void ClearLine(uint32 line);                                   // Clear a line of the currently executing CPU