OSDN Git Service

[VM][General] Merge upstream 2016-03-01. (Pahse 1).
[csp-qt/common_source_project-fm7.git] / source / src / vm / z80tvgame / joystick.h
1 /*
2         Homebrew Z80 TV GAME SYSTEM Emulator 'eZ80TVGAME'
3
4         Author : Takeda.Toshiya
5         Date   : 2015.04.28-
6
7         [ joystick ]
8 */
9
10 // http://w01.tp1.jp/~a571632211/z80tvgame/index.html
11
12 #ifndef _JOYSTICK_H_
13 #define _JOYSTICK_H_
14
15 #include "../vm.h"
16 #include "../../emu.h"
17 #include "../device.h"
18
19 class JOYSTICK : public DEVICE
20 {
21 private:
22         DEVICE* d_pio;
23         const uint32_t* joy_stat;
24         
25 public:
26         JOYSTICK(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu) {}
27         ~JOYSTICK() {}
28         
29         // common functions
30         void initialize();
31         void event_frame();
32         
33         // unique function
34         void set_context_pio(DEVICE* device)
35         {
36                 d_pio = device;
37         }
38 };
39
40 #endif