OSDN Git Service

[VM] TRY:Use namespace {VMNAME} to separate around VMs. This feature still apply...
[csp-qt/common_source_project-fm7.git] / source / src / vm / bubcom80 / membus.h
1 /*
2         Systems Formulate BUBCOM80 Emulator 'eBUBCOM80'
3
4         Author : Takeda.Toshiya
5         Date   : 2018.05.08-
6
7         [ memory bus ]
8 */
9
10 #ifndef _MEMBUS_H_
11 #define _MEMBUS_H_
12
13 #include "../memory.h"
14
15 //class csp_state_utils;
16
17 namespace BUBCOM80 {
18 class MEMBUS : public MEMORY
19 {
20 private:
21 //      csp_state_utils *state_entry;
22         
23         uint8_t boot[0x800];
24         uint8_t basic[0x10000];
25         uint8_t ram[0x10000];
26         
27         pair_t basic_addr;
28         bool ram_selected;
29         
30         void update_bank();
31         
32 public:
33         MEMBUS(VM_TEMPLATE* parent_vm, EMU* parent_emu) : MEMORY(parent_vm, parent_emu)
34         {
35                 set_device_name(_T("Memory Bus"));
36         }
37         ~MEMBUS() {}
38         
39         // common functions
40         void initialize();
41         void reset();
42         void write_io8(uint32_t addr, uint32_t data);
43         uint32_t read_io8(uint32_t addr);
44         void write_dma_data8(uint32_t addr, uint32_t data);
45         uint32_t read_dma_data8(uint32_t addr);
46         bool process_state(FILEIO* state_fio, bool loading);
47 };
48 }
49 #endif