2 EPOCH Super Cassette Vision Emulator 'eSCV'
4 Author : Takeda.Toshiya
14 #include "../../emu.h"
15 #include "../device.h"
19 class MEMORY : public DEVICE
25 _TCHAR save_path[_MAX_PATH];
28 // Maybe should *not* be char, should be uint8_t.
29 // Because sizeof(char) may not be 1 byte at unicode. code.20181023 K.O
30 uint8_t id[4]; // SCV^Z
31 uint8_t ctype; // 0=16KB,32KB,32K+8KB ROM, bankswitched by PC5
32 // 1=32KB ROM+8KB SRAM, bank switched by PC5
33 // 2=32KB+32KB,32KB+32KB+32KB+32KB ROM, bank switched by PC5,PC6
34 // 3=32KB+32KB ROM, bank switched by PC6
40 uint8_t* wbank[0x200];
41 uint8_t* rbank[0x200];
45 uint8_t cart[0x8000*4];
51 void __FASTCALL set_bank(uint8_t bank);
54 MEMORY(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
56 set_device_name(_T("Memory Bus"));
64 void __FASTCALL write_data8(uint32_t addr, uint32_t data);
65 uint32_t __FASTCALL read_data8(uint32_t addr);
66 void __FASTCALL write_data8w(uint32_t addr, uint32_t data, int* wait);
67 uint32_t __FASTCALL read_data8w(uint32_t addr, int* wait);
68 void __FASTCALL write_io8(uint32_t addr, uint32_t data);
69 bool process_state(FILEIO* state_fio, bool loading);
72 void open_cart(const _TCHAR* file_path);
74 bool is_cart_inserted()
78 void set_context_sound(DEVICE* device)