]> Shamusworld >> Repos - thunder/blobdiff - src/v6809.h
Code cleanup, final fix for sprite lag problem.
[thunder] / src / v6809.h
index 380318c243bce63d9363873a1221efc19592262c..2e404145bc63e9d02daf726347f6cc6d5800292d 100644 (file)
@@ -1,11 +1,9 @@
 //
 // Virtual 6809 Header file
 //
-// by James Hammons
+// by James L. Hammons
+// (C) 1997, 2004 Underground Software
 //
-// (C) 1997, 2014 Underground Software
-//
-
 #ifndef __V6809_H__
 #define __V6809_H__
 
 
 // Useful defines
 
-#define FLAG_E 0x80            // Entire
-#define FLAG_F 0x40            // Fast IRQ
-#define FLAG_H 0x20            // Half carry
-#define FLAG_I 0x10            // IRQ
-#define FLAG_N 0x08            // Negative
-#define FLAG_Z 0x04            // Zero
-#define FLAG_V 0x02            // oVerflow
-#define FLAG_C 0x01            // Carry
-
-#define V6809_ASSERT_LINE_RESET                0x0001          // v6809 RESET line
-#define V6809_ASSERT_LINE_IRQ          0x0002          // v6809 IRQ line
-#define V6809_ASSERT_LINE_FIRQ         0x0004          // v6809 FIRQ line
-#define V6809_ASSERT_LINE_NMI          0x0008          // v6809 NMI line
+#define FLAG_E         0x80            // Entire
+#define FLAG_F         0x40            // Fast IRQ
+#define FLAG_H         0x20            // Half carry
+#define FLAG_I         0x10            // IRQ
+#define FLAG_N         0x08            // Negative
+#define FLAG_Z         0x04            // Zero
+#define FLAG_V         0x02            // oVerflow
+#define FLAG_C         0x01            // Carry
+
+#define V6809_LINE_RESET                       0x0001          // v6809 RESET line
+#define V6809_LINE_IRQ                         0x0002          // v6809 IRQ line
+#define V6809_LINE_FIRQ                                0x0004          // v6809 FIRQ line
+#define V6809_LINE_NMI                         0x0008          // v6809 NMI line
 #define V6809_STATE_SYNC                       0x0010          // v6809 SYNC line
 #define V6809_STATE_ILLEGAL_INST       0x0020          // Illegal instruction executed flag
 //#define V6809_START_DEBUG_LOG        EQU     0020h           // Debug log go (temporary!)
@@ -43,10 +41,9 @@ struct V6809REGS
        uint8_t a;                                              // 6809 A register
        uint8_t b;                                              // 6809 B register
        uint8_t dp;                                             // 6809 Direct Page register
-//     uint32_t clock;                                 // 6809 clock (@ 1 MHz, wraps at 71.5 minutes)
        uint64_t clock;                                 // 6809 clock (@ 1 MHz, wraps at 570842 years)
-       uint8_t (* RdMem)(uint16_t);            // Address of uint8_t read routine
-       void (* WrMem)(uint16_t, uint8_t);      // Address of uint8_t write routine
+       uint8_t (* RdMem)(uint16_t);    // Address of uint8 read routine
+       void (* WrMem)(uint16_t, uint8_t);      // Address of uint8 write routine
        uint32_t cpuFlags;                              // v6809 IRQ/RESET flags
        uint32_t clockOverrun;
 };
@@ -60,4 +57,3 @@ void SetLineOfCurrentV6809(uint32_t line);            // Set a line of the currently execu
 void ClearLineOfCurrentV6809(uint32_t line);   // Clear a line of the currently executing CPU
 
 #endif // __V6809_H__
-