Skip to content

Commit 2193c0a

Browse files
authored
CPCHawk2024 (#4071)
* [CPCHawk] Start of new gate array and CRTC implementation * [CPCHawk] Some cleanup * [CPCHawk] More Cleanup * [CPCHawk] More CRTC work * [CPCHawk] More crtc work * [CPCHawk] more CRTC work * [CPCHawk] More CRTC work * [CPCHawk] more crtc * [CPCHawk] GateArray breaking changes WIP * [CPCHawk] GA, CRTC and Screen changes * [CPCHawk] CRTC and GateArray * [CPCHawk] More stuff * [CPCHawk] Progress * [CPCHawk] Starting CRTC type abstraction * [CPCHawk] Start CRTC status register implementation * [CPCHAWK] Update colour palatte * [CPCHawk] Trying to fix GA colour issues * [CPCHawk] Actually use the Z80 /WAIT line * [CPCHawk] Frame now running at req 19968 x6 INT * [CPCHawk] Implement PAL16L8 as a separate device * [CPCHawk] Border cropping SyncSetting * [CPCHawk] Stuff * [CPCHawk] More accurate CRT emulation * [CPCHawk] Reset vertical timing var only when VSYNC ends in the middle of a scaline * [CPCHawk] Allow IN port accesses to affect certain write-only devices * [CPCHawk] Fixed high-impedence returns * [CPCHawk] Readme update * [CPCHawk] Update readme with Z80 timing test failures * [CPCHawk] Update readme
1 parent 5cc4c1f commit 2193c0a

32 files changed

Lines changed: 4525 additions & 6064 deletions

src/BizHawk.Client.Common/movie/PlatformFrameRates.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ public static class PlatformFrameRates
7272
["INTV"] = 59.92,
7373

7474
["ZXSpectrum_PAL"] = 50.080128205,
75-
["AmstradCPC_PAL"] = 50.08012820512821,
75+
["AmstradCPC_PAL"] = 50.08012820512821, // = 1 / ((1024 * 312) / 16,000,000)
76+
7677
["UZE"] = 1125000.0 / 18733.0, // = 8 * 315000000 / 88 / 1820 / 262 ≈ 60.05444936742646666
7778
["VEC"] = 50,
7879
["O2"] = 89478485.0 / 1495643, // 59.8260982065907439141559850846

src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,10 @@
267267
<EmbeddedResource Update="LogWindow.resx" DependentUpon="LogWindow.cs" />
268268
<Compile Update="MainForm.cs" SubType="Form" />
269269
<Compile Update="MainForm.Designer.cs" DependentUpon="MainForm.cs" />
270-
<Compile Update="MainForm.Events.cs" DependentUpon="MainForm.cs" SubType="Form" />
270+
<Compile Update="MainForm.Events.cs" DependentUpon="MainForm.cs" />
271271
<Compile Update="MainForm.FileLoader.cs" DependentUpon="MainForm.cs" SubType="Form" />
272-
<Compile Update="MainForm.Hotkey.cs" DependentUpon="MainForm.cs" SubType="Form" />
273-
<Compile Update="MainForm.Movie.cs" DependentUpon="MainForm.cs" SubType="Form" />
272+
<Compile Update="MainForm.Hotkey.cs" DependentUpon="MainForm.cs" />
273+
<Compile Update="MainForm.Movie.cs" DependentUpon="MainForm.cs" />
274274
<EmbeddedResource Update="MainForm.resx" DependentUpon="MainForm.cs" SubType="Designer" />
275275
<Compile Update="movie/EditCommentsForm.cs" SubType="Form" />
276276
<Compile Update="movie/EditCommentsForm.Designer.cs" DependentUpon="EditCommentsForm.cs" />
@@ -330,9 +330,9 @@
330330
<EmbeddedResource Update="tools/Debugger/BreakpointControl.resx" DependentUpon="BreakpointControl.cs" />
331331
<Compile Update="tools/Debugger/GenericDebugger.cs" SubType="Form" />
332332
<Compile Update="tools/Debugger/GenericDebugger.Designer.cs" DependentUpon="GenericDebugger.cs" />
333-
<Compile Update="tools/Debugger/GenericDebugger.Disassembler.cs" DependentUpon="GenericDebugger.cs" SubType="Form" />
334-
<Compile Update="tools/Debugger/GenericDebugger.IControlMainform.cs" DependentUpon="GenericDebugger.cs" SubType="Form" />
335-
<Compile Update="tools/Debugger/GenericDebugger.IToolForm.cs" DependentUpon="GenericDebugger.cs" SubType="Form" />
333+
<Compile Update="tools/Debugger/GenericDebugger.Disassembler.cs" DependentUpon="GenericDebugger.cs" />
334+
<Compile Update="tools/Debugger/GenericDebugger.IControlMainform.cs" DependentUpon="GenericDebugger.cs" />
335+
<Compile Update="tools/Debugger/GenericDebugger.IToolForm.cs" DependentUpon="GenericDebugger.cs" />
336336
<EmbeddedResource Update="tools/Debugger/GenericDebugger.resx" DependentUpon="GenericDebugger.cs" />
337337
<Compile Update="tools/Debugger/RegisterBoxControl.cs" SubType="UserControl" />
338338
<Compile Update="tools/Debugger/RegisterBoxControl.Designer.cs" DependentUpon="RegisterBoxControl.cs" />

src/BizHawk.Client.EmuHawk/config/AmstradCPC/AmstradCPCCoreEmulationSettings.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,8 @@ private void UpdateBorderNotes(AmstradCPC.BorderType type)
9999
{
100100
lblBorderInfo.Text = type switch
101101
{
102-
AmstradCPC.BorderType.Uniform => "Attempts to equalize the border areas",
103-
AmstradCPC.BorderType.Uncropped => "Pretty much the signal the gate array is generating (looks pants)",
104-
AmstradCPC.BorderType.Widescreen => "Top and bottom border removed so that the result is *almost* 16:9",
102+
AmstradCPC.BorderType.Visible => "Approximates what you see on a CPC monitor",
103+
AmstradCPC.BorderType.Uncropped => "The full display area",
105104
_ => lblBorderInfo.Text
106105
};
107106
}

src/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.ISettable.cs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public class AmstradCPCSyncSettings
106106

107107
[DisplayName("Border type")]
108108
[Description("Select how to show the border area")]
109-
[DefaultValue(BorderType.Uniform)]
109+
[DefaultValue(BorderType.Visible)]
110110
public BorderType BorderType { get; set; }
111111

112112
public AmstradCPCSyncSettings Clone()
@@ -331,19 +331,14 @@ public static string GetMetaStringOld(MachineType type)
331331
public enum BorderType
332332
{
333333
/// <summary>
334-
/// Attempts to equalise the border areas
334+
/// Roughly what you might see on an Amstrad monitor
335335
/// </summary>
336-
Uniform,
336+
Visible,
337337

338338
/// <summary>
339-
/// Pretty much the signal the gate array is generating (looks shit)
339+
/// The full display area
340340
/// </summary>
341341
Uncropped,
342-
343-
/// <summary>
344-
/// Top and bottom border removed so that the result is *almost* 16:9
345-
/// </summary>
346-
Widescreen,
347342
}
348343
}
349344
}

src/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ public AmstradCPC(CoreLoadParameters<AmstradCPCSettings, AmstradCPCSyncSettings>
5757

5858
ser.Register<ITraceable>(_tracer);
5959
ser.Register<IDisassemblable>(_cpu);
60-
ser.Register<IVideoProvider>(_machine.GateArray);
60+
//ser.Register<IVideoProvider>(_machine.GateArray);
61+
ser.Register<IVideoProvider>(_machine.CRTScreen);
6162
ser.Register<IStatable>(new StateSerializer(SyncState));
6263

6364
// initialize sound mixer and attach the various ISoundProvider devices

src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/SoundOutput/AY38912.cs renamed to src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/AY38912.cs

File renamed without changes.

src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/SoundOutput/Beeper.cs renamed to src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Beeper.cs

File renamed without changes.

0 commit comments

Comments
 (0)