// by James Hammons
// (C) 2014 Underground Software
//
-
#ifndef __V63701_H__
#define __V63701_H__
#define FLAG_V 0x02 // oVerflow
#define FLAG_C 0x01 // Carry
-#define V63701_ASSERT_LINE_RESET 0x0001 // v63701 RESET line
-#define V63701_ASSERT_LINE_IRQ 0x0002 // v63701 IRQ line
-#define V63701_ASSERT_LINE_NMI 0x0004 // v63701 NMI line
-#define V63701_STATE_WAI 0x0008 // v63701 wait for IRQ line
-#define V63701_ASSERT_TIMER_OVERFLOW 0x0010
-#define V63701_ASSERT_OUTPUT_COMPARE 0x0020
-#define V63701_ASSERT_INPUT_CAPTURE 0x0040
-#define V63701_ASSERT_TRAP 0x0080 // Illegal instruction executed flag
+#define V63701_LINE_RESET 0x0001 // v63701 RESET line
+#define V63701_LINE_IRQ 0x0002 // v63701 IRQ line
+#define V63701_LINE_NMI 0x0004 // v63701 NMI line
+#define V63701_STATE_WAI 0x0008 // v63701 wait for IRQ line
+#define V63701_TIMER_OVERFLOW 0x0010
+#define V63701_OUTPUT_COMPARE 0x0020
+#define V63701_INPUT_CAPTURE 0x0040
+#define V63701_TRAP 0x0080 // Illegal instruction executed flag
//#define V6809_START_DEBUG_LOG 0x8000 // Debug log go (temporary!)
// Useful structs
Word outputCompare; // 63701 Output Compare register
uint8_t ddr1;
uint8_t ddr2;
- uint8_t port1;
- uint8_t port2;
+ uint8_t port1data;
+ uint8_t port2data;
uint8_t ramCtrl;
uint8_t cWriteLatch; // Counter write latch
uint8_t cReadLatch; // Counter read latch
uint8_t InternalRegisterRead(uint16_t);
void InternalRegisterWrite(uint16_t, uint8_t);
-#endif // __V63701_H__
+// These functions must be implemented by the user...
+extern uint8_t V63701ReadPort1(void);
+extern uint8_t V63701ReadPort2(void);
+extern void V63701WritePort1(uint8_t);
+extern void V63701WritePort2(uint8_t);
+#endif // __V63701_H__