From d2e20f0d05aa0871981925b43bce9776bdb24016 Mon Sep 17 00:00:00 2001 From: Luke Usher Date: Fri, 27 Oct 2023 12:55:26 +0100 Subject: [PATCH] mia: use SMS mode when loading .sms roms on gamegear --- mia/medium/game-gear.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mia/medium/game-gear.cpp b/mia/medium/game-gear.cpp index a1463076f4..7f8ec4cb67 100644 --- a/mia/medium/game-gear.cpp +++ b/mia/medium/game-gear.cpp @@ -3,7 +3,7 @@ struct GameGear : Cartridge { auto extensions() -> vector override { return {"gg"}; } auto load(string location) -> bool override; auto save(string location) -> bool override; - auto analyze(vector& rom) -> string; + auto analyze(vector& rom, string location) -> string; }; auto GameGear::load(string location) -> bool { @@ -17,7 +17,7 @@ auto GameGear::load(string location) -> bool { } this->location = location; - this->manifest = analyze(rom); + this->manifest = analyze(rom, location); auto document = BML::unserialize(manifest); if(!document) return false; @@ -46,7 +46,7 @@ auto GameGear::save(string location) -> bool { return true; } -auto GameGear::analyze(vector& rom) -> string { +auto GameGear::analyze(vector& rom, string location) -> string { string hash = Hash::SHA256(rom).digest(); string board = "Sega"; string region = "NTSC-J, NTSC-U"; //database required to detect region @@ -55,6 +55,7 @@ auto GameGear::analyze(vector& rom) -> string { //Master System //============= + if(location.endsWith(".sms")) ms = 1; //Castle of Illusion Starring Mickey Mouse (USA, Europe) if(hash == "068fc6eaf728b3cd17c6fc5320c955deb0cd3b36343810470fe30c5a3661d0d3") {