OSDN Git Service

[VM][COMMON_VM] Include IO:: class to common_vm.
[csp-qt/common_source_project-fm7.git] / source / src / vm / not.h
1 /*
2         Skelton for retropc emulator
3
4         Author : Takeda.Toshiya
5         Date   : 2006.09.20-
6
7         [ not gate ]
8 */
9
10 #ifndef _NOT_H_
11 #define _NOT_H_
12
13 //#include "vm.h"
14 //#include "../emu.h"
15 #include "device.h"
16
17 #define SIG_NOT_INPUT   0
18
19 class VM;
20 class EMU;
21 class NOT : public DEVICE
22 {
23 private:
24         outputs_t outputs;
25         bool prev, first;
26         
27 public:
28         NOT(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
29         {
30                 initialize_output_signals(&outputs);
31                 prev = first = true;
32                 set_device_name(_T("NOT GATE"));
33         }
34         ~NOT() {}
35         
36         // common functions
37         void __FASTCALL write_signal(int id, uint32_t data, uint32_t mask);
38         bool process_state(FILEIO* state_fio, bool loading);
39         
40         // unique function
41         void set_context_out(DEVICE* device, int id, uint32_t mask)
42         {
43                 register_output_signal(&outputs, device, id, mask);
44         }
45 };
46
47 #endif
48