RomLoader - GPGX - support rom + cd .xml files
This commit is contained in:
parent
e547a0eb6f
commit
14c117e92e
|
@ -203,7 +203,7 @@ namespace BizHawk.Client.Common
|
||||||
{
|
{
|
||||||
var discs = new List<Disc>();
|
var discs = new List<Disc>();
|
||||||
var sw = new StringWriter();
|
var sw = new StringWriter();
|
||||||
foreach (var e in xmlGame.AssetFullPaths)
|
foreach (var e in xmlGame.AssetFullPaths.Where(a => IsDisc(Path.GetExtension(a))))
|
||||||
{
|
{
|
||||||
string discPath = e;
|
string discPath = e;
|
||||||
|
|
||||||
|
@ -468,7 +468,7 @@ namespace BizHawk.Client.Common
|
||||||
System = "PSX"
|
System = "PSX"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else if (ext == ".iso" || ext == ".cue" || ext == ".ccd" || ext == ".mds")
|
else if (IsDisc(ext))
|
||||||
{
|
{
|
||||||
if (file.IsArchive)
|
if (file.IsArchive)
|
||||||
{
|
{
|
||||||
|
@ -818,13 +818,15 @@ namespace BizHawk.Client.Common
|
||||||
(Tst.Settings)GetCoreSettings<Tst>(), (Tst.SyncSettings)GetCoreSyncSettings<Tst>());
|
(Tst.Settings)GetCoreSettings<Tst>(), (Tst.SyncSettings)GetCoreSyncSettings<Tst>());
|
||||||
break;
|
break;
|
||||||
case "GEN":
|
case "GEN":
|
||||||
// We are assuming discs only, for now
|
|
||||||
var genDiscs = DiscsFromXml(xmlGame, "GEN", DiscType.MegaCD);
|
var genDiscs = DiscsFromXml(xmlGame, "GEN", DiscType.MegaCD);
|
||||||
if (!genDiscs.Any())
|
var romBytes = xmlGame.Assets.Where(a => !IsDisc(a.Key))
|
||||||
|
.Select(a => a.Value)
|
||||||
|
.FirstOrDefault();
|
||||||
|
if (!genDiscs.Any() && romBytes == null)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
nextEmulator = new GPGX(nextComm, game, null, genDiscs, GetCoreSettings<GPGX>(), GetCoreSyncSettings<GPGX>());
|
nextEmulator = new GPGX(nextComm, game, romBytes, genDiscs, GetCoreSettings<GPGX>(), GetCoreSyncSettings<GPGX>());
|
||||||
break;
|
break;
|
||||||
case "Game Gear":
|
case "Game Gear":
|
||||||
var leftBytesGG = xmlGame.Assets.First().Value;
|
var leftBytesGG = xmlGame.Assets.First().Value;
|
||||||
|
@ -1165,5 +1167,11 @@ namespace BizHawk.Client.Common
|
||||||
Game = game;
|
Game = game;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static bool IsDisc(string extension) =>
|
||||||
|
extension == ".iso"
|
||||||
|
|| extension == ".cue"
|
||||||
|
|| extension == ".ccd"
|
||||||
|
|| extension == ".mds";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue