mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-24 07:02:27 +01:00
Changelog: - S-SMP core code style updated - S-SMP loads reset vector from IPLROM ($fffe-ffff) - sfc/base => sfc/expansion - system/input => system/device - added expansion/eBoot (simulation of defparam's SNES-Boot device) - expansion port device can now be selected from Super Famicom menu option - improved GBA MROM/SRAM reading endrift's memory test is up to 1388/1552. Note: I added the expansion port devices to the same group as controller ports. I also had to move "None" to the top of the list. Before v096, I am going to have to add caching of port selections to the configuration file, check the proper default item in the system menu, and remove the items with no mappings from the input configuration window. Lots of work >_>
65 lines
1.2 KiB
C++
65 lines
1.2 KiB
C++
struct MROM {
|
|
uint8* data;
|
|
uint size;
|
|
uint mask;
|
|
|
|
auto read(uint mode, uint32 addr) -> uint32;
|
|
auto write(uint mode, uint32 addr, uint32 word) -> void;
|
|
|
|
auto serialize(serializer&) -> void;
|
|
} mrom;
|
|
|
|
struct SRAM {
|
|
uint8* data;
|
|
uint size;
|
|
uint mask;
|
|
|
|
auto read(uint mode, uint32 addr) -> uint32;
|
|
auto write(uint mode, uint32 addr, uint32 word) -> void;
|
|
|
|
auto serialize(serializer&) -> void;
|
|
} sram;
|
|
|
|
struct EEPROM {
|
|
uint8* data;
|
|
uint size;
|
|
uint mask;
|
|
uint test;
|
|
uint bits;
|
|
|
|
enum class Mode : uint {
|
|
Wait, Command, ReadAddress, ReadValidate, ReadData, WriteAddress, WriteData, WriteValidate
|
|
} mode;
|
|
uint offset;
|
|
uint address;
|
|
uint addressbits;
|
|
|
|
auto read(uint addr) -> bool;
|
|
auto write(uint addr, bool bit) -> void;
|
|
|
|
auto read() -> bool;
|
|
auto write(bool bit) -> void;
|
|
auto power() -> void;
|
|
auto serialize(serializer&) -> void;
|
|
} eeprom;
|
|
|
|
struct FLASH {
|
|
uint8* data;
|
|
uint size;
|
|
uint16 id;
|
|
|
|
bool unlockhi;
|
|
bool unlocklo;
|
|
bool idmode;
|
|
bool erasemode;
|
|
bool bankselect;
|
|
bool writeselect;
|
|
bool bank;
|
|
|
|
auto read(uint16 addr) -> uint8;
|
|
auto write(uint16 addr, uint8 byte) -> void;
|
|
|
|
auto power() -> void;
|
|
auto serialize(serializer&) -> void;
|
|
} flash;
|