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 / msx / joystick.h
1 /*
2         ASCII MSX1 Emulator 'yaMSX1'
3         ASCII MSX2 Emulator 'yaMSX2'
4         Pioneer PX-7 Emulator 'ePX-7'
5
6         Author : tanam
7         Date   : 2013.06.29-
8
9         modified by Takeda.Toshiya
10
11         [ joystick ]
12 */
13
14 #ifndef _JOYSTICK_H_
15 #define _JOYSTICK_H_
16
17 #include "../vm.h"
18 #include "../../emu.h"
19 #include "../device.h"
20
21 #define SIG_JOYSTICK_SEL        0
22
23 class JOYSTICK : public DEVICE
24 {
25 private:
26         DEVICE *d_psg;
27         const uint32 *joy_stat;
28         int select;
29         
30 public:
31         JOYSTICK(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu) {}
32         ~JOYSTICK() {}
33         
34         // common functions
35         void initialize();
36         void event_frame();
37         void write_signal(int id, uint32 data, uint32 mask);
38         void save_state(FILEIO* state_fio);
39         bool load_state(FILEIO* state_fio);
40         
41         // unique function
42         void set_context_psg(DEVICE* device)
43         {
44                 d_psg = device;
45         }
46 };
47
48 #endif
49