diff --git a/Assets/dll/puae.wbx.zst b/Assets/dll/puae.wbx.zst index cfaeea56f3a..1330a3e5e35 100644 Binary files a/Assets/dll/puae.wbx.zst and b/Assets/dll/puae.wbx.zst differ diff --git a/src/BizHawk.Emulation.Cores/Computers/Amiga/PUAE.ISettable.cs b/src/BizHawk.Emulation.Cores/Computers/Amiga/PUAE.ISettable.cs index e0ddcd356c0..8dbbec06b80 100644 --- a/src/BizHawk.Emulation.Cores/Computers/Amiga/PUAE.ISettable.cs +++ b/src/BizHawk.Emulation.Cores/Computers/Amiga/PUAE.ISettable.cs @@ -60,6 +60,12 @@ public enum Chipset Auto } + public enum VideoStandard + { + PAL, + NTSC + } + public enum ChipMemory { [Display(Name = "512KB")] @@ -224,6 +230,12 @@ private void CreateArguments(PUAESyncSettings settings) AppendSetting("fastmem_size=" + settings.FastMemory); } + if (settings.Region == VideoStandard.NTSC) + { + AppendSetting("ntsc=true"); + VsyncNumerator = 60; + } + AppendSetting("input.mouse_speed=" + settings.MouseSpeed); AppendSetting("sound_stereo_separation=" + settings.StereoSeparation / 10); } @@ -335,6 +347,11 @@ public class PUAESyncSettings [TypeConverter(typeof(ConstrainedIntConverter))] public int FloppyDrives { get; set; } + [DisplayName("Video standard")] + [Description("Determines resolution and framerate.")] + [DefaultValue(VideoStandard.PAL)] + public VideoStandard Region { get; set; } + public PUAESyncSettings() => SettingsUtil.SetDefaultValues(this); diff --git a/src/BizHawk.Emulation.Cores/Computers/Amiga/PUAE.cs b/src/BizHawk.Emulation.Cores/Computers/Amiga/PUAE.cs index b0589d4fdf3..3ee5f7bf12e 100644 --- a/src/BizHawk.Emulation.Cores/Computers/Amiga/PUAE.cs +++ b/src/BizHawk.Emulation.Cores/Computers/Amiga/PUAE.cs @@ -313,6 +313,11 @@ protected override LibWaterboxCore.FrameInfo FrameAdvancePrep(IController contro return fi; } + protected override void FrameAdvancePost() + { + VsyncNumerator = BufferHeight == LibPUAE.NTSC_HEIGHT ? 60 : 50; + } + protected override void SaveStateBinaryInternal(BinaryWriter writer) { writer.Write(_ejectPressed); diff --git a/waterbox/uae/bizhawk.c b/waterbox/uae/bizhawk.c index b160f94d592..c6e7d789969 100644 --- a/waterbox/uae/bizhawk.c +++ b/waterbox/uae/bizhawk.c @@ -25,8 +25,9 @@ ECL_EXPORT bool Init(int argc, char **argv) ECL_EXPORT void FrameAdvance(MyFrameInfo* f) { - f->base.Width = 720; - f->base.Height = 576; + bool is_ntsc = minfirstline == VBLANK_ENDLINE_NTSC; + f->base.Width = PUAE_VIDEO_WIDTH; + f->base.Height = is_ntsc ? PUAE_VIDEO_HEIGHT_NTSC : PUAE_VIDEO_HEIGHT_PAL; sound_buffer = f->base.SoundBuffer; thisframe_y_adjust = minfirstline; visible_left_border = retro_max_diwlastword - retrow;