uae: allow limiting drive count

This commit is contained in:
feos 2024-06-13 00:13:16 +03:00
parent c39da847c2
commit 1a62b7874c
2 changed files with 12 additions and 1 deletions

View File

@ -329,6 +329,13 @@ namespace BizHawk.Emulation.Cores.Computers.Amiga
[TypeConverter(typeof(ConstrainedIntConverter))]
public int StereoSeparation { get; set; }
[DisplayName("Floppy disk drives")]
[Description("How many floppy disk drives to emulate (0 - 4).")]
[Range(0, 4)]
[DefaultValue(1)]
[TypeConverter(typeof(ConstrainedIntConverter))]
public int FloppyDrives { get; set; }
public PUAESyncSettings()
=> SettingsUtil.SetDefaultValues(this);

View File

@ -58,7 +58,11 @@ namespace BizHawk.Emulation.Cores.Computers.Amiga
SkipMemoryConsistencyCheck = lp.Comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxMemoryConsistencyCheck),
});
for (var index = 0; index < MAX_FLOPPIES && index < lp.Roms.Count; index++)
for (var index = 0; index < Math.Min(Math.Min(
lp.Roms.Count,
MAX_FLOPPIES),
_syncSettings.FloppyDrives
); index++)
{
_exe.AddReadonlyFile(lp.Roms[index].FileData, "disk" + index);
filesToRemove.Add("disk" + index);