2 NEC PC-9801 Emulator 'ePC-9801'
3 NEC PC-9801E/F/M Emulator 'ePC-9801E'
4 NEC PC-9801U Emulator 'ePC-9801U'
5 NEC PC-9801VF Emulator 'ePC-9801VF'
6 NEC PC-9801VM Emulator 'ePC-9801VM'
7 NEC PC-9801VX Emulator 'ePC-9801VX'
8 NEC PC-9801RA Emulator 'ePC-9801RA'
9 NEC PC-98XA Emulator 'ePC-98XA'
10 NEC PC-98XL Emulator 'ePC-98XL'
11 NEC PC-98RL Emulator 'ePC-98RL'
12 NEC PC-98DO Emulator 'ePC-98DO'
14 Author : Takeda.Toshiya
23 #include "../memory.h"
27 #if defined(SUPPORT_32BIT_ADDRESS)
28 #define RAM_SIZE 0x800000 // 8MB
29 #elif defined(SUPPORT_24BIT_ADDRESS)
30 #define RAM_SIZE 0x400000 // 4MB
32 #define RAM_SIZE 0x100000 // 1MB
35 //class csp_state_utils;
37 class MEMBUS : public MEMORY
42 // csp_state_utils *state_entry;
44 uint8_t ram[RAM_SIZE];
47 #if !defined(SUPPORT_HIRESO)
48 uint8_t bios[0x18000];
50 uint8_t bios[0x10000];
52 #if defined(SUPPORT_BIOS_RAM)
53 #if !defined(SUPPORT_HIRESO)
54 uint8_t bios_ram[0x18000];
56 uint8_t bios_ram[0x10000];
58 // uint8_t bios_ram[sizeof(bios)];
59 bool bios_ram_selected;
61 #if defined(SUPPORT_ITF_ROM)
67 #if !defined(SUPPORT_HIRESO)
69 #if defined(_PC9801) || defined(_PC9801E)
70 uint8_t fd_bios_2hd[0x1000];
71 uint8_t fd_bios_2dd[0x1000];
73 uint8_t sound_bios[0x4000];
74 // uint8_t sound_bios_ram[0x4000];
75 bool sound_bios_selected;
76 // bool sound_bios_ram_selected;
77 void update_sound_bios();
78 #if defined(SUPPORT_SASI_IF)
79 uint8_t sasi_bios[0x1000];
80 uint8_t sasi_bios_ram[0x1000];
81 bool sasi_bios_selected;
82 bool sasi_bios_ram_selected;
83 void update_sasi_bios();
85 #if defined(SUPPORT_SCSI_IF)
86 uint8_t scsi_bios[0x1000];
87 uint8_t scsi_bios_ram[0x1000];
88 bool scsi_bios_selected;
89 bool scsi_bios_ram_selected;
90 void update_scsi_bios();
92 #if defined(SUPPORT_IDE_IF)
93 uint8_t ide_bios[0x4000];
94 // uint8_t ide_bios_ram[0x4000];
95 bool ide_bios_selected;
96 // bool ide_bios_ram_selected;
97 void update_ide_bios();
101 #if defined(SUPPORT_NEC_EMS)
102 uint8_t nec_ems[0x10000];
103 bool nec_ems_selected;
104 void update_nec_ems();
108 #if defined(SUPPORT_24BIT_ADDRESS) || defined(SUPPORT_32BIT_ADDRESS)
109 uint8_t dma_access_ctrl;
110 uint32_t window_80000h;
111 uint32_t window_a0000h;
115 MEMBUS(VM_TEMPLATE* parent_vm, EMU* parent_emu) : MEMORY(parent_vm, parent_emu)
117 set_device_name(_T("Memory Bus"));
124 void write_io8(uint32_t addr, uint32_t data);
125 uint32_t read_io8(uint32_t addr);
126 #if defined(SUPPORT_24BIT_ADDRESS) || defined(SUPPORT_32BIT_ADDRESS)
127 uint32_t read_data8(uint32_t addr);
128 void write_data8(uint32_t addr, uint32_t data);
129 uint32_t read_dma_data8(uint32_t addr);
130 void write_dma_data8(uint32_t addr, uint32_t data);
132 bool process_state(FILEIO* state_fio, bool loading);
135 void set_context_display(DISPLAY* device)