mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-23 14:42:33 +01:00
byuu says: Changelog: - nall: `#undef OUT` on Windows platform - GBA: add missing CPU prefetch state to serialization (this was breaking serialization in games using ROM prefetch) - GBA: reset all PPU data in the power() function (some things were missing before, causing issues on reset) - GBA: restored horizontal mosaic emulation to the new pixel-based renderer - GBA: fixed tilemap background horizontal flipping (Legend of Spyro - warning screen) - GBA: fixed d8 bits of scroll registers (ATV - Thunder Ridge Racers - menu screen) - SFC: DRAM refresh ticks the ALU MUL/DIV registers five steps forward [reported by kevtris] - SFC: merged dmaCounter and autoJoypadCounter into new shared clockCounter - left stub for old dmaCounter so that I can do some traces to ensure the new code's 100% identical GBA save states would have been broken since whenever I emulated ROM prefetch. I guess not many people are using the GBA core ...
21 lines
573 B
C++
21 lines
573 B
C++
auto Cartridge::MROM::read(uint mode, uint32 addr) -> uint32 {
|
|
if(mode & Word) {
|
|
uint32 word = 0;
|
|
word |= read(mode & ~Word | Half, (addr & ~3) + 0) << 0;
|
|
word |= read(mode & ~Word | Half, (addr & ~3) + 2) << 16;
|
|
return word;
|
|
}
|
|
|
|
addr &= 0x01ff'ffff;
|
|
if(addr >= size) return (uint16)(addr >> 1);
|
|
|
|
if(mode & Half) addr &= ~1;
|
|
auto p = data + addr;
|
|
if(mode & Half) return p[0] << 0 | p[1] << 8;
|
|
if(mode & Byte) return p[0] << 0;
|
|
return 0; //should never occur
|
|
}
|
|
|
|
auto Cartridge::MROM::write(uint mode, uint32 addr, uint32 word) -> void {
|
|
}
|