]> Shamusworld >> Repos - thunder/blobdiff - src/v6809.h
Added old email from Lee Saito to notes, various attempts at fixes
[thunder] / src / v6809.h
index f62d1cfcc5be2589dbcfddb406c9d56bd75c539f..39fc3f84638e86545644c4a2319f5f2d1af7c96e 100755 (executable)
@@ -3,7 +3,7 @@
 //
 // by James L. Hammons
 //
-// (c) 1997, 2004 Underground Software
+// (C) 1997, 2004 Underground Software
 //
 
 #ifndef __V6809_H__
 
 struct V6809REGS
 {
-       WORD pc;                                        // 6809 PC register
-       WORD x;                                         // 6809 X index register
-       WORD y;                                         // 6809 Y index register
-       WORD s;                                         // 6809 System stack pointer
-       WORD u;                                         // 6809 User stack pointer
-       BYTE cc;                                        // 6809 Condition Code register
-       BYTE a;                                         // 6809 A register
-       BYTE b;                                         // 6809 B register
-       BYTE dp;                                        // 6809 Direct Page register
-       DWORD clock;                            // 6809 clock
-//DWORD _reserved;//   BYTE (* Fetch)(WORD&);          // Address of BYTE fetch routine
-       BYTE (* RdMem)(WORD);           // Address of BYTE read routine
-       void (* WrMem)(WORD, BYTE);     // Address of BYTE write routine
-       DWORD cpuFlags;                         // v6809 IRQ/RESET flags
+       uint16 pc;                                              // 6809 PC register
+       uint16 x;                                               // 6809 X index register
+       uint16 y;                                               // 6809 Y index register
+       uint16 s;                                               // 6809 System stack pointer
+       uint16 u;                                               // 6809 User stack pointer
+       uint8 cc;                                               // 6809 Condition Code register
+       uint8 a;                                                // 6809 A register
+       uint8 b;                                                // 6809 B register
+       uint8 dp;                                               // 6809 Direct Page register
+//     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 *, DWORD);                                  // Function to execute 6809 instructions
+void Execute6809(V6809REGS *, uint32);                 // Function to execute 6809 instructions
+uint64 GetCurrentV6809Clock(void);                             // Get the clock of the currently executing CPU
+uint16 GetCurrentV6809PC(void);                                        // Get the PC of the currently executing CPU
+void SetLineOfCurrentV6809(uint32 line);               // Set a line of the currently executing CPU
+void ClearLineOfCurrentV6809(uint32 line);             // Clear a line of the currently executing CPU
 
 #endif // __V6809_H__