mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-04-02 10:42:14 -04:00
byuu says: For higan: - I fixed the data ROM/RAM initialization for the Cx4, which would periodically cause a crash. - I also moved the Satellaview MaskROM vs FlashROM detection into the Satellaview manifests, so Same Game - Character Data works now. - I also re-added the driver filter to the video shaders, so the D3D driver won't show OGL shaders and vice versa. For ananke: - You can now generate the other SGB images by putting sgb.rom in the same folder as the BIOS images. - I fixed the markup in the database and via heuristics for 5MB+ games (DKJM2, ToP) - Sufami Turbo and BS-X Satellaview generate BML now instead of XML when using heuristics.
31 lines
903 B
C++
31 lines
903 B
C++
#ifndef NALL_EMULATION_SUFAMI_TURBO_HPP
|
|
#define NALL_EMULATION_SUFAMI_TURBO_HPP
|
|
|
|
#include <nall/sha256.hpp>
|
|
#include <nall/string.hpp>
|
|
|
|
namespace nall {
|
|
|
|
struct SufamiTurboCartridge {
|
|
string markup;
|
|
inline SufamiTurboCartridge(const uint8_t *data, unsigned size);
|
|
};
|
|
|
|
SufamiTurboCartridge::SufamiTurboCartridge(const uint8_t *data, unsigned size) {
|
|
markup = "";
|
|
|
|
if(size < 0x20000) return; //too small to be a valid game?
|
|
if(memcmp(data, "BANDAI SFC-ADX", 14)) return; //missing required header?
|
|
unsigned romsize = data[0x36] * 0x20000; //128KB
|
|
unsigned ramsize = data[0x37] * 0x800; //2KB
|
|
bool linkable = data[0x35] != 0x00; //TODO: unconfirmed
|
|
|
|
markup.append("cartridge", linkable ? " linkable" : "", "\n");
|
|
markup.append(" rom name=program.rom size=0x", hex(romsize), "\n");
|
|
if(ramsize)
|
|
markup.append(" ram name=save.ram size=0x", hex(ramsize), "\n");
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|