mirror of https://github.com/bsnes-emu/bsnes.git
Update to v089 release.
byuu says: Changelog to v089: - fix SA-1 Mini Yonku Shining Scorpion - load from command-line - remove SNES::Cartridge::NVRAM - fix SGB save RAM - update cheats.xml - already mapped inputs cancel input assign BS-X wasn't broken after all. I forgot that I ran purify on my BS-X images, and that the BS Zelda ZIP I have has the disable ROM bit set. Whoops.
This commit is contained in:
parent
c3f9d421da
commit
73ebe093b8
218557
bsnes/data/cheats.xml
218557
bsnes/data/cheats.xml
File diff suppressed because it is too large
Load Diff
|
@ -3,7 +3,7 @@
|
|||
|
||||
namespace Emulator {
|
||||
static const char Name[] = "bsnes";
|
||||
static const char Version[] = "088.16";
|
||||
static const char Version[] = "089";
|
||||
static const char Author[] = "byuu";
|
||||
static const char License[] = "GPLv3";
|
||||
}
|
||||
|
|
|
@ -10,7 +10,6 @@ struct Interface {
|
|||
unsigned height;
|
||||
bool overscan;
|
||||
double aspectRatio;
|
||||
unsigned frequency;
|
||||
bool resettable;
|
||||
} information;
|
||||
|
||||
|
|
|
@ -88,7 +88,6 @@ Interface::Interface() {
|
|||
information.height = 240;
|
||||
information.overscan = true;
|
||||
information.aspectRatio = 8.0 / 7.0;
|
||||
information.frequency = 1789772;
|
||||
information.resettable = true;
|
||||
|
||||
media.append({ID::ROM, "Famicom", "sys", "program.rom", "fc"});
|
||||
|
|
|
@ -112,7 +112,6 @@ Interface::Interface() {
|
|||
information.height = 144;
|
||||
information.overscan = false;
|
||||
information.aspectRatio = 1.0;
|
||||
information.frequency = 4194304;
|
||||
information.resettable = false;
|
||||
|
||||
firmware.append({ID::GameBoyBootROM, "Game Boy", "sys", "boot.rom"});
|
||||
|
|
|
@ -91,7 +91,6 @@ Interface::Interface() {
|
|||
information.height = 160;
|
||||
information.overscan = false;
|
||||
information.aspectRatio = 1.0;
|
||||
information.frequency = 32768;
|
||||
information.resettable = false;
|
||||
|
||||
firmware.append({ID::BIOS, "Game Boy Advance", "sys", "bios.rom"});
|
||||
|
|
|
@ -32,8 +32,6 @@ void Cartridge::load(const string &markup, const stream &stream) {
|
|||
has_msu1 = false;
|
||||
has_link = false;
|
||||
|
||||
nvram.reset();
|
||||
|
||||
parse_markup(markup);
|
||||
//print(markup, "\n\n");
|
||||
|
||||
|
|
|
@ -40,17 +40,6 @@ struct Cartridge : property<Cartridge> {
|
|||
readonly<bool> has_msu1;
|
||||
readonly<bool> has_link;
|
||||
|
||||
struct NonVolatileRAM {
|
||||
const string id;
|
||||
uint8_t *data;
|
||||
unsigned size;
|
||||
Slot slot;
|
||||
NonVolatileRAM() : id(""), data(nullptr), size(0), slot(Slot::Base) {}
|
||||
NonVolatileRAM(const string id, uint8_t *data, unsigned size, Slot slot = Slot::Base)
|
||||
: id(id), data(data), size(size), slot(slot) {}
|
||||
};
|
||||
linear_vector<NonVolatileRAM> nvram;
|
||||
|
||||
struct Mapping {
|
||||
function<uint8 (unsigned)> read;
|
||||
function<void (unsigned, uint8)> write;
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
#ifdef CARTRIDGE_CPP
|
||||
|
||||
void Cartridge::serialize(serializer &s) {
|
||||
for(auto &ram : nvram) {
|
||||
if(ram.size) s.array(ram.data, ram.size);
|
||||
}
|
||||
s.array(ram.data(), ram.size());
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#ifdef BSX_CPP
|
||||
|
||||
#include "serialization.cpp"
|
||||
BSXCartridge bsxcartridge;
|
||||
|
||||
void BSXCartridge::init() {
|
||||
|
|
|
@ -20,6 +20,8 @@ struct BSXCartridge {
|
|||
void mmio_write(unsigned addr, uint8 data);
|
||||
void mmio_commit();
|
||||
|
||||
void serialize(serializer&);
|
||||
|
||||
private:
|
||||
uint8 r[16];
|
||||
bool r00, r01, r02, r03;
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
void BSXCartridge::serialize(serializer &s) {
|
||||
s.array(sram.data(), sram.size());
|
||||
s.array(psram.data(), psram.size());
|
||||
}
|
|
@ -37,6 +37,8 @@ void ICD2::load() {
|
|||
hook = GameBoy::interface->hook;
|
||||
GameBoy::interface->bind = this;
|
||||
GameBoy::interface->hook = this;
|
||||
|
||||
interface->memory.append({ID::SuperGameBoyRAM, "save.ram"});
|
||||
}
|
||||
|
||||
void ICD2::unload() {
|
||||
|
|
|
@ -221,15 +221,15 @@ void SA1::reset() {
|
|||
mmio.vcnt = 0x0000;
|
||||
|
||||
//$2220-2223 CXB, DXB, EXB, FXB
|
||||
mmio.cbmode = 1;
|
||||
mmio.dbmode = 1;
|
||||
mmio.ebmode = 1;
|
||||
mmio.fbmode = 1;
|
||||
mmio.cbmode = 0;
|
||||
mmio.dbmode = 0;
|
||||
mmio.ebmode = 0;
|
||||
mmio.fbmode = 0;
|
||||
|
||||
mmio.cb = 0x00;
|
||||
mmio.db = 0x01;
|
||||
mmio.eb = 0x00;
|
||||
mmio.fb = 0x01;
|
||||
mmio.eb = 0x02;
|
||||
mmio.fb = 0x03;
|
||||
|
||||
//$2224 BMAPS
|
||||
mmio.sbm = 0x00;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#ifdef SUFAMITURBO_CPP
|
||||
|
||||
void SufamiTurbo::serialize(serializer &s) {
|
||||
if(slotA.ram.data()) s.array(slotA.ram.data(), slotA.ram.size());
|
||||
if(slotB.ram.data()) s.array(slotB.ram.data(), slotB.ram.size());
|
||||
s.array(slotA.ram.data(), slotA.ram.size());
|
||||
s.array(slotB.ram.data(), slotB.ram.size());
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -121,6 +121,10 @@ void Interface::load(unsigned id, const stream &stream, const string &markup) {
|
|||
stream.read(bsxcartridge.psram.data(), min(stream.size(), bsxcartridge.psram.size()));
|
||||
}
|
||||
|
||||
if(id == ID::SuperGameBoyRAM) {
|
||||
stream.read(GameBoy::cartridge.ramdata, GameBoy::cartridge.ramsize);
|
||||
}
|
||||
|
||||
if(id == ID::SufamiTurboSlotARAM) {
|
||||
sufamiturbo.slotA.ram.copy(stream);
|
||||
}
|
||||
|
@ -155,6 +159,10 @@ void Interface::save(unsigned id, const stream &stream) {
|
|||
stream.write(bsxcartridge.psram.data(), bsxcartridge.psram.size());
|
||||
}
|
||||
|
||||
if(id == ID::SuperGameBoyRAM) {
|
||||
stream.write(GameBoy::cartridge.ramdata, GameBoy::cartridge.ramsize);
|
||||
}
|
||||
|
||||
if(id == ID::SufamiTurboSlotARAM) {
|
||||
stream.write(sufamiturbo.slotA.ram.data(), sufamiturbo.slotA.ram.size());
|
||||
}
|
||||
|
@ -235,7 +243,6 @@ Interface::Interface() {
|
|||
information.height = 240;
|
||||
information.overscan = true;
|
||||
information.aspectRatio = 8.0 / 7.0;
|
||||
information.frequency = 32040;
|
||||
information.resettable = true;
|
||||
|
||||
firmware.append({ID::IPLROM, "Super Famicom", "sys", "spc700.rom"});
|
||||
|
|
|
@ -58,6 +58,7 @@ void System::serialize_all(serializer &s) {
|
|||
dsp.serialize(s);
|
||||
|
||||
if(cartridge.has_gb_slot()) icd2.serialize(s);
|
||||
if(cartridge.has_bs_cart()) bsxcartridge.serialize(s);
|
||||
if(cartridge.has_st_slots()) sufamiturbo.serialize(s);
|
||||
if(cartridge.has_superfx()) superfx.serialize(s);
|
||||
if(cartridge.has_sa1()) sa1.serialize(s);
|
||||
|
|
|
@ -16,6 +16,23 @@ string Application::path(const string &filename) {
|
|||
return {userpath, filename};
|
||||
}
|
||||
|
||||
void Application::commandLineLoad(string pathname) {
|
||||
pathname.transform("\\", "/");
|
||||
pathname.rtrim<1>("/");
|
||||
if(directory::exists(pathname) == false) return;
|
||||
|
||||
string type = extension(pathname);
|
||||
pathname.append("/");
|
||||
|
||||
for(auto &emulator : this->emulator) {
|
||||
for(auto &media : emulator->media) {
|
||||
if(media.type != "sys") continue;
|
||||
if(type != media.extension) continue;
|
||||
return utility->loadMedia(emulator, media, pathname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Application::run() {
|
||||
inputManager->poll();
|
||||
utility->updateStatus();
|
||||
|
@ -103,6 +120,8 @@ Application::Application(int argc, char **argv) {
|
|||
utility->synchronizeRuby();
|
||||
utility->updateShader();
|
||||
|
||||
if(argc >= 2) commandLineLoad(argv[1]);
|
||||
|
||||
while(quit == false) {
|
||||
OS::processEvents();
|
||||
run();
|
||||
|
|
|
@ -46,6 +46,7 @@ struct Application {
|
|||
string monospaceFont;
|
||||
|
||||
string path(const string &filename);
|
||||
void commandLineLoad(string pathname);
|
||||
void run();
|
||||
void bootstrap();
|
||||
Application(int argc, char **argv);
|
||||
|
|
|
@ -28,7 +28,7 @@ void AbstractInput::bind() {
|
|||
}
|
||||
|
||||
bool AbstractInput::append(const string &encode) {
|
||||
if(mapping.position(encode)) return false; //mapping already bound
|
||||
if(mapping.position(encode)) return true; //mapping already bound
|
||||
if(mapping.empty() || mapping == "None") mapping = encode; //remove "None"
|
||||
else mapping.append(",", encode); //add to existing mapping list
|
||||
bind();
|
||||
|
|
|
@ -45,15 +45,7 @@ void CheatDatabase::findCodes() {
|
|||
for(auto &cheat : node) {
|
||||
if(cheat.name != "cheat") continue;
|
||||
cheatList.append(cheat["description"].data);
|
||||
|
||||
string codeList;
|
||||
for(auto &code : cheat) {
|
||||
if(code.name != "code") continue;
|
||||
codeList.append(code.data, "+");
|
||||
}
|
||||
codeList.rtrim<1>("+");
|
||||
|
||||
this->cheat.append({codeList, cheat["description"].data});
|
||||
this->cheat.append({cheat["code"].data, cheat["description"].data});
|
||||
}
|
||||
|
||||
setVisible();
|
||||
|
|
Loading…
Reference in New Issue