OSDN Git Service

e4f1a52b92c486026daba351aa81d2ca98206342
[csp-qt/common_source_project-fm7.git] / source / src / vm / mz700 / ramfile.h
1 /*
2         SHARP MZ-700 Emulator 'EmuZ-700'
3         SHARP MZ-800 Emulator 'EmuZ-800'
4         SHARP MZ-1500 Emulator 'EmuZ-1500'
5
6         Author : Takeda.Toshiya
7         Date   : 2010.09.02 -
8
9         [ ram file ]
10 */
11
12 #ifndef _RAMFILE_H_
13 #define _RAMFILE_H_
14
15 #include "../vm.h"
16 #include "../../emu.h"
17 #include "../device.h"
18
19 class RAMFILE : public DEVICE
20 {
21 private:
22         uint8_t *data_buffer;
23         uint32_t data_addr;
24         
25 public:
26         RAMFILE(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
27         {
28                 set_device_name(_T("RAM File"));
29         }
30         ~RAMFILE() {}
31         
32         // common functions
33         void initialize();
34         void release();
35         void reset();
36         void write_io8(uint32_t addr, uint32_t data);
37         uint32_t read_io8(uint32_t addr);
38         void decl_state();
39         void save_state(FILEIO* state_fio);
40         bool load_state(FILEIO* state_fio);
41 };
42
43 #endif
44