-/*\r
- Skelton for retropc emulator\r
-\r
- Author : Takeda.Toshiya\r
- Date : 2008.06.10-\r
-\r
- [ nor gate ]\r
-*/\r
-\r
-#ifndef _NOR_H_\r
-#define _NOR_H_\r
-\r
-#include "vm.h"\r
-#include "../emu.h"\r
-#include "device.h"\r
-\r
-#define SIG_NOR_BIT_0 0x01\r
-#define SIG_NOR_BIT_1 0x02\r
-#define SIG_NOR_BIT_2 0x04\r
-#define SIG_NOR_BIT_3 0x08\r
-#define SIG_NOR_BIT_4 0x10\r
-#define SIG_NOR_BIT_5 0x20\r
-#define SIG_NOR_BIT_6 0x40\r
-#define SIG_NOR_BIT_7 0x80\r
-\r
-class NOR : public DEVICE\r
-{\r
-private:\r
- outputs_t outputs;\r
- uint32 bits_in;\r
- bool prev, first;\r
- \r
-public:\r
- NOR(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)\r
- {\r
- init_output_signals(&outputs);\r
- bits_in = 0;\r
- prev = first = true;\r
- }\r
- ~NOR() {}\r
- \r
- // common functions\r
- void write_signal(int id, uint32 data, uint32 mask);\r
- void save_state(FILEIO* state_fio);\r
- bool load_state(FILEIO* state_fio);\r
- \r
- // unique function\r
- void set_context_out(DEVICE* device, int id, uint32 mask)\r
- {\r
- register_output_signal(&outputs, device, id, mask);\r
- }\r
-};\r
-\r
-#endif\r
-\r
+/*
+ Skelton for retropc emulator
+
+ Author : Takeda.Toshiya
+ Date : 2008.06.10-
+
+ [ nor gate ]
+*/
+
+#ifndef _NOR_H_
+#define _NOR_H_
+
+//#include "vm.h"
+//#include "../emu.h"
+#include "device.h"
+
+#define SIG_NOR_BIT_0 0x01
+#define SIG_NOR_BIT_1 0x02
+#define SIG_NOR_BIT_2 0x04
+#define SIG_NOR_BIT_3 0x08
+#define SIG_NOR_BIT_4 0x10
+#define SIG_NOR_BIT_5 0x20
+#define SIG_NOR_BIT_6 0x40
+#define SIG_NOR_BIT_7 0x80
+
+class VM;
+class EMU;
+class NOR : public DEVICE
+{
+private:
+ outputs_t outputs;
+ uint32_t bits_in;
+ bool prev, first;
+
+public:
+ NOR(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
+ {
+ initialize_output_signals(&outputs);
+ bits_in = 0;
+ prev = first = true;
+ set_device_name(_T("NOR GATE"));
+ }
+ ~NOR() {}
+
+ // common functions
+ void __FASTCALL write_signal(int id, uint32_t data, uint32_t mask);
+ bool process_state(FILEIO* state_fio, bool loading);
+
+ // unique function
+ void set_context_out(DEVICE* device, int id, uint32_t mask)
+ {
+ register_output_signal(&outputs, device, id, mask);
+ }
+};
+
+#endif
+