OSDN Git Service

[VM][STATE] Apply New framework to some VMs.
[csp-qt/common_source_project-fm7.git] / source / src / vm / pv1000 / joystick.h
1 /*
2         CASIO PV-1000 Emulator 'ePV-1000'
3
4         Author : Takeda.Toshiya
5         Date   : 2006.11.16 -
6
7         [ joystick ]
8 */
9
10 #ifndef _JOYSTICK_H_
11 #define _JOYSTICK_H_
12
13 #include "../vm.h"
14 #include "../../emu.h"
15 #include "../device.h"
16
17 class JOYSTICK : public DEVICE
18 {
19 private:
20         const uint8_t* key;
21         const uint32_t* joy;
22         uint8_t column;
23         uint8_t status;
24         
25 public:
26         JOYSTICK(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
27         {
28                 set_device_name(_T("Joystick I/F"));
29         }
30         ~JOYSTICK() {}
31         
32         // common functions
33         void initialize();
34         void reset();
35         void write_io8(uint32_t addr, uint32_t data);
36         uint32_t read_io8(uint32_t addr);
37         void event_frame();
38         bool process_state(FILEIO* state_fio, bool loading);
39 };
40
41 #endif