OSDN Git Service

[VM][STATE] Use namespace {VMNAME} to separate per VMs.
[csp-qt/common_source_project-fm7.git] / source / src / vm / mz2800 / joystick.h
1 /*
2         SHARP MZ-2800 Emulator 'EmuZ-2800'
3
4         Author : Takeda.Toshiya
5         Date   : 2007.08.14 -
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 namespace MZ2800 {
18
19 class JOYSTICK : public DEVICE
20 {
21 private:
22         uint32_t mode;
23         const uint32_t* joy_stat;
24 public:
25         JOYSTICK(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
26         {
27                 set_device_name(_T("Joystick I/F"));
28         }
29         ~JOYSTICK() {}
30         
31         // common functions
32         void initialize();
33         void write_io8(uint32_t addr, uint32_t data);
34         uint32_t read_io8(uint32_t addr);
35         bool process_state(FILEIO* state_fio, bool loading);
36 };
37
38 }
39 #endif