OSDN Git Service

[VM][STATE] Use namespace {VMNAME} to separate per VMs.
[csp-qt/common_source_project-fm7.git] / source / src / vm / mz2800 / sysport.h
1 /*
2         SHARP MZ-2800 Emulator 'EmuZ-2800'
3
4         Author : Takeda.Toshiya
5         Date   : 2007.08.14 -
6
7         [ system poty ]
8 */
9
10 #ifndef _SYSPORT_H_
11 #define _SYSPORT_H_
12
13 #include "../vm.h"
14 #include "../../emu.h"
15 #include "../device.h"
16
17 namespace MZ2800 {
18
19 class SYSPORT : public DEVICE
20 {
21 private:
22         DEVICE *d_pit, *d_sio;
23         
24 public:
25         SYSPORT(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
26         {
27                 set_device_name(_T("System I/O"));
28         }
29         ~SYSPORT() {}
30         
31         // common functions
32         void write_io8(uint32_t addr, uint32_t data);
33         uint32_t read_io8(uint32_t addr);
34         
35         // unique functions
36         void set_context_pit(DEVICE* device)
37         {
38                 d_pit = device;
39         }
40         void set_context_sio(DEVICE* device)
41         {
42                 d_sio = device;
43         }
44 };
45
46 }
47 #endif
48