OSDN Git Service

[VM][General] Merge upstream 2016-02-13. Still don't implement OSD/Gui part of joysti...
[csp-qt/common_source_project-fm7.git] / source / src / vm / pasopia7 / keyboard.h
1 /*
2         TOSHIBA PASOPIA 7 Emulator 'EmuPIA7'
3
4         Author : Takeda.Toshiya
5         Date   : 2006.09.20 -
6
7         [ keyboard ]
8 */
9
10 #ifndef _KEYBOARD_H_
11 #define _KEYBOARD_H_
12
13 #include "../vm.h"
14 #include "../../emu.h"
15 #include "../device.h"
16
17 #define SIG_KEYBOARD_Z80PIO_A   0
18
19 class KEYBOARD : public DEVICE
20 {
21 private:
22         DEVICE* d_pio;
23         
24         const uint8* key_stat;
25         void create_key();
26         uint8 sel;
27         
28 public:
29         KEYBOARD(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu) {}
30         ~KEYBOARD() {}
31         
32         // common functions
33         void initialize();
34         void write_signal(int id, uint32 data, uint32 mask);
35         void event_frame();
36         void save_state(FILEIO* state_fio);
37         bool load_state(FILEIO* state_fio);
38         
39         // unique function
40         void set_context_pio(DEVICE* device)
41         {
42                 d_pio = device;
43         }
44 };
45
46 #endif
47