2 SHARP MZ-80B Emulator 'EmuZ-80B'
3 SHARP MZ-2200 Emulator 'EmuZ-2200'
5 Author : Takeda.Toshiya
11 #ifndef _MEMORY_80B_H_
12 #define _MEMORY_80B_H_
15 #include "../../emu.h"
16 #include "../device.h"
18 #define SIG_MEMORY_VRAM_SEL 0
19 #define SIG_CRTC_WIDTH80 1
20 #define SIG_CRTC_REVERSE 2
24 class MEMORY : public DEVICE
38 uint8 vram[0x10000]; // 0x4000 * (3 pages + dummy)
40 uint8 vram[0xc000]; // 0x4000 * (2 pages + dummy)
46 uint8 vram_sel, vram_page;
47 void update_vram_map();
51 scrntype palette_color[8];
53 scrntype palette_green[2];
55 uint8 screen_txt[200][640];
56 uint8 screen_gra[200][640];
57 uint8 back_color, text_color, vram_mask;
58 bool width80, reverse;
60 void update_green_palette();
63 MEMORY(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu) {}
70 void write_data8(uint32 addr, uint32 data);
71 uint32 read_data8(uint32 addr);
72 uint32 fetch_op(uint32 addr, int *wait);
73 void write_io8(uint32 addr, uint32 data);
74 void write_signal(int id, uint32 data, uint32 mask);
75 void event_vline(int v, int clock);
76 void event_callback(int event_id, int err);
77 void save_state(FILEIO* state_fio);
78 bool load_state(FILEIO* state_fio);
81 void set_context_cpu(Z80* device)
85 void set_context_pio(DEVICE* device)
89 void load_dat_image(const _TCHAR* file_path);
90 bool load_mzt_image(const _TCHAR* file_path);