2 // Virtual 6808 Header file
6 // (c) 2004 Underground Software
16 #define FLAG_E 0x80 // ??? Entire ???
17 #define FLAG_F 0x40 // ??? Fast IRQ ???
19 #define FLAG_H 0x20 // Half carry
20 #define FLAG_I 0x10 // IRQ
21 #define FLAG_N 0x08 // Negative
22 #define FLAG_Z 0x04 // Zero
23 #define FLAG_V 0x02 // oVerflow
24 #define FLAG_C 0x01 // Carry
26 #define V6808_ASSERT_LINE_RESET 0x0001 // v6808 RESET line
27 #define V6808_ASSERT_LINE_IRQ 0x0002 // v6808 IRQ line
28 #define V6808_ASSERT_LINE_NMI 0x0004 // v6808 NMI line
29 #define V6808_STATE_SYNC 0x0008 // ??? v6808 SYNC line ???
30 #define V6808_STATE_ILLEGAL_INST 0x0010 // Illegal instruction executed flag
31 //#define V6809_START_DEBUG_LOG 0x0020 // Debug log go (temporary!)
37 uint16 pc; // 6808 PC register
38 uint16 x; // 6808 X index register
39 uint16 s; // 6808 System stack pointer
40 uint8 cc; // 6808 Condition Code register
41 uint8 a; // 6808 A register
42 uint8 b; // 6808 B register
43 uint32 clock; // 6808 clock
44 //uint32 _reserved;// uint8 (* Fetch)(uint16&); // Address of uint8 fetch routine
45 uint8 (* RdMem)(uint16); // Address of uint8 read routine
46 void (* WrMem)(uint16, uint8); // Address of uint8 write routine
47 uint32 cpuFlags; // v6808 IRQ/RESET flags
50 // Function prototypes
52 void Execute6808(V6808REGS *, uint32); // Function to execute 6808 instructions
53 uint32 GetCurrentV6808Clock(void); // Get the clock of the currently executing CPU