2 FUJITSU FMR-50 Emulator 'eFMR-50'
3 FUJITSU FMR-60 Emulator 'eFMR-60'
5 Author : Takeda.Toshiya
11 #ifndef _FMR50_MEMORY_H_
12 #define _FMR50_MEMORY_H_
15 #include "../../emu.h"
16 #include "../device.h"
18 #define SIG_MEMORY_DISP 0
19 #define SIG_MEMORY_VSYNC 1
29 class MEMORY : public DEVICE
39 uint8_t* rbank[8192]; // 16MB / 2KB
44 uint8_t ram[0x400000]; // RAM 1+3MB
46 uint8_t vram[0x80000]; // VRAM 512KB
47 uint8_t cvram[0x2000];
48 uint8_t avram[0x2000];
50 uint8_t vram[0x40000]; // VRAM 256KB
51 uint8_t cvram[0x1000];
52 uint8_t kvram[0x1000];
53 uint8_t dummy[0x8000]; // dummy plane
55 uint8_t ipl[0x4000]; // IPL 16KB
57 uint8_t ank24[0x3000]; // ANK(14x24)
58 uint8_t kanji24[0x240000]; // KANJI(24x24)
60 uint8_t ank8[0x800]; // ANK(8x8) 2KB
61 uint8_t ank16[0x1000]; // ANK(8x16) 4KB
62 uint8_t kanji16[0x40000]; // KANJI(16x16) 256KB
64 uint8_t machine_id; // MACHINE ID
68 uint8_t mainmem, rplane, wplane;
69 uint8_t dma_addr_reg, dma_wrap_reg;
70 uint32_t dma_addr_mask;
78 uint8_t apal[16][3], apalsel, dpal[8];
83 uint8_t pagesel, ankcg;
86 uint16_t accaddr, dispaddr;
89 int kj_h, kj_l, kj_ofs, kj_row;
92 uint8_t cmdreg, imgcol, maskreg, compreg[8], compbit, bankdis, tilereg[3];
93 uint16_t lofs, lsty, lsx, lsy, lex, ley;
94 void point(int x, int y, int col);
98 uint8_t screen_txt[SCREEN_HEIGHT][SCREEN_WIDTH + 14];
99 uint8_t screen_cg[SCREEN_HEIGHT][SCREEN_WIDTH];
100 // uint8_t screen_txt[400][648];
101 // uint8_t screen_cg[400][640];
102 scrntype_t palette_txt[16];
103 scrntype_t palette_cg[16];
106 void update_dma_addr_mask();
116 MEMORY(VM_TEMPLATE* parent_vm, EMU_TEMPLATE* parent_emu) : DEVICE(parent_vm, parent_emu)
118 set_device_name(_T("Memory Bus"));
125 void __FASTCALL write_data8(uint32_t addr, uint32_t data);
126 uint32_t __FASTCALL read_data8(uint32_t addr);
127 void __FASTCALL write_dma_data8(uint32_t addr, uint32_t data);
128 uint32_t __FASTCALL read_dma_data8(uint32_t addr);
129 void __FASTCALL write_io8(uint32_t addr, uint32_t data);
130 uint32_t __FASTCALL read_io8(uint32_t addr);
131 void __FASTCALL write_signal(int id, uint32_t data, uint32_t mask);
133 bool process_state(FILEIO* state_fio, bool loading);
136 #if defined(HAS_I286)
137 void set_context_cpu(I286* device)
139 void set_context_cpu(I386* device)
144 void set_machine_id(uint8_t id)
148 void set_context_crtc(DEVICE* device)
152 void set_chregs_ptr(uint8_t* ptr)