X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fv63701.h;h=19842b3972ac95afef96c2d5ee590913bf741441;hb=HEAD;hp=47c5b1802d386f164b380f06e42b433e9b8dcc84;hpb=756fbabdd25117272164fd2d31810e6018a5990e;p=thunder diff --git a/src/v63701.h b/src/v63701.h index 47c5b18..19842b3 100644 --- a/src/v63701.h +++ b/src/v63701.h @@ -4,7 +4,6 @@ // by James Hammons // (C) 2014 Underground Software // - #ifndef __V63701_H__ #define __V63701_H__ @@ -19,14 +18,14 @@ #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 @@ -105,8 +104,8 @@ struct V63701REGS 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 @@ -128,5 +127,10 @@ uint64_t GetCurrentV63701Clock(void); // Get the clock of the currently executi 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__