mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-24 15:12:23 +01:00
byuu says: Changelog: - fixed icarus to save settings properly - fixed higan's full screen toggle on OS X - increased "Add Codes" button width to avoid text clipping - implemented cocoa/canvas.cpp - added 1s delay after mapping inputs before re-enabling the window (wasn't actually necessary, but already added it) - fixed setEnabled(false) on Cocoa's ListView and TextEdit widgets - updated nall::programpath() to use GetModuleFileName on Windows - GB: system uses open collector logic, so unmapped reads return 0xFF, not 0x00 (passes blargg's cpu_instrs again) [gekkio]
33 lines
672 B
C++
33 lines
672 B
C++
struct Memory {
|
|
~Memory();
|
|
|
|
auto operator[](uint addr) -> uint8&;
|
|
auto allocate(uint size) -> void;
|
|
auto copy(const uint8* data, uint size) -> void;
|
|
auto free() -> void;
|
|
|
|
uint8* data = nullptr;
|
|
uint size = 0;
|
|
};
|
|
|
|
struct MMIO {
|
|
virtual auto mmio_read(uint16 addr) -> uint8 = 0;
|
|
virtual auto mmio_write(uint16 addr, uint8 data) -> void = 0;
|
|
};
|
|
|
|
struct Unmapped : MMIO {
|
|
auto mmio_read(uint16) -> uint8 { return 0xff; }
|
|
auto mmio_write(uint16, uint8) -> void {}
|
|
};
|
|
|
|
struct Bus {
|
|
auto read(uint16 addr) -> uint8;
|
|
auto write(uint16 addr, uint8 data) -> void;
|
|
auto power() -> void;
|
|
|
|
MMIO* mmio[65536];
|
|
};
|
|
|
|
extern Unmapped unmapped;
|
|
extern Bus bus;
|