OSDN Git Service

[VM][General] Merge upstream 2016-03-01. (Pahse 1).
[csp-qt/common_source_project-fm7.git] / source / src / vm / fm7 / kanjirom.h
1 /*
2  * Common source code project -> FM-7/77/AV -> Kanji rom
3  * (C) 2015 K.Ohta <whatisthis.sowhat _at_ gmail.com>
4  * License: GPLv2
5  * History:
6  *  Feb 11, 2015 : Initial
7  */
8
9 #include "../device.h"
10 #include "../mc6809.h"
11
12 class KANJIROM: public DEVICE {
13 private:
14         uint8_t data_table[0x20000];
15         bool read_ok;
16         bool class2;
17         pair_t kanjiaddr;
18  public:
19         KANJIROM(VM *parent_vm, EMU* parent_emu, bool type_2std);
20         ~KANJIROM();
21         void write_data8(uint32_t addr, uint32_t data);
22         uint32_t read_data8(uint32_t addr);
23         void release();
24         void reset(void);
25         bool get_readstat(void);
26         const _TCHAR *get_device_name()
27         {
28                 if(class2) {
29                         return _T("FM7_KANJI_CLASS2");
30                 } else {
31                         return _T("FM7_KANJI_CLASS1");
32                 }
33         }
34         
35         void save_state(FILEIO *state_fio);
36         bool load_state(FILEIO *state_fio);
37 };