OSDN Git Service

[VM][FMTOWNS][MEMORY] Fix setup around memory banks by I/O 0404h and 0480h.
[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 namespace PV1000 {
18
19 class JOYSTICK : public DEVICE
20 {
21 private:
22         const uint8_t* key;
23         const uint32_t* joy;
24         uint8_t column;
25         uint8_t status;
26         
27 public:
28         JOYSTICK(VM_TEMPLATE* parent_vm, EMU_TEMPLATE* parent_emu) : DEVICE(parent_vm, parent_emu)
29         {
30                 set_device_name(_T("Joystick I/F"));
31         }
32         ~JOYSTICK() {}
33         
34         // common functions
35         void initialize();
36         void reset();
37         void __FASTCALL write_io8(uint32_t addr, uint32_t data);
38         uint32_t __FASTCALL read_io8(uint32_t addr);
39         void event_frame();
40         bool process_state(FILEIO* state_fio, bool loading);
41 };
42
43 }
44 #endif