From 97dc7108c30ef827158b9153369be244ae39c041 Mon Sep 17 00:00:00 2001 From: feos Date: Sun, 30 Jun 2024 15:47:24 +0300 Subject: [PATCH] uae: "support" rds and reduce magic --- .../Computers/Amiga/PUAE.cs | 31 +++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/src/BizHawk.Emulation.Cores/Computers/Amiga/PUAE.cs b/src/BizHawk.Emulation.Cores/Computers/Amiga/PUAE.cs index cdded390c1..54c41cbc95 100644 --- a/src/BizHawk.Emulation.Cores/Computers/Amiga/PUAE.cs +++ b/src/BizHawk.Emulation.Cores/Computers/Amiga/PUAE.cs @@ -71,8 +71,35 @@ namespace BizHawk.Emulation.Cores.Computers.Amiga { if (lp.Roms[index].Extension.ToLowerInvariant() == ".hdf") { - _exe.AddReadonlyFile(lp.Roms[index].FileData, FileNames.HD + index); - AppendSetting($"hardfile2=ro,DH0:\"{FileNames.HD + index}\",32,1,2,512,0,,uae0"); + var access = "ro"; + var device_name = "DH0"; + var volume_name = FileNames.HD + index; + var blocks_per_track = 32; + var surfaces = 1; + var reserved = 2; + var block_size = 512; + var boot_priority = 0; + var filesys_path = ""; + var controller_unit = "uae0"; + + if (Encoding.ASCII.GetString(lp.Roms[index].RomData, 0, 3) == "RDS") + { + blocks_per_track = 0; + surfaces = 0; + reserved = 0; + } + _exe.AddReadonlyFile(lp.Roms[index].FileData, volume_name); + AppendSetting($"hardfile2=" + + $"{access}," + + $"{device_name}:" + + $"\"{volume_name}\"," + + $"{blocks_per_track}," + + $"{surfaces}," + + $"{reserved}," + + $"{block_size}," + + $"{boot_priority}," + + $"{filesys_path}," + + $"{controller_unit}"); } else {