uae: allow loading HDFs even tho they give black screen now

This commit is contained in:
feos 2024-06-17 02:35:01 +03:00
parent 4cfaf74837
commit acca29a66e
3 changed files with 21 additions and 6 deletions

View File

@ -875,7 +875,7 @@ namespace BizHawk.Client.Common
public static readonly IReadOnlyCollection<string> A78 = new[] { "a78" }; public static readonly IReadOnlyCollection<string> A78 = new[] { "a78" };
public static readonly IReadOnlyCollection<string> Amiga = new[] { "adf", "adz", "dms", "fdi", "ipf", "lha" }; public static readonly IReadOnlyCollection<string> Amiga = new[] { "adf", "adz", "dms", "fdi", "hdf", "ipf", "lha" };
public static readonly IReadOnlyCollection<string> AppleII = new[] { "dsk", "do", "po" }; public static readonly IReadOnlyCollection<string> AppleII = new[] { "dsk", "do", "po" };

View File

@ -406,6 +406,7 @@ namespace BizHawk.Emulation.Common
case ".DMS": case ".DMS":
case ".IPF": case ".IPF":
case ".FDI": case ".FDI":
case ".HDF":
case ".LHA": case ".LHA":
game.System = VSystemID.Raw.Amiga; game.System = VSystemID.Raw.Amiga;
break; break;

View File

@ -68,15 +68,24 @@ namespace BizHawk.Emulation.Cores.Computers.Amiga
}); });
for (var index = 0; index < lp.Roms.Count; index++) for (var index = 0; index < lp.Roms.Count; index++)
{
if (lp.Roms[index].Extension.ToLower() == ".hdf")
{
_exe.AddReadonlyFile(lp.Roms[index].FileData, FileNames.HD + index);
AppendSetting($"hardfile2=ro,DH0:\"{FileNames.HD + index}\",32,1,2,512,0,,uae0");
}
else
{ {
_exe.AddReadonlyFile(lp.Roms[index].FileData, FileNames.FD + index); _exe.AddReadonlyFile(lp.Roms[index].FileData, FileNames.FD + index);
if (index < Math.Min(LibPUAE.MAX_FLOPPIES, _syncSettings.FloppyDrives)) if (index < Math.Min(LibPUAE.MAX_FLOPPIES, _syncSettings.FloppyDrives))
{ {
AppendSetting($"floppy{index}={FileNames.FD}{index}"); AppendSetting($"floppy{index}={FileNames.FD}{index}");
AppendSetting($"floppy{index}type={(int)DriveType.DRV_35_DD}"); AppendSetting($"floppy{index}type={(int)DriveType.DRV_35_DD}");
} }
} }
}
//AppendSetting("filesystem2=ro,DH0:data:Floppy/,0");
var (kickstartData, kickstartInfo) = CoreComm.CoreFileProvider.GetFirmwareWithGameInfoOrThrow( var (kickstartData, kickstartInfo) = CoreComm.CoreFileProvider.GetFirmwareWithGameInfoOrThrow(
new(VSystemID.Raw.Amiga, _chipsetCompatible), new(VSystemID.Raw.Amiga, _chipsetCompatible),
@ -88,6 +97,11 @@ namespace BizHawk.Emulation.Cores.Computers.Amiga
"-r", kickstartInfo.Name "-r", kickstartInfo.Name
]); ]);
var s = string.Join(" ", _args);
Console.WriteLine();
Console.WriteLine(s);
Console.WriteLine();
if (!_puae.Init(_args.Count, _args.ToArray())) if (!_puae.Init(_args.Count, _args.ToArray()))
throw new InvalidOperationException("Core rejected the rom!"); throw new InvalidOperationException("Core rejected the rom!");