Merge branch 'AmstradCPC' into master

This commit is contained in:
Asnivor 2018-09-19 14:56:41 +01:00 committed by GitHub
commit 2565f49c89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
103 changed files with 25134 additions and 62 deletions

View File

@ -99,6 +99,9 @@ namespace BizHawk.Client.ApiHawk
case "ZXSpectrum":
return CoreSystem.ZXSpectrum;
case "AmstradCPC":
return CoreSystem.AmstradCPC;
case "VB":
case "NGP":
case "DNGP":
@ -211,6 +214,9 @@ namespace BizHawk.Client.ApiHawk
case CoreSystem.ZXSpectrum:
return "ZXSpectrum";
case CoreSystem.AmstradCPC:
return "AmstradCPC";
default:
throw new IndexOutOfRangeException(string.Format("{0} is missing in convert list", value.ToString()));
}

View File

@ -30,6 +30,7 @@
Libretro,
VirtualBoy,
NeoGeoPocket,
ZXSpectrum
ZXSpectrum,
AmstradCPC
}
}

View File

@ -153,6 +153,8 @@ namespace BizHawk.Client.Common
return SystemInfo.NeoGeoPocket;
case "ZXSpectrum":
return SystemInfo.ZXSpectrum;
case "AmstradCPC":
return SystemInfo.AmstradCPC;
}
}
}

View File

@ -67,7 +67,7 @@ namespace BizHawk.Client.Common
RomData = FileData;
}
else if (file.Extension == ".DSK" || file.Extension == ".TAP" || file.Extension == ".TZX" ||
file.Extension == ".PZX" || file.Extension == ".CSW" || file.Extension == ".WAV")
file.Extension == ".PZX" || file.Extension == ".CSW" || file.Extension == ".WAV" || file.Extension == ".CDT")
{
// these are not roms. unforunately if treated as such there are certain edge-cases
// where a header offset is detected. This should mitigate this issue until a cleaner solution is found

View File

@ -25,6 +25,7 @@ using BizHawk.Emulation.DiscSystem;
using GPGX64 = BizHawk.Emulation.Cores.Consoles.Sega.gpgx;
using BizHawk.Emulation.Cores.Consoles.Sega.Saturn;
using BizHawk.Emulation.Cores.Consoles.NEC.PCFX;
using BizHawk.Emulation.Cores.Computers.AmstradCPC;
namespace BizHawk.Client.Common
{
@ -674,7 +675,22 @@ namespace BizHawk.Client.Common
(ZXSpectrum.ZXSpectrumSyncSettings)GetCoreSyncSettings<ZXSpectrum>(),
Deterministic);
break;
case "PSX":
case "AmstradCPC":
List<GameInfo> cpcGI = new List<GameInfo>();
foreach (var a in xmlGame.Assets)
{
cpcGI.Add(new GameInfo { Name = Path.GetFileNameWithoutExtension(a.Key) });
}
nextEmulator = new AmstradCPC(
nextComm,
xmlGame.Assets.Select(a => a.Value), //.First(),
cpcGI, // GameInfo.NullInstance,
(AmstradCPC.AmstradCPCSettings)GetCoreSettings<AmstradCPC>(),
(AmstradCPC.AmstradCPCSyncSettings)GetCoreSyncSettings<AmstradCPC>());
break;
case "PSX":
var entries = xmlGame.AssetFullPaths;
var discs = new List<Disc>();
var discNames = new List<string>();
@ -1023,7 +1039,11 @@ namespace BizHawk.Client.Common
Deterministic);
nextEmulator = zx;
break;
case "GBA":
case "AmstradCPC":
var cpc = new AmstradCPC(nextComm, Enumerable.Repeat(rom.RomData, 1), Enumerable.Repeat(rom.GameInfo, 1).ToList(), GetCoreSettings<AmstradCPC>(), GetCoreSyncSettings<AmstradCPC>());
nextEmulator = cpc;
break;
case "GBA":
if (Global.Config.GBA_UsemGBA)
{
core = CoreInventory.Instance["GBA", "mGBA"];

View File

@ -193,14 +193,19 @@ namespace BizHawk.Client.Common
/// </summary>
public static SystemInfo ZXSpectrum { get; } = new SystemInfo("ZX Spectrum", CoreSystem.ZXSpectrum, 2);
#endregion Get SystemInfo
/// <summary>
/// Gets the <see cref="SystemInfo"/> instance for AmstradCPC
/// </summary>
public static SystemInfo AmstradCPC { get; } = new SystemInfo("Amstrad CPC", CoreSystem.AmstradCPC, 2);
/// <summary>
/// Get a <see cref="SystemInfo"/> by its <see cref="CoreSystem"/>
/// </summary>
/// <param name="system"><see cref="CoreSystem"/> you're looking for</param>
/// <returns><see cref="SystemInfo"/></returns>
public static SystemInfo FindByCoreSystem(CoreSystem system)
#endregion Get SystemInfo
/// <summary>
/// Get a <see cref="SystemInfo"/> by its <see cref="CoreSystem"/>
/// </summary>
/// <param name="system"><see cref="CoreSystem"/> you're looking for</param>
/// <returns><see cref="SystemInfo"/></returns>
public static SystemInfo FindByCoreSystem(CoreSystem system)
{
return _allSystemInfos.Find(s => s.System == system);
}

View File

@ -301,6 +301,12 @@ namespace BizHawk.Client.Common
new PathEntry { System = "ZXSpectrum", SystemDisplayName = "Sinclair ZX Spectrum", Type = "Screenshots", Path = Path.Combine(".", "Screenshots"), Ordinal = 4 },
new PathEntry { System = "ZXSpectrum", SystemDisplayName = "Sinclair ZX Spectrum", Type = "Cheats", Path = Path.Combine(".", "Cheats"), Ordinal = 5 },
new PathEntry { System = "AmstradCPC", SystemDisplayName = "Amstrad CPC", Type = "Base", Path = Path.Combine(".", "AmstradCPC"), Ordinal = 0 },
new PathEntry { System = "AmstradCPC", SystemDisplayName = "Amstrad CPC", Type = "ROM", Path = ".", Ordinal = 1 },
new PathEntry { System = "AmstradCPC", SystemDisplayName = "Amstrad CPC", Type = "Savestates", Path = Path.Combine(".", "State"), Ordinal = 2 },
new PathEntry { System = "AmstradCPC", SystemDisplayName = "Amstrad CPC", Type = "Screenshots", Path = Path.Combine(".", "Screenshots"), Ordinal = 4 },
new PathEntry { System = "AmstradCPC", SystemDisplayName = "Amstrad CPC", Type = "Cheats", Path = Path.Combine(".", "Cheats"), Ordinal = 5 },
new PathEntry { System = "PSX", SystemDisplayName = "Playstation", Type = "Base", Path = Path.Combine(".", "PSX"), Ordinal = 0 },
new PathEntry { System = "PSX", SystemDisplayName = "Playstation", Type = "ROM", Path = ".", Ordinal = 1 },
new PathEntry { System = "PSX", SystemDisplayName = "Playstation", Type = "Savestates", Path = Path.Combine(".", "State"), Ordinal = 2 },

View File

@ -61,17 +61,18 @@ namespace BizHawk.Client.Common
["C64_DREAN"] = PALNCarrier * 2 / 7 / 312 / 65,
["INTV"] = 59.92,
["ZXSpectrum_PAL"] = 50.080128205
["ZXSpectrum_PAL"] = 50.080128205,
["AmstradCPC_PAL"] = 50.08012820512821,
// according to ryphecha, using
// clocks[2] = { 53.693182e06, 53.203425e06 }; //ntsc console, pal console
// lpf[2][2] = { { 263, 262.5 }, { 314, 312.5 } }; //ntsc,pal; noninterlaced, interlaced
// cpl[2] = { 3412.5, 3405 }; //ntsc mode, pal mode
// PAL PS1: 0, PAL Mode: 0, Interlaced: 0 --- 59.826106 (53.693182e06/(263*3412.5))
// PAL PS1: 0, PAL Mode: 0, Interlaced: 1 --- 59.940060 (53.693182e06/(262.5*3412.5))
// PAL PS1: 1, PAL Mode: 1, Interlaced: 0 --- 49.761427 (53.203425e06/(314*3405))
// PAL PS1: 1, PAL Mode: 1, Interlaced: 1 --- 50.000282(53.203425e06/(312.5*3405))
};
// according to ryphecha, using
// clocks[2] = { 53.693182e06, 53.203425e06 }; //ntsc console, pal console
// lpf[2][2] = { { 263, 262.5 }, { 314, 312.5 } }; //ntsc,pal; noninterlaced, interlaced
// cpl[2] = { 3412.5, 3405 }; //ntsc mode, pal mode
// PAL PS1: 0, PAL Mode: 0, Interlaced: 0 --- 59.826106 (53.693182e06/(263*3412.5))
// PAL PS1: 0, PAL Mode: 0, Interlaced: 1 --- 59.940060 (53.693182e06/(262.5*3412.5))
// PAL PS1: 1, PAL Mode: 1, Interlaced: 0 --- 49.761427 (53.203425e06/(314*3405))
// PAL PS1: 1, PAL Mode: 1, Interlaced: 1 --- 50.000282(53.203425e06/(312.5*3405))
};
public double this[string systemId, bool pal]
{

View File

@ -199,6 +199,30 @@
<DependentUpon>BizBoxInfoControl.cs</DependentUpon>
</Compile>
<Compile Include="Communication.cs" />
<Compile Include="config\AmstradCPC\AmstradCPCCoreEmulationSettings.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="config\AmstradCPC\AmstradCPCCoreEmulationSettings.Designer.cs">
<DependentUpon>AmstradCPCCoreEmulationSettings.cs</DependentUpon>
</Compile>
<Compile Include="config\AmstradCPC\AmstradCPCAudioSettings.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="config\AmstradCPC\AmstradCPCAudioSettings.Designer.cs">
<DependentUpon>AmstradCPCAudioSettings.cs</DependentUpon>
</Compile>
<Compile Include="config\AmstradCPC\AmstradCPCPokeMemory.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="config\AmstradCPC\AmstradCPCPokeMemory.Designer.cs">
<DependentUpon>AmstradCPCPokeMemory.cs</DependentUpon>
</Compile>
<Compile Include="config\AmstradCPC\AmstradCPCNonSyncSettings.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="config\AmstradCPC\AmstradCPCNonSyncSettings.Designer.cs">
<DependentUpon>AmstradCPCNonSyncSettings.cs</DependentUpon>
</Compile>
<Compile Include="config\AnalogRangeConfig.cs">
<SubType>Component</SubType>
</Compile>
@ -1298,6 +1322,18 @@
<EmbeddedResource Include="BizBoxInfoControl.resx">
<DependentUpon>BizBoxInfoControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="config\AmstradCPC\AmstradCPCCoreEmulationSettings.resx">
<DependentUpon>AmstradCPCCoreEmulationSettings.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="config\AmstradCPC\AmstradCPCAudioSettings.resx">
<DependentUpon>AmstradCPCAudioSettings.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="config\AmstradCPC\AmstradCPCPokeMemory.resx">
<DependentUpon>AmstradCPCPokeMemory.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="config\AmstradCPC\AmstradCPCNonSyncSettings.resx">
<DependentUpon>AmstradCPCNonSyncSettings.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="config\AnalogRangeConfigControl.resx">
<DependentUpon>AnalogRangeConfigControl.cs</DependentUpon>
</EmbeddedResource>

View File

@ -51,7 +51,7 @@ namespace BizHawk.Client.EmuHawk
return new[]
{
".NES", ".FDS", ".UNF", ".SMS", ".GG", ".SG", ".GB", ".GBC", ".GBA", ".PCE", ".SGX", ".BIN", ".SMD", ".GEN", ".MD", ".SMC", ".SFC", ".A26", ".A78", ".LNX", ".COL", ".ROM", ".M3U", ".CUE", ".CCD", ".SGB", ".Z64", ".V64", ".N64", ".WS", ".WSC", ".XML", ".DSK", ".DO", ".PO", ".PSF", ".MINIPSF", ".NSF",
".EXE", ".PRG", ".D64", "*G64", ".CRT", ".TAP", ".32X", ".MDS", ".TZX", ".PZX", ".CSW", ".WAV"
".EXE", ".PRG", ".D64", "*G64", ".CRT", ".TAP", ".32X", ".MDS", ".TZX", ".PZX", ".CSW", ".WAV", ".CDT"
};
}

View File

@ -393,6 +393,15 @@
this.ZXSpectrumDisksSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.zxt2ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ZXSpectrumExportSnapshotMenuItemMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.amstradCPCToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.amstradCPCCoreEmulationSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.AmstradCPCAudioSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.AmstradCPCPokeMemoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.AmstradCPCMediaToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.AmstradCPCTapesSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.cpct1ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.AmstradCPCDisksSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.cpcd1ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.Atari7800HawkCoreMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.MainStatusBar = new StatusStripEx();
this.DumpStatusButton = new System.Windows.Forms.ToolStripDropDownButton();
@ -465,6 +474,7 @@
this.ShowMenuContextMenuSeparator = new System.Windows.Forms.ToolStripSeparator();
this.ShowMenuContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.timerMouseIdle = new System.Windows.Forms.Timer(this.components);
this.AmstradCPCNonSyncSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.MainformMenu.SuspendLayout();
this.MainStatusBar.SuspendLayout();
this.MainFormContextMenu.SuspendLayout();
@ -503,7 +513,8 @@
this.virtualBoyToolStripMenuItem,
this.neoGeoPocketToolStripMenuItem,
this.zXSpectrumToolStripMenuItem,
this.HelpSubMenu});
this.HelpSubMenu,
this.amstradCPCToolStripMenuItem});
this.MainformMenu.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Flow;
this.MainformMenu.Location = new System.Drawing.Point(0, 0);
this.MainformMenu.Name = "MainformMenu";
@ -3498,6 +3509,79 @@
this.ZXSpectrumExportSnapshotMenuItemMenuItem.Size = new System.Drawing.Size(159, 22);
this.ZXSpectrumExportSnapshotMenuItemMenuItem.Text = "Export Snapshot";
this.ZXSpectrumExportSnapshotMenuItemMenuItem.Click += new System.EventHandler(this.ZXSpectrumExportSnapshotMenuItemMenuItem_Click);
//
// amstradCPCToolStripMenuItem
//
this.amstradCPCToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.amstradCPCCoreEmulationSettingsToolStripMenuItem,
this.AmstradCPCAudioSettingsToolStripMenuItem,
this.AmstradCPCNonSyncSettingsToolStripMenuItem,
this.AmstradCPCPokeMemoryToolStripMenuItem,
this.AmstradCPCMediaToolStripMenuItem});
this.amstradCPCToolStripMenuItem.Name = "amstradCPCToolStripMenuItem";
this.amstradCPCToolStripMenuItem.Size = new System.Drawing.Size(90, 19);
this.amstradCPCToolStripMenuItem.Text = "Amstrad CPC";
//
// amstradCPCCoreEmulationSettingsToolStripMenuItem
//
this.amstradCPCCoreEmulationSettingsToolStripMenuItem.Name = "amstradCPCCoreEmulationSettingsToolStripMenuItem";
this.amstradCPCCoreEmulationSettingsToolStripMenuItem.Size = new System.Drawing.Size(201, 22);
this.amstradCPCCoreEmulationSettingsToolStripMenuItem.Text = "Core Emulation Settings";
this.amstradCPCCoreEmulationSettingsToolStripMenuItem.Click += new System.EventHandler(this.amstradCPCCoreEmulationSettingsToolStripMenuItem_Click);
//
// AmstradCPCAudioSettingsToolStripMenuItem
//
this.AmstradCPCAudioSettingsToolStripMenuItem.Name = "AmstradCPCAudioSettingsToolStripMenuItem";
this.AmstradCPCAudioSettingsToolStripMenuItem.Size = new System.Drawing.Size(201, 22);
this.AmstradCPCAudioSettingsToolStripMenuItem.Text = "Audio Settings";
this.AmstradCPCAudioSettingsToolStripMenuItem.Click += new System.EventHandler(this.AmstradCPCAudioSettingsToolStripMenuItem_Click);
//
// AmstradCPCPokeMemoryToolStripMenuItem
//
this.AmstradCPCPokeMemoryToolStripMenuItem.Name = "AmstradCPCPokeMemoryToolStripMenuItem";
this.AmstradCPCPokeMemoryToolStripMenuItem.Size = new System.Drawing.Size(201, 22);
this.AmstradCPCPokeMemoryToolStripMenuItem.Text = "POKE Memory";
this.AmstradCPCPokeMemoryToolStripMenuItem.Click += new System.EventHandler(this.AmstradCPCPokeMemoryToolStripMenuItem_Click);
//
// AmstradCPCMediaToolStripMenuItem
//
this.AmstradCPCMediaToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.AmstradCPCTapesSubMenu,
this.AmstradCPCDisksSubMenu});
this.AmstradCPCMediaToolStripMenuItem.Name = "AmstradCPCMediaToolStripMenuItem";
this.AmstradCPCMediaToolStripMenuItem.Size = new System.Drawing.Size(201, 22);
this.AmstradCPCMediaToolStripMenuItem.Text = "Media";
this.AmstradCPCMediaToolStripMenuItem.DropDownOpened += new System.EventHandler(this.AmstradCPCMediaToolStripMenuItem_DropDownOpened);
//
// AmstradCPCTapesSubMenu
//
this.AmstradCPCTapesSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.cpct1ToolStripMenuItem});
this.AmstradCPCTapesSubMenu.Name = "AmstradCPCTapesSubMenu";
this.AmstradCPCTapesSubMenu.Size = new System.Drawing.Size(105, 22);
this.AmstradCPCTapesSubMenu.Text = "Tapes";
this.AmstradCPCTapesSubMenu.DropDownOpened += new System.EventHandler(this.AmstradCPCTapesSubMenu_DropDownOpened);
//
// cpct1ToolStripMenuItem
//
this.cpct1ToolStripMenuItem.Name = "cpct1ToolStripMenuItem";
this.cpct1ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
this.cpct1ToolStripMenuItem.Text = "cpct1";
//
// AmstradCPCDisksSubMenu
//
this.AmstradCPCDisksSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.cpcd1ToolStripMenuItem});
this.AmstradCPCDisksSubMenu.Name = "AmstradCPCDisksSubMenu";
this.AmstradCPCDisksSubMenu.Size = new System.Drawing.Size(105, 22);
this.AmstradCPCDisksSubMenu.Text = "Disks";
this.AmstradCPCDisksSubMenu.DropDownOpened += new System.EventHandler(this.AmstradCPCDisksSubMenu_DropDownOpened);
//
// cpcd1ToolStripMenuItem
//
this.cpcd1ToolStripMenuItem.Name = "cpcd1ToolStripMenuItem";
this.cpcd1ToolStripMenuItem.Size = new System.Drawing.Size(106, 22);
this.cpcd1ToolStripMenuItem.Text = "cpcd1";
//
// Atari7800HawkCoreMenuItem
//
@ -4125,6 +4209,13 @@
this.timerMouseIdle.Interval = 2000;
this.timerMouseIdle.Tick += new System.EventHandler(this.TimerMouseIdle_Tick);
//
// AmstradCPCNonSyncSettingsToolStripMenuItem
//
this.AmstradCPCNonSyncSettingsToolStripMenuItem.Name = "AmstradCPCNonSyncSettingsToolStripMenuItem";
this.AmstradCPCNonSyncSettingsToolStripMenuItem.Size = new System.Drawing.Size(201, 22);
this.AmstradCPCNonSyncSettingsToolStripMenuItem.Text = "Non-Sync Settings";
this.AmstradCPCNonSyncSettingsToolStripMenuItem.Click += new System.EventHandler(this.AmstradCPCNonSyncSettingsToolStripMenuItem_Click);
//
// MainForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@ -4589,17 +4680,27 @@
private System.Windows.Forms.ToolStripMenuItem SMSControllerLightPhaserToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem SMSControllerSportsPadToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem SMSControllerKeyboardToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem zXSpectrumToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem ZXSpectrumControllerConfigurationMenuItem;
private System.Windows.Forms.ToolStripMenuItem ZXSpectrumCoreEmulationSettingsMenuItem;
private System.Windows.Forms.ToolStripMenuItem ZXSpectrumNonSyncSettingsMenuItem;
private System.Windows.Forms.ToolStripMenuItem ZXSpectrumAudioSettingsMenuItem;
private System.Windows.Forms.ToolStripMenuItem ZXSpectrumPokeMemoryMenuItem;
private System.Windows.Forms.ToolStripMenuItem ZXSpectrumMediaMenuItem;
private System.Windows.Forms.ToolStripMenuItem ZXSpectrumTapesSubMenu;
private System.Windows.Forms.ToolStripMenuItem ZXSpectrumDisksSubMenu;
private System.Windows.Forms.ToolStripMenuItem zxt1ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem zxt2ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem ZXSpectrumExportSnapshotMenuItemMenuItem;
private System.Windows.Forms.ToolStripMenuItem zXSpectrumToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem ZXSpectrumControllerConfigurationMenuItem;
private System.Windows.Forms.ToolStripMenuItem ZXSpectrumCoreEmulationSettingsMenuItem;
private System.Windows.Forms.ToolStripMenuItem ZXSpectrumNonSyncSettingsMenuItem;
private System.Windows.Forms.ToolStripMenuItem ZXSpectrumAudioSettingsMenuItem;
private System.Windows.Forms.ToolStripMenuItem ZXSpectrumPokeMemoryMenuItem;
private System.Windows.Forms.ToolStripMenuItem ZXSpectrumMediaMenuItem;
private System.Windows.Forms.ToolStripMenuItem ZXSpectrumTapesSubMenu;
private System.Windows.Forms.ToolStripMenuItem ZXSpectrumDisksSubMenu;
private System.Windows.Forms.ToolStripMenuItem zxt1ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem zxt2ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem ZXSpectrumExportSnapshotMenuItemMenuItem;
private System.Windows.Forms.ToolStripMenuItem amstradCPCToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem amstradCPCCoreEmulationSettingsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem AmstradCPCAudioSettingsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem AmstradCPCPokeMemoryToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem AmstradCPCMediaToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem AmstradCPCTapesSubMenu;
private System.Windows.Forms.ToolStripMenuItem cpct1ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem AmstradCPCDisksSubMenu;
private System.Windows.Forms.ToolStripMenuItem cpcd1ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem AmstradCPCNonSyncSettingsToolStripMenuItem;
}
}

View File

@ -2,6 +2,7 @@ using System;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using System.Collections.Generic;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Common.IEmulatorExtensions;
@ -26,7 +27,7 @@ using BizHawk.Client.ApiHawk;
using BizHawk.Emulation.Cores.Computers.Commodore64;
using BizHawk.Emulation.Cores.Nintendo.Gameboy;
using BizHawk.Emulation.Cores.Computers.SinclairSpectrum;
using System.Collections.Generic;
using BizHawk.Emulation.Cores.Computers.AmstradCPC;
namespace BizHawk.Client.EmuHawk
{
@ -2601,6 +2602,101 @@ namespace BizHawk.Client.EmuHawk
#endregion
#region AmstradCPC
private void amstradCPCCoreEmulationSettingsToolStripMenuItem_Click(object sender, EventArgs e)
{
new AmstradCPCCoreEmulationSettings().ShowDialog();
}
private void AmstradCPCAudioSettingsToolStripMenuItem_Click(object sender, EventArgs e)
{
new AmstradCPCAudioSettings().ShowDialog();
}
private void AmstradCPCPokeMemoryToolStripMenuItem_Click(object sender, EventArgs e)
{
new AmstradCPCPokeMemory().ShowDialog();
}
private void AmstradCPCMediaToolStripMenuItem_DropDownOpened(object sender, EventArgs e)
{
if (Emulator is AmstradCPC)
{
AmstradCPCTapesSubMenu.Enabled = ((AmstradCPC)Emulator)._tapeInfo.Count > 0;
AmstradCPCDisksSubMenu.Enabled = ((AmstradCPC)Emulator)._diskInfo.Count > 0;
}
}
private void AmstradCPCTapesSubMenu_DropDownOpened(object sender, EventArgs e)
{
AmstradCPCTapesSubMenu.DropDownItems.Clear();
if (Emulator is AmstradCPC)
{
var ams = (AmstradCPC)Emulator;
var currSel = ams._machine.TapeMediaIndex;
for (int i = 0; i < ams._tapeInfo.Count; i++)
{
string name = ams._tapeInfo[i].Name;
var menuItem = new ToolStripMenuItem
{
Name = i + "_" + name,
Text = i + ": " + name,
Checked = currSel == i
};
int dummy = i;
menuItem.Click += (o, ev) =>
{
ams._machine.TapeMediaIndex = dummy;
};
AmstradCPCTapesSubMenu.DropDownItems.Add(menuItem);
}
}
}
private void AmstradCPCDisksSubMenu_DropDownOpened(object sender, EventArgs e)
{
AmstradCPCDisksSubMenu.DropDownItems.Clear();
if (Emulator is AmstradCPC)
{
var ams = (AmstradCPC)Emulator;
var currSel = ams._machine.DiskMediaIndex;
for (int i = 0; i < ams._diskInfo.Count; i++)
{
string name = ams._diskInfo[i].Name;
var menuItem = new ToolStripMenuItem
{
Name = i + "_" + name,
Text = i + ": " + name,
Checked = currSel == i
};
int dummy = i;
menuItem.Click += (o, ev) =>
{
ams._machine.DiskMediaIndex = dummy;
};
AmstradCPCDisksSubMenu.DropDownItems.Add(menuItem);
}
}
}
private void AmstradCPCNonSyncSettingsToolStripMenuItem_Click(object sender, EventArgs e)
{
new AmstradCPCNonSyncSettings().ShowDialog();
}
#endregion
#region Help
private void HelpSubMenu_DropDownOpened(object sender, EventArgs e)

View File

@ -1735,6 +1735,7 @@ namespace BizHawk.Client.EmuHawk
neoGeoPocketToolStripMenuItem.Visible = false;
pCFXToolStripMenuItem.Visible = false;
zXSpectrumToolStripMenuItem.Visible = false;
amstradCPCToolStripMenuItem.Visible = false;
switch (system)
{
@ -1839,6 +1840,9 @@ namespace BizHawk.Client.EmuHawk
#else
ZXSpectrumExportSnapshotMenuItemMenuItem.Visible = false;
#endif
break;
case "AmstradCPC":
amstradCPCToolStripMenuItem.Visible = true;
break;
}
}
@ -2101,7 +2105,7 @@ namespace BizHawk.Client.EmuHawk
if (VersionInfo.DeveloperBuild)
{
return FormatFilter(
"Rom Files", "*.nes;*.fds;*.unf;*.sms;*.gg;*.sg;*.pce;*.sgx;*.bin;*.smd;*.rom;*.a26;*.a78;*.lnx;*.m3u;*.cue;*.ccd;*.mds;*.exe;*.gb;*.gbc;*.gba;*.gen;*.md;*.32x;*.col;*.int;*.smc;*.sfc;*.prg;*.d64;*.g64;*.crt;*.tap;*.sgb;*.xml;*.z64;*.v64;*.n64;*.ws;*.wsc;*.dsk;*.do;*.po;*.vb;*.ngp;*.ngc;*.psf;*.minipsf;*.nsf;*.tzx;*.pzx;*.csw;*.wav;%ARCH%",
"Rom Files", "*.nes;*.fds;*.unf;*.sms;*.gg;*.sg;*.pce;*.sgx;*.bin;*.smd;*.rom;*.a26;*.a78;*.lnx;*.m3u;*.cue;*.ccd;*.mds;*.exe;*.gb;*.gbc;*.gba;*.gen;*.md;*.32x;*.col;*.int;*.smc;*.sfc;*.prg;*.d64;*.g64;*.crt;*.tap;*.sgb;*.xml;*.z64;*.v64;*.n64;*.ws;*.wsc;*.dsk;*.do;*.po;*.vb;*.ngp;*.ngc;*.psf;*.minipsf;*.nsf;*.tzx;*.pzx;*.csw;*.wav;*.cdt;%ARCH%",
"Music Files", "*.psf;*.minipsf;*.sid;*.nsf",
"Disc Images", "*.cue;*.ccd;*.mds;*.m3u",
"NES", "*.nes;*.fds;*.unf;*.nsf;%ARCH%",
@ -2130,6 +2134,7 @@ namespace BizHawk.Client.EmuHawk
"Virtual Boy", "*.vb;%ARCH%",
"Neo Geo Pocket", "*.ngp;*.ngc;%ARCH%",
"Sinclair ZX Spectrum", "*.tzx;*.tap;*.dsk;*.pzx;*.csw;*.wav;%ARCH%",
"Amstrad CPC", "*.cdt;*.dsk;%ARCH%",
"All Files", "*.*");
}
@ -2781,9 +2786,14 @@ namespace BizHawk.Client.EmuHawk
{
var core = (Emulation.Cores.Computers.SinclairSpectrum.ZXSpectrum)Emulator as Emulation.Cores.Computers.SinclairSpectrum.ZXSpectrum;
CoreNameStatusBarButton.ToolTipText = core.GetMachineType();
}
}
}
if (Emulator.SystemId == "AmstradCPC")
{
var core = (Emulation.Cores.Computers.AmstradCPC.AmstradCPC)Emulator as Emulation.Cores.Computers.AmstradCPC.AmstradCPC;
CoreNameStatusBarButton.ToolTipText = core.GetMachineType();
}
}
private void ToggleKeyPriority()
{

View File

@ -0,0 +1,185 @@
namespace BizHawk.Client.EmuHawk
{
partial class AmstradCPCAudioSettings
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AmstradCPCAudioSettings));
this.OkBtn = new System.Windows.Forms.Button();
this.CancelBtn = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.panTypecomboBox1 = new System.Windows.Forms.ComboBox();
this.lblBorderInfo = new System.Windows.Forms.Label();
this.tapeVolumetrackBar = new System.Windows.Forms.TrackBar();
this.label3 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.ayVolumetrackBar = new System.Windows.Forms.TrackBar();
((System.ComponentModel.ISupportInitialize)(this.tapeVolumetrackBar)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ayVolumetrackBar)).BeginInit();
this.SuspendLayout();
//
// OkBtn
//
this.OkBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.OkBtn.Location = new System.Drawing.Point(247, 245);
this.OkBtn.Name = "OkBtn";
this.OkBtn.Size = new System.Drawing.Size(60, 23);
this.OkBtn.TabIndex = 3;
this.OkBtn.Text = "&OK";
this.OkBtn.UseVisualStyleBackColor = true;
this.OkBtn.Click += new System.EventHandler(this.OkBtn_Click);
//
// CancelBtn
//
this.CancelBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.CancelBtn.Location = new System.Drawing.Point(313, 245);
this.CancelBtn.Name = "CancelBtn";
this.CancelBtn.Size = new System.Drawing.Size(60, 23);
this.CancelBtn.TabIndex = 4;
this.CancelBtn.Text = "&Cancel";
this.CancelBtn.UseVisualStyleBackColor = true;
this.CancelBtn.Click += new System.EventHandler(this.CancelBtn_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 14);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(140, 13);
this.label1.TabIndex = 17;
this.label1.Text = "Amstrad CPC Audio Settings";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 172);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(135, 13);
this.label2.TabIndex = 23;
this.label2.Text = "AY-3-8912 Panning Config:";
//
// panTypecomboBox1
//
this.panTypecomboBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panTypecomboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.panTypecomboBox1.FormattingEnabled = true;
this.panTypecomboBox1.Location = new System.Drawing.Point(12, 188);
this.panTypecomboBox1.Name = "panTypecomboBox1";
this.panTypecomboBox1.Size = new System.Drawing.Size(157, 21);
this.panTypecomboBox1.TabIndex = 22;
//
// lblBorderInfo
//
this.lblBorderInfo.Font = new System.Drawing.Font("Lucida Console", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblBorderInfo.Location = new System.Drawing.Point(175, 181);
this.lblBorderInfo.Name = "lblBorderInfo";
this.lblBorderInfo.Size = new System.Drawing.Size(196, 37);
this.lblBorderInfo.TabIndex = 24;
this.lblBorderInfo.Text = "Selects a particular panning configuration for the 3ch AY-3-8912 Programmable Sou" +
"nd Generator";
this.lblBorderInfo.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// tapeVolumetrackBar
//
this.tapeVolumetrackBar.Location = new System.Drawing.Point(12, 60);
this.tapeVolumetrackBar.Maximum = 100;
this.tapeVolumetrackBar.Name = "tapeVolumetrackBar";
this.tapeVolumetrackBar.Size = new System.Drawing.Size(359, 45);
this.tapeVolumetrackBar.TabIndex = 25;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(12, 44);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(73, 13);
this.label3.TabIndex = 26;
this.label3.Text = "Tape Volume:";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(12, 108);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(98, 13);
this.label5.TabIndex = 30;
this.label5.Text = "AY-3-8912 Volume:";
//
// ayVolumetrackBar
//
this.ayVolumetrackBar.Location = new System.Drawing.Point(12, 124);
this.ayVolumetrackBar.Maximum = 100;
this.ayVolumetrackBar.Name = "ayVolumetrackBar";
this.ayVolumetrackBar.Size = new System.Drawing.Size(359, 45);
this.ayVolumetrackBar.TabIndex = 29;
//
// AmstradCPCAudioSettings
//
this.AcceptButton = this.OkBtn;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.CancelBtn;
this.ClientSize = new System.Drawing.Size(385, 280);
this.Controls.Add(this.label5);
this.Controls.Add(this.ayVolumetrackBar);
this.Controls.Add(this.label3);
this.Controls.Add(this.tapeVolumetrackBar);
this.Controls.Add(this.lblBorderInfo);
this.Controls.Add(this.label2);
this.Controls.Add(this.panTypecomboBox1);
this.Controls.Add(this.label1);
this.Controls.Add(this.CancelBtn);
this.Controls.Add(this.OkBtn);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "AmstradCPCAudioSettings";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Audio Settings";
this.Load += new System.EventHandler(this.IntvControllerSettings_Load);
((System.ComponentModel.ISupportInitialize)(this.tapeVolumetrackBar)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.ayVolumetrackBar)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button OkBtn;
private System.Windows.Forms.Button CancelBtn;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox panTypecomboBox1;
private System.Windows.Forms.Label lblBorderInfo;
private System.Windows.Forms.TrackBar tapeVolumetrackBar;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TrackBar ayVolumetrackBar;
}
}

View File

@ -0,0 +1,74 @@
using System;
using System.Linq;
using System.Windows.Forms;
using BizHawk.Client.Common;
using BizHawk.Emulation.Cores.Computers.AmstradCPC;
using System.Text;
namespace BizHawk.Client.EmuHawk
{
public partial class AmstradCPCAudioSettings : Form
{
private AmstradCPC.AmstradCPCSettings _settings;
public AmstradCPCAudioSettings()
{
InitializeComponent();
}
private void IntvControllerSettings_Load(object sender, EventArgs e)
{
_settings = ((AmstradCPC)Global.Emulator).GetSettings().Clone();
// AY panning config
var panTypes = Enum.GetNames(typeof(AY38912.AYPanConfig));
foreach (var val in panTypes)
{
panTypecomboBox1.Items.Add(val);
}
panTypecomboBox1.SelectedItem = _settings.AYPanConfig.ToString();
// tape volume
tapeVolumetrackBar.Value = _settings.TapeVolume;
// ay volume
ayVolumetrackBar.Value = _settings.AYVolume;
}
private void OkBtn_Click(object sender, EventArgs e)
{
bool changed =
_settings.AYPanConfig.ToString() != panTypecomboBox1.SelectedItem.ToString()
|| _settings.TapeVolume != tapeVolumetrackBar.Value
|| _settings.AYVolume != ayVolumetrackBar.Value;
if (changed)
{
_settings.AYPanConfig = (AY38912.AYPanConfig)Enum.Parse(typeof(AY38912.AYPanConfig), panTypecomboBox1.SelectedItem.ToString());
_settings.TapeVolume = tapeVolumetrackBar.Value;
_settings.AYVolume = ayVolumetrackBar.Value;
GlobalWin.MainForm.PutCoreSettings(_settings);
DialogResult = DialogResult.OK;
Close();
}
else
{
DialogResult = DialogResult.OK;
Close();
}
}
private void CancelBtn_Click(object sender, EventArgs e)
{
GlobalWin.OSD.AddMessage("Misc settings aborted");
DialogResult = DialogResult.Cancel;
Close();
}
}
}

View File

@ -0,0 +1,624 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAwAMDAQAAAABABoBgAAxgAAACAgEAAAAAQA6AIAAC4HAAAYGBAAAAAEAOgBAAAWCgAAEBAQAAAA
BAAoAQAA/gsAADAwAAAAAAgAqA4AACYNAAAgIAAAAAAIAKgIAADOGwAAGBgAAAAACADIBgAAdiQAABAQ
AAAAAAgAaAUAAD4rAAAwMAAAAAAgAKglAACmMAAAICAAAAAAIACoEAAATlYAABgYAAAAACAAiAkAAPZm
AAAQEAAAAAAgAGgEAAB+cAAAK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4iIiIiIhwAAAAd4eIiI+IiIh3d3eHh3iIiIiIeHwAAAAAfIjHeIiIiIyIeHh4iIiIiIiIiI
cAAAAAeIQ0R3h3iIiMiIiIiIiIiIiIiEAAAAAAfIR3d3d0iIiIh4iIeIiIiIiHhAAAAAAAB4d3d3SHiI
h4fTiIi3iIiIeIwAAAAAAAB3h4d3eIeIiHiJiIuIiIh4jHAAAAAAAAAHyId3h3h4iIh4iIiIiIiHeAAA
AAAAAAAAB8iMiMjIiIiIh4h3aMjHAAAAAAAAAAAAAAdYyIeIiIiMjId6d4eAAAAAAAAAAAAAAAAHdsjH
eIeH6MiId3AAAAAAAAAAAAAAAIiIh4V8jIh4eIfHcAAAAAAAAAAAAACIiIh3AAAHd3h3fHcAAAAAAAAA
AAAAAAiIjHgAAAAAAHx8eAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAD///////8AAP///////wAA////////AAD///////8AAP///////wAA////////
AAD///////8AAP///////wAA//h/////AAD/4D////8AAP/AP////wAA/8A/////AAD/gB////8AAP8A
H////wAA/wAf////AAD+AB////8AAP4AH////wAA/gAf////AAD8AB////8AAPwAH////wAA/AAP////
AAD8AA////8AAPgAD//+BwAA+AAH//ADAAD4AAP/wAMAAPgAAP8AAwAA+AAAAAADAAD4AAAAAAMAAPgA
AAAABwAA+AAAAAAHAAD4AAAAAA8AAPgAAAAAHwAA/AAAAAA/AAD8AAAAAH8AAP4AAAAA/wAA/4AAAAP/
AAD/4AAAB/8AAP/4AAAf/wAA/8AAAH//AAD8A+AD//8AAPgP/A///wAA////////AAD///////8AAP//
/////wAA////////AAD///////8AAP///////wAA////////AAAoAAAAIAAAAEAAAAABAAQAAAAAAAAC
AAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAgAAAgAAAAICAAIAAAACAAIAAgIAAAICAgADAwMAAAAD/AAD/
AAAA//8A/wAAAP8A/wD//wAA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdwAAAAAAAAAAAAAAAA
AAd0dAAAAAAAAAAAAAAAAAB3x3cAAAAAAAAAAAAAAAAAd3fHcAAAAAAAAAAAAAAAB3yMh3AAAAAAAAAA
AAAAAAfIeMdwAAAAAAAAAAAAAAAHjIyHQAAAAAAAAAAAAAAAfId4yHAAAAAAAAAAAAAAAHjIyIdQAAAA
AAAAAAAAAAB3iId4YAAAAAAAAAdwAAAAjIiIiIUAAAAAAHd3dAAAB4iIiHh8cAAAAHd3x4dwAAd4iIiI
h3Z3d3R3yIh4cAAHh4iIiIfHd3d4iIiIh3AAB3jHiIiIiHeHiIiIiIwAAAh3dXh4iMiIiIiIiIhwAAAA
yGd0d4iIeIi4iIiMAAAAAIeHd4iIh32IiIiIcAAAAAAAd4jIyIiIiHeHyAAAAAAAAAB3h4iIh8h3dwAA
AAAAAAAIh8fIh4eIaAAAAAAAAACIiHAAB8jIyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////
////////////////////n////g////wP///8B///+Af///gH///4B///8Af///AH///wB//n8AP/A+AB
/AHgAAAB4AAAAeAAAAPgAAAH8AAAD/AAAB/8AAA//wAA//4AA//weA//////////////////////////
//8oAAAAGAAAADAAAAABAAQAAAAAACABAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAgAAAgAAAAICAAIAA
AACAAIAAg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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAD///////8AAP///////wAA////////AAD///////8AAP///////wAA////////
AAD///////8AAP///////wAA//h/////AAD/4D////8AAP/AP////wAA/8A/////AAD/gB////8AAP8A
H////wAA/wAf////AAD+AB////8AAP4AH////wAA/gAf////AAD8AB////8AAPwAH////wAA/AAP////
AAD8AA////8AAPgAD//+BwAA+AAH//ADAAD4AAP/wAMAAPgAAP8AAwAA+AAAAAADAAD4AAAAAAMAAPgA
AAAABwAA+AAAAAAHAAD4AAAAAA8AAPgAAAAAHwAA/AAAAAA/AAD8AAAAAH8AAP4AAAAA/wAA/4AAAAP/
AAD/4AAAB/8AAP/4AAAf/wAA/8AAAH//AAD8A+AD//8AAPgP/A///wAA////////AAD///////8AAP//
/////wAA////////AAD///////8AAP///////wAA////////AAAoAAAAIAAAAEAAAAABAAgAAAAAAAAE
AAAAAAAAAAAAAAABAAAAAQAAAAAAAFFNTQBRUlIAU1RUAGJHRwBiT08Aa0lIAGJTUwBrVlYAYllZAGZc
XABpWloAb1xbAHNTUwB7V1YAc1hXAHFbWwBkZWUAaWFhAG5kZABpamkAcGFhAHlubgB2cHAAf3V1AH55
eQB8fX0AgUpKAI1PTwCLWFcAhlhYAI9ZWQCKXFsAm1ZWAJJZWQCWWVgAmlpbAJtcWwCiXFwAl2BfAIBg
YACAZ2YAgG9vAI9oaACWZWQAmGBhAJ5kZACcaWoAmm9vAIV0dACNcHAAiXZ2AIB8fACac3IAm3V0AJ51
dQCZfHwAnHx8AKNmZgCnZmYAqmJiAK5jYwCvb24AtWVmALBtbgC5bW0AvmxtAKx+fQCxcnIAtHBwALZz
dAC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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////+f///+D////A////wH
///4B///+Af///gH///wB///8Af///AH/+fwA/8D4AH8AeAAAAHgAAAB4AAAA+AAAAfwAAAP8AAAH/wA
AD//AAD//gAD//B4D////////////////////////////ygAAAAYAAAAMAAAAAEACAAAAAAAQAIAAAAA
AAAAAAAAAAEAAAABAAAAAAAAWlJSAHBJSQB1SEgAe1dXAHdYWAB5WlkAel1dAGBiYgB1bGwAfWtrAHh2
dgB9fn4Ag01NAIRXVwCIV1cAhV9eAItbWgCgX14ApV1dAJhgXwCNYGAAnWtqAJhtbQCCdnYAh3x8AI15
eACeensAqGBgAKhoZwCga2oArGpqALNqagCzb28AtG1tALltbQCxb3AApnVzAKlzcwCqdHMApnp6AKd+
fgCpensAq3x7ALZ3dgC8dHQAvH59AMZvcADGcHEAxXN0AMhycwDJdncAynh5AMx5egDNfn8Ajo1wAOek
VgDGgH8A4p53AEZ2+gB8u4AAd8PaAIuEhACOh4cAjo6OAJ+DggCejo4Ao4SEAKSIiACsi4sAqo2MAK6P
jgC+gYAAvoaGAL+KiACskJAAtJeXALWenQC5np4At6iOAKmyjgC9nroAwYSDAMaGhADOhoYAxomHAMiK
iQDJjYwA0oeIANOOjwDUjY0A2ZiPANaPkADGkZEAx5eXAMySkADGnZwA1ZOSANeTlADWl5YA2JSVANGZ
mADan50A3J6dAOCcmwDVoJ8A7K2fAMOtrQDXo6IA3aCgAN+kpADVq6oA3ay3AMu0tADPtrYA3L+/AOCi
oQDhpqUA5KelAOinpgDlq6gA46usAOOvrQDqrqwA7LGuAOayswDjtrQ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AAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAP//
/////wAA////////AAD///////8AAP///////wAA////////AAD/+H////8AAP/gH////wAA/8Af////
AAD/gA////8AAP+AD////wAA/wAP////AAD/AA////8AAP4AB////wAA/gAH////AAD8AAf///8AAPwA
B////wAA/AAH////AAD8AAf///8AAPgAB////wAA+AAH//4HAAD4AAP/8AEAAPgAAf/AAQAA8AAA/wAA
AADwAAAAAAAAAPAAAAAAAAAA8AAAAAAAAADwAAAAAAEAAPAAAAAAAQAA8AAAAAADAADwAAAAAAcAAPAA
AAAADwAA+AAAAAAfAAD4AAAAAD8AAPwAAAAAfwAA/gAAAAD/AAD/gAAAA/8AAP/gAAAH/wAAgAAAAB//
AAAAAAAAf/8AAAAD4AP//wAAgB/8H///AAD///////8AAP///////wAA////////AAD///////8AAP//
/////wAA////////AAAoAAAAIAAAAEAAAAABACAAAAAAAIAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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u6/8CHhfpmPDyvRysqYlExMV1ySEiGnWdn07qB
gPzLkI//w4iG/HJLS3YAAAAAomloXsyRkf/DoKD/48bG/+jAv//hpKL/vX17/7h/fPu/iYj7z5qZ/+Gw
rv/rvLr/77q3/9ScmuR9U1I+AAAAAJZbWz2ndnbxdG9v/4yCgv+4lJP/77Wy/86erP+6nsH/tsXR/8PH
0P/4wsD/9b26/+Cppu2peXdiAAAAAQAAAABYKCgHn2lqe6eCguSsgoL90pKS//Cxrv/TrcP/s5y+/8i3
s/+quab/26mh/82UktSgbm1TBAAAAwAAAACud3cEvYGBC7N6ehyyfHtyt39+3bNub9vLgYH05qak/+Kg
g//OlH39jZR04Zd0aYmDT1EiAAAAAAAAAAAAAAAAr3t7D7aCgki5h4Z8uImJgah+fUltPz8ajU1ORq1s
bI6vdHOgm2RkaYxJUiZgCygCAAAAAAAAAAAAAAAAAAAAAGo9PQF9UVEHcEdHCTodHQIAAAAAAAAAAAAA
AAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//8AAP//AADh/wAAwf8AAMH/
AACB/wAAgfkAAIDAAACAAAAAgAAAAIAAAACAAQAAAAcAAAAPAAAOfwAA//8AAA==
</value>
</data>
</root>

View File

@ -0,0 +1,213 @@
namespace BizHawk.Client.EmuHawk
{
partial class AmstradCPCCoreEmulationSettings
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AmstradCPCCoreEmulationSettings));
this.OkBtn = new System.Windows.Forms.Button();
this.CancelBtn = new System.Windows.Forms.Button();
this.label4 = new System.Windows.Forms.Label();
this.MachineSelectionComboBox = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.lblMachineNotes = new System.Windows.Forms.Label();
this.determEmucheckBox1 = new System.Windows.Forms.CheckBox();
this.lblAutoLoadText = new System.Windows.Forms.Label();
this.autoLoadcheckBox1 = new System.Windows.Forms.CheckBox();
this.lblBorderInfo = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.borderTypecomboBox1 = new System.Windows.Forms.ComboBox();
this.SuspendLayout();
//
// OkBtn
//
this.OkBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.OkBtn.Location = new System.Drawing.Point(249, 432);
this.OkBtn.Name = "OkBtn";
this.OkBtn.Size = new System.Drawing.Size(60, 23);
this.OkBtn.TabIndex = 3;
this.OkBtn.Text = "&OK";
this.OkBtn.UseVisualStyleBackColor = true;
this.OkBtn.Click += new System.EventHandler(this.OkBtn_Click);
//
// CancelBtn
//
this.CancelBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.CancelBtn.Location = new System.Drawing.Point(315, 432);
this.CancelBtn.Name = "CancelBtn";
this.CancelBtn.Size = new System.Drawing.Size(60, 23);
this.CancelBtn.TabIndex = 4;
this.CancelBtn.Text = "&Cancel";
this.CancelBtn.UseVisualStyleBackColor = true;
this.CancelBtn.Click += new System.EventHandler(this.CancelBtn_Click);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(12, 46);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(98, 13);
this.label4.TabIndex = 15;
this.label4.Text = "Emulated Machine:";
//
// MachineSelectionComboBox
//
this.MachineSelectionComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.MachineSelectionComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.MachineSelectionComboBox.FormattingEnabled = true;
this.MachineSelectionComboBox.Location = new System.Drawing.Point(12, 62);
this.MachineSelectionComboBox.Name = "MachineSelectionComboBox";
this.MachineSelectionComboBox.Size = new System.Drawing.Size(363, 21);
this.MachineSelectionComboBox.TabIndex = 13;
this.MachineSelectionComboBox.SelectionChangeCommitted += new System.EventHandler(this.MachineSelectionComboBox_SelectionChangeCommitted);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 14);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(159, 13);
this.label1.TabIndex = 17;
this.label1.Text = "Amstrad CPC Emulation Settings";
//
// lblMachineNotes
//
this.lblMachineNotes.Font = new System.Drawing.Font("Lucida Console", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblMachineNotes.Location = new System.Drawing.Point(15, 95);
this.lblMachineNotes.Name = "lblMachineNotes";
this.lblMachineNotes.Size = new System.Drawing.Size(358, 204);
this.lblMachineNotes.TabIndex = 20;
this.lblMachineNotes.Text = "null\r\n";
//
// determEmucheckBox1
//
this.determEmucheckBox1.AutoSize = true;
this.determEmucheckBox1.Location = new System.Drawing.Point(12, 373);
this.determEmucheckBox1.Name = "determEmucheckBox1";
this.determEmucheckBox1.Size = new System.Drawing.Size(135, 17);
this.determEmucheckBox1.TabIndex = 21;
this.determEmucheckBox1.Text = "Deterministic Emulation";
this.determEmucheckBox1.UseVisualStyleBackColor = true;
//
// lblAutoLoadText
//
this.lblAutoLoadText.Font = new System.Drawing.Font("Lucida Console", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblAutoLoadText.Location = new System.Drawing.Point(172, 390);
this.lblAutoLoadText.Name = "lblAutoLoadText";
this.lblAutoLoadText.Size = new System.Drawing.Size(196, 30);
this.lblAutoLoadText.TabIndex = 27;
this.lblAutoLoadText.Text = "When enabled CPCHawk will automatically start and stop the tape whenever the tape" +
" motor state changes";
this.lblAutoLoadText.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// autoLoadcheckBox1
//
this.autoLoadcheckBox1.AutoSize = true;
this.autoLoadcheckBox1.Location = new System.Drawing.Point(12, 396);
this.autoLoadcheckBox1.Name = "autoLoadcheckBox1";
this.autoLoadcheckBox1.Size = new System.Drawing.Size(128, 17);
this.autoLoadcheckBox1.TabIndex = 26;
this.autoLoadcheckBox1.Text = "Auto Tape Start/Stop";
this.autoLoadcheckBox1.UseVisualStyleBackColor = true;
//
// lblBorderInfo
//
this.lblBorderInfo.Font = new System.Drawing.Font("Lucida Console", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblBorderInfo.Location = new System.Drawing.Point(175, 331);
this.lblBorderInfo.Name = "lblBorderInfo";
this.lblBorderInfo.Size = new System.Drawing.Size(196, 21);
this.lblBorderInfo.TabIndex = 30;
this.lblBorderInfo.Text = "null";
this.lblBorderInfo.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 315);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(118, 13);
this.label2.TabIndex = 29;
this.label2.Text = "Rendered Border Type:";
//
// borderTypecomboBox1
//
this.borderTypecomboBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.borderTypecomboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.borderTypecomboBox1.FormattingEnabled = true;
this.borderTypecomboBox1.Location = new System.Drawing.Point(12, 331);
this.borderTypecomboBox1.Name = "borderTypecomboBox1";
this.borderTypecomboBox1.Size = new System.Drawing.Size(159, 21);
this.borderTypecomboBox1.TabIndex = 28;
//
// AmstradCPCCoreEmulationSettings
//
this.AcceptButton = this.OkBtn;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.CancelBtn;
this.ClientSize = new System.Drawing.Size(387, 467);
this.Controls.Add(this.lblBorderInfo);
this.Controls.Add(this.label2);
this.Controls.Add(this.borderTypecomboBox1);
this.Controls.Add(this.lblAutoLoadText);
this.Controls.Add(this.autoLoadcheckBox1);
this.Controls.Add(this.determEmucheckBox1);
this.Controls.Add(this.lblMachineNotes);
this.Controls.Add(this.label1);
this.Controls.Add(this.label4);
this.Controls.Add(this.MachineSelectionComboBox);
this.Controls.Add(this.CancelBtn);
this.Controls.Add(this.OkBtn);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "AmstradCPCCoreEmulationSettings";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Core Emulation Settings";
this.Load += new System.EventHandler(this.IntvControllerSettings_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button OkBtn;
private System.Windows.Forms.Button CancelBtn;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.ComboBox MachineSelectionComboBox;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label lblMachineNotes;
private System.Windows.Forms.CheckBox determEmucheckBox1;
private System.Windows.Forms.Label lblAutoLoadText;
private System.Windows.Forms.CheckBox autoLoadcheckBox1;
private System.Windows.Forms.Label lblBorderInfo;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox borderTypecomboBox1;
}
}

View File

@ -0,0 +1,118 @@
using System;
using System.Linq;
using System.Windows.Forms;
using BizHawk.Client.Common;
using BizHawk.Emulation.Cores.Computers.AmstradCPC;
using System.Text;
using static BizHawk.Emulation.Cores.Computers.AmstradCPC.AmstradCPC;
namespace BizHawk.Client.EmuHawk
{
public partial class AmstradCPCCoreEmulationSettings : Form
{
private AmstradCPC.AmstradCPCSyncSettings _syncSettings;
public AmstradCPCCoreEmulationSettings()
{
InitializeComponent();
}
private void IntvControllerSettings_Load(object sender, EventArgs e)
{
_syncSettings = ((AmstradCPC)Global.Emulator).GetSyncSettings().Clone();
// machine selection
var machineTypes = Enum.GetNames(typeof(MachineType));
foreach (var val in machineTypes)
{
MachineSelectionComboBox.Items.Add(val);
}
MachineSelectionComboBox.SelectedItem = _syncSettings.MachineType.ToString();
UpdateMachineNotes((MachineType)Enum.Parse(typeof(MachineType), MachineSelectionComboBox.SelectedItem.ToString()));
// border selecton
var borderTypes = Enum.GetNames(typeof(AmstradCPC.BorderType));
foreach (var val in borderTypes)
{
borderTypecomboBox1.Items.Add(val);
}
borderTypecomboBox1.SelectedItem = _syncSettings.BorderType.ToString();
UpdateBorderNotes((AmstradCPC.BorderType)Enum.Parse(typeof(AmstradCPC.BorderType), borderTypecomboBox1.SelectedItem.ToString()));
// deterministic emulation
determEmucheckBox1.Checked = _syncSettings.DeterministicEmulation;
// autoload tape
autoLoadcheckBox1.Checked = _syncSettings.AutoStartStopTape;
}
private void OkBtn_Click(object sender, EventArgs e)
{
bool changed =
_syncSettings.MachineType.ToString() != MachineSelectionComboBox.SelectedItem.ToString()
|| _syncSettings.BorderType.ToString() != borderTypecomboBox1.SelectedItem.ToString()
|| _syncSettings.DeterministicEmulation != determEmucheckBox1.Checked
|| _syncSettings.AutoStartStopTape != autoLoadcheckBox1.Checked;
if (changed)
{
_syncSettings.MachineType = (MachineType)Enum.Parse(typeof(MachineType), MachineSelectionComboBox.SelectedItem.ToString());
_syncSettings.BorderType = (AmstradCPC.BorderType)Enum.Parse(typeof(AmstradCPC.BorderType), borderTypecomboBox1.SelectedItem.ToString());
_syncSettings.DeterministicEmulation = determEmucheckBox1.Checked;
_syncSettings.AutoStartStopTape = autoLoadcheckBox1.Checked;
GlobalWin.MainForm.PutCoreSyncSettings(_syncSettings);
DialogResult = DialogResult.OK;
Close();
}
else
{
DialogResult = DialogResult.OK;
Close();
}
}
private void CancelBtn_Click(object sender, EventArgs e)
{
GlobalWin.OSD.AddMessage("Core emulator settings aborted");
DialogResult = DialogResult.Cancel;
Close();
}
private void MachineSelectionComboBox_SelectionChangeCommitted(object sender, EventArgs e)
{
ComboBox cb = sender as ComboBox;
UpdateMachineNotes((MachineType)Enum.Parse(typeof(MachineType), cb.SelectedItem.ToString()));
}
private void UpdateMachineNotes(MachineType type)
{
lblMachineNotes.Text = CPCMachineMetaData.GetMetaString(type);
}
private void borderTypecomboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
ComboBox cb = sender as ComboBox;
UpdateBorderNotes((AmstradCPC.BorderType)Enum.Parse(typeof(AmstradCPC.BorderType), cb.SelectedItem.ToString()));
}
private void UpdateBorderNotes(AmstradCPC.BorderType type)
{
switch (type)
{
case AmstradCPC.BorderType.Uniform:
lblBorderInfo.Text = "Attempts to equalise the border areas";
break;
case AmstradCPC.BorderType.Uncropped:
lblBorderInfo.Text = "Pretty much the signal the gate array is generating (looks pants)";
break;
case AmstradCPC.BorderType.Widescreen:
lblBorderInfo.Text = "Top and bottom border removed so that the result is *almost* 16:9";
break;
}
}
}
}

View File

@ -0,0 +1,624 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAwAMDAQAAAABABoBgAAxgAAACAgEAAAAAQA6AIAAC4HAAAYGBAAAAAEAOgBAAAWCgAAEBAQAAAA
BAAoAQAA/gsAADAwAAAAA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AAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAD///////8AAP///////wAA////////AAD///////8AAP///////wAA////////
AAD///////8AAP///////wAA//h/////AAD/4D////8AAP/AP////wAA/8A/////AAD/gB////8AAP8A
H////wAA/wAf////AAD+AB////8AAP4AH////wAA/gAf////AAD8AB////8AAPwAH////wAA/AAP////
AAD8AA////8AAPgAD//+BwAA+AAH//ADAAD4AAP/wAMAAPgAAP8AAwAA+AAAAAADAAD4AAAAAAMAAPgA
AAAABwAA+AAAAAAHAAD4AAAAAA8AAPgAAAAAHwAA/AAAAAA/AAD8AAAAAH8AAP4AAAAA/wAA/4AAAAP/
AAD/4AAAB/8AAP/4AAAf/wAA/8AAAH//AAD8A+AD//8AAPgP/A///wAA////////AAD///////8AAP//
/////wAA////////AAD///////8AAP///////wAA////////AAAoAAAAIAAAAEAAAAABAAgAAAAAAAAE
AAAAAAAAAAAAAAABAAAAAQAAAAAAAFFNTQBRUlIAU1RUAGJHRwBiT08Aa0lIAGJTUwBrVlYAYllZAGZc
XABpWloAb1xbAHNTUwB7V1YAc1hXAHFbWwBkZWUAaWFhAG5kZABpamkAcGFhAHlubgB2cHAAf3V1AH55
eQB8fX0AgUpKAI1PTwCLWFcAhlhYAI9ZWQCKXFsAm1ZWAJJZWQCWWVgAmlpbAJtcWwCiXFwAl2BfAIBg
YACA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AAAAAAAAvhpKakoyg19HNyKS5wHtb
orZ/cwAAAAAAAAAAAAAAAAAANkaKWVm5zb1gYV6cXVxfNgAAAAAAAAAAAAAAAAAAALGvlTIuP1K5tqCR
l4xfLwAAAAAAAAAAAAAAAAAAsbPBenkAAAAAcCVYjE0scwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////+f///+D////A////wH
///4B///+Af///gH///wB///8Af///AH/+fwA/8D4AH8AeAAAAHgAAAB4AAAA+AAAAfwAAAP8AAAH/wA
AD//AAD//gAD//B4D////////////////////////////ygAAAAYAAAAMAAAAAEACAAAAAAAQAIAAAAA
AAAAAAAAAAEAAAABAAAAAAAAWlJSAHBJSQB1SEgAe1dXAHdYWAB5WlkAel1dAGBiYgB1bGwAfWtrAHh2
dgB9fn4Ag01NAIRXVwCIV1cAhV9eAItbWgCgX14ApV1dAJhgXwCNYGAAnWtqAJhtbQCCdnYAh3x8AI15
eACeensAqGBgAKhoZwCga2oArGpqALNqagCzb28AtG1tALltbQCxb3AApnVzAKlzcwCqdHMApnp6AKd+
fgCpensAq3x7ALZ3dgC8dHQAvH59AMZvcADGcHEAxXN0AMhycwDJdncAynh5AMx5egDNfn8Ajo1wAOek
VgDGgH8A4p53AEZ2+gB8u4AAd8PaAIuEhACOh4cAjo6OAJ+DggCejo4Ao4SEAKSIiACsi4sAqo2MAK6P
jgC+gYAAvoaGAL+KiACskJAAtJeXALWenQC5np4At6iOAKmyjgC9nroAwYSDAMaGhADOhoYAxomHAMiK
iQDJjYwA0oeIANOOjwDUjY0A2ZiPANaPkADGkZEAx5eXAMySkAD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AAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAP//
/////wAA////////AAD///////8AAP///////wAA////////AAD/+H////8AAP/gH////wAA/8Af////
AAD/gA////8AAP+AD////wAA/wAP////AAD/AA////8AAP4AB////wAA/gAH////AAD8AAf///8AAPwA
B////wAA/AAH////AAD8AAf///8AAPgAB////wAA+AAH//4HAAD4AAP/8AEAAPgAAf/AAQAA8AAA/wAA
AADwAAAAAAAAAPAAAAAAAAAA8AAAAAAAAADwAAAAAAEAAPAAAAAAAQAA8AAAAAADAADwAAAAAAcAAPAA
AAAADwAA+AAAAAAfAAD4AAAAAD8AAPwAAAAAfwAA/gAAAAD/AAD/gAAAA/8AAP/gAAAH/wAAgAAAAB//
AAAAAAAAf/8AAAAD4AP//wAAgB/8H///AAD///////8AAP///////wAA////////AAD///////8AAP//
/////wAA////////AAAoAAAAIAAAAEAAAAABACAAAAAAAIAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAA
AAkAAAAAAAAAAItYWDvFfn/y2ZWW/92fn//anJv/jWFgvwAAAB0AAAAAAAAAAAAAAAIzHBwiYjs7a3pM
S6pqQkKjLBoaMwAAAACeZ2dZ05KS/em0tP/vxMT/77u6/8CHhfpmPDyvRysqYlExMV1ySEiGnWdn07qB
gPzLkI//w4iG/HJLS3YAAAAAomloXsyRkf/DoKD/48bG/+jAv//hpKL/vX17/7h/fPu/iYj7z5qZ/+Gw
rv/rvLr/77q3/9ScmuR9U1I+AAAAAJZbWz2ndnbxdG9v/4yCgv+4lJP/77Wy/86erP+6nsH/tsXR/8PH
0P/4wsD/9b26/+Cppu2peXdiAAAAAQAAAABYKCgHn2lqe6eCguSsgoL90pKS//Cxrv/TrcP/s5y+/8i3
s/+quab/26mh/82UktSgbm1TBAAAAwAAAACud3cEvYGBC7N6ehyyfHtyt39+3bNub9vLgYH05qak/+Kg
g//OlH39jZR04Zd0aYmDT1EiAAAAAAAAAAAAAAAAr3t7D7aCgki5h4Z8uImJgah+fUltPz8ajU1ORq1s
bI6vdHOgm2RkaYxJUiZgCygCAAAAAAAAAAAAAAAAAAAAAGo9PQF9UVEHcEdHCTodHQIAAAAAAAAAAAAA
AAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//8AAP//AADh/wAAwf8AAMH/
AACB/wAAgfkAAIDAAACAAAAAgAAAAIAAAACAAQAAAAcAAAAPAAAOfwAA//8AAA==
</value>
</data>
</root>

View File

@ -0,0 +1,135 @@
namespace BizHawk.Client.EmuHawk
{
partial class AmstradCPCNonSyncSettings
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ZXSpectrumNonSyncSettings));
this.OkBtn = new System.Windows.Forms.Button();
this.CancelBtn = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.lblOSDVerbinfo = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.osdMessageVerbositycomboBox1 = new System.Windows.Forms.ComboBox();
this.SuspendLayout();
//
// OkBtn
//
this.OkBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.OkBtn.Location = new System.Drawing.Point(247, 142);
this.OkBtn.Name = "OkBtn";
this.OkBtn.Size = new System.Drawing.Size(60, 23);
this.OkBtn.TabIndex = 3;
this.OkBtn.Text = "&OK";
this.OkBtn.UseVisualStyleBackColor = true;
this.OkBtn.Click += new System.EventHandler(this.OkBtn_Click);
//
// CancelBtn
//
this.CancelBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.CancelBtn.Location = new System.Drawing.Point(313, 142);
this.CancelBtn.Name = "CancelBtn";
this.CancelBtn.Size = new System.Drawing.Size(60, 23);
this.CancelBtn.TabIndex = 4;
this.CancelBtn.Text = "&Cancel";
this.CancelBtn.UseVisualStyleBackColor = true;
this.CancelBtn.Click += new System.EventHandler(this.CancelBtn_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 14);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(185, 13);
this.label1.TabIndex = 17;
this.label1.Text = "ZX Spectrum Misc Non-Sync Settings";
//
// lblOSDVerbinfo
//
this.lblOSDVerbinfo.Font = new System.Drawing.Font("Lucida Console", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblOSDVerbinfo.Location = new System.Drawing.Point(175, 107);
this.lblOSDVerbinfo.Name = "lblOSDVerbinfo";
this.lblOSDVerbinfo.Size = new System.Drawing.Size(196, 21);
this.lblOSDVerbinfo.TabIndex = 28;
this.lblOSDVerbinfo.Text = "null";
this.lblOSDVerbinfo.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(12, 91);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(125, 13);
this.label4.TabIndex = 27;
this.label4.Text = "OSD Message Verbosity:";
//
// osdMessageVerbositycomboBox1
//
this.osdMessageVerbositycomboBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.osdMessageVerbositycomboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.osdMessageVerbositycomboBox1.FormattingEnabled = true;
this.osdMessageVerbositycomboBox1.Location = new System.Drawing.Point(12, 107);
this.osdMessageVerbositycomboBox1.Name = "osdMessageVerbositycomboBox1";
this.osdMessageVerbositycomboBox1.Size = new System.Drawing.Size(157, 21);
this.osdMessageVerbositycomboBox1.TabIndex = 26;
this.osdMessageVerbositycomboBox1.SelectionChangeCommitted += new System.EventHandler(this.OSDComboBox_SelectionChangeCommitted);
//
// ZXSpectrumNonSyncSettings
//
this.AcceptButton = this.OkBtn;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.CancelBtn;
this.ClientSize = new System.Drawing.Size(385, 177);
this.Controls.Add(this.lblOSDVerbinfo);
this.Controls.Add(this.label4);
this.Controls.Add(this.osdMessageVerbositycomboBox1);
this.Controls.Add(this.label1);
this.Controls.Add(this.CancelBtn);
this.Controls.Add(this.OkBtn);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "ZXSpectrumNonSyncSettings";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Other Non-Sync Settings";
this.Load += new System.EventHandler(this.IntvControllerSettings_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button OkBtn;
private System.Windows.Forms.Button CancelBtn;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label lblOSDVerbinfo;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.ComboBox osdMessageVerbositycomboBox1;
}
}

View File

@ -0,0 +1,86 @@
using System;
using System.Linq;
using System.Windows.Forms;
using BizHawk.Client.Common;
using BizHawk.Emulation.Cores.Computers.AmstradCPC;
using System.Text;
namespace BizHawk.Client.EmuHawk
{
public partial class AmstradCPCNonSyncSettings : Form
{
private AmstradCPC.AmstradCPCSettings _settings;
public AmstradCPCNonSyncSettings()
{
InitializeComponent();
}
private void IntvControllerSettings_Load(object sender, EventArgs e)
{
_settings = ((AmstradCPC)Global.Emulator).GetSettings().Clone();
// OSD Message Verbosity
var osdTypes = Enum.GetNames(typeof(AmstradCPC.OSDVerbosity));
foreach (var val in osdTypes)
{
osdMessageVerbositycomboBox1.Items.Add(val);
}
osdMessageVerbositycomboBox1.SelectedItem = _settings.OSDMessageVerbosity.ToString();
UpdateOSDNotes((AmstradCPC.OSDVerbosity)Enum.Parse(typeof(AmstradCPC.OSDVerbosity), osdMessageVerbositycomboBox1.SelectedItem.ToString()));
}
private void OkBtn_Click(object sender, EventArgs e)
{
bool changed =
_settings.OSDMessageVerbosity.ToString() != osdMessageVerbositycomboBox1.SelectedItem.ToString();
if (changed)
{
_settings.OSDMessageVerbosity = (AmstradCPC.OSDVerbosity)Enum.Parse(typeof(AmstradCPC.OSDVerbosity), osdMessageVerbositycomboBox1.SelectedItem.ToString());
GlobalWin.MainForm.PutCoreSettings(_settings);
DialogResult = DialogResult.OK;
Close();
}
else
{
DialogResult = DialogResult.OK;
Close();
}
}
private void CancelBtn_Click(object sender, EventArgs e)
{
GlobalWin.OSD.AddMessage("Misc settings aborted");
DialogResult = DialogResult.Cancel;
Close();
}
private void UpdateOSDNotes(AmstradCPC.OSDVerbosity type)
{
switch (type)
{
case AmstradCPC.OSDVerbosity.Full:
lblOSDVerbinfo.Text = "Show all OSD messages";
break;
case AmstradCPC.OSDVerbosity.Medium:
lblOSDVerbinfo.Text = "Only show machine/device generated messages";
break;
case AmstradCPC.OSDVerbosity.None:
lblOSDVerbinfo.Text = "No core-driven OSD messages";
break;
}
}
private void OSDComboBox_SelectionChangeCommitted(object sender, EventArgs e)
{
ComboBox cb = sender as ComboBox;
UpdateOSDNotes((AmstradCPC.OSDVerbosity)Enum.Parse(typeof(AmstradCPC.OSDVerbosity), cb.SelectedItem.ToString()));
}
}
}

View File

@ -0,0 +1,624 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAwAMDAQAAAABABoBgAAxgAAACAgEAAAAAQA6AIAAC4HAAAYGBAAAAAEAOgBAAAWCgAAEBAQAAAA
BAAoAQAA/gsAADAwAAAAAAgAqA4AACYNAAAgIAAAAAAIAKgIAADOGwAAGBgAAAAACADIBgAAdiQAABAQ
AAAAAAgAaAUAAD4rAAAwMAAAAAAgAKglAACmMAAAICAAAAAAIACoEAAATlYAABgYAAAAACAAiAkAAPZm
AAAQEAAAAAAgAGgEAAB+cAAAKAAAADAAAABgAAAAAQAEAAAAAACABAAAAAAAAAAAAAAQAAAAEAAAAA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eIiIiIyIeHh4iIiIiIiIiI
cAAAAAeIQ0R3h3iIiMiIiIiIiIiIiIiEAAAAAAfIR3d3d0iIiIh4iIeIiIiIiHhAAAAAAAB4d3d3SHiI
h4fTiIi3iIiIeIwAAAAAAAB3h4d3eIeIiHiJiIuIiIh4jHAAAAAAAAAHyId3h3h4iIh4iIiIiIiHeAAA
AAAAAAAAB8iMiMjIiIiIh4h3aMjHAAAAAAAAAAAAAAdYyIeIiIiMjId6d4eAAAAAAAAAAAAAAAAHdsjH
eIeH6MiId3AAAAAAAAAAAAAAAIiIh4V8jIh4eIfHcAAAAAAAAAAAAACIiIh3AAAHd3h3fHcAAAAAAAAA
AAAAAAiIjHgAAAAAAHx8eAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAD///////8AAP///////wAA////////AAD///////8AAP///////wAA////////
AAD///////8AAP///////wAA//h/////AAD/4D////8AAP/AP////wAA/8A/////AAD/gB////8AAP8A
H////wAA/wAf////AAD+AB////8AAP4AH////wAA/gAf////AAD8AB////8AAPwAH////wAA/AAP////
AAD8AA////8AAPgAD//+BwAA+AAH//ADAAD4AAP/wAMAAPgAAP8AAwAA+AAAAAADAAD4AAAAAAMAAPgA
AAAABwAA+AAAAAAHAAD4AAAAAA8AAPgAAAAAHwAA/AAAAAA/AAD8AAAAAH8AAP4AAAAA/wAA/4AAAAP/
AAD/4AAAB/8AAP/4AAAf/wAA/8AAAH//AAD8A+AD//8AAPgP/A///wAA////////AAD///////8AAP//
/////wAA////////AAD///////8AAP///////wAA////////AAAoAAAAIAAAAEAAAAABAAQAAAAAAAAC
A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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAD///////8AAP///////wAA////////AAD///////8AAP///////wAA////////
AAD///////8AAP///////wAA//h/////AAD/4D////8AAP/AP////wAA/8A/////AAD/gB////8AAP8A
H////wAA/wAf////AAD+AB////8AAP4AH////wAA/gAf////AAD8AB////8AAPwAH////wAA/AAP////
AAD8AA////8AAPgAD//+BwAA+AAH//ADAAD4AAP/wAMAAPgAAP8AAwAA+AAAAAADAAD4AAAAAAMAAPgA
AAAABwAA+AAAAAAHAAD4AAAAAA8AAPgAAAAAHwAA/AAAAAA/AAD8AAAAAH8AAP4AAAAA/wAA/4AAAAP/
AAD/4AAAB/8AAP/4AAAf/wAA/8AAAH//AAD8A+AD//8AAPgP/A///wAA////////AAD///////8AAP//
/////wAA////////AAD///////8AAP///////wAA////////AAAoAAAAIAAAAEAAAAABAAgAAAAAAAAE
AAAAAAAAAAAAAAABAAAAAQAAAAAAAFFNTQBRUlIAU1RUAGJHRwBiT08Aa0lIAGJTUwBrVlYAYllZAGZc
XABpWloAb1xbAHNTUwB7V1YAc1hXAHFbWwBkZWUAaWFhAG5kZABpamkAcGFhAHlubgB2cHAAf3V1AH55
eQB8fX0AgUpKAI1PTwCLWFcAhlhYAI9ZWQCKXFsAm1ZWAJJZWQCWWVgAmlpbAJtcWwCiXFwAl2BfAIBg
YACAZ2YAgG9vAI9oaACWZWQAmGBhAJ5kZACcaWoAmm9vAIV0dACNcHAAiXZ2AIB8fACac3IAm3V0AJ51
dQCZfHwAnHx8AKNmZgCnZmYAqmJiAK5jYwCvb24AtWVmALBtbgC5bW0AvmxtAKx+fQCxcnIAtHBwALZz
dACydXQAtnd2ALlwcAC5dnYAt3p5ALh5eAC8fHsAun18ALx+fQDGb3A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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////+f///+D////A////wH
///4B///+Af///gH///wB///8Af///AH/+fwA/8D4AH8AeAAAAHgAAAB4AAAA+AAAAfwAAAP8AAAH/wA
AD//AAD//gAD//B4D////////////////////////////ygAAAAYAAAAMAAAAAEACAAAAAAAQAIAAAAA
AAAAAAAAAAEAAAABAAAAAAAAWlJSAHBJSQB1SEgAe1dXAHdYWAB5WlkAel1dAGBiYgB1bGwAfWtrAHh2
dgB9fn4Ag01NAIRXVwCIV1cAhV9eAItbWgCgX14ApV1dAJhgXwCNYGAAnWtqAJhtbQCCdnYAh3x8AI15
eACeensAqGBgAKhoZwCga2oArGpqALNqagCzb28AtG1tALltbQCxb3AApnVzAKlzcwCqdHMApnp6AKd+
fgCpensAq3x7ALZ3dgC8dHQAvH59AMZvcADGcHEAxXN0AMhycwDJdncAynh5AMx5egDNfn8Ajo1wAOek
VgDGgH8A4p53AEZ2+gB8u4AAd8PaAIuEhACOh4cAjo6OAJ+DggCejo4Ao4SEAKSIiACsi4sAqo2MAK6P
jgC+gYAAvoaGAL+KiACskJAAtJeXALWenQC5np4At6iOAKmyjgC9nroAwYSDAMaGhADOhoYAxomHAMiK
iQDJjYwA0oeIANOOjwDUjY0A2ZiPANaPkADGkZEAx5eXAMySkADGnZwA1ZOSANeTlADWl5YA2JSVANGZ
mADan50A3J6dAOCcmwDVoJ8A7K2fAMOtrQDXo6IA3aCgAN+kpADVq6oA3ay3AMu0tADPtrYA3L+/AOCi
oQDhpqUA5KelAOinpgDlq6gA46usAOOvrQDqrqwA7LGuAOayswDjtrQA5re1AOqysQDts7EA57y6AO+8
ugDrvL0A8LOwAPC1sgDwtrQA87q3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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAP//
/////wAA////////AAD///////8AAP///////wAA////////AAD/+H////8AAP/gH////wAA/8Af////
AAD/gA////8AAP+AD////wAA/wAP////AAD/AA////8AAP4AB////wAA/gAH////AAD8AAf///8AAPwA
B////wAA/AAH////AAD8AAf///8AAPgAB////wAA+AAH//4HAAD4AAP/8AEAAPgAAf/AAQAA8AAA/wAA
AADwAAAAAAAAAPAAAAAAAAAA8AAAAAAAAADwAAAAAAEAAPAAAAAAAQAA8AAAAAADAADwAAAAAAcAAPAA
AAAADwAA+AAAAAAfAAD4AAAAAD8AAPwAAAAAfwAA/gAAAAD/AAD/gAAAA/8AAP/gAAAH/wAAgAAAAB//
AAAAAAAAf/8AAAAD4AP//wAAgB/8H///AAD///////8AAP///////wAA////////AAD///////8AAP//
/////wAA////////AAAoAAAAIAAAAEAAAAABACAAAAAAAIAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAA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JLS3YAAAAAomloXsyRkf/DoKD/48bG/+jAv//hpKL/vX17/7h/fPu/iYj7z5qZ/+Gw
rv/rvLr/77q3/9ScmuR9U1I+AAAAAJZbWz2ndnbxdG9v/4yCgv+4lJP/77Wy/86erP+6nsH/tsXR/8PH
0P/4wsD/9b26/+Cppu2peXdiAAAAAQAAAABYKCgHn2lqe6eCguSsgoL90pKS//Cxrv/TrcP/s5y+/8i3
s/+quab/26mh/82UktSgbm1TBAAAAwAAAACud3cEvYGBC7N6ehyyfHtyt39+3bNub9vLgYH05qak/+Kg
g//OlH39jZR04Zd0aYmDT1EiAAAAAAAAAAAAAAAAr3t7D7aCgki5h4Z8uImJgah+fUltPz8ajU1ORq1s
bI6vdHOgm2RkaYxJUiZgCygCAAAAAAAAAAAAAAAAAAAAAGo9PQF9UVEHcEdHCTodHQIAAAAAAAAAAAAA
AAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//8AAP//AADh/wAAwf8AAMH/
AACB/wAAgfkAAIDAAACAAAAAgAAAAIAAAACAAQAAAAcAAAAPAAAOfwAA//8AAA==
</value>
</data>
</root>

View File

@ -0,0 +1,164 @@
namespace BizHawk.Client.EmuHawk
{
partial class AmstradCPCPokeMemory
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AmstradCPCPokeMemory));
this.OkBtn = new System.Windows.Forms.Button();
this.CancelBtn = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.numericUpDownAddress = new System.Windows.Forms.NumericUpDown();
this.label3 = new System.Windows.Forms.Label();
this.numericUpDownByte = new System.Windows.Forms.NumericUpDown();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownAddress)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownByte)).BeginInit();
this.SuspendLayout();
//
// OkBtn
//
this.OkBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.OkBtn.Location = new System.Drawing.Point(150, 109);
this.OkBtn.Name = "OkBtn";
this.OkBtn.Size = new System.Drawing.Size(60, 23);
this.OkBtn.TabIndex = 3;
this.OkBtn.Text = "&OK";
this.OkBtn.UseVisualStyleBackColor = true;
this.OkBtn.Click += new System.EventHandler(this.OkBtn_Click);
//
// CancelBtn
//
this.CancelBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.CancelBtn.Location = new System.Drawing.Point(216, 109);
this.CancelBtn.Name = "CancelBtn";
this.CancelBtn.Size = new System.Drawing.Size(60, 23);
this.CancelBtn.TabIndex = 4;
this.CancelBtn.Text = "&Cancel";
this.CancelBtn.UseVisualStyleBackColor = true;
this.CancelBtn.Click += new System.EventHandler(this.CancelBtn_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 14);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(273, 13);
this.label1.TabIndex = 17;
this.label1.Text = "Enter an address to POKE along with a single byte value";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(12, 52);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(93, 13);
this.label4.TabIndex = 27;
this.label4.Text = "Address (0-65535)";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 27);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(254, 13);
this.label2.TabIndex = 29;
this.label2.Text = "(This will always target the 64K RAM address space)";
//
// numericUpDownAddress
//
this.numericUpDownAddress.Location = new System.Drawing.Point(15, 69);
this.numericUpDownAddress.Maximum = new decimal(new int[] {
65535,
0,
0,
0});
this.numericUpDownAddress.Name = "numericUpDownAddress";
this.numericUpDownAddress.Size = new System.Drawing.Size(90, 20);
this.numericUpDownAddress.TabIndex = 30;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(123, 52);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(70, 13);
this.label3.TabIndex = 31;
this.label3.Text = "Value (0-255)";
//
// numericUpDownByte
//
this.numericUpDownByte.Location = new System.Drawing.Point(126, 68);
this.numericUpDownByte.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.numericUpDownByte.Name = "numericUpDownByte";
this.numericUpDownByte.Size = new System.Drawing.Size(67, 20);
this.numericUpDownByte.TabIndex = 32;
//
// AmstradCPCPokeMemory
//
this.AcceptButton = this.OkBtn;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.CancelBtn;
this.ClientSize = new System.Drawing.Size(288, 144);
this.Controls.Add(this.numericUpDownByte);
this.Controls.Add(this.label3);
this.Controls.Add(this.numericUpDownAddress);
this.Controls.Add(this.label2);
this.Controls.Add(this.label4);
this.Controls.Add(this.label1);
this.Controls.Add(this.CancelBtn);
this.Controls.Add(this.OkBtn);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "AmstradCPCPokeMemory";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Poke Memory";
((System.ComponentModel.ISupportInitialize)(this.numericUpDownAddress)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownByte)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button OkBtn;
private System.Windows.Forms.Button CancelBtn;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.NumericUpDown numericUpDownAddress;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.NumericUpDown numericUpDownByte;
}
}

View File

@ -0,0 +1,39 @@
using System;
using System.Linq;
using System.Windows.Forms;
using BizHawk.Client.Common;
using BizHawk.Emulation.Cores.Computers.AmstradCPC;
using System.Text;
namespace BizHawk.Client.EmuHawk
{
public partial class AmstradCPCPokeMemory : Form
{
private AmstradCPC.AmstradCPCSettings _settings;
public AmstradCPCPokeMemory()
{
InitializeComponent();
}
private void OkBtn_Click(object sender, EventArgs e)
{
var ams = (AmstradCPC)Global.Emulator;
var addr = (ushort)numericUpDownAddress.Value;
var val = (byte)numericUpDownByte.Value;
ams.PokeMemory(addr, val);
DialogResult = DialogResult.OK;
Close();
}
private void CancelBtn_Click(object sender, EventArgs e)
{
GlobalWin.OSD.AddMessage("POKE memory aborted");
DialogResult = DialogResult.Cancel;
Close();
}
}
}

View File

@ -0,0 +1,624 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAwAMDAQAAAABABoBgAAxgAAACAgEAAAAAQA6AIAAC4HAAAYGBAAAAAEAOgBAAAWCgAAEBAQAAAA
BAAoAQAA/gsAADAwAAAAAAgAqA4AACYNAAAgIAAAAAAIAKgIAADOGwAAGBgAAAAACADIBgAAdiQAABAQ
AAAAAAgAaAUAAD4rAAAwMAA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AP/
AAD/4AAAB/8AAP/4AAAf/wAA/8AAAH//AAD8A+AD//8AAPgP/A///wAA////////AAD///////8AAP//
/////wAA////////AAD///////8AAP///////wAA////////AAAoAAAAIAAAAEAAAAABAAQAAAAAAAAC
AAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAgAAAgAAAAICAAIAAAACAAIAAgIAAAICAgADAwMAAAAD/AAD/
AAAA//8A/wAAAP8A/wD//wAA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdwAAAAAAAAAAAAAAAA
AAd0dAAAAAAAAAAAAAAAAAB3x3cAAAAAAAAAAAAAAAAAd3fHcAAAAAAAAAAAAAAAB3yMh3AAAAAAAAAA
AAAAAAfIeMdwAAAAAAAAAAAAAAAHjIyHQAAAAAAAAAAAAAAAfId4yHAAAAAAAAAAAAAAAHjIyIdQAAAA
AAAAAAAAAAB3iId4YAAAAAAAAAdwAAAAjIiIiIUAAAAAAHd3dAAAB4iIiHh8cAAAAHd3x4dwAAd4iIiI
h3Z3d3R3yIh4cAAHh4iIiIfHd3d4iIiIh3AAB3jHiIiIiHeHiIiIiIwAAAh3dXh4iMiIiIiIiIhwAAAA
yGd0d4iIeIi4iIiMAAAAAIeHd4iIh32IiIiIcAAAAAAAd4jIyIiIiHeHyAAAAAAAAAB3h4iIh8h3dwAA
AAAAAAAIh8fIh4eIaAAAAAAAAACIiHAAB8jIyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////
////////////////////n////g////wP///8B///+Af///gH///4B///8Af///AH///wB//n8AP/A+AB
/AHgAAAB4AAAAeAAAAPgAAAH8AAAD/AAAB/8AAA//wAA//4AA//weA//////////////////////////
//8oAAA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AAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAD///////8AAP///////wAA////////AAD///////8AAP///////wAA////////
AAD///////8AAP///////wAA//h/////AAD/4D////8AAP/AP////wAA/8A/////AAD/gB////8AAP8A
H////wAA/wAf////AAD+AB////8AAP4AH////wAA/gAf////AAD8AB////8AAPwAH////wAA/AAP////
AAD8AA////8AAPgAD//+BwAA+AAH//ADAAD4AAP/wAMAAPgAAP8AAwAA+AAAAAADAAD4AAAAAAMAAPgA
AAAABwAA+AAAAAAHAAD4AAAAAA8AAPgAAAAAHwAA/AAAAAA/AAD8AAAAAH8AAP4AAAAA/wAA/4AAAAP/
AAD/4AAAB/8AAP/4AAAf/wAA/8AAAH//AAD8A+AD//8AAPgP/A///wAA////////AAD///////8AAP//
/////wAA////////AAD///////8AAP///////wAA////////AAAoAAAAIAAAAEAAAAABAAgAAAAAAAAE
AAAAAAAAAAAAAAABAAAAAQAAAAAAAFFNTQBRUlIAU1RUAGJHRwBiT08Aa0lIAGJTUwBrVlYAYllZAGZc
XABpWloAb1xbAHNTUwB7V1YAc1hXAHFbWwBkZWUAaWFhAG5kZABpamkAcGFhAHlubgB2cHAAf3V1AH55
eQB8fX0AgUpKAI1PTwCLWFcAhlhYAI9ZWQCKXFsAm1ZWAJJZWQCWWVgAmlpbAJtcWwCiXFwAl2BfAIBg
YACAZ2YAgG9vAI9oaACWZWQAmGBhAJ5kZACcaWoAmm9vAIV0dACNcHAAiXZ2AIB8fACac3IAm3V0AJ51
dQCZ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AAAAAAAAAAAAALGvlTIuP1K5tqCR
l4xfLwAAAAAAAAAAAAAAAAAAsbPBenkAAAAAcCVYjE0scwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////+f///+D////A////wH
///4B///+Af///gH///wB///8Af///AH/+fwA/8D4AH8AeAAAAHgAAAB4AAAA+AAAAfwAAAP8AAAH/wA
AD//AAD//gAD//B4D////////////////////////////ygAAAAYAAAAMAAAAAEACAAAAAAAQAIAAAAA
AAAAAAAAAAEAAAABAAAAAAAAWlJSAHBJSQB1SEgAe1dXAHdYWAB5WlkAel1dAGBiYgB1bGwAfWtrAHh2
dgB9fn4Ag01NAIRXVwCIV1cAhV9eAItbWgCgX14ApV1dAJhgXwCNYGAAnWtqAJhtbQCCdnYAh3x8AI15
eACeensAqGBgAKhoZwCga2oArGpqALNqagCzb28AtG1tALltbQCxb3AApnVzAKlzcwCqdHMApnp6AKd+
fgCpensAq3x7ALZ3dgC8dHQAvH59AMZvcADGcHEAxXN0AMhycwDJdncAynh5AMx5egDNfn8Ajo1wAOek
VgDGgH8A4p53AEZ2+gB8u4AAd8PaAIuEhACOh4cAjo6OAJ+DggCejo4Ao4SEAKSIiACsi4sAqo2MAK6P
jgC+gYAAvoaGAL+KiACskJAAtJeXALWenQC5np4At6iOAKmyjgC9nroAwYSDAMaGhADOhoYAxomHAMiK
iQDJjYwA0oeIANOOjwDUjY0A2ZiPANaPkADGkZEAx5eXAMySkADGnZwA1ZOSANeTlADWl5YA2JSVANGZ
mADan50A3J6dAOCcmwDVoJ8A7K2fAMOtrQDXo6IA3aCgAN+kpADVq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AAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAP//
/////wAA////////AAD///////8AAP///////wAA////////AAD/+H////8AAP/gH////wAA/8Af////
AAD/gA////8AAP+AD////wAA/wAP////AAD/AA////8AAP4AB////wAA/gAH////AAD8AAf///8AAPwA
B////wAA/AAH////AAD8AAf///8AAPgAB////wAA+AAH//4HAAD4AAP/8AEAAPgAAf/AAQAA8AAA/wAA
AADwAAAAAAAAAPAAAAAAAAAA8AAAAAAAAADwAAAAAAEAAPAAAAAAAQAA8AAAAAADAADwAAAAAAcAAPAA
AAAADwAA+AAAAAAfAAD4AAAAAD8AAPwAAAAAfwAA/gAAAAD/AAD/gAAAA/8AAP/gAAAH/wAAgAAAAB//
AAAAAAAAf/8AAAAD4AP//wAAgB/8H///AAD///////8AAP///////wAA////////AAD///////8AAP//
/////wAA////////AAAoAAAAIAAAAEAAAAABACAAAAAAAIAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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wAAAB0AAAAAAAAAAAAAAAIzHBwiYjs7a3pM
S6pqQkKjLBoaMwAAAACeZ2dZ05KS/em0tP/vxMT/77u6/8CHhfpmPDyvRysqYlExMV1ySEiGnWdn07qB
gPzLkI//w4iG/HJLS3YAAAAAomloXsyRkf/DoKD/48bG/+jAv//hpKL/vX17/7h/fPu/iYj7z5qZ/+Gw
rv/rvLr/77q3/9ScmuR9U1I+AAAAAJZbWz2ndnbxdG9v/4yCgv+4lJP/77Wy/86erP+6nsH/tsXR/8PH
0P/4wsD/9b26/+Cppu2peXdiAAAAAQAAAABYKCgHn2lqe6eCguSsgoL90pKS//Cxrv/TrcP/s5y+/8i3
s/+quab/26mh/82UktSgbm1TBAAAAwAAAACud3cEvYGBC7N6ehyyfHtyt39+3bNub9vLgYH05qak/+Kg
g//OlH39jZR04Zd0aYmDT1EiAAAAAAAAAAAAAAAAr3t7D7aCgki5h4Z8uImJgah+fUltPz8ajU1ORq1s
bI6vdHOgm2RkaYxJUiZgCygCAAAAAAAAAAAAAAAAAAAAAGo9PQF9UVEHcEdHCTodHQIAAAAAAAAAAAAA
AAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//8AAP//AADh/wAAwf8AAMH/
AACB/wAAgfkAAIDAAACAAAAAgAAAAIAAAACAAQAAAAcAAAAPAAAOfwAA//8AAA==
</value>
</data>
</root>

View File

@ -174,7 +174,7 @@ namespace BizHawk.Client.EmuHawk
tt.TabPages[pageidx].Controls.Add(createpanel(settings, cat.Value, tt.Size));
// zxhawk hack - it uses multiple categoryLabels
if (Global.Emulator.SystemId == "ZXSpectrum")
if (Global.Emulator.SystemId == "ZXSpectrum" || Global.Emulator.SystemId == "AmstradCPC")
pageidx++;
}
@ -182,7 +182,7 @@ namespace BizHawk.Client.EmuHawk
if (buckets[0].Count > 0)
{
// ZXHawk needs to skip this bit
if (Global.Emulator.SystemId == "ZXSpectrum")
if (Global.Emulator.SystemId == "ZXSpectrum" || Global.Emulator.SystemId == "AmstradCPC")
return;
string tabname = (Global.Emulator.SystemId == "C64") ? "Keyboard" : "Console"; // hack
@ -272,7 +272,16 @@ namespace BizHawk.Client.EmuHawk
pictureBox1.Size = Properties.Resources.ZXSpectrumKeyboards.Size;
tableLayoutPanel1.ColumnStyles[1].Width = Properties.Resources.ZXSpectrumKeyboards.Width;
}
}
if (controlName == "AmstradCPC Controller")
{
/*
pictureBox1.Image = Properties.Resources.ZXSpectrumKeyboards;
pictureBox1.Size = Properties.Resources.ZXSpectrumKeyboards.Size;
tableLayoutPanel1.ColumnStyles[1].Width = Properties.Resources.ZXSpectrumKeyboards.Width;
*/
}
}
// lazy methods, but they're not called often and actually
// tracking all of the ControllerConfigPanels wouldn't be simpler

View File

@ -52,8 +52,9 @@ namespace BizHawk.Client.EmuHawk
{ "GBC", "Game Boy Color" },
{ "PCFX", "PC-FX" },
{ "32X", "32X" },
{ "ZXSpectrum", "ZX Spectrum" }
};
{ "ZXSpectrum", "ZX Spectrum" },
{ "AmstradCPC", "Amstrad CPC" }
};
public string TargetSystem = null;

View File

@ -144,7 +144,8 @@
"PCFX",
"PSX",
"SAT",
"ZXSpectrum"});
"ZXSpectrum",
"AmstradCPC"});
this.SystemDropDown.Location = new System.Drawing.Point(425, 75);
this.SystemDropDown.Name = "SystemDropDown";
this.SystemDropDown.Size = new System.Drawing.Size(69, 21);

View File

@ -79,6 +79,7 @@
<Compile Include="CoreComms.cs" />
<Compile Include="Database\CRC32.cs" />
<Compile Include="Database\Database.cs" />
<Compile Include="DSKIdentifier.cs" />
<Compile Include="Database\FirmwareDatabase.cs" />
<Compile Include="Database\GameInfo.cs" />
<Compile Include="EmulationExceptions.cs" />
@ -143,4 +144,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>

View File

@ -0,0 +1,421 @@

using System.Linq;
using System.Text;
namespace BizHawk.Emulation.Common
{
/// <summary>
/// A slightly convoluted way of determining the required System based on a *.dsk file
/// This is here because (for probably good reason) there does not appear to be a route
/// to BizHawk.Emulation.Cores from Bizhawk.Emultion.Common
/// </summary>
public class DSKIdentifier
{
/// <summary>
/// Default fallthrough to AppleII
/// </summary>
public string IdentifiedSystem = "AppleII";
private string PossibleIdent = "";
private byte[] data;
// dsk header
public byte NumberOfTracks { get; set; }
public byte NumberOfSides { get; set; }
public int[] TrackSizes { get; set; }
// state
public int CylinderCount;
public int SideCount;
public int BytesPerTrack;
public Track[] Tracks = null;
public DSKIdentifier(byte[] imageData)
{
data = imageData;
ParseDskImage();
}
private void ParseDskImage()
{
string ident = Encoding.ASCII.GetString(data, 0, 16).ToUpper();
if (ident.Contains("MV - CPC"))
{
ParseDSK();
}
else if (ident.Contains("EXTENDED CPC DSK"))
{
ParseEDSK();
}
else
{
// fall through
return;
}
CalculateFormat();
}
private void CalculateFormat()
{
// uses some of the work done here: https://github.com/damieng/DiskImageManager
var trk = Tracks[0];
// look for standard speccy bootstart
if (trk.Sectors[0].SectorData != null && trk.Sectors[0].SectorData.Length > 0)
{
if (trk.Sectors[0].SectorData[0] == 0 && trk.Sectors[0].SectorData[1] == 0
&& trk.Sectors[0].SectorData[2] == 40)
{
PossibleIdent = "ZXSpectrum";
}
}
// search for PLUS3DOS string
foreach (var t in Tracks)
{
foreach (var s in t.Sectors)
{
if (s.SectorData == null || s.SectorData.Length == 0)
continue;
string str = Encoding.ASCII.GetString(s.SectorData, 0, s.SectorData.Length).ToUpper();
if (str.Contains("PLUS3DOS"))
{
IdentifiedSystem = "ZXSpectrum";
return;
}
}
}
// check for bootable status
if (trk.Sectors[0].SectorData != null && trk.Sectors[0].SectorData.Length > 0)
{
int chksm = trk.Sectors[0].GetChecksum256();
switch(chksm)
{
case 3:
IdentifiedSystem = "ZXSpectrum";
return;
case 1:
case 255:
// different Amstrad PCW boot records
// just return CPC for now
IdentifiedSystem = "AmstradCPC";
return;
}
switch(trk.GetLowestSectorID())
{
case 65:
case 193:
IdentifiedSystem = "AmstradCPC";
return;
}
}
// at this point the disk is not standard bootable
// try format analysis
if (trk.Sectors.Length == 9 && trk.Sectors[0].SectorSize == 2)
{
switch(trk.GetLowestSectorID())
{
case 1:
switch(trk.Sectors[0].GetChecksum256())
{
case 3:
IdentifiedSystem = "ZXSpectrum";
return;
case 1:
case 255:
// different Amstrad PCW checksums
// just return CPC for now
IdentifiedSystem = "AmstradCPC";
return;
}
break;
case 65:
case 193:
IdentifiedSystem = "AmstradCPC";
return;
}
}
// could be an odd format disk
switch (trk.GetLowestSectorID())
{
case 1:
if (trk.Sectors.Length == 8)
{
// CPC IBM
IdentifiedSystem = "AmstradCPC";
return;
}
break;
case 65:
case 193:
// possible CPC custom
PossibleIdent = "AmstradCPC";
break;
}
// other custom ZX Spectrum formats
if (NumberOfSides == 1 && trk.Sectors.Length == 10)
{
if (trk.Sectors[0].SectorData.Length > 10)
{
if (trk.Sectors[0].SectorData[2] == 42 && trk.Sectors[0].SectorData[8] == 12)
{
switch (trk.Sectors[0].SectorData[5])
{
case 0:
if (trk.Sectors[1].SectorID == 8)
{
switch (Tracks[1].Sectors[0].SectorID)
{
case 7:
IdentifiedSystem = "ZXSpectrum";
return;
default:
PossibleIdent = "ZXSpectrum";
break;
}
}
else
{
PossibleIdent = "ZXSpectrum";
}
break;
case 1:
if (trk.Sectors[1].SectorID == 8)
{
switch (Tracks[1].Sectors[0].SectorID)
{
case 7:
case 1:
IdentifiedSystem = "ZXSpectrum";
return;
}
}
else
{
PossibleIdent = "ZXSpectrum";
}
break;
}
}
if (trk.Sectors[0].SectorData[7] == 3 &&
trk.Sectors[0].SectorData[9] == 23 &&
trk.Sectors[0].SectorData[2] == 40)
{
IdentifiedSystem = "ZXSpectrum";
return;
}
}
}
// last chance. use the possible value
if (IdentifiedSystem == "AppleII" && PossibleIdent != "")
{
IdentifiedSystem = "ZXSpectrum";
}
}
private void ParseDSK()
{
NumberOfTracks = data[0x30];
NumberOfSides = data[0x31];
TrackSizes = new int[NumberOfTracks * NumberOfSides];
Tracks = new Track[NumberOfTracks * NumberOfSides];
int pos = 0x32;
for (int i = 0; i < NumberOfTracks * NumberOfSides; i++)
{
TrackSizes[i] = (ushort)(data[pos] | data[pos + 1] << 8);
}
pos = 0x100;
for (int i = 0; i < NumberOfTracks * NumberOfSides; i++)
{
if (TrackSizes[i] == 0)
{
Tracks[i] = new Track();
Tracks[i].Sectors = new Sector[0];
continue;
}
int p = pos;
Tracks[i] = new Track();
Tracks[i].TrackIdent = Encoding.ASCII.GetString(data, p, 12);
p += 16;
Tracks[i].TrackNumber = data[p++];
Tracks[i].SideNumber = data[p++];
p += 2;
Tracks[i].SectorSize = data[p++];
Tracks[i].NumberOfSectors = data[p++];
Tracks[i].GAP3Length = data[p++];
Tracks[i].FillerByte = data[p++];
int dpos = pos + 0x100;
Tracks[i].Sectors = new Sector[Tracks[i].NumberOfSectors];
for (int s = 0; s < Tracks[i].NumberOfSectors; s++)
{
Tracks[i].Sectors[s] = new Sector();
Tracks[i].Sectors[s].TrackNumber = data[p++];
Tracks[i].Sectors[s].SideNumber = data[p++];
Tracks[i].Sectors[s].SectorID = data[p++];
Tracks[i].Sectors[s].SectorSize = data[p++];
Tracks[i].Sectors[s].Status1 = data[p++];
Tracks[i].Sectors[s].Status2 = data[p++];
Tracks[i].Sectors[s].ActualDataByteLength = (ushort)(data[p] | data[p + 1] << 8);
p += 2;
if (Tracks[i].Sectors[s].SectorSize == 0)
{
Tracks[i].Sectors[s].ActualDataByteLength = TrackSizes[i];
}
else if (Tracks[i].Sectors[s].SectorSize > 6)
{
Tracks[i].Sectors[s].ActualDataByteLength = TrackSizes[i];
}
else if (Tracks[i].Sectors[s].SectorSize == 6)
{
Tracks[i].Sectors[s].ActualDataByteLength = 0x1800;
}
else
{
Tracks[i].Sectors[s].ActualDataByteLength = 0x80 << Tracks[i].Sectors[s].SectorSize;
}
Tracks[i].Sectors[s].SectorData = new byte[Tracks[i].Sectors[s].ActualDataByteLength];
for (int b = 0; b < Tracks[i].Sectors[s].ActualDataByteLength; b++)
{
Tracks[i].Sectors[s].SectorData[b] = data[dpos + b];
}
dpos += Tracks[i].Sectors[s].ActualDataByteLength;
}
pos += TrackSizes[i];
}
}
private void ParseEDSK()
{
NumberOfTracks = data[0x30];
NumberOfSides = data[0x31];
TrackSizes = new int[NumberOfTracks * NumberOfSides];
Tracks = new Track[NumberOfTracks * NumberOfSides];
int pos = 0x34;
for (int i = 0; i < NumberOfTracks * NumberOfSides; i++)
{
TrackSizes[i] = data[pos++] * 256;
}
pos = 0x100;
for (int i = 0; i < NumberOfTracks * NumberOfSides; i++)
{
if (TrackSizes[i] == 0)
{
Tracks[i] = new Track();
Tracks[i].Sectors = new Sector[0];
continue;
}
int p = pos;
Tracks[i] = new Track();
Tracks[i].TrackIdent = Encoding.ASCII.GetString(data, p, 12);
p += 16;
Tracks[i].TrackNumber = data[p++];
Tracks[i].SideNumber = data[p++];
Tracks[i].DataRate = data[p++];
Tracks[i].RecordingMode = data[p++];
Tracks[i].SectorSize = data[p++];
Tracks[i].NumberOfSectors = data[p++];
Tracks[i].GAP3Length = data[p++];
Tracks[i].FillerByte = data[p++];
int dpos = pos + 0x100;
Tracks[i].Sectors = new Sector[Tracks[i].NumberOfSectors];
for (int s = 0; s < Tracks[i].NumberOfSectors; s++)
{
Tracks[i].Sectors[s] = new Sector();
Tracks[i].Sectors[s].TrackNumber = data[p++];
Tracks[i].Sectors[s].SideNumber = data[p++];
Tracks[i].Sectors[s].SectorID = data[p++];
Tracks[i].Sectors[s].SectorSize = data[p++];
Tracks[i].Sectors[s].Status1 = data[p++];
Tracks[i].Sectors[s].Status2 = data[p++];
Tracks[i].Sectors[s].ActualDataByteLength = (ushort)(data[p] | data[p + 1] << 8);
p += 2;
Tracks[i].Sectors[s].SectorData = new byte[Tracks[i].Sectors[s].ActualDataByteLength];
for (int b = 0; b < Tracks[i].Sectors[s].ActualDataByteLength; b++)
{
Tracks[i].Sectors[s].SectorData[b] = data[dpos + b];
}
if (Tracks[i].Sectors[s].SectorSize <= 7)
{
int specifiedSize = 0x80 << Tracks[i].Sectors[s].SectorSize;
if (specifiedSize < Tracks[i].Sectors[s].ActualDataByteLength)
{
if (Tracks[i].Sectors[s].ActualDataByteLength % specifiedSize != 0)
{
Tracks[i].Sectors[s].ContainsMultipleWeakSectors = true;
}
}
}
dpos += Tracks[i].Sectors[s].ActualDataByteLength;
}
pos += TrackSizes[i];
}
}
#region Internal Classes
public class Track
{
public string TrackIdent { get; set; }
public byte TrackNumber { get; set; }
public byte SideNumber { get; set; }
public byte DataRate { get; set; }
public byte RecordingMode { get; set; }
public byte SectorSize { get; set; }
public byte NumberOfSectors { get; set; }
public byte GAP3Length { get; set; }
public byte FillerByte { get; set; }
public Sector[] Sectors { get; set; }
public byte GetLowestSectorID()
{
byte res = 0xFF;
foreach (var s in Sectors)
{
if (s.SectorID < res)
res = s.SectorID;
}
return res;
}
}
public class Sector
{
public byte TrackNumber { get; set; }
public byte SideNumber { get; set; }
public byte SectorID { get; set; }
public byte SectorSize { get; set; }
public byte Status1 { get; set; }
public byte Status2 { get; set; }
public int ActualDataByteLength { get; set; }
public byte[] SectorData { get; set; }
public bool ContainsMultipleWeakSectors { get; set; }
public int GetChecksum256()
{
int res = 0;
for (int i = 0; i < SectorData.Length; i++)
{
res += SectorData[i] % 256;
}
return res;
}
}
#endregion
}
}

View File

@ -310,7 +310,11 @@ namespace BizHawk.Emulation.Common
game.System = "ZXSpectrum";
break;
case ".TAP":
case ".CDT":
game.System = "AmstradCPC";
break;
case ".TAP":
byte[] head = romData.Take(8).ToArray();
if (System.Text.Encoding.Default.GetString(head).Contains("C64-TAPE"))
game.System = "C64";
@ -342,14 +346,9 @@ namespace BizHawk.Emulation.Common
break;
case ".DSK":
byte[] head2 = romData.Take(20).ToArray();
string ident = System.Text.Encoding.Default.GetString(head2);
if (ident.ToUpper().Contains("EXTENDED CPC DSK") ||
ident.ToUpper().Contains("MV - CPC"))
game.System = "ZXSpectrum";
else
game.System = "AppleII";
break;
var dId = new DSKIdentifier(romData);
game.System = dId.IdentifiedSystem;
break;
case ".PO":
case ".DO":

View File

@ -33,7 +33,8 @@ namespace BizHawk.Emulation.Common
new SystemInfo { SystemId = "C64", FullName = "Commodore 64" },
new SystemInfo { SystemId = "AppleII", FullName = "Apple II" },
new SystemInfo { SystemId = "INTV", FullName = "Intellivision" },
new SystemInfo { SystemId = "ZXSpectrum", FullName = "Sinclair ZX Spectrum" }
new SystemInfo { SystemId = "ZXSpectrum", FullName = "Sinclair ZX Spectrum" },
new SystemInfo { SystemId = "AmstradCPC", FullName = "Amstrad CPC" }
};
public SystemInfo this[string systemId]

View File

@ -125,6 +125,64 @@
<DependentUpon>TI83.cs</DependentUpon>
</Compile>
<Compile Include="Calculator\TI83LinkPort.cs" />
<Compile Include="Computers\AmstradCPC\AmstradCPC.Controllers.cs" />
<Compile Include="Computers\AmstradCPC\AmstradCPC.cs" />
<Compile Include="Computers\AmstradCPC\AmstradCPC.IDebuggable.cs" />
<Compile Include="Computers\AmstradCPC\AmstradCPC.IEmulator.cs" />
<Compile Include="Computers\AmstradCPC\AmstradCPC.InputPollable.cs" />
<Compile Include="Computers\AmstradCPC\AmstradCPC.ISettable.cs" />
<Compile Include="Computers\AmstradCPC\AmstradCPC.IStatable.cs" />
<Compile Include="Computers\AmstradCPC\AmstradCPC.Messaging.cs" />
<Compile Include="Computers\AmstradCPC\AmstradCPC.Util.cs" />
<Compile Include="Computers\AmstradCPC\Hardware\Abstraction\IBeeperDevice.cs" />
<Compile Include="Computers\AmstradCPC\Hardware\Abstraction\IFDDHost.cs" />
<Compile Include="Computers\AmstradCPC\Hardware\Abstraction\IJoystick.cs" />
<Compile Include="Computers\AmstradCPC\Hardware\Abstraction\IKeyboard.cs" />
<Compile Include="Computers\AmstradCPC\Hardware\Abstraction\IPortIODevice.cs" />
<Compile Include="Computers\AmstradCPC\Hardware\Abstraction\IPSG.cs" />
<Compile Include="Computers\AmstradCPC\Hardware\Display\CRCTChip.cs" />
<Compile Include="Computers\AmstradCPC\Hardware\Display\CRCT_6845.cs" />
<Compile Include="Computers\AmstradCPC\Hardware\Datacorder\DatacorderDevice.cs" />
<Compile Include="Computers\AmstradCPC\Hardware\Disk\CHRN.cs" />
<Compile Include="Computers\AmstradCPC\Hardware\Disk\NECUPD765.cs" />
<Compile Include="Computers\AmstradCPC\Hardware\Disk\NECUPD765.Definitions.cs" />
<Compile Include="Computers\AmstradCPC\Hardware\Disk\NECUPD765.FDC.cs" />
<Compile Include="Computers\AmstradCPC\Hardware\Disk\NECUPD765.FDD.cs" />
<Compile Include="Computers\AmstradCPC\Hardware\Disk\NECUPD765.IPortIODevice.cs" />
<Compile Include="Computers\AmstradCPC\Hardware\Disk\NECUPD765.Timing.cs" />
<Compile Include="Computers\AmstradCPC\Hardware\Disk\NECUPS765.Static.cs" />
<Compile Include="Computers\AmstradCPC\Hardware\Display\AmstradGateArray.cs" />
<Compile Include="Computers\AmstradCPC\Hardware\Display\CRTDevice.cs" />
<Compile Include="Computers\AmstradCPC\Hardware\Input\StandardKeyboard.cs" />
<Compile Include="Computers\AmstradCPC\Hardware\SoundOutput\AY38912.cs" />
<Compile Include="Computers\AmstradCPC\Hardware\SoundOutput\Beeper.cs" />
<Compile Include="Computers\AmstradCPC\Machine\CPC464\CPC464.cs" />
<Compile Include="Computers\AmstradCPC\Machine\CPC464\CPC464.Memory.cs" />
<Compile Include="Computers\AmstradCPC\Machine\CPC464\CPC464.Port.cs" />
<Compile Include="Computers\AmstradCPC\Machine\CPC6128\CPC6128.Port.cs" />
<Compile Include="Computers\AmstradCPC\Machine\CPC6128\CPC6128.Memory.cs" />
<Compile Include="Computers\AmstradCPC\Machine\CPC6128\CPC6128.cs" />
<Compile Include="Computers\AmstradCPC\Machine\CPCBase.cs" />
<Compile Include="Computers\AmstradCPC\Machine\CPCBase.Input.cs" />
<Compile Include="Computers\AmstradCPC\Machine\CPCBase.Media.cs" />
<Compile Include="Computers\AmstradCPC\Machine\CPCBase.Memory.cs" />
<Compile Include="Computers\AmstradCPC\Machine\CPCBase.Port.cs" />
<Compile Include="Computers\AmstradCPC\Machine\GateArrayBase.cs" />
<Compile Include="Computers\AmstradCPC\Machine\MachineType.cs" />
<Compile Include="Computers\AmstradCPC\Hardware\PPI\PPI_8255.cs" />
<Compile Include="Computers\AmstradCPC\Media\Disk\CPCExtendedFloppyDisk.cs" />
<Compile Include="Computers\AmstradCPC\Media\Disk\CPCFloppyDisk.cs" />
<Compile Include="Computers\AmstradCPC\Media\Disk\DiskHandler.cs" />
<Compile Include="Computers\AmstradCPC\Media\Disk\DiskType.cs" />
<Compile Include="Computers\AmstradCPC\Media\Disk\FloppyDisk.cs" />
<Compile Include="Computers\AmstradCPC\Media\MediaConverter.cs" />
<Compile Include="Computers\AmstradCPC\Media\MediaConverterType.cs" />
<Compile Include="Computers\AmstradCPC\Media\Tape\TapeCommand.cs" />
<Compile Include="Computers\AmstradCPC\Media\Tape\TapeDataBlock.cs" />
<Compile Include="Computers\AmstradCPC\Media\Tape\CDT\CdtConverter.cs" />
<Compile Include="Computers\AmstradCPC\ROM\RomData.cs" />
<Compile Include="Computers\AmstradCPC\SoundProviderMixer.cs" />
<Compile Include="Computers\AmstradCPC\AmstradCPC.IMemoryDomains.cs" />
<Compile Include="Computers\AppleII\AppleII.cs" />
<Compile Include="Computers\AppleII\AppleII.IDebuggable.cs">
<DependentUpon>AppleII.cs</DependentUpon>
@ -1440,6 +1498,7 @@
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum48K\ZX48.Port.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum48K\ZX48.Screen.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum128K\ZX128.Screen.cs" />
<None Include="Computers\AmstradCPC\readme.md" />
<None Include="Computers\SinclairSpectrum\readme.md" />
<Compile Include="Computers\SinclairSpectrum\Machine\SpectrumBase.Media.cs" />
<None Include="Consoles\Atari\docs\stella.pdf" />
@ -1452,7 +1511,12 @@
<None Include="Resources\128.ROM.gz" />
<None Include="Resources\48.ROM.gz" />
<None Include="Resources\cgb_boot.bin.gz" />
<None Include="Resources\CPC_AMSDOS_0.5.ROM.gz" />
<None Include="Resources\CPC_BASIC_1.0.ROM.gz" />
<None Include="Resources\CPC_BASIC_1.1.ROM.gz" />
<None Include="Resources\CPC_OS_6128.ROM.gz" />
<None Include="Resources\dmg_boot.bin.gz" />
<None Include="Resources\OS_464.ROM.gz" />
<None Include="Resources\plus2.rom.gz" />
<None Include="Resources\plus2a.rom.gz" />
<None Include="Resources\sgb-cart-present.spc.gz" />

View File

@ -30,6 +30,10 @@ namespace BizHawk.Emulation.Cores.Components.Z80A
public Action IRQCallback = delegate () { };
public Action NMICallback = delegate () { };
// this will be a few cycles off for now
// it should suffice for now until Alyosha returns from hiatus
public Action IRQACKCallback = delegate () { };
private void NMI_()
{
cur_instr = new ushort[]
@ -47,7 +51,7 @@ namespace BizHawk.Emulation.Cores.Components.Z80A
BUSRQ = new ushort[] { 0, SPh, 0, 0, SPh, 0, 0, PCh, 0, 0, 0 };
MEMRQ = new ushort[] { 0, SPh, 0, 0, SPh, 0, 0, PCh, 0, 0, 0 };
}
}
// Mode 0 interrupts only take effect if a CALL or RST is on the data bus
// Otherwise operation just continues as normal
@ -67,7 +71,9 @@ namespace BizHawk.Emulation.Cores.Components.Z80A
BUSRQ = new ushort[] { PCh, 0, 0, PCh, 0, 0, 0 };
MEMRQ = new ushort[] { PCh, 0, 0, PCh, 0, 0, 0 };
}
IRQACKCallback();
}
// Just jump to $0038
private void INTERRUPT_1()
@ -89,7 +95,9 @@ namespace BizHawk.Emulation.Cores.Components.Z80A
BUSRQ = new ushort[] { I, 0, 0, SPh, 0, 0, SPh, 0, 0, PCh, 0, 0, 0 };
MEMRQ = new ushort[] { I, 0, 0, SPh, 0, 0, SPh, 0, 0, PCh, 0, 0, 0 };
}
IRQACKCallback();
}
// Interrupt mode 2 uses the I vector combined with a byte on the data bus
private void INTERRUPT_2()
@ -117,7 +125,9 @@ namespace BizHawk.Emulation.Cores.Components.Z80A
BUSRQ = new ushort[] { I, 0, 0, SPh, 0, 0, SPh, 0, 0, W, 0, 0, W, 0 ,0 ,PCh, 0, 0, 0 };
MEMRQ = new ushort[] { I, 0, 0, SPh, 0, 0, SPh, 0, 0, W, 0, 0, W, 0, 0, PCh, 0, 0, 0 };
}
IRQACKCallback();
}
private void ResetInterrupts()
{

View File

@ -0,0 +1,129 @@
using System.Collections.Generic;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// CPCHawk: Core Class
/// * Controllers *
/// </summary>
public partial class AmstradCPC
{
/// <summary>
/// The one CPCHawk ControllerDefinition
/// </summary>
public ControllerDefinition AmstradCPCControllerDefinition
{
get
{
ControllerDefinition definition = new ControllerDefinition();
definition.Name = "AmstradCPC Controller";
// joysticks
List<string> joys1 = new List<string>
{
// P1 Joystick
"P1 Up", "P1 Down", "P1 Left", "P1 Right", "P1 Fire1", "P1 Fire2", "P1 Fire3"
};
foreach (var s in joys1)
{
definition.BoolButtons.Add(s);
definition.CategoryLabels[s] = "J1";
}
List<string> joys2 = new List<string>
{
// P2 Joystick
"P2 Up", "P2 Down", "P2 Left", "P2 Right", "P2 Fire",
};
foreach (var s in joys2)
{
definition.BoolButtons.Add(s);
definition.CategoryLabels[s] = "J2";
}
// keyboard
List<string> keys = new List<string>
{
/// http://www.cpcwiki.eu/index.php/Programming:Keyboard_scanning
/// http://www.cpcwiki.eu/index.php/File:Grimware_cpc464_version3_case_top.jpg
// Keyboard - row 1
"Key ESC", "Key 1", "Key 2", "Key 3", "Key 4", "Key 5", "Key 6", "Key 7", "Key 8", "Key 9", "Key 0", "Key Dash", "Key Hat", "Key CLR", "Key DEL",
// Keyboard - row 2
"Key TAB", "Key Q", "Key W", "Key E", "Key R", "Key T", "Key Y", "Key U", "Key I", "Key O", "Key P", "Key @", "Key LeftBracket", "Key RETURN",
// Keyboard - row 3
"Key CAPSLOCK", "Key A", "Key S", "Key D", "Key F", "Key G", "Key H", "Key J", "Key K", "Key L", "Key Colon", "Key SemiColon", "Key RightBracket",
// Keyboard - row 4
"Key SHIFT", "Key Z", "Key X", "Key C", "Key V", "Key B", "Key N", "Key M", "Key Comma", "Key Period", "Key ForwardSlash", "Key BackSlash",
// Keyboard - row 5
"Key SPACE", "Key CONTROL",
// Keyboard - Cursor
"Key CURUP", "Key CURDOWN", "Key CURLEFT", "Key CURRIGHT", "Key COPY",
// Keyboard - Numpad
"Key NUM0", "Key NUM1", "Key NUM2", "Key NUM3", "Key NUM4", "Key NUM5", "Key NUM6", "Key NUM7", "Key NUM8", "Key NUM9", "Key NUMPERIOD", "KEY ENTER"
};
foreach (var s in keys)
{
definition.BoolButtons.Add(s);
definition.CategoryLabels[s] = "Keyboard";
}
// Power functions
List<string> power = new List<string>
{
// Power functions
"Reset", "Power"
};
foreach (var s in power)
{
definition.BoolButtons.Add(s);
definition.CategoryLabels[s] = "Power";
}
// Datacorder (tape device)
List<string> tape = new List<string>
{
// Tape functions
"Play Tape", "Stop Tape", "RTZ Tape", "Record Tape", "Insert Next Tape",
"Insert Previous Tape", "Next Tape Block", "Prev Tape Block", "Get Tape Status"
};
foreach (var s in tape)
{
definition.BoolButtons.Add(s);
definition.CategoryLabels[s] = "Datacorder";
}
// Datacorder (tape device)
List<string> disk = new List<string>
{
// Tape functions
"Insert Next Disk", "Insert Previous Disk", /*"Eject Current Disk",*/ "Get Disk Status"
};
foreach (var s in disk)
{
definition.BoolButtons.Add(s);
definition.CategoryLabels[s] = "Amstrad Disk Drive";
}
return definition;
}
}
}
/// <summary>
/// The possible joystick types
/// </summary>
public enum JoystickType
{
NULL,
Joystick1,
Joystick2
}
}

View File

@ -0,0 +1,149 @@
using System;
using System.Collections.Generic;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// CPCHawk: Core Class
/// * IDebugggable *
/// </summary>
public partial class AmstradCPC : IDebuggable
{
public IDictionary<string, RegisterValue> GetCpuFlagsAndRegisters()
{
return new Dictionary<string, RegisterValue>
{
["A"] = _cpu.Regs[_cpu.A],
["AF"] = _cpu.Regs[_cpu.F] + (_cpu.Regs[_cpu.A] << 8),
["B"] = _cpu.Regs[_cpu.B],
["BC"] = _cpu.Regs[_cpu.C] + (_cpu.Regs[_cpu.B] << 8),
["C"] = _cpu.Regs[_cpu.C],
["D"] = _cpu.Regs[_cpu.D],
["DE"] = _cpu.Regs[_cpu.E] + (_cpu.Regs[_cpu.D] << 8),
["E"] = _cpu.Regs[_cpu.E],
["F"] = _cpu.Regs[_cpu.F],
["H"] = _cpu.Regs[_cpu.H],
["HL"] = _cpu.Regs[_cpu.L] + (_cpu.Regs[_cpu.H] << 8),
["I"] = _cpu.Regs[_cpu.I],
["IX"] = _cpu.Regs[_cpu.Ixl] + (_cpu.Regs[_cpu.Ixh] << 8),
["IY"] = _cpu.Regs[_cpu.Iyl] + (_cpu.Regs[_cpu.Iyh] << 8),
["L"] = _cpu.Regs[_cpu.L],
["PC"] = _cpu.Regs[_cpu.PCl] + (_cpu.Regs[_cpu.PCh] << 8),
["R"] = _cpu.Regs[_cpu.R],
["Shadow AF"] = _cpu.Regs[_cpu.F_s] + (_cpu.Regs[_cpu.A_s] << 8),
["Shadow BC"] = _cpu.Regs[_cpu.C_s] + (_cpu.Regs[_cpu.B_s] << 8),
["Shadow DE"] = _cpu.Regs[_cpu.E_s] + (_cpu.Regs[_cpu.D_s] << 8),
["Shadow HL"] = _cpu.Regs[_cpu.L_s] + (_cpu.Regs[_cpu.H_s] << 8),
["SP"] = _cpu.Regs[_cpu.Iyl] + (_cpu.Regs[_cpu.Iyh] << 8),
["Flag C"] = _cpu.FlagC,
["Flag N"] = _cpu.FlagN,
["Flag P/V"] = _cpu.FlagP,
["Flag 3rd"] = _cpu.Flag3,
["Flag H"] = _cpu.FlagH,
["Flag 5th"] = _cpu.Flag5,
["Flag Z"] = _cpu.FlagZ,
["Flag S"] = _cpu.FlagS
};
}
public void SetCpuRegister(string register, int value)
{
switch (register)
{
default:
throw new InvalidOperationException();
case "A":
_cpu.Regs[_cpu.A] = (ushort)value;
break;
case "AF":
_cpu.Regs[_cpu.F] = (ushort)(value & 0xFF);
_cpu.Regs[_cpu.A] = (ushort)(value & 0xFF00);
break;
case "B":
_cpu.Regs[_cpu.B] = (ushort)value;
break;
case "BC":
_cpu.Regs[_cpu.C] = (ushort)(value & 0xFF);
_cpu.Regs[_cpu.B] = (ushort)(value & 0xFF00);
break;
case "C":
_cpu.Regs[_cpu.C] = (ushort)value;
break;
case "D":
_cpu.Regs[_cpu.D] = (ushort)value;
break;
case "DE":
_cpu.Regs[_cpu.E] = (ushort)(value & 0xFF);
_cpu.Regs[_cpu.D] = (ushort)(value & 0xFF00);
break;
case "E":
_cpu.Regs[_cpu.E] = (ushort)value;
break;
case "F":
_cpu.Regs[_cpu.F] = (ushort)value;
break;
case "H":
_cpu.Regs[_cpu.H] = (ushort)value;
break;
case "HL":
_cpu.Regs[_cpu.L] = (ushort)(value & 0xFF);
_cpu.Regs[_cpu.H] = (ushort)(value & 0xFF00);
break;
case "I":
_cpu.Regs[_cpu.I] = (ushort)value;
break;
case "IX":
_cpu.Regs[_cpu.Ixl] = (ushort)(value & 0xFF);
_cpu.Regs[_cpu.Ixh] = (ushort)(value & 0xFF00);
break;
case "IY":
_cpu.Regs[_cpu.Iyl] = (ushort)(value & 0xFF);
_cpu.Regs[_cpu.Iyh] = (ushort)(value & 0xFF00);
break;
case "L":
_cpu.Regs[_cpu.L] = (ushort)value;
break;
case "PC":
_cpu.Regs[_cpu.PCl] = (ushort)(value & 0xFF);
_cpu.Regs[_cpu.PCh] = (ushort)(value & 0xFF00);
break;
case "R":
_cpu.Regs[_cpu.R] = (ushort)value;
break;
case "Shadow AF":
_cpu.Regs[_cpu.F_s] = (ushort)(value & 0xFF);
_cpu.Regs[_cpu.A_s] = (ushort)(value & 0xFF00);
break;
case "Shadow BC":
_cpu.Regs[_cpu.C_s] = (ushort)(value & 0xFF);
_cpu.Regs[_cpu.B_s] = (ushort)(value & 0xFF00);
break;
case "Shadow DE":
_cpu.Regs[_cpu.E_s] = (ushort)(value & 0xFF);
_cpu.Regs[_cpu.D_s] = (ushort)(value & 0xFF00);
break;
case "Shadow HL":
_cpu.Regs[_cpu.L_s] = (ushort)(value & 0xFF);
_cpu.Regs[_cpu.H_s] = (ushort)(value & 0xFF00);
break;
case "SP":
_cpu.Regs[_cpu.SPl] = (ushort)(value & 0xFF);
_cpu.Regs[_cpu.SPh] = (ushort)(value & 0xFF00);
break;
}
}
public IMemoryCallbackSystem MemoryCallbacks { get; }
public bool CanStep(StepType type) => false;
[FeatureNotImplemented]
public void Step(StepType type)
{
throw new NotImplementedException();
}
public long TotalExecutedCycles => _cpu.TotalExecutedCycles;
}
}

View File

@ -0,0 +1,83 @@
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// CPCHawk: Core Class
/// * IEmulator *
/// </summary>
public partial class AmstradCPC : IEmulator
{
public IEmulatorServiceProvider ServiceProvider { get; }
public ControllerDefinition ControllerDefinition { get; set; }
public void FrameAdvance(IController controller, bool render, bool renderSound)
{
_controller = controller;
bool ren = render;
bool renSound = renderSound;
if (DeterministicEmulation)
{
ren = true;
renSound = true;
}
_isLag = true;
if (_tracer.Enabled)
{
_cpu.TraceCallback = s => _tracer.Put(s);
}
else
{
_cpu.TraceCallback = null;
}
_machine.ExecuteFrame(ren, renSound);
if (_isLag)
{
_lagCount++;
}
}
public int Frame
{
get
{
if (_machine == null)
return 0;
else
return _machine.FrameCount;
}
}
public string SystemId => "AmstradCPC";
private bool deterministicEmulation;
public bool DeterministicEmulation
{
get { return deterministicEmulation; }
}
public void ResetCounters()
{
_machine.FrameCount = 0;
_lagCount = 0;
_isLag = false;
}
public CoreComm CoreComm { get; }
public void Dispose()
{
if (_machine != null)
{
_machine = null;
}
}
}
}

View File

@ -0,0 +1,78 @@
using System;
using System.Collections.Generic;
using System.Linq;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// CPCHawk: Core Class
/// * Memory Domains *
/// </summary>
public partial class AmstradCPC
{
internal IMemoryDomains memoryDomains;
private readonly Dictionary<string, MemoryDomainByteArray> _byteArrayDomains = new Dictionary<string, MemoryDomainByteArray>();
private bool _memoryDomainsInit = false;
private void SetupMemoryDomains()
{
var domains = new List<MemoryDomain>
{
new MemoryDomainDelegate("System Bus", 0x10000, MemoryDomain.Endian.Little,
(addr) =>
{
if (addr < 0 || addr >= 65536)
{
throw new ArgumentOutOfRangeException();
}
return _machine.ReadBus((ushort)addr);
},
(addr, value) =>
{
if (addr < 0 || addr >= 65536)
{
throw new ArgumentOutOfRangeException();
}
_machine.WriteBus((ushort)addr, value);
}, 1)
};
SyncAllByteArrayDomains();
memoryDomains = new MemoryDomainList(_byteArrayDomains.Values.Concat(domains).ToList());
(ServiceProvider as BasicServiceProvider).Register<IMemoryDomains>(memoryDomains);
_memoryDomainsInit = true;
}
private void SyncAllByteArrayDomains()
{
SyncByteArrayDomain("ROMLower", _machine.ROMLower);
SyncByteArrayDomain("ROM0", _machine.ROM0);
SyncByteArrayDomain("ROM7", _machine.ROM7);
SyncByteArrayDomain("RAM0", _machine.RAM0);
SyncByteArrayDomain("RAM1", _machine.RAM1);
SyncByteArrayDomain("RAM2", _machine.RAM2);
SyncByteArrayDomain("RAM3", _machine.RAM3);
SyncByteArrayDomain("RAM4", _machine.RAM4);
SyncByteArrayDomain("RAM5", _machine.RAM5);
SyncByteArrayDomain("RAM6", _machine.RAM6);
SyncByteArrayDomain("RAM7", _machine.RAM7);
}
private void SyncByteArrayDomain(string name, byte[] data)
{
if (_memoryDomainsInit || _byteArrayDomains.ContainsKey(name))
{
var m = _byteArrayDomains[name];
m.Data = data;
}
else
{
var m = new MemoryDomainByteArray(name, MemoryDomain.Endian.Little, data, true, 1);
_byteArrayDomains.Add(name, m);
}
}
}
}

View File

@ -0,0 +1,329 @@
using BizHawk.Common;
using BizHawk.Emulation.Common;
using System.ComponentModel;
using System.Text;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// CPCHawk: Core Class
/// * ISettable *
/// </summary>
public partial class AmstradCPC : ISettable<AmstradCPC.AmstradCPCSettings, AmstradCPC.AmstradCPCSyncSettings>
{
internal AmstradCPCSettings Settings = new AmstradCPCSettings();
internal AmstradCPCSyncSettings SyncSettings = new AmstradCPCSyncSettings();
public AmstradCPCSettings GetSettings()
{
return Settings.Clone();
}
public AmstradCPCSyncSettings GetSyncSettings()
{
return SyncSettings.Clone();
}
public bool PutSettings(AmstradCPCSettings o)
{
// restore user settings to devices
if (_machine != null && _machine.AYDevice != null)
{
((AY38912)_machine.AYDevice as AY38912).PanningConfiguration = o.AYPanConfig;
_machine.AYDevice.Volume = o.AYVolume;
}
if (_machine != null && _machine.TapeBuzzer != null)
{
((Beeper)_machine.TapeBuzzer as Beeper).Volume = o.TapeVolume;
}
Settings = o;
return false;
}
public bool PutSyncSettings(AmstradCPCSyncSettings o)
{
bool ret = AmstradCPCSyncSettings.NeedsReboot(SyncSettings, o);
SyncSettings = o;
return ret;
}
public class AmstradCPCSettings
{
[DisplayName("AY-3-8912 Panning Config")]
[Description("Set the PSG panning configuration.\nThe chip has 3 audio channels that can be outputed in different configurations")]
[DefaultValue(AY38912.AYPanConfig.ABC)]
public AY38912.AYPanConfig AYPanConfig { get; set; }
[DisplayName("AY-3-8912 Volume")]
[Description("The AY chip volume")]
[DefaultValue(75)]
public int AYVolume { get; set; }
[DisplayName("Core OSD Message Verbosity")]
[Description("Full: Display all GUI messages\nMedium: Display only emulator/device generated messages\nNone: Show no messages")]
[DefaultValue(OSDVerbosity.Medium)]
public OSDVerbosity OSDMessageVerbosity { get; set; }
[DisplayName("Tape Loading Volume")]
[Description("The buzzer volume when the tape is playing")]
[DefaultValue(50)]
public int TapeVolume { get; set; }
public AmstradCPCSettings Clone()
{
return (AmstradCPCSettings)MemberwiseClone();
}
public AmstradCPCSettings()
{
BizHawk.Common.SettingsUtil.SetDefaultValues(this);
}
}
public class AmstradCPCSyncSettings
{
[DisplayName("Deterministic Emulation")]
[Description("If true, the core agrees to behave in a completely deterministic manner")]
[DefaultValue(true)]
public bool DeterministicEmulation { get; set; }
[DisplayName("CPC Model")]
[Description("The model of Amstrad CPC machine to be emulated")]
[DefaultValue(MachineType.CPC464)]
public MachineType MachineType { get; set; }
[DisplayName("Auto Start/Stop Tape")]
[Description("If true, CPCHawk will automatically start and stop the tape when the tape motor is triggered")]
[DefaultValue(true)]
public bool AutoStartStopTape { get; set; }
[DisplayName("Border type")]
[Description("Select how to show the border area")]
[DefaultValue(BorderType.Uniform)]
public BorderType BorderType { get; set; }
public AmstradCPCSyncSettings Clone()
{
return (AmstradCPCSyncSettings)MemberwiseClone();
}
public AmstradCPCSyncSettings()
{
BizHawk.Common.SettingsUtil.SetDefaultValues(this);
}
public static bool NeedsReboot(AmstradCPCSyncSettings x, AmstradCPCSyncSettings y)
{
return !DeepEquality.DeepEquals(x, y);
}
}
/// <summary>
/// Verbosity of the CPCHawk generated OSD messages
/// </summary>
public enum OSDVerbosity
{
/// <summary>
/// Show all OSD messages
/// </summary>
Full,
/// <summary>
/// Only show machine/device generated messages
/// </summary>
Medium,
/// <summary>
/// No core-driven OSD messages
/// </summary>
None
}
/// <summary>
/// Provides information on each emulated machine
/// </summary>
public class CPCMachineMetaData
{
public MachineType MachineType { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public string Released { get; set; }
public string CPU { get; set; }
public string Memory { get; set; }
public string Video { get; set; }
public string Audio { get; set; }
public string Media { get; set; }
public string OtherMisc { get; set; }
public static CPCMachineMetaData GetMetaObject(MachineType type)
{
CPCMachineMetaData m = new CPCMachineMetaData();
m.MachineType = type;
switch (type)
{
case MachineType.CPC464:
m.Name = "Amstrad CPC 464";
m.Description = "The CPC 464 was the first personal home computer built by Amstrad in 1984. ";
m.Description += "The 464 was popular with consumers for various reasons. Aside from the joystick port, the computer, keyboard, and tape deck were all combined into one unit.";
m.Released = "1984";
m.CPU = "Zilog Z80A @ 4MHz";
m.Memory = "64KB RAM / 32KB ROM";
m.Video = "Amstrad Gate Array @ 16Mhz & CRCT @ 1Mhz";
m.Audio = "General Instruments AY-3-8912 PSG (3ch)";
m.Media = "Cassette Tape (via built-in Datacorder)";
break;
case MachineType.CPC6128:
m.Name = "Amstrad CPC 6128";
m.Description = "The CPC6128 features 128 KB RAM and an internal 3-inch floppy disk drive. ";
m.Description += "Aside from various hardware and firmware improvements, one of the CPC6128's most prominent features is the compatibility with the CP/M+ operating system that rendered it attractive for business uses.";
m.Released = "1985";
m.CPU = "Zilog Z80A @ 4MHz";
m.Memory = "64KB RAM / 32KB ROM";
m.Video = "Amstrad Gate Array @ 16Mhz & CRCT @ 1Mhz";
m.Audio = "General Instruments AY-3-8912 PSG (3ch)";
m.Media = "3\" Floppy Disk (via built-in Floppy Drive) & Cassette Tape (via external cassette player)";
break;
/*
case MachineType.ZXSpectrum48:
m.Name = "Sinclair ZX Spectrum 48K / 48K+";
m.Description = "The original ZX Spectrum 48K RAM version. 2 years later a 'plus' version was released that had a better keyboard. ";
m.Description += "Electronically both the 48K and + are identical, so ZXHawk treats them as the same emulated machine. ";
m.Description += "These machines dominated the UK 8-bit home computer market throughout the 1980's so most non-128k only games are compatible.";
m.Released = "1982 (48K) / 1984 (48K+)";
m.CPU = "Zilog Z80A @ 3.5MHz";
m.Memory = "16KB ROM / 48KB RAM";
m.Video = "ULA @ 7MHz - PAL (50.08Hz Interrupt)";
m.Audio = "Beeper (HW 1ch. / 10oct.) - Internal Speaker";
m.Media = "Cassette Tape (via 3rd party external tape player)";
break;
case MachineType.ZXSpectrum128:
m.Name = "Sinclair ZX Spectrum 128";
m.Description = "The first Spectrum 128K machine released in Spain in 1985 and later UK in 1986. ";
m.Description += "With an updated ROM and new memory paging system to work around the Z80's 16-bit address bus. ";
m.Description += "The 128 shipped with a copy of the 48k ROM (that is paged in when required) and a new startup menu with the option of dropping into a '48k mode'. ";
m.Description += "Even so, there were some compatibility issues with older Spectrum games that were written to utilise some of the previous model's intricacies. ";
m.Description += "Many games released after 1985 supported the new AY-3-8912 PSG chip making for far superior audio. The extra memory also enabled many games to be loaded in all at once (rather than loading each level from tape when needed).";
m.Released = "1985 / 1986";
m.CPU = "Zilog Z80A @ 3.5469 MHz";
m.Memory = "32KB ROM / 128KB RAM";
m.Video = "ULA @ 7.0938MHz - PAL (50.01Hz Interrupt)";
m.Audio = "Beeper (HW 1ch. / 10oct.) & General Instruments AY-3-8912 PSG (3ch) - RF Output";
m.Media = "Cassette Tape (via 3rd party external tape player)";
break;
case MachineType.ZXSpectrum128Plus2:
m.Name = "Sinclair ZX Spectrum +2";
m.Description = "The first Sinclair Spectrum 128K machine that was released after Amstrad purchased Sinclair in 1986. ";
m.Description += "Electronically it was almost identical to the 128, but with the addition of a built-in tape deck and 2 Sinclair Joystick ports.";
m.Released = "1986";
m.CPU = "Zilog Z80A @ 3.5469 MHz";
m.Memory = "32KB ROM / 128KB RAM";
m.Video = "ULA @ 7.0938MHz - PAL (50.01Hz Interrupt)";
m.Audio = "Beeper (HW 1ch. / 10oct.) & General Instruments AY-3-8912 PSG (3ch) - RF Output";
m.Media = "Cassette Tape (via built-in Datacorder)";
break;
case MachineType.ZXSpectrum128Plus2a:
m.Name = "Sinclair ZX Spectrum +2a";
m.Description = "The +2a looks almost identical to the +2 but is a variant of the +3 machine that was released the same year (except with the same built-in datacorder that the +2 had rather than a floppy drive). ";
m.Description += "Memory paging again changed significantly and this (along with memory contention timing changes) caused more compatibility issues with some older games. ";
m.Description += "Although functionally identical to the +3, it does not contain floppy disk controller.";
m.Released = "1987";
m.CPU = "Zilog Z80A @ 3.5469 MHz";
m.Memory = "64KB ROM / 128KB RAM";
m.Video = "ULA @ 7.0938MHz - PAL (50.01Hz Interrupt)";
m.Audio = "Beeper (HW 1ch. / 10oct.) & General Instruments AY-3-8912 PSG (3ch) - RF Output";
m.Media = "Cassette Tape (via built-in Datacorder)";
break;
case MachineType.ZXSpectrum128Plus3:
m.Name = "Sinclair ZX Spectrum +3";
m.Description = "Amstrad released the +3 the same year as the +2a, but it featured a built-in floppy drive rather than a datacorder. An external cassette player could still be connected though as in the older 48k models. ";
m.Description += "Memory paging again changed significantly and this (along with memory contention timing changes) caused more compatibility issues with some older games. ";
m.Description += "Currently ZXHawk does not emulate the floppy drive or floppy controller so the machine reports as a +2a on boot.";
m.Released = "1987";
m.CPU = "Zilog Z80A @ 3.5469 MHz";
m.Memory = "64KB ROM / 128KB RAM";
m.Video = "ULA @ 7.0938MHz - PAL (50.01Hz Interrupt)";
m.Audio = "Beeper (HW 1ch. / 10oct.) & General Instruments AY-3-8912 PSG (3ch) - RF Output";
m.Media = "3\" Floppy Disk (via built-in Floppy Drive)";
break;
*/
}
return m;
}
public static string GetMetaString(MachineType type)
{
var m = GetMetaObject(type);
StringBuilder sb = new StringBuilder();
sb.Append(m.Name);
sb.Append("\n");
sb.Append("-----------------------------------------------------------------\n");
// Release
sb.Append("Released:");
sb.Append(" ");
sb.Append(m.Released);
sb.Append("\n");
// CPU
sb.Append("CPU:");
sb.Append(" ");
sb.Append(m.CPU);
sb.Append("\n");
// Memory
sb.Append("Memory:");
sb.Append(" ");
sb.Append(m.Memory);
sb.Append("\n");
// Video
sb.Append("Video:");
sb.Append(" ");
sb.Append(m.Video);
sb.Append("\n");
// Audio
sb.Append("Audio:");
sb.Append(" ");
sb.Append(m.Audio);
sb.Append("\n");
// Audio
sb.Append("Media:");
sb.Append(" ");
sb.Append(m.Media);
sb.Append("\n");
sb.Append("-----------------------------------------------------------------\n");
// description
sb.Append(m.Description);
if (m.OtherMisc != null)
sb.Append("\n" + m.OtherMisc);
return sb.ToString();
}
}
/// <summary>
/// The size of the Spectrum border
/// </summary>
public enum BorderType
{
/// <summary>
/// Attempts to equalise the border areas
/// </summary>
Uniform,
/// <summary>
/// Pretty much the signal the gate array is generating (looks shit)
/// </summary>
Uncropped,
/// <summary>
/// Top and bottom border removed so that the result is *almost* 16:9
/// </summary>
Widescreen,
}
}
}

View File

@ -0,0 +1,101 @@
using System.IO;
using BizHawk.Common;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// CPCHawk: Core Class
/// * IStatable *
/// </summary>
public partial class AmstradCPC : IStatable
{
public bool BinarySaveStatesPreferred
{
get { return true; }
}
public void SaveStateText(TextWriter writer)
{
SyncState(new Serializer(writer));
}
public void LoadStateText(TextReader reader)
{
SyncState(new Serializer(reader));
}
public void SaveStateBinary(BinaryWriter bw)
{
SyncState(new Serializer(bw));
}
public void LoadStateBinary(BinaryReader br)
{
SyncState(new Serializer(br));
}
public byte[] SaveStateBinary()
{
MemoryStream ms = new MemoryStream();
BinaryWriter bw = new BinaryWriter(ms);
SaveStateBinary(bw);
bw.Flush();
return ms.ToArray();
}
private void SyncState(Serializer ser)
{
byte[] core = null;
if (ser.IsWriter)
{
var ms = new MemoryStream();
ms.Close();
core = ms.ToArray();
}
if (ser.IsWriter)
{
ser.SyncEnum("_machineType", ref _machineType);
_cpu.SyncState(ser);
ser.BeginSection("AmstradCPC");
_machine.SyncState(ser);
ser.Sync("Frame", ref _machine.FrameCount);
ser.Sync("LagCount", ref _lagCount);
ser.Sync("IsLag", ref _isLag);
ser.EndSection();
}
if (ser.IsReader)
{
var tmpM = _machineType;
ser.SyncEnum("_machineType", ref _machineType);
if (tmpM != _machineType && _machineType.ToString() != "72")
{
string msg = "SAVESTATE FAILED TO LOAD!!\n\n";
msg += "Current Configuration: " + tmpM.ToString();
msg += "\n";
msg += "Saved Configuration: " + _machineType.ToString();
msg += "\n\n";
msg += "If you wish to load this SaveState ensure that you have the correct machine configuration selected, reboot the core, then try again.";
CoreComm.ShowMessage(msg);
_machineType = tmpM;
}
else
{
_cpu.SyncState(ser);
ser.BeginSection("AmstradCPC");
_machine.SyncState(ser);
ser.Sync("Frame", ref _machine.FrameCount);
ser.Sync("LagCount", ref _lagCount);
ser.Sync("IsLag", ref _isLag);
ser.EndSection();
SyncAllByteArrayDomains();
}
}
}
}
}

View File

@ -0,0 +1,29 @@
using System;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// CPCHawk: Core Class
/// * IInputPollable *
/// </summary>
public partial class AmstradCPC : IInputPollable
{
public int LagCount
{
get { return _lagCount; }
set { _lagCount = value; }
}
public bool IsLagFrame
{
get { return _isLag; }
set { _isLag = value; }
}
public IInputCallbackSystem InputCallbacks { get; }
private int _lagCount = 0;
private bool _isLag = false;
}
}

View File

@ -0,0 +1,523 @@
using System;
using System.Linq;
using System.Text;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// CPCHawk: Core Class
/// * Handles all messaging (OSD) operations *
/// </summary>
public partial class AmstradCPC
{
/// <summary>
/// Writes a message to the OSD
/// </summary>
/// <param name="message"></param>
/// <param name="category"></param>
public void SendMessage(string message, MessageCategory category)
{
if (!CheckMessageSettings(category))
return;
StringBuilder sb = new StringBuilder();
switch (category)
{
case MessageCategory.Tape:
sb.Append("DATACORDER: ");
sb.Append(message);
break;
case MessageCategory.Input:
sb.Append("INPUT DETECTED: ");
sb.Append(message);
break;
case MessageCategory.Disk:
sb.Append("DISK DRIVE: ");
sb.Append(message);
break;
case MessageCategory.Emulator:
case MessageCategory.Misc:
sb.Append("CPCHAWK: ");
sb.Append(message);
break;
}
CoreComm.Notify(sb.ToString());
}
#region Input Message Methods
/// <summary>
/// Called when certain input presses are detected
/// </summary>
/// <param name="input"></param>
public void OSD_FireInputMessage(string input)
{
StringBuilder sb = new StringBuilder();
sb.Append(input);
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Input);
}
#endregion
#region DiskDevice Message Methods
/// <summary>
/// Disk message that is fired on core init
/// </summary>
public void OSD_DiskInit()
{
StringBuilder sb = new StringBuilder();
if (_machine.diskImages != null && _machine.UPDDiskDevice != null)
{
sb.Append("Disk Media Imported (count: " + _machine.diskImages.Count() + ")");
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Emulator);
}
}
/// <summary>
/// Disk message that is fired when a new disk is inserted into the drive
/// </summary>
public void OSD_DiskInserted()
{
StringBuilder sb = new StringBuilder();
if (_machine.UPDDiskDevice == null)
{
sb.Append("No Drive Present");
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Disk);
return;
}
sb.Append("DISK INSERTED (" + _machine.DiskMediaIndex + ": " + _diskInfo[_machine.DiskMediaIndex].Name + ")");
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Disk);
}
/// <summary>
/// Tape message that prints the current status of the tape device
/// </summary>
public void OSD_ShowDiskStatus()
{
StringBuilder sb = new StringBuilder();
if (_machine.UPDDiskDevice == null)
{
sb.Append("No Drive Present");
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Disk);
return;
}
if (_diskInfo.Count == 0)
{
sb.Append("No Disk Loaded");
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Disk);
return;
}
if (_machine.UPDDiskDevice != null)
{
if (_machine.UPDDiskDevice.DiskPointer == null)
{
sb.Append("No Disk Loaded");
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Disk);
return;
}
sb.Append("Disk: " + _machine.DiskMediaIndex + ": " + _diskInfo[_machine.DiskMediaIndex].Name);
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Disk);
sb.Clear();
/*
string protection = "None";
protection = Enum.GetName(typeof(ProtectionType), _machine.UPDDiskDevice.DiskPointer.Protection);
if (protection == "None")
protection += " (OR UNKNOWN)";
sb.Append("Detected Protection: " + protection);
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Disk);
sb.Clear();
*/
sb.Append("Status: ");
if (_machine.UPDDiskDevice.DriveLight)
sb.Append("READING/WRITING DATA");
else
sb.Append("UNKNOWN");
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Disk);
sb.Clear();
}
}
#endregion
#region TapeDevice Message Methods
/// <summary>
/// Tape message that is fired on core init
/// </summary>
public void OSD_TapeInit()
{
if (_tapeInfo.Count == 0)
return;
StringBuilder sb = new StringBuilder();
sb.Append("Tape Media Imported (count: " + _tapeInfo.Count() + ")");
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Emulator);
}
/// <summary>
/// Tape message that is fired when tape is playing
/// </summary>
public void OSD_TapeMotorActive()
{
if (_tapeInfo.Count == 0)
return;
StringBuilder sb = new StringBuilder();
sb.Append("MOTOR ON (" + _machine.TapeMediaIndex + ": " + _tapeInfo[_machine.TapeMediaIndex].Name + ")");
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Tape);
}
/// <summary>
/// Tape message that is fired when tape is playing
/// </summary>
public void OSD_TapeMotorInactive()
{
if (_tapeInfo.Count == 0)
return;
StringBuilder sb = new StringBuilder();
sb.Append("MOTOR OFF (" + _machine.TapeMediaIndex + ": " + _tapeInfo[_machine.TapeMediaIndex].Name + ")");
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Tape);
}
/// <summary>
/// Tape message that is fired when tape is playing
/// </summary>
public void OSD_TapePlaying()
{
if (_tapeInfo.Count == 0)
return;
StringBuilder sb = new StringBuilder();
sb.Append("PLAYING MANUAL (" + _machine.TapeMediaIndex + ": " + _tapeInfo[_machine.TapeMediaIndex].Name + ")");
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Tape);
}
/// <summary>
/// Tape message that is fired when tape is stopped
/// </summary>
public void OSD_TapeStopped()
{
if (_tapeInfo.Count == 0)
return;
StringBuilder sb = new StringBuilder();
sb.Append("STOPPED MANUAL (" + _machine.TapeMediaIndex + ": " + _tapeInfo[_machine.TapeMediaIndex].Name + ")");
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Tape);
}
/// <summary>
/// Tape message that is fired when tape is rewound
/// </summary>
public void OSD_TapeRTZ()
{
if (_tapeInfo.Count == 0)
return;
StringBuilder sb = new StringBuilder();
sb.Append("REWOUND (" + _machine.TapeMediaIndex + ": " + _tapeInfo[_machine.TapeMediaIndex].Name + ")");
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Tape);
}
/// <summary>
/// Tape message that is fired when a new tape is inserted into the datacorder
/// </summary>
public void OSD_TapeInserted()
{
if (_tapeInfo.Count == 0)
return;
StringBuilder sb = new StringBuilder();
sb.Append("TAPE INSERTED (" + _machine.TapeMediaIndex + ": " + _tapeInfo[_machine.TapeMediaIndex].Name + ")");
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Tape);
}
/// <summary>
/// Tape message that is fired when a tape is stopped automatically
/// </summary>
public void OSD_TapeStoppedAuto()
{
StringBuilder sb = new StringBuilder();
if (_tapeInfo.Count == 0)
{
sb.Append("No Tape Loaded");
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Tape);
return;
}
sb.Append("STOPPED (Auto Tape Trap Detected)");
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Tape);
}
/// <summary>
/// Tape message that is fired when a tape is started automatically
/// </summary>
public void OSD_TapePlayingAuto()
{
StringBuilder sb = new StringBuilder();
if (_tapeInfo.Count == 0)
{
sb.Append("No Tape Loaded");
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Tape);
return;
}
sb.Append("PLAYING (Auto Tape Trap Detected)");
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Tape);
}
/// <summary>
/// Tape message that is fired when a new block starts playing
/// </summary>
public void OSD_TapePlayingBlockInfo(string blockinfo)
{
StringBuilder sb = new StringBuilder();
if (_tapeInfo.Count == 0)
{
sb.Append("No Tape Loaded");
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Tape);
return;
}
sb.Append("...Starting Block " + blockinfo);
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Tape);
}
/// <summary>
/// Tape message that is fired when a tape block is skipped (because it is empty)
/// </summary>
public void OSD_TapePlayingSkipBlockInfo(string blockinfo)
{
StringBuilder sb = new StringBuilder();
if (_tapeInfo.Count == 0)
{
sb.Append("No Tape Loaded");
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Tape);
return;
}
sb.Append("...Skipping Empty Block " + blockinfo);
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Tape);
}
/// <summary>
/// Tape message that is fired when a tape is started automatically
/// </summary>
public void OSD_TapeEndDetected(string blockinfo)
{
StringBuilder sb = new StringBuilder();
if (_tapeInfo.Count == 0)
{
sb.Append("No Tape Loaded");
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Tape);
return;
}
sb.Append("...Skipping Empty Block " + blockinfo);
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Tape);
}
/// <summary>
/// Tape message that is fired when user has manually skipped to the next block
/// </summary>
public void OSD_TapeNextBlock(string blockinfo)
{
StringBuilder sb = new StringBuilder();
if (_tapeInfo.Count == 0)
{
sb.Append("No Tape Loaded");
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Tape);
return;
}
sb.Append("Manual Skip Next " + blockinfo);
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Tape);
}
/// <summary>
/// Tape message that is fired when user has manually skipped to the next block
/// </summary>
public void OSD_TapePrevBlock(string blockinfo)
{
StringBuilder sb = new StringBuilder();
if (_tapeInfo.Count == 0)
{
sb.Append("No Tape Loaded");
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Tape);
return;
}
sb.Append("Manual Skip Prev " + blockinfo);
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Tape);
}
/// <summary>
/// Tape message that prints the current status of the tape device
/// </summary>
public void OSD_ShowTapeStatus()
{
StringBuilder sb = new StringBuilder();
if (_tapeInfo.Count == 0)
{
sb.Append("No Tape Loaded");
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Tape);
return;
}
sb.Append("Status: ");
if (_machine.TapeDevice.TapeIsPlaying)
sb.Append("PLAYING");
else
sb.Append("STOPPED");
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Tape);
sb.Clear();
sb.Append("Tape: " + _machine.TapeMediaIndex + ": " + _tapeInfo[_machine.TapeMediaIndex].Name);
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Tape);
sb.Clear();
sb.Append("Block: ");
sb.Append("(" + (_machine.TapeDevice.CurrentDataBlockIndex + 1) +
" of " + _machine.TapeDevice.DataBlocks.Count() + ") " +
_machine.TapeDevice.DataBlocks[_machine.TapeDevice.CurrentDataBlockIndex].BlockDescription);
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Tape);
sb.Clear();
sb.Append("Block Pos: ");
int pos = _machine.TapeDevice.Position;
int end = _machine.TapeDevice.DataBlocks[_machine.TapeDevice.CurrentDataBlockIndex].DataPeriods.Count;
double p = 0;
if (end != 0)
p = ((double)pos / (double)end) * (double)100;
sb.Append(p.ToString("N0") + "%");
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Tape);
sb.Clear();
// get position within the tape itself
sb.Append("Tape Pos: ");
var ind = _machine.TapeDevice.CurrentDataBlockIndex;
int cnt = 0;
for (int i = 0; i < ind; i++)
{
cnt += _machine.TapeDevice.DataBlocks[i].DataPeriods.Count;
}
// now we are at our current block
int ourPos = cnt + pos;
cnt += end;
// count periods in the remaining blocks
for (int i = ind + 1; i < _machine.TapeDevice.DataBlocks.Count; i++)
{
cnt += _machine.TapeDevice.DataBlocks[i].DataPeriods.Count;
}
// work out overall position within the tape
p = 0;
p = ((double)ourPos / (double)cnt) * (double)100;
sb.Append(p.ToString("N0") + "%");
SendMessage(sb.ToString().TrimEnd('\n'), MessageCategory.Tape);
}
#endregion
/// <summary>
/// Checks whether message category is allowed to be sent
/// </summary>
/// <param name="category"></param>
/// <returns></returns>
public bool CheckMessageSettings(MessageCategory category)
{
switch (Settings.OSDMessageVerbosity)
{
case OSDVerbosity.Full:
return true;
case OSDVerbosity.None:
return false;
case OSDVerbosity.Medium:
switch (category)
{
case MessageCategory.Disk:
case MessageCategory.Emulator:
case MessageCategory.Tape:
case MessageCategory.Misc:
return true;
default:
return false;
}
default:
return true;
}
}
/// <summary>
/// Defines the different message categories
/// </summary>
public enum MessageCategory
{
/// <summary>
/// No defined category as such
/// </summary>
Misc,
/// <summary>
/// User generated input messages (at the moment only tape/disk controls)
/// </summary>
Input,
/// <summary>
/// Tape device generated messages
/// </summary>
Tape,
/// <summary>
/// Disk device generated messages
/// </summary>
Disk,
/// <summary>
/// Emulator generated messages
/// </summary>
Emulator
}
}
}

View File

@ -0,0 +1,53 @@
using System;
using System.Collections;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// CPCHawk: Core Class
/// * Misc Utilities *
/// </summary>
public partial class AmstradCPC
{
/// <summary>
/// Helper method that returns a single INT32 from a BitArray
/// </summary>
/// <param name="bitarray"></param>
/// <returns></returns>
public static int GetIntFromBitArray(BitArray bitArray)
{
if (bitArray.Length > 32)
throw new ArgumentException("Argument length shall be at most 32 bits.");
int[] array = new int[1];
bitArray.CopyTo(array, 0);
return array[0];
}
/// <summary>
/// POKEs a memory bus address
/// </summary>
/// <param name="addr"></param>
/// <param name="value"></param>
public void PokeMemory(ushort addr, byte value)
{
_machine.WriteBus(addr, value);
}
public string GetMachineType()
{
string m = "";
switch (SyncSettings.MachineType)
{
case MachineType.CPC464:
m = "(Amstrad) CPC 464 (64K)";
break;
case MachineType.CPC6128:
m = "(Amstrad) CPC 6464 (128K)";
break;
}
return m;
}
}
}

View File

@ -0,0 +1,220 @@
using BizHawk.Common;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Components.Z80A;
using BizHawk.Emulation.Cores.Properties;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// CPCHawk: Core Class
/// * Main Initialization *
/// </summary>
[Core(
"CPCHawk",
"Asnivor",
isPorted: false,
isReleased: false)]
public partial class AmstradCPC : IRegionable, IDriveLight
{
public AmstradCPC(CoreComm comm, IEnumerable<byte[]> files, List<GameInfo> game, object settings, object syncSettings)
{
var ser = new BasicServiceProvider(this);
ServiceProvider = ser;
InputCallbacks = new InputCallbackSystem();
MemoryCallbacks = new MemoryCallbackSystem(new[] { "System Bus" });
CoreComm = comm;
_gameInfo = game;
_cpu = new Z80A();
_tracer = new TraceBuffer { Header = _cpu.TraceHeader };
_files = files?.ToList() ?? new List<byte[]>();
if (settings == null)
settings = new AmstradCPCSettings();
if (syncSettings == null)
syncSettings = new AmstradCPCSyncSettings();
PutSyncSettings((AmstradCPCSyncSettings)syncSettings ?? new AmstradCPCSyncSettings());
PutSettings((AmstradCPCSettings)settings ?? new AmstradCPCSettings());
deterministicEmulation = ((AmstradCPCSyncSettings)syncSettings as AmstradCPCSyncSettings).DeterministicEmulation;
switch (SyncSettings.MachineType)
{
case MachineType.CPC464:
ControllerDefinition = AmstradCPCControllerDefinition;
Init(MachineType.CPC464, _files, ((AmstradCPCSyncSettings)syncSettings as AmstradCPCSyncSettings).AutoStartStopTape,
((AmstradCPCSyncSettings)syncSettings as AmstradCPCSyncSettings).BorderType);
break;
case MachineType.CPC6128:
ControllerDefinition = AmstradCPCControllerDefinition;
Init(MachineType.CPC6128, _files, ((AmstradCPCSyncSettings)syncSettings as AmstradCPCSyncSettings).AutoStartStopTape, ((AmstradCPCSyncSettings)syncSettings as AmstradCPCSyncSettings).BorderType);
break;
default:
throw new InvalidOperationException("Machine not yet emulated");
}
_cpu.MemoryCallbacks = MemoryCallbacks;
HardReset = _machine.HardReset;
SoftReset = _machine.SoftReset;
_cpu.FetchMemory = _machine.ReadMemory;
_cpu.ReadMemory = _machine.ReadMemory;
_cpu.WriteMemory = _machine.WriteMemory;
_cpu.ReadHardware = _machine.ReadPort;
_cpu.WriteHardware = _machine.WritePort;
_cpu.FetchDB = _machine.PushBus;
_cpu.IRQACKCallback = _machine.GateArray.IORQA;
//_cpu.OnExecFetch = _machine.CPUMon.OnExecFetch;
ser.Register<ITraceable>(_tracer);
ser.Register<IDisassemblable>(_cpu);
ser.Register<IVideoProvider>(_machine.GateArray);
// initialize sound mixer and attach the various ISoundProvider devices
SoundMixer = new SoundProviderMixer((int)(32767 / 10), "Tape Audio", (ISoundProvider)_machine.TapeBuzzer);
if (_machine.AYDevice != null)
SoundMixer.AddSource(_machine.AYDevice, "AY-3-3912");
// set audio device settings
if (_machine.AYDevice != null && _machine.AYDevice.GetType() == typeof(AY38912))
{
((AY38912)_machine.AYDevice as AY38912).PanningConfiguration = ((AmstradCPCSettings)settings as AmstradCPCSettings).AYPanConfig;
_machine.AYDevice.Volume = ((AmstradCPCSettings)settings as AmstradCPCSettings).AYVolume;
}
if (_machine.TapeBuzzer != null)
{
((Beeper)_machine.TapeBuzzer as Beeper).Volume = ((AmstradCPCSettings)settings as AmstradCPCSettings).TapeVolume;
}
ser.Register<ISoundProvider>(SoundMixer);
HardReset();
SetupMemoryDomains();
}
public Action HardReset;
public Action SoftReset;
private readonly Z80A _cpu;
private readonly TraceBuffer _tracer;
public IController _controller;
public CPCBase _machine;
public List<GameInfo> _gameInfo;
public List<GameInfo> _tapeInfo = new List<GameInfo>();
public List<GameInfo> _diskInfo = new List<GameInfo>();
private SoundProviderMixer SoundMixer;
private readonly List<byte[]> _files;
private byte[] GetFirmware(int length, params string[] names)
{
// Amstrad licensed ROMs are free to distribute and shipped with BizHawk
byte[] embeddedRom = new byte[length];
bool embeddedFound = true;
switch (names.FirstOrDefault())
{
// CPC 464 ROMS
case "OS464ROM":
embeddedRom = Util.DecompressGzipFile(new MemoryStream(Resources.OS_464_ROM));
break;
case "BASIC1-0ROM":
embeddedRom = Util.DecompressGzipFile(new MemoryStream(Resources.CPC_BASIC_1_0_ROM));
break;
// CPC 6128 ROMS
case "OS6128ROM":
embeddedRom = Util.DecompressGzipFile(new MemoryStream(Resources.CPC_OS_6128_ROM));
break;
case "BASIC1-1ROM":
embeddedRom = Util.DecompressGzipFile(new MemoryStream(Resources.CPC_BASIC_1_1_ROM));
break;
case "AMSDOS0-5ROM":
embeddedRom = Util.DecompressGzipFile(new MemoryStream(Resources.CPC_AMSDOS_0_5_ROM));
break;
default:
embeddedFound = false;
break;
}
if (embeddedFound)
return embeddedRom;
// Embedded ROM not found, maybe this is a peripheral ROM?
var result = names.Select(n => CoreComm.CoreFileProvider.GetFirmware("AmstradCPC", n, false)).FirstOrDefault(b => b != null && b.Length == length);
if (result == null)
{
throw new MissingFirmwareException($"At least one of these firmwares is required: {string.Join(", ", names)}");
}
return result;
}
private MachineType _machineType;
private void Init(MachineType machineType, List<byte[]> files, bool autoTape, BorderType bType)
{
_machineType = machineType;
// setup the emulated model based on the MachineType
switch (machineType)
{
case MachineType.CPC464:
_machine = new CPC464(this, _cpu, files, autoTape, bType);
List<RomData> roms64 = new List<RomData>();
roms64.Add(RomData.InitROM(MachineType.CPC464, GetFirmware(0x4000, "OS464ROM"), RomData.ROMChipType.Lower));
roms64.Add(RomData.InitROM(MachineType.CPC464, GetFirmware(0x4000, "BASIC1-0ROM"), RomData.ROMChipType.Upper, 0));
_machine.InitROM(roms64.ToArray());
break;
case MachineType.CPC6128:
_machine = new CPC6128(this, _cpu, files, autoTape, bType);
List<RomData> roms128 = new List<RomData>();
roms128.Add(RomData.InitROM(MachineType.CPC6128, GetFirmware(0x4000, "OS6128ROM"), RomData.ROMChipType.Lower));
roms128.Add(RomData.InitROM(MachineType.CPC6128, GetFirmware(0x4000, "BASIC1-1ROM"), RomData.ROMChipType.Upper, 0));
roms128.Add(RomData.InitROM(MachineType.CPC6128, GetFirmware(0x4000, "AMSDOS0-5ROM"), RomData.ROMChipType.Upper, 7));
_machine.InitROM(roms128.ToArray());
break;
}
}
#region IRegionable
public DisplayType Region => DisplayType.PAL;
#endregion
#region IDriveLight
public bool DriveLightEnabled
{
get
{
return true;
}
}
public bool DriveLightOn
{
get
{
if (_machine != null &&
(_machine.TapeDevice != null && _machine.TapeDevice.TapeIsPlaying) ||
(_machine.UPDDiskDevice != null && _machine.UPDDiskDevice.DriveLight))
return true;
return false;
}
}
#endregion
}
}

View File

@ -0,0 +1,29 @@
using BizHawk.Common;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// Represents a beeper/buzzer device
/// </summary>
public interface IBeeperDevice
{
/// <summary>
/// Initialisation
/// </summary>
/// <param name="sampleRate"></param>
/// <param name="tStatesPerFrame"></param>
void Init(int sampleRate, int tStatesPerFrame);
/// <summary>
/// Processes an incoming pulse value and adds it to the blipbuffer
/// </summary>
/// <param name="pulse"></param>
void ProcessPulseValue(bool pulse);
/// <summary>
/// State serialization
/// </summary>
/// <param name="ser"></param>
void SyncState(Serializer ser);
}
}

View File

@ -0,0 +1,30 @@

namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// Defines an object that can load a floppy disk image
/// </summary>
public interface IFDDHost
{
/// <summary>
/// The currently inserted diskimage
/// </summary>
FloppyDisk Disk { get; set; }
/// <summary>
/// Parses a new disk image and loads it into this floppy drive
/// </summary>
/// <param name="diskData"></param>
void FDD_LoadDisk(byte[] diskData);
/// <summary>
/// Ejects the current disk
/// </summary>
void FDD_EjectDisk();
/// <summary>
/// Signs whether the current active drive has a disk inserted
/// </summary>
bool FDD_IsDiskLoaded { get; }
}
}

View File

@ -0,0 +1,38 @@

namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// Represents a spectrum joystick
/// </summary>
public interface IJoystick
{
/// <summary>
/// The type of joystick
/// </summary>
JoystickType JoyType { get; }
/// <summary>
/// Array of all the possibly button press names
/// </summary>
string[] ButtonCollection { get; set; }
/// <summary>
/// The player number that this controller is currently assigned to
/// </summary>
int PlayerNumber { get; set; }
/// <summary>
/// Sets the joystick line based on key pressed
/// </summary>
/// <param name="key"></param>
/// <param name="isPressed"></param>
void SetJoyInput(string key, bool isPressed);
/// <summary>
/// Gets the state of a particular joystick binding
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
bool GetJoyInput(string key);
}
}

View File

@ -0,0 +1,58 @@
using BizHawk.Common;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// Represents a spectrum keyboard
/// </summary>
public interface IKeyboard
{
/// <summary>
/// The calling spectrumbase class
/// </summary>
CPCBase _machine { get; }
/// <summary>
/// The keyboard matrix for a particular CPC model
/// </summary>
string[] KeyboardMatrix { get; set; }
/// <summary>
/// Other keyboard keys that are not in the matrix
/// (usually keys derived from key combos)
/// </summary>
string[] NonMatrixKeys { get; set; }
/// <summary>
/// Represents the spectrum key state
/// </summary>
bool[] KeyStatus { get; set; }
/// <summary>
/// The currently selected line
/// </summary>
int CurrentLine { get; set; }
/// <summary>
/// Reads the current line status
/// </summary>
/// <returns></returns>
byte ReadCurrentLine();
/// <summary>
/// Sets the CPC key status
/// </summary>
/// <param name="key"></param>
/// <param name="isPressed"></param>
void SetKeyStatus(string key, bool isPressed);
/// <summary>
/// Gets the status of a CPC key
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
bool GetKeyStatus(string key);
void SyncState(Serializer ser);
}
}

View File

@ -0,0 +1,71 @@
using BizHawk.Common;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// Represents a PSG device (in this case an AY-3-891x)
/// </summary>
public interface IPSG : ISoundProvider
{
/// <summary>
/// Initlization routine
/// </summary>
/// <param name="sampleRate"></param>
/// <param name="tStatesPerFrame"></param>
void Init(int sampleRate, int tStatesPerFrame);
void SetFunction(int data);
//void ClockCycle();
/// <summary>
/// Activates a register
/// </summary>
int SelectedRegister { get; set; }
/// <summary>
/// Writes to the PSG
/// </summary>
/// <param name="value"></param>
void PortWrite(int value);
/// <summary>
/// Reads from the PSG
/// </summary>
int PortRead();
/// <summary>
/// Resets the PSG
/// </summary>
void Reset();
/// <summary>
/// The volume of the AY chip
/// </summary>
int Volume { get; set; }
/// <summary>
/// Called at the start of a frame
/// </summary>
void StartFrame();
/// <summary>
/// called at the end of a frame
/// </summary>
void EndFrame();
/// <summary>
/// Updates the sound based on number of frame cycles
/// </summary>
/// <param name="frameCycle"></param>
void UpdateSound(int frameCycle);
/// <summary>
/// IStatable serialization
/// </summary>
/// <param name="ser"></param>
void SyncState(Serializer ser);
}
}

View File

@ -0,0 +1,25 @@

namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// Represents a device that utilizes port IN & OUT
/// </summary>
public interface IPortIODevice
{
/// <summary>
/// Device responds to an IN instruction
/// </summary>
/// <param name="port"></param>
/// <param name="result"></param>
/// <returns></returns>
bool ReadPort(ushort port, ref int result);
/// <summary>
/// Device responds to an OUT instruction
/// </summary>
/// <param name="port"></param>
/// <param name="result"></param>
/// <returns></returns>
bool WritePort(ushort port, int result);
}
}

View File

@ -0,0 +1,841 @@
using BizHawk.Common;
using BizHawk.Emulation.Cores.Components.Z80A;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// Represents the tape device
/// </summary>
public class DatacorderDevice
{
#region Construction
private CPCBase _machine;
private Z80A _cpu => _machine.CPU;
private IBeeperDevice _buzzer => _machine.TapeBuzzer;
/// <summary>
/// Default constructor
/// </summary>
public DatacorderDevice(bool autoTape)
{
_autoPlay = autoTape;
}
/// <summary>
/// Initializes the datacorder device
/// </summary>
/// <param name="machine"></param>
public void Init(CPCBase machine)
{
_machine = machine;
}
#endregion
#region State Information
/// <summary>
/// Signs whether the tape motor is running
/// </summary>
private bool tapeMotor;
public bool TapeMotor
{
get { return tapeMotor; }
set
{
if (tapeMotor == value)
return;
tapeMotor = value;
if (tapeMotor)
{
_machine.CPC.OSD_TapeMotorActive();
if (_autoPlay)
{
Play();
}
}
else
{
_machine.CPC.OSD_TapeMotorInactive();
if (_autoPlay)
{
Stop();
}
}
}
}
/// <summary>
/// Internal counter used to trigger tape buzzer output
/// </summary>
private int counter = 0;
/// <summary>
/// The index of the current tape data block that is loaded
/// </summary>
private int _currentDataBlockIndex = 0;
public int CurrentDataBlockIndex
{
get
{
if (_dataBlocks.Count() > 0) { return _currentDataBlockIndex; }
else { return -1; }
}
set
{
if (value == _currentDataBlockIndex) { return; }
if (value < _dataBlocks.Count() && value >= 0)
{
_currentDataBlockIndex = value;
_position = 0;
}
}
}
/// <summary>
/// The current position within the current data block
/// </summary>
private int _position = 0;
public int Position
{
get
{
if (_position >= _dataBlocks[_currentDataBlockIndex].DataPeriods.Count) { return 0; }
else { return _position; }
}
}
/// <summary>
/// Signs whether the tape is currently playing or not
/// </summary>
private bool _tapeIsPlaying = false;
public bool TapeIsPlaying
{
get { return _tapeIsPlaying; }
}
/// <summary>
/// A list of the currently loaded data blocks
/// </summary>
private List<TapeDataBlock> _dataBlocks = new List<TapeDataBlock>();
public List<TapeDataBlock> DataBlocks
{
get { return _dataBlocks; }
set { _dataBlocks = value; }
}
/// <summary>
/// Stores the last CPU t-state value
/// </summary>
private long _lastCycle = 0;
/// <summary>
/// Edge
/// </summary>
private int _waitEdge = 0;
/// <summary>
/// Current tapebit state
/// </summary>
private bool currentState = false;
#endregion
#region Datacorder Device Settings
/// <summary>
/// Signs whether the device should autodetect when the Z80 has entered into
/// 'load' mode and auto-play the tape if neccesary
/// </summary>
private bool _autoPlay;
#endregion
#region Emulator
/// <summary>
/// Should be fired at the end of every frame
/// Primary purpose is to detect tape traps and manage auto play (if/when this is ever implemented)
/// </summary>
public void EndFrame()
{
//MonitorFrame();
}
public void StartFrame()
{
//_buzzer.ProcessPulseValue(currentState);
}
#endregion
#region Tape Controls
/// <summary>
/// Starts the tape playing from the beginning of the current block
/// </summary>
public void Play()
{
if (_tapeIsPlaying)
return;
if (!_autoPlay)
_machine.CPC.OSD_TapePlaying();
_machine.CPC.OSD_TapeMotorActive();
// update the lastCycle
_lastCycle = _cpu.TotalExecutedCycles;
// reset waitEdge and position
_waitEdge = 0;
_position = 0;
if (
_dataBlocks.Count > 0 && // data blocks are present &&
_currentDataBlockIndex >= 0 // the current data block index is 1 or greater
)
{
while (_position >= _dataBlocks[_currentDataBlockIndex].DataPeriods.Count)
{
// we are at the end of a data block - move to the next
_position = 0;
_currentDataBlockIndex++;
// are we at the end of the tape?
if (_currentDataBlockIndex >= _dataBlocks.Count)
{
break;
}
}
// check for end of tape
if (_currentDataBlockIndex >= _dataBlocks.Count)
{
// end of tape reached. Rewind to beginning
AutoStopTape();
RTZ();
return;
}
// update waitEdge with the current position in the current block
_waitEdge = _dataBlocks[_currentDataBlockIndex].DataPeriods[_position];
// sign that the tape is now playing
_tapeIsPlaying = true;
}
}
/// <summary>
/// Stops the tape
/// (should move to the beginning of the next block)
/// </summary>
public void Stop()
{
if (!_tapeIsPlaying)
return;
_machine.CPC.OSD_TapeStopped();
// sign that the tape is no longer playing
_tapeIsPlaying = false;
if (
_currentDataBlockIndex >= 0 && // we are at datablock 1 or above
_position >= _dataBlocks[_currentDataBlockIndex].DataPeriods.Count - 1 // the block is still playing back
)
{
// move to the next block
_currentDataBlockIndex++;
if (_currentDataBlockIndex >= _dataBlocks.Count())
{
_currentDataBlockIndex = -1;
}
// reset waitEdge and position
_waitEdge = 0;
_position = 0;
if (
_currentDataBlockIndex < 0 && // block index is -1
_dataBlocks.Count() > 0 // number of blocks is greater than 0
)
{
// move the index on to 0
_currentDataBlockIndex = 0;
}
}
// update the lastCycle
_lastCycle = _cpu.TotalExecutedCycles;
}
/// <summary>
/// Rewinds the tape to it's beginning (return to zero)
/// </summary>
public void RTZ()
{
Stop();
_machine.CPC.OSD_TapeRTZ();
_currentDataBlockIndex = 0;
}
/// <summary>
/// Performs a block skip operation on the current tape
/// TRUE: skip forward
/// FALSE: skip backward
/// </summary>
/// <param name="skipForward"></param>
public void SkipBlock(bool skipForward)
{
int blockCount = _dataBlocks.Count;
int targetBlockId = _currentDataBlockIndex;
if (skipForward)
{
if (_currentDataBlockIndex == blockCount - 1)
{
// last block, go back to beginning
targetBlockId = 0;
}
else
{
targetBlockId++;
}
}
else
{
if (_currentDataBlockIndex == 0)
{
// already first block, goto last block
targetBlockId = blockCount - 1;
}
else
{
targetBlockId--;
}
}
var bl = _dataBlocks[targetBlockId];
StringBuilder sbd = new StringBuilder();
sbd.Append("(");
sbd.Append((targetBlockId + 1) + " of " + _dataBlocks.Count());
sbd.Append(") : ");
//sbd.Append("ID" + bl.BlockID.ToString("X2") + " - ");
sbd.Append(bl.BlockDescription);
if (bl.MetaData.Count > 0)
{
sbd.Append(" - ");
sbd.Append(bl.MetaData.First().Key + ": " + bl.MetaData.First().Value);
//sbd.Append("\n");
//sbd.Append(bl.MetaData.Skip(1).First().Key + ": " + bl.MetaData.Skip(1).First().Value);
}
if (skipForward)
_machine.CPC.OSD_TapeNextBlock(sbd.ToString());
else
_machine.CPC.OSD_TapePrevBlock(sbd.ToString());
CurrentDataBlockIndex = targetBlockId;
}
/// <summary>
/// Inserts a new tape and sets up the tape device accordingly
/// </summary>
/// <param name="tapeData"></param>
public void LoadTape(byte[] tapeData)
{
// instantiate converters
CdtConverter cdtSer = new CdtConverter(this);
// CDT
if (cdtSer.CheckType(tapeData))
{
// this file has a tzx header - attempt serialization
try
{
cdtSer.Read(tapeData);
// reset block index
CurrentDataBlockIndex = 0;
return;
}
catch (Exception ex)
{
// exception during operation
var e = ex;
throw new Exception(this.GetType().ToString() +
"\n\nTape image file has a valid CDT header, but threw an exception whilst data was being parsed.\n\n" + e.ToString());
}
}
}
/// <summary>
/// Resets the tape
/// </summary>
public void Reset()
{
RTZ();
}
#endregion
#region Tape Device Methods
/// <summary>
/// Is called every cpu cycle but runs every 50 t-states
/// This enables the tape devices to play out even if the spectrum itself is not
/// requesting tape data
/// </summary>
public void TapeCycle()
{
if (TapeMotor)
{
counter++;
if (counter > 20)
{
counter = 0;
bool state = GetEarBit(_machine.CPU.TotalExecutedCycles);
_buzzer.ProcessPulseValue(state);
}
}
}
/// <summary>
/// Simulates the spectrum 'EAR' input reading data from the tape
/// </summary>
/// <param name="cpuCycles"></param>
/// <returns></returns>
public bool GetEarBit(long cpuCycle)
{
// decide how many cycles worth of data we are capturing
long cycles = cpuCycle - _lastCycle;
// check whether tape is actually playing
if (tapeMotor == false)
{
// it's not playing. Update lastCycle and return
_lastCycle = cpuCycle;
return false;
}
// check for end of tape
if (_currentDataBlockIndex < 0)
{
// end of tape reached - RTZ (and stop)
RTZ();
return currentState;
}
// process the cycles based on the waitEdge
while (cycles >= _waitEdge)
{
// decrement cycles
cycles -= _waitEdge;
if (_position == 0 && tapeMotor)
{
// start of block - take care of initial pulse level for PZX
switch (_dataBlocks[_currentDataBlockIndex].BlockDescription)
{
case BlockType.PULS:
// initial pulse level is always low
if (currentState)
FlipTapeState();
break;
case BlockType.DATA:
// initial pulse level is stored in block
if (currentState != _dataBlocks[_currentDataBlockIndex].InitialPulseLevel)
FlipTapeState();
break;
case BlockType.PAUS:
// initial pulse level is stored in block
if (currentState != _dataBlocks[_currentDataBlockIndex].InitialPulseLevel)
FlipTapeState();
break;
}
// most of these amstrad tapes appear to have a pause block at the start
// skip this if it is the first block
switch (_dataBlocks[_currentDataBlockIndex].BlockDescription)
{
case BlockType.PAUS:
case BlockType.PAUSE_BLOCK:
case BlockType.Pause_or_Stop_the_Tape:
if (_currentDataBlockIndex == 0)
{
// this is the first block on the tape
SkipBlock(true);
}
else
{
// there may be non-data blocks before this
bool okToSkipPause = true;
for (int i = _currentDataBlockIndex; i >= 0; i--)
{
switch (_dataBlocks[i].BlockDescription)
{
case BlockType.Archive_Info:
case BlockType.BRWS:
case BlockType.Custom_Info_Block:
case BlockType.Emulation_Info:
case BlockType.Glue_Block:
case BlockType.Hardware_Type:
case BlockType.Message_Block:
case BlockType.PZXT:
case BlockType.Text_Description:
break;
default:
okToSkipPause = false;
break;
}
if (!okToSkipPause)
break;
}
if (okToSkipPause)
{
SkipBlock(true);
}
}
break;
}
// notify about the current block
var bl = _dataBlocks[_currentDataBlockIndex];
StringBuilder sbd = new StringBuilder();
sbd.Append("(");
sbd.Append((_currentDataBlockIndex + 1) + " of " + _dataBlocks.Count());
sbd.Append(") : ");
//sbd.Append("ID" + bl.BlockID.ToString("X2") + " - ");
sbd.Append(bl.BlockDescription);
if (bl.MetaData.Count > 0)
{
sbd.Append(" - ");
sbd.Append(bl.MetaData.First().Key + ": " + bl.MetaData.First().Value);
}
_machine.CPC.OSD_TapePlayingBlockInfo(sbd.ToString());
}
// increment the current period position
_position++;
if (_position >= _dataBlocks[_currentDataBlockIndex].DataPeriods.Count())
{
// we have reached the end of the current block
if (_dataBlocks[_currentDataBlockIndex].DataPeriods.Count() == 0)
{
// notify about the current block (we are skipping it because its empty)
var bl = _dataBlocks[_currentDataBlockIndex];
StringBuilder sbd = new StringBuilder();
sbd.Append("(");
sbd.Append((_currentDataBlockIndex + 1) + " of " + _dataBlocks.Count());
sbd.Append(") : ");
//sbd.Append("ID" + bl.BlockID.ToString("X2") + " - ");
sbd.Append(bl.BlockDescription);
if (bl.MetaData.Count > 0)
{
sbd.Append(" - ");
sbd.Append(bl.MetaData.First().Key + ": " + bl.MetaData.First().Value);
}
_machine.CPC.OSD_TapePlayingSkipBlockInfo(sbd.ToString());
}
// skip any empty blocks (and process any command blocks)
while (_position >= _dataBlocks[_currentDataBlockIndex].DataPeriods.Count())
{
// check for any commands
var command = _dataBlocks[_currentDataBlockIndex].Command;
var block = _dataBlocks[_currentDataBlockIndex];
bool shouldStop = false;
switch (command)
{
case TapeCommand.STOP_THE_TAPE:
case TapeCommand.STOP_THE_TAPE_48K:
throw new Exception("spectrum tape command found in CPC tape");
/*
// Stop the tape command found - if this is the end of the tape RTZ
// otherwise just STOP and move to the next block
case TapeCommand.STOP_THE_TAPE:
_machine.CPC.OSD_TapeStoppedAuto();
shouldStop = true;
if (_currentDataBlockIndex >= _dataBlocks.Count())
RTZ();
else
{
Stop();
}
_monitorTimeOut = 2000;
break;
case TapeCommand.STOP_THE_TAPE_48K:
if (is48k)
{
_machine.CPC.OSD_TapeStoppedAuto();
shouldStop = true;
if (_currentDataBlockIndex >= _dataBlocks.Count())
RTZ();
else
{
Stop();
}
_monitorTimeOut = 2000;
}
break;
*/
default:
break;
}
if (shouldStop)
break;
_position = 0;
_currentDataBlockIndex++;
if (_currentDataBlockIndex >= _dataBlocks.Count())
{
break;
}
}
// check for end of tape
if (_currentDataBlockIndex >= _dataBlocks.Count())
{
_currentDataBlockIndex = -1;
RTZ();
return currentState;
}
}
// update waitEdge with current position within the current block
_waitEdge = _dataBlocks[_currentDataBlockIndex].DataPeriods[_position];
// flip the current state
FlipTapeState();
}
// update lastCycle and return currentstate
_lastCycle = cpuCycle - (long)cycles;
// play the buzzer
//_buzzer.ProcessPulseValue(false, currentState);
return currentState;
}
private void FlipTapeState()
{
currentState = !currentState;
}
#endregion
#region TapeMonitor
public void AutoStopTape()
{
if (!_tapeIsPlaying)
return;
if (!_autoPlay)
return;
Stop();
_machine.CPC.OSD_TapeStoppedAuto();
}
public void AutoStartTape()
{
if (_tapeIsPlaying)
return;
if (!_autoPlay)
return;
Play();
_machine.CPC.OSD_TapePlayingAuto();
}
/*
public int MaskableInterruptCount = 0;
private void MonitorFrame()
{
if (_tapeIsPlaying && _autoPlay)
{
if (DataBlocks.Count > 1 ||
(_dataBlocks[_currentDataBlockIndex].BlockDescription != BlockType.CSW_Recording &&
_dataBlocks[_currentDataBlockIndex].BlockDescription != BlockType.WAV_Recording))
{
// we should only stop the tape when there are multiple blocks
// if we just have one big block (maybe a CSW or WAV) then auto stopping will cock things up
_monitorTimeOut--;
}
if (_monitorTimeOut < 0)
{
if (_dataBlocks[_currentDataBlockIndex].BlockDescription != BlockType.PAUSE_BLOCK &&
_dataBlocks[_currentDataBlockIndex].BlockDescription != BlockType.PAUS)
{
AutoStopTape();
}
return;
}
// fallback in case usual monitor detection methods do not work
// number of t-states since last IN operation
long diff = _machine.CPU.TotalExecutedCycles - _lastINCycle;
// get current datablock
var block = DataBlocks[_currentDataBlockIndex];
// is this a pause block?
if (block.BlockDescription == BlockType.PAUS || block.BlockDescription == BlockType.PAUSE_BLOCK)
{
// dont autostop the tape here
return;
}
// pause in ms at the end of the current block
int blockPause = block.PauseInMS;
// timeout in t-states (equiv. to blockpause)
int timeout = ((_machine.GateArray.FrameLength * 50) / 1000) * blockPause;
// dont use autostop detection if block has no pause at the end
if (timeout == 0)
return;
// dont autostop if there is only 1 block
if (DataBlocks.Count == 1 || _dataBlocks[_currentDataBlockIndex].BlockDescription == BlockType.CSW_Recording ||
_dataBlocks[_currentDataBlockIndex].BlockDescription == BlockType.WAV_Recording
)
{
return;
}
if (diff >= timeout * 2)
{
// There have been no attempted tape reads by the CPU within the double timeout period
// Autostop the tape
AutoStopTape();
_lastCycle = _cpu.TotalExecutedCycles;
}
}
}
*/
#endregion
#region IPortIODevice
/// <summary>
/// Mask constants
/// </summary>
private const int TAPE_BIT = 0x40;
private const int EAR_BIT = 0x10;
private const int MIC_BIT = 0x08;
/// <summary>
/// Device responds to an IN instruction
/// </summary>
/// <returns></returns>
public bool ReadPort()
{
if (TapeIsPlaying)
{
GetEarBit(_cpu.TotalExecutedCycles);
}
/*
if (currentState)
{
result |= TAPE_BIT;
}
else
{
result &= ~TAPE_BIT;
}
*/
if (!TapeIsPlaying)
{
//if (_machine.UPDDiskDevice == null || !_machine.UPDDiskDevice.FDD_IsDiskLoaded)
//MonitorRead();
}
//if (_machine.UPDDiskDevice == null || !_machine.UPDDiskDevice.FDD_IsDiskLoaded)
//MonitorRead();
return true;
}
/// <summary>
/// Device responds to an OUT instruction
/// </summary>
/// <param name="state"></param>
/// <returns></returns>
public void WritePort(bool state)
{
// not implemented
/*
if (!TapeIsPlaying)
{
currentState = ((byte)result & 0x10) != 0;
}
*/
}
#endregion
#region State Serialization
/// <summary>
/// Bizhawk state serialization
/// </summary>
/// <param name="ser"></param>
public void SyncState(Serializer ser)
{
ser.BeginSection("DatacorderDevice");
ser.Sync("counter", ref counter);
ser.Sync("_currentDataBlockIndex", ref _currentDataBlockIndex);
ser.Sync("_position", ref _position);
ser.Sync("_tapeIsPlaying", ref _tapeIsPlaying);
ser.Sync("_lastCycle", ref _lastCycle);
ser.Sync("_waitEdge", ref _waitEdge);
ser.Sync("currentState", ref currentState);
ser.Sync("TapeMotor", ref tapeMotor);
ser.EndSection();
}
#endregion
}
}

View File

@ -0,0 +1,180 @@

namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// Used for the sector CHRN structure
/// </summary>
public class CHRN
{
/// <summary>
/// Track
/// </summary>
public byte C { get; set; }
/// <summary>
/// Side
/// </summary>
public byte H { get; set; }
/// <summary>
/// Sector ID
/// </summary>
public byte R { get; set; }
/// <summary>
/// Sector Size
/// </summary>
public byte N { get; set; }
/// <summary>
/// Status register 1
/// </summary>
private byte _flag1;
public byte Flag1
{
get { return _flag1; }
set { _flag1 = value; }
}
/// <summary>
/// Status register 2
/// </summary>
private byte _flag2;
public byte Flag2
{
get { return _flag2; }
set { _flag2 = value; }
}
/// <summary>
/// Used to store the last transmitted/received data bytes
/// </summary>
public byte[] DataBytes { get; set; }
/// <summary>
/// ID for the read/write data command
/// </summary>
public int DataID { get; set; }
#region Helper Methods
/// <summary>
/// Missing Address Mark (Sector_ID or DAM not found)
/// </summary>
public bool ST1MA
{
get { return NECUPD765.GetBit(0, _flag1); }
set
{
if (value) { NECUPD765.SetBit(0, ref _flag1); }
else { NECUPD765.UnSetBit(0, ref _flag1); }
}
}
/// <summary>
/// No Data (Sector_ID not found, CRC fail in ID_field)
/// </summary>
public bool ST1ND
{
get { return NECUPD765.GetBit(2, _flag1); }
set
{
if (value) { NECUPD765.SetBit(2, ref _flag1); }
else { NECUPD765.UnSetBit(2, ref _flag1); }
}
}
/// <summary>
/// Data Error (CRC-fail in ID- or Data-Field)
/// </summary>
public bool ST1DE
{
get { return NECUPD765.GetBit(5, _flag1); }
set
{
if (value) { NECUPD765.SetBit(5, ref _flag1); }
else { NECUPD765.UnSetBit(5, ref _flag1); }
}
}
/// <summary>
/// End of Track (set past most read/write commands) (see IC)
/// </summary>
public bool ST1EN
{
get { return NECUPD765.GetBit(7, _flag1); }
set
{
if (value) { NECUPD765.SetBit(7, ref _flag1); }
else { NECUPD765.UnSetBit(7, ref _flag1); }
}
}
/// <summary>
/// Missing Address Mark in Data Field (DAM not found)
/// </summary>
public bool ST2MD
{
get { return NECUPD765.GetBit(0, _flag2); }
set
{
if (value) { NECUPD765.SetBit(0, ref _flag2); }
else { NECUPD765.UnSetBit(0, ref _flag2); }
}
}
/// <summary>
/// Bad Cylinder (read/programmed track-ID different and read-ID = FF)
/// </summary>
public bool ST2BC
{
get { return NECUPD765.GetBit(1, _flag2); }
set
{
if (value) { NECUPD765.SetBit(1, ref _flag2); }
else { NECUPD765.UnSetBit(1, ref _flag2); }
}
}
/// <summary>
/// Wrong Cylinder (read/programmed track-ID different) (see b1)
/// </summary>
public bool ST2WC
{
get { return NECUPD765.GetBit(4, _flag2); }
set
{
if (value) { NECUPD765.SetBit(4, ref _flag2); }
else { NECUPD765.UnSetBit(4, ref _flag2); }
}
}
/// <summary>
/// Data Error in Data Field (CRC-fail in data-field)
/// </summary>
public bool ST2DD
{
get { return NECUPD765.GetBit(5, _flag2); }
set
{
if (value) { NECUPD765.SetBit(5, ref _flag2); }
else { NECUPD765.UnSetBit(5, ref _flag2); }
}
}
/// <summary>
/// Control Mark (read/scan command found sector with deleted DAM)
/// </summary>
public bool ST2CM
{
get { return NECUPD765.GetBit(6, _flag2); }
set
{
if (value) { NECUPD765.SetBit(6, ref _flag2); }
else { NECUPD765.UnSetBit(6, ref _flag2); }
}
}
#endregion
}
}

View File

@ -0,0 +1,826 @@
using BizHawk.Common;
using System;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// Definitions
/// </summary>
#region Attribution
/*
Implementation based on the information contained here:
http://www.cpcwiki.eu/index.php/765_FDC
and here:
http://www.cpcwiki.eu/imgs/f/f3/UPD765_Datasheet_OCRed.pdf
*/
#endregion
public partial class NECUPD765
{
#region Enums
/// <summary>
/// Defines the current phase of the controller
/// </summary>
private enum Phase
{
/// <summary>
/// FDC is in an idle state, awaiting the next initial command byte
/// </summary>
Idle,
/// <summary>
/// FDC is in a state waiting for the next command instruction
/// A command consists of a command byte (eventually including the MF, MK, SK bits), and up to eight parameter bytes
/// </summary>
Command,
/// <summary>
/// During this phase, the actual data is transferred (if any). Usually that are the data bytes for the read/written sector(s), except for the Format Track Command,
/// in that case four bytes for each sector are transferred
/// </summary>
Execution,
/// <summary>
/// Returns up to seven result bytes (depending on the command) that are containing status information. The Recalibrate and Seek Track commands do not return result bytes directly,
/// instead the program must wait until the Main Status Register signalizes that the command has been completed, and then it must (!) send a
/// Sense Interrupt State command to 'terminate' the Seek/Recalibrate command.
/// </summary>
Result
}
/// <summary>
/// The lifecycle of an instruction
/// Similar to phase, this describes the current 'sub-phase' we are in when dealing with an instruction
/// </summary>
private enum InstructionState
{
/// <summary>
/// FDC has received a command byte and is currently reading parameter bytes from the data bus
/// </summary>
ReceivingParameters,
/// <summary>
/// All parameter bytes have been received. This phase allows any neccessary setup before instruction execution starts
/// </summary>
PreExecution,
/// <summary>
/// The start of instruction execution. This may end up with the FDC moving into result phase,
/// but also may also prepare the way for further processing to occur later in execution phase
/// </summary>
StartExecute,
/// <summary>
/// Data is read or written in execution phase
/// </summary>
ExecutionReadWrite,
/// <summary>
/// Execution phase is well under way. This state primarily deals with data transfer between CPU and FDC
/// </summary>
ExecutionWrite,
/// <summary>
/// Execution phase is well under way. This state primarily deals with data transfer between FDC and CPU
/// </summary>
ExecutionRead,
/// <summary>
/// Execution has finished and results bytes are ready to be read by the CPU
/// Initial result setup
/// </summary>
StartResult,
/// <summary>
/// Result processing
/// </summary>
ProcessResult,
/// <summary>
/// Results are being sent
/// </summary>
SendingResults,
/// <summary>
/// Final cleanup tasks when the instruction has fully completed
/// </summary>
Completed
}
/// <summary>
/// Represents internal interrupt state of the FDC
/// </summary>
public enum InterruptState
{
/// <summary>
/// There is no interrupt
/// </summary>
None,
/// <summary>
/// Execution interrupt
/// </summary>
Execution,
/// <summary>
/// Result interrupt
/// </summary>
Result,
/// <summary>
/// Ready interrupt
/// </summary>
Ready,
/// <summary>
/// Seek interrupt
/// </summary>
Seek
}
/// <summary>
/// Possible main states that each drive can be in
/// </summary>
public enum DriveMainState
{
/// <summary>
/// Drive is not doing anything
/// </summary>
None,
/// <summary>
/// Seek operation is in progress
/// </summary>
Seek,
/// <summary>
/// Recalibrate operation is in progress
/// </summary>
Recalibrate,
/// <summary>
/// A scan data operation is in progress
/// </summary>
Scan,
/// <summary>
/// A read ID operation is in progress
/// </summary>
ReadID,
/// <summary>
/// A read data operation is in progress
/// </summary>
ReadData,
/// <summary>
/// A read diagnostic (read track) operation is in progress
/// </summary>
ReadDiagnostic,
/// <summary>
/// A write id (format track) operation is in progress
/// </summary>
WriteID,
/// <summary>
/// A write data operation is in progress
/// </summary>
WriteData,
}
/// <summary>
/// State information during a seek/recalibration operation
/// </summary>
public enum SeekSubState
{
/// <summary>
/// Seek hasnt started yet
/// </summary>
Idle,
/// <summary>
/// Delayed
/// </summary>
Wait,
/// <summary>
/// Setup for head move
/// </summary>
MoveInit,
/// <summary>
/// Seek is currently happening
/// </summary>
HeadMove,
/// <summary>
/// Head move with no delay
/// </summary>
MoveImmediate,
/// <summary>
/// Ready to complete
/// </summary>
PerformCompletion,
/// <summary>
/// Seek operation has completed
/// </summary>
SeekCompleted
}
/// <summary>
/// Seek int code
/// </summary>
public enum SeekIntStatus
{
Normal,
Abnormal,
DriveNotReady,
}
/// <summary>
/// The direction of a specific command
/// </summary>
private enum CommandDirection
{
/// <summary>
/// Data flows from UPD765A to Z80
/// </summary>
OUT,
/// <summary>
/// Data flows from Z80 to UPD765A
/// </summary>
IN
}
/// <summary>
/// Enum defining the different types of result that can be returned
/// </summary>
private enum ResultType
{
/// <summary>
/// Standard 7 result bytes are returned
/// </summary>
Standard,
/// <summary>
/// 1 byte returned - ST3
/// (used for SenseDriveStatus)
/// </summary>
ST3,
/// <summary>
/// 1 byte returned - ST0
/// (used for version & invalid)
/// </summary>
ST0,
/// <summary>
/// 2 bytes returned for sense interrupt status command
/// ST0
/// CurrentCylinder
/// </summary>
Interrupt
}
/// <summary>
/// Possible list of encountered drive status errors
/// </summary>
public enum Status
{
/// <summary>
/// No error detected
/// </summary>
None,
/// <summary>
/// An undefined error has been detected
/// </summary>
Undefined,
/// <summary>
/// Drive is not ready
/// </summary>
DriveNotReady,
/// <summary>
/// Invalid command received
/// </summary>
Invalid,
/// <summary>
/// The disk has its write protection tab enabled
/// </summary>
WriteProtected,
/// <summary>
/// The requested sector has not been found
/// </summary>
SectorNotFound
}
/// <summary>
/// Represents the direction that the head is moving over the cylinders
/// Increment: Track number increasing (head moving from outside of disk inwards)
/// Decrement: Track number decreasing (head moving from inside of disk outwards)
/// </summary>
public enum SkipDirection
{
Increment,
Decrement
}
#endregion
#region Constants
// Command Instruction Constants
// Designates the default postitions within the cmdbuffer array
public const int CM_HEAD = 0;
/// <summary>
/// C - Track
/// </summary>
public const int CM_C = 1;
/// <summary>
/// H - Side
/// </summary>
public const int CM_H = 2;
/// <summary>
/// R - Sector ID
/// </summary>
public const int CM_R = 3;
/// <summary>
/// N - Sector size
/// </summary>
public const int CM_N = 4;
/// <summary>
/// EOT - End of track
/// </summary>
public const int CM_EOT = 5;
/// <summary>
/// GPL - Gap length
/// </summary>
public const int CM_GPL = 6;
/// <summary>
/// DTL - Data length
/// </summary>
public const int CM_DTL = 7;
/// <summary>
/// STP - Step
/// </summary>
public const int CM_STP = 7;
// Result Instruction Constants
// Designates the default postitions within the cmdbuffer array
/// <summary>
/// Status register 0
/// </summary>
public const int RS_ST0 = 0;
/// <summary>
/// Status register 1
/// </summary>
public const int RS_ST1 = 1;
/// <summary>
/// Status register 2
/// </summary>
public const int RS_ST2 = 2;
/// <summary>
/// C - Track
/// </summary>
public const int RS_C = 3;
/// <summary>
/// H - Side
/// </summary>
public const int RS_H = 4;
/// <summary>
/// R - Sector ID
/// </summary>
public const int RS_R = 5;
/// <summary>
/// N - Sector size
/// </summary>
public const int RS_N = 6;
// Main Status Register Constants
// Designates the bit positions within the Main status register
/// <summary>
/// FDD0 Busy (seek/recalib active, until succesful sense intstat)
/// FDD number 0 is in the seek mode. If any of the DnB bits IS set FDC will not accept read or write command.
/// </summary>
public const int MSR_D0B = 0;
/// <summary>
/// FDD1 Busy (seek/recalib active, until succesful sense intstat)
/// FDD number 1 is in the seek mode. If any of the DnB bits IS set FDC will not accept read or write command.
/// </summary>
public const int MSR_D1B = 1;
/// <summary>
/// FDD2 Busy (seek/recalib active, until succesful sense intstat)
/// FDD number 2 is in the seek mode. If any of the DnB bits IS set FDC will not accept read or write command.
/// </summary>
public const int MSR_D2B = 2;
/// <summary>
/// FDD3 Busy (seek/recalib active, until succesful sense intstat)
/// FDD number 3 is in the seek mode. If any of the DnB bits IS set FDC will not accept read or write command.
/// </summary>
public const int MSR_D3B = 3;
/// <summary>
/// FDC Busy (still in command-, execution- or result-phase)
/// A Read or Write command is in orocess. (FDC Busy) FDC will not accept any other command
/// </summary>
public const int MSR_CB = 4;
/// <summary>
/// Execution Mode (still in execution-phase, non_DMA_only)
/// This bit is set only during execution ohase (Execution Mode) in non-DMA mode When DB5 goes low, execution phase has ended and result phase has started.It operates only during
/// non-DMA mode of operation
/// </summary>
public const int MSR_EXM = 5;
/// <summary>
/// Data Input/Output (0=CPU->FDC, 1=FDC->CPU) (see b7)
/// Indicates direction of data transfer between FDC and data regrster If DIO = 1, then transfer is from data register to the
/// processor.If DIO = 0, then transfer is from the processor to data register
/// </summary>
public const int MSR_DIO = 6;
/// <summary>
/// Request For Master (1=ready for next byte) (see b6 for direction)
/// ndicates data register IS ready to send or receive data to or from the processor Both bits DIO and RQM should be
/// used to perform the hand-shaking functions of “ready” and “directron” to the processor
/// </summary>
public const int MSR_RQM = 7;
// Status Register 0 Constants
// Designates the bit positions within the status register 0
/// <summary>
/// Unit Select (driveno during interrupt)
/// This flag IS used to indicate a drive unit number at interrupt
/// </summary>
public const int SR0_US0 = 0;
/// <summary>
/// Unit Select (driveno during interrupt)
/// This flag IS used to indicate a drive unit number at interrupt
/// </summary>
public const int SR0_US1 = 1;
/// <summary>
/// Head Address (head during interrupt)
/// State of the head at interrupt
/// </summary>
public const int SR0_HD = 2;
/// <summary>
/// Not Ready (drive not ready or non-existing 2nd head selected)
/// Not Ready - When the FDD IS in the not-ready state and a Read or Write command IS Issued, this
/// flag IS set If a Read or Write command is issued to side 1 of a single-sided drive, then this flag IS set
/// </summary>
public const int SR0_NR = 3;
/// <summary>
/// Equipment Check (drive failure or recalibrate failed (retry))
/// Equipment check - If a fault srgnal IS received from the FDD, or if the track 0 srgnal fails to occur after 77
/// step pulses(Recalibrate Command) then this flag is set
/// </summary>
public const int SR0_EC = 4;
/// <summary>
/// Seek End (Set if seek-command completed)
/// Seek end - When the FDC completes the Seek command, this flag IS set lo 1 (high)
/// </summary>
public const int SR0_SE = 5;
/// <summary>
/// Interrupt Code (low byte)
/// Interrupt Code (0=OK, 1=aborted:readfail/OK if EN, 2=unknown cmd
/// or senseint with no int occured, 3=aborted:disc removed etc.)
/// </summary>
public const int SR0_IC0 = 6;
/// <summary>
/// Interrupt Code (high byte)
/// Interrupt Code (0=OK, 1=aborted:readfail/OK if EN, 2=unknown cmd
/// or senseint with no int occured, 3=aborted:disc removed etc.)
/// </summary>
public const int SR0_IC1 = 7;
// Status Register 1 Constants
// Designates the bit positions within the status register 1
/// <summary>
/// Missing Address Mark (Sector_ID or DAM not found)
/// Missing address mark - This bit is set i f the FDC does not detect the IDAM before 2 index pulses It is also set if
/// the FDC cannot find the DAM or DDAM after the IDAM i s found.MD bit of ST2 is also set at this time
/// </summary>
public const int SR1_MA = 0;
/// <summary>
/// Not Writeable (tried to write/format disc with wprot_tab=on)
/// Not writable (write protect) - During execution of Write Data, Write Deleted Data or Write ID command. if the FDC
/// detect: a write protect srgnal from the FDD.then this flag is Set
/// </summary>
public const int SR1_NW = 1;
/// <summary>
/// No Data
/// No Data (Sector_ID not found, CRC fail in ID_field)
///
/// During execution of Read Data. Read Deleted Data Write Data.Write Deleted Data or Scan command, if the FDC cannot find
/// the sector specified in the IDR(2)Register, this flag i s set.
///
/// During execution of the Read ID command. if the FDC cannot read the ID field without an error, then this flag IS set
///
/// During execution of the Read Diagnostic command. if the starting sector cannot be found, then this flag is set
/// </summary>
public const int SR1_ND = 2;
/// <summary>
/// Over Run (CPU too slow in execution-phase (ca. 26us/Byte))
/// Overrun - If the FDC i s not serviced by the host system during data transfers within a certain time interval.this flaa i s set
/// </summary>
public const int SR1_OR = 4;
/// <summary>
/// Data Error (CRC-fail in ID- or Data-Field)
/// Data error - When the FDC detects a CRC(1) error in either the ID field or the data field, this flag is set
/// </summary>
public const int SR1_DE = 5;
/// <summary>
/// End of Track (set past most read/write commands) (see IC)
/// End of cylinder - When the FDC tries to access a sector beyond the final sector of a cylinder, this flag I S set
/// </summary>
public const int SR1_EN = 7;
// Status Register 2 Constants
// Designates the bit positions within the status register 2
/// <summary>
/// Missing Address Mark in Data Field (DAM not found)
/// Missing address mark - When data IS read from the medium, i f the FDC cannot find a data address mark or deleted
/// data address mark, then this flag is set
/// </summary>
public const int SR2_MD = 0;
/// <summary>
/// Bad Cylinder (read/programmed track-ID different and read-ID = FF)
/// Bad cylinder - This bit i s related to the ND bit. and when the contents of C on the medium is different
/// from that stored i n the IDR and the contents of C IS FFH.then this flag IS set
/// </summary>
public const int SR2_BC = 1;
/// <summary>
/// Scan Not Satisfied (no fitting sector found)
/// Scan not satisfied - During execution of the Scan command, i f the F D cannot find a sector on the cylinder
/// which meets the condition.then this flag i s set
/// </summary>
public const int SR2_SN = 2;
/// <summary>
/// Scan Equal Hit (equal)
/// Scan equal hit - During execution of the Scan command. i f the condition of “equal” is satisfied, this flag i s set
/// </summary>
public const int SR2_SH = 3;
/// <summary>
/// Wrong Cylinder (read/programmed track-ID different) (see b1)
/// Wrong cylinder - This bit IS related to the ND bit, and when the contents of C(3) on the medium is different
/// from that stored i n the IDR.this flag is set
/// </summary>
public const int SR2_WC = 4;
/// <summary>
/// Data Error in Data Field (CRC-fail in data-field)
/// Data error in data field - If the FDC detects a CRC error i n the data field then this flag is set
/// </summary>
public const int SR2_DD = 5;
/// <summary>
/// Control Mark (read/scan command found sector with deleted DAM)
/// Control mark - During execution of the Read Data or Scan command, if the FDC encounters a sector
/// which contains a deleted data address mark, this flag is set Also set if DAM is
/// found during Read Deleted Data
/// </summary>
public const int SR2_CM = 6;
// Status Register 3 Constants
// Designates the bit positions within the status register 3
/// <summary>
/// Unit select 0
/// Unit Select (pin 28,29 of FDC)
/// </summary>
public const int SR3_US0 = 0;
/// <summary>
/// Unit select 1
/// Unit Select (pin 28,29 of FDC)
/// </summary>
public const int SR3_US1 = 1;
/// <summary>
/// Head address (side select)
/// Head Address (pin 27 of FDC)
/// </summary>
public const int SR3_HD = 2;
/// <summary>
/// Two Side (0=yes, 1=no (!))
/// Two-side - This bit IS used to indicate the status of the two-side signal from the FDD
/// </summary>
public const int SR3_TS = 3;
/// <summary>
/// Track 0 (on track 0 we are)
/// Track 0 - This bit IS used to indicate the status of the track 0 signal from the FDD
/// </summary>
public const int SR3_T0 = 4;
/// <summary>
/// Ready - status of the ready signal from the fdd
/// Ready (drive ready signal)
/// </summary>
public const int SR3_RY = 5;
/// <summary>
/// Write Protected (write protected)
/// Write protect - status of the wp signal from the fdd
/// </summary>
public const int SR3_WP = 6;
/// <summary>
/// Fault - This bit is used to indicate the status of the fault signal from the FDD
/// Fault (if supported: 1=Drive failure)
/// </summary>
public const int SR3_FT = 7;
// Interrupt Code Masks
/// <summary>
/// 1 = aborted:readfail / OK if EN (end of track)
/// </summary>
public const byte IC_OK = 0x00;
/// <summary>
/// 1 = aborted:readfail / OK if EN (end of track)
/// </summary>
public const byte IC_ABORTED_RF_OKEN = 0x40;
/// <summary>
/// 2 = unknown cmd or senseint with no int occured
/// </summary>
public const byte IC_NO_INT_OCCURED = 0x80;
/// <summary>
/// 3 = aborted:disc removed etc
/// </summary>
public const byte IC_ABORTED_DISCREMOVED = 0xC0;
// command code constants
public const int CC_READ_DATA = 0x06;
public const int CC_READ_ID = 0x0a;
public const int CC_SPECIFY = 0x03;
public const int CC_READ_DIAGNOSTIC = 0x02;
public const int CC_SCAN_EQUAL = 0x11;
public const int CC_SCAN_HIGHOREQUAL = 0x1d;
public const int CC_SCAN_LOWOREQUAL = 0x19;
public const int CC_READ_DELETEDDATA = 0x0c;
public const int CC_WRITE_DATA = 0x05;
public const int CC_WRITE_ID = 0x0d;
public const int CC_WRITE_DELETEDDATA = 0x09;
public const int CC_SEEK = 0x0f;
public const int CC_RECALIBRATE = 0x07;
public const int CC_SENSE_INTSTATUS = 0x08;
public const int CC_SENSE_DRIVESTATUS = 0x04;
public const int CC_VERSION = 0x10;
public const int CC_INVALID = 0x00;
// drive seek state constants
public const int SEEK_IDLE = 0;
public const int SEEK_SEEK = 1;
public const int SEEK_RECALIBRATE = 2;
// seek interrupt
public const int SEEK_INTACKNOWLEDGED = 3;
public const int SEEK_NORMALTERM = 4;
public const int SEEK_ABNORMALTERM = 5;
public const int SEEK_DRIVENOTREADY = 6;
#endregion
#region Classes & Structs
/// <summary>
/// Class that holds information about a specific command
/// </summary>
private class Command
{
/// <summary>
/// Mask to remove potential parameter bits (5,6, and or 7) in order to identify the command
/// </summary>
//public int BitMask { get; set; }
/// <summary>
/// The command code after bitmask has been applied
/// </summary>
public int CommandCode { get; set; }
/// <summary>
/// The number of bytes that make up the full command
/// </summary>
public int ParameterByteCount { get; set; }
/// <summary>
/// The number of result bytes that will be generated from the command
/// </summary>
public int ResultByteCount { get; set; }
/// <summary>
/// The command direction
/// IN - Z80 to UPD765A
/// OUT - UPD765A to Z80
/// </summary>
public CommandDirection Direction { get; set; }
/// <summary>
/// Command makes use of the MT bit
/// </summary>
public bool MT;
/// <summary>
/// Command makes use of the MF bit
/// </summary>
public bool MF;
/// <summary>
/// Command makes use of the SK bit
/// </summary>
public bool SK;
/// <summary>
/// Read/Write command that is READ
/// </summary>
public bool IsRead;
/// <summary>
/// Read/Write command that is WRITE
/// </summary>
public bool IsWrite;
/// <summary>
/// Delegate function that is called by this command
/// bool 1: EXECUTE - if TRUE the command will be executed. if FALSE the method will instead parse commmand parameter bytes
/// bool 2: RESULT - if TRUE
/// </summary>
public Action CommandDelegate { get; set; }
}
/// <summary>
/// Storage for command parameters
/// </summary>
public class CommandParameters
{
/// <summary>
/// The requested drive
/// </summary>
public byte UnitSelect;
/// <summary>
/// The requested physical side
/// </summary>
public byte Side;
/// <summary>
/// The requested track (C)
/// </summary>
public byte Cylinder;
/// <summary>
/// The requested head (H)
/// </summary>
public byte Head;
/// <summary>
/// The requested sector (R)
/// </summary>
public byte Sector;
/// <summary>
/// The specified sector size (N)
/// </summary>
public byte SectorSize;
/// <summary>
/// The end of track or last sector value (EOT)
/// </summary>
public byte EOT;
/// <summary>
/// Gap3 length (GPL)
/// </summary>
public byte Gap3Length;
/// <summary>
/// Data length (DTL) - When N is defined as 00, DTL stands for the data length
/// which users are going to read out or write into the sector
/// </summary>
public byte DTL;
/// <summary>
/// Clear down
/// </summary>
public void Reset()
{
UnitSelect = 0;
Side = 0;
Cylinder = 0;
Head = 0;
Sector = 0;
SectorSize = 0;
EOT = 0;
Gap3Length = 0;
DTL = 0;
}
public void SyncState(Serializer ser)
{
ser.BeginSection("ActiveCmdParams");
ser.Sync("UnitSelect", ref UnitSelect);
ser.Sync("Side", ref Side);
ser.Sync("Cylinder", ref Cylinder);
ser.Sync("Head", ref Head);
ser.Sync("Sector", ref Sector);
ser.Sync("SectorSize", ref SectorSize);
ser.Sync("EOT", ref EOT);
ser.Sync("Gap3Length", ref Gap3Length);
ser.Sync("DTL", ref DTL);
ser.EndSection();
}
}
#endregion
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,893 @@
using BizHawk.Common;
using BizHawk.Common.NumberExtensions;
using System;
using System.Linq;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// Floppy drive related stuff
/// </summary>
#region Attribution
/*
Implementation based on the information contained here:
http://www.cpcwiki.eu/index.php/765_FDC
and here:
http://www.cpcwiki.eu/imgs/f/f3/UPD765_Datasheet_OCRed.pdf
*/
#endregion
public partial class NECUPD765 : IFDDHost
{
#region Drive State
/// <summary>
/// FDD Flag - motor on/off
/// </summary>
public bool FDD_FLAG_MOTOR;
/// <summary>
/// The index of the currently active disk drive
/// </summary>
public int DiskDriveIndex
{
get { return _diskDriveIndex; }
set
{
// when index is changed update the ActiveDrive
_diskDriveIndex = value;
ActiveDrive = DriveStates[_diskDriveIndex];
}
}
private int _diskDriveIndex = 0;
/// <summary>
/// The currently active drive
/// </summary>
private DriveState ActiveDrive;
/// <summary>
/// Array that holds state information for each possible drive
/// </summary>
private DriveState[] DriveStates = new DriveState[4];
#endregion
#region FDD Methods
/// <summary>
/// Initialization / reset of the floppy drive subsystem
/// </summary>
private void FDD_Init()
{
for (int i = 0; i < 4; i++)
{
DriveState ds = new DriveState(i, this);
DriveStates[i] = ds;
}
}
/// <summary>
/// Searches for the requested sector
/// </summary>
/// <returns></returns>
private FloppyDisk.Sector GetSector()
{
FloppyDisk.Sector sector = null;
// get the current track
var trk = ActiveDrive.Disk.DiskTracks[ActiveDrive.TrackIndex];
// get the current sector index
int index = ActiveDrive.SectorIndex;
// make sure this index exists
if (index > trk.Sectors.Length)
{
index = 0;
}
// index hole count
int iHole = 0;
// loop through the sectors in a track
// the loop ends with either the sector being found
// or the index hole being passed twice
while (iHole <= 2)
{
// does the requested sector match the current sector
if (trk.Sectors[index].SectorIDInfo.C == ActiveCommandParams.Cylinder &&
trk.Sectors[index].SectorIDInfo.H == ActiveCommandParams.Head &&
trk.Sectors[index].SectorIDInfo.R == ActiveCommandParams.Sector &&
trk.Sectors[index].SectorIDInfo.N == ActiveCommandParams.SectorSize)
{
// sector has been found
sector = trk.Sectors[index];
UnSetBit(SR2_BC, ref Status2);
UnSetBit(SR2_WC, ref Status2);
break;
}
// check for bad cylinder
if (trk.Sectors[index].SectorIDInfo.C == 255)
{
SetBit(SR2_BC, ref Status2);
}
// check for no cylinder
else if (trk.Sectors[index].SectorIDInfo.C != ActiveCommandParams.Cylinder)
{
SetBit(SR2_WC, ref Status2);
}
// incrememnt sector index
index++;
// have we reached the index hole?
if (trk.Sectors.Length <= index)
{
// wrap around
index = 0;
iHole++;
}
}
// search loop has completed and the sector may or may not have been found
// bad cylinder detected?
if (Status2.Bit(SR2_BC))
{
// remove WC
UnSetBit(SR2_WC, ref Status2);
}
// update sectorindex on drive
ActiveDrive.SectorIndex = index;
return sector;
}
#endregion
#region IFDDHost
// IFDDHost methods that fall through to the currently active drive
/// <summary>
/// Parses a new disk image and loads it into this floppy drive
/// </summary>
/// <param name="tapeData"></param>
public void FDD_LoadDisk(byte[] diskData)
{
// we are only going to load into the first drive
DriveStates[0].FDD_LoadDisk(diskData);
}
/// <summary>
/// Ejects the current disk
/// </summary>
public void FDD_EjectDisk()
{
DriveStates[0].FDD_EjectDisk();
}
/// <summary>
/// Signs whether the current active drive has a disk inserted
/// </summary>
public bool FDD_IsDiskLoaded
{
get { return DriveStates[DiskDriveIndex].FDD_IsDiskLoaded; }
}
/// <summary>
/// Returns the disk object from drive 0
/// </summary>
public FloppyDisk DiskPointer
{
get { return DriveStates[0].Disk; }
}
public FloppyDisk Disk { get; set; }
#endregion
#region Drive Status Class
/// <summary>
/// Holds specfic state information about a drive
/// </summary>
private class DriveState : IFDDHost
{
#region State
/// <summary>
/// The drive ID from an FDC perspective
/// </summary>
public int ID;
/// <summary>
/// Signs whether this drive ready
/// TRUE if both drive exists and has a disk inserted
/// </summary>
public bool FLAG_READY
{
get
{
if (!FDD_IsDiskLoaded || Disk.GetTrackCount() == 0 || !FDC.FDD_FLAG_MOTOR)
return false;
else
return true;
}
}
/// <summary>
/// Disk is write protected (TRUE BY DEFAULT)
/// </summary>
public bool FLAG_WRITEPROTECT = false;
/// <summary>
/// Storage for seek steps
/// One step for each indexpulse (track index) until seeked track
/// </summary>
public int SeekCounter;
/// <summary>
/// Seek status
/// </summary>
public int SeekStatus;
/// <summary>
/// Age counter
/// </summary>
public int SeekAge;
/// <summary>
/// The current side
/// </summary>
public byte CurrentSide;
/// <summary>
/// The current track index in the DiskTracks array
/// </summary>
public byte TrackIndex;
/// <summary>
/// The track ID of the current cylinder
/// </summary>
public byte CurrentTrackID
{
get
{
// default invalid track
int id = 0xff;
if (Disk == null)
return (byte)id;
if (Disk.DiskTracks.Count() == 0)
return (byte)id;
if (TrackIndex >= Disk.GetTrackCount())
TrackIndex = 0;
else if (TrackIndex < 0)
TrackIndex = 0;
var track = Disk.DiskTracks[TrackIndex];
id = track.TrackNumber;
return (byte)id;
}
set
{
for (int i = 0; i < Disk.GetTrackCount(); i++)
{
if (Disk.DiskTracks[i].TrackNumber == value)
{
TrackIndex = (byte)i;
break;
}
}
}
}
/// <summary>
/// The new track that the drive is seeking to
/// (used in seek operations)
/// </summary>
public int SeekingTrack;
/// <summary>
/// The current sector index in the Sectors array
/// </summary>
public int SectorIndex;
/// <summary>
/// The currently loaded floppy disk
/// </summary>
public FloppyDisk Disk { get; set; }
/// <summary>
/// The parent controller
/// </summary>
private NECUPD765 FDC;
#endregion
#region Lookups
/// <summary>
/// TRUE if we are on track 0
/// </summary>
public bool FLAG_TRACK0
{
get
{
if (TrackIndex == 0) { return true; }
else { return false; }
}
}
#endregion
#region Public Methods
/*
/// <summary>
/// Moves the head across the disk cylinders
/// </summary>
/// <param name="direction"></param>
/// <param name="cylinderCount"></param>
public void MoveHead(SkipDirection direction, int cylinderCount)
{
// get total tracks
int trackCount = Disk.DiskTracks.Count();
int trk = 0;
switch (direction)
{
case SkipDirection.Increment:
trk = (int)CurrentTrack + cylinderCount;
if (trk >= trackCount)
{
// past the last track
trk = trackCount - 1;
}
else if (trk < 0)
trk = 0;
break;
case SkipDirection.Decrement:
trk = (int)CurrentTrack - cylinderCount;
if (trk < 0)
{
// before the first track
trk = 0;
}
else if (trk >= trackCount)
trk = trackCount - 1;
break;
}
// move the head
CurrentTrack = (byte)trk;
}
*/
/*
/// <summary>
/// Finds a supplied sector
/// </summary>
/// <param name="resBuffer"></param>
/// <param name=""></param>
/// <param name=""></param>
/// <returns></returns>
public FloppyDisk.Sector FindSector(ref byte[] resBuffer, CommandParameters prms)
{
int index =CurrentSector;
int lc = 0;
FloppyDisk.Sector sector = null;
bool found = false;
do
{
sector = Disk.DiskTracks[CurrentTrack].Sectors[index];
if (sector != null && sector.SectorID == prms.Sector)
{
// sector found
// check for data errors
if ((sector.Status1 & 0x20) != 0 || (sector.Status2 & 0x20) != 0)
{
// data errors found
}
found = true;
break;
}
// sector doesnt match
var c = Disk.DiskTracks[CurrentTrack].Sectors[index].TrackNumber;
if (c == 255)
{
// bad cylinder
resBuffer[RS_ST2] |= 0x02;
}
else if (prms.Cylinder != c)
{
// cylinder mismatch
resBuffer[RS_ST2] |= 0x10;
}
// increment index
index++;
if (index >= Disk.DiskTracks[CurrentTrack].NumberOfSectors)
{
// out of bounds
index = 0;
lc++;
}
} while (lc < 2);
if ((resBuffer[RS_ST2] & 0x02) != 0)
{
// bad cylinder set - remove no cylinder
UnSetBit(SR2_WC, ref resBuffer[RS_ST2]);
}
// update current sector
CurrentSector = index;
if (found)
return sector;
else
return null;
}
/// <summary>
/// Populates a result buffer
/// </summary>
/// <param name="resBuffer"></param>
/// <param name="chrn"></param>
public void FillResult(ref byte[] resBuffer, CHRN chrn)
{
// clear results
resBuffer[RS_ST0] = 0;
resBuffer[RS_ST1] = 0;
resBuffer[RS_ST2] = 0;
resBuffer[RS_C] = 0;
resBuffer[RS_H] = 0;
resBuffer[RS_R] = 0;
resBuffer[RS_N] = 0;
if (chrn == null)
{
// no chrn supplied
resBuffer[RS_ST0] = ST0;
resBuffer[RS_ST1] = 0;
resBuffer[RS_ST2] = 0;
resBuffer[RS_C] = 0;
resBuffer[RS_H] = 0;
resBuffer[RS_R] = 0;
resBuffer[RS_N] = 0;
}
}
/// <summary>
/// Populates the result buffer with ReadID data
/// </summary>
/// <returns></returns>
public void ReadID(ref byte[] resBuffer)
{
if (CheckDriveStatus() == false)
{
// drive not ready
resBuffer[RS_ST0] = ST0;
return;
}
var track = Disk.DiskTracks.Where(a => a.TrackNumber == CurrentTrack).FirstOrDefault();
if (track != null && track.NumberOfSectors > 0)
{
// formatted track
// get the current sector
int index = CurrentSector;
// is the index out of bounds?
if (index >= track.NumberOfSectors)
{
// reset the index
index = 0;
}
// read the sector data
var data = track.Sectors[index];
resBuffer[RS_C] = data.TrackNumber;
resBuffer[RS_H] = data.SideNumber;
resBuffer[RS_R] = data.SectorID;
resBuffer[RS_N] = data.SectorSize;
resBuffer[RS_ST0] = ST0;
// increment the current sector
CurrentSector = index + 1;
return;
}
else
{
// unformatted track?
resBuffer[RS_C] = FDC.CommBuffer[CM_C];
resBuffer[RS_H] = FDC.CommBuffer[CM_H];
resBuffer[RS_R] = FDC.CommBuffer[CM_R];
resBuffer[RS_N] = FDC.CommBuffer[CM_N];
SetBit(SR0_IC0, ref ST0);
resBuffer[RS_ST0] = ST0;
resBuffer[RS_ST1] = 0x01;
return;
}
}
*/
/*
/// <summary>
/// The drive performs a seek operation if necessary
/// Return value TRUE indicates seek complete
/// </summary>
public void DoSeek()
{
if (CurrentState != DriveMainState.Recalibrate &&
CurrentState != DriveMainState.Seek)
{
// no seek/recalibrate has been asked for
return;
}
if (GetBit(ID, FDC.StatusMain))
{
// drive is already seeking
return;
}
RunSeekCycle();
}
/// <summary>
/// Runs a seek cycle
/// </summary>
public void RunSeekCycle()
{
for (;;)
{
switch (SeekState)
{
// seek or recalibrate has been requested
case SeekSubState.Idle:
if (CurrentState == DriveMainState.Recalibrate)
{
// recalibrate always seeks to track 0
SeekingTrack = 0;
}
SeekState = SeekSubState.MoveInit;
// mark drive as busy
// this should be cleared by SIS command
SetBit(ID, ref FDC.StatusMain);
break;
// setup for the head move
case SeekSubState.MoveInit:
if (CurrentTrack == SeekingTrack)
{
// we are already at the required track
if (CurrentState == DriveMainState.Recalibrate &&
!FLAG_TRACK0)
{
// recalibration fail
SeekIntState = SeekIntStatus.Abnormal;
// raise seek interrupt
FDC.ActiveInterrupt = InterruptState.Seek;
// unset DB bit
UnSetBit(ID, ref FDC.StatusMain);
// equipment check
SetBit(SR0_EC, ref FDC.Status0);
SeekState = SeekSubState.PerformCompletion;
break;
}
if (CurrentState == DriveMainState.Recalibrate &&
FLAG_TRACK0)
{
// recalibration success
SeekIntState = SeekIntStatus.Normal;
// raise seek interrupt
FDC.ActiveInterrupt = InterruptState.Seek;
// unset DB bit
UnSetBit(ID, ref FDC.StatusMain);
SeekState = SeekSubState.PerformCompletion;
break;
}
}
// check for error
if (IntStatus >= IC_ABORTED_DISCREMOVED || Disk == null)
{
// drive not ready
FLAG_READY = false;
// drive not ready
SeekIntState = SeekIntStatus.DriveNotReady;
// cancel any interrupt
FDC.ActiveInterrupt = InterruptState.None;
// unset DB bit
UnSetBit(ID, ref FDC.StatusMain);
SeekState = SeekSubState.PerformCompletion;
break;
}
if (SeekCounter > 1)
{
// not ready to seek yet
SeekCounter--;
return;
}
if (FDC.SRT < 1 && CurrentTrack != SeekingTrack)
{
SeekState = SeekSubState.MoveImmediate;
break;
}
// head move
SeekState = SeekSubState.HeadMove;
break;
case SeekSubState.HeadMove:
// do the seek
SeekCounter = FDC.SRT;
if (CurrentTrack < SeekingTrack)
{
// we are seeking forward
var delta = SeekingTrack - CurrentTrack;
MoveHead(SkipDirection.Increment, 1);
}
else if (CurrentTrack > SeekingTrack)
{
// we are seeking backward
var delta = CurrentTrack - SeekingTrack;
MoveHead(SkipDirection.Decrement, 1);
}
// should the seek be completed now?
if (CurrentTrack == SeekingTrack)
{
SeekState = SeekSubState.PerformCompletion;
break;
}
// seek not finished yet
return;
// seek emulation processed immediately
case SeekSubState.MoveImmediate:
if (CurrentTrack < SeekingTrack)
{
// we are seeking forward
var delta = SeekingTrack - CurrentTrack;
MoveHead(SkipDirection.Increment, delta);
}
else if (CurrentTrack > SeekingTrack)
{
// we are seeking backward
var delta = CurrentTrack - SeekingTrack;
MoveHead(SkipDirection.Decrement, delta);
}
SeekState = SeekSubState.PerformCompletion;
break;
case SeekSubState.PerformCompletion:
SeekDone();
SeekState = SeekSubState.SeekCompleted;
break;
case SeekSubState.SeekCompleted:
// seek has already completed
return;
}
}
}
/// <summary>
/// Called when a seek operation has completed
/// </summary>
public void SeekDone()
{
SeekCounter = 0;
SeekingTrack = CurrentTrack;
// generate ST0 register data
// get only the IC bits
IntStatus &= IC_ABORTED_DISCREMOVED;
// drive ready?
if (!FLAG_READY)
{
SetBit(SR0_NR, ref IntStatus);
SetBit(SR0_EC, ref IntStatus);
// are we recalibrating?
if (CurrentState == DriveMainState.Recalibrate)
{
SetBit(SR0_EC, ref IntStatus);
}
}
// set seek end
SetBit(SR0_SE, ref IntStatus);
/*
// head address
if (CurrentSide > 0)
{
SetBit(SR0_HD, ref IntStatus);
// drive only supports 1 head
// set the EC bit
SetBit(SR0_EC, ref IntStatus);
}
*/
/*
// UnitSelect
SetUnitSelect(ID, ref IntStatus);
// move to none state
//CurrentState = DriveMainState.None;
//SeekState = SeekSubState.SeekCompleted;
// set the seek interrupt flag for this drive
// this will be cleared at the next successful senseint
FLAG_SEEK_INTERRUPT = true;
//CurrentState = DriveMainState.None;
}
*/
#endregion
#region Construction
public DriveState(int driveID, NECUPD765 fdc)
{
ID = driveID;
FDC = fdc;
}
#endregion
#region IFDDHost
/// <summary>
/// Parses a new disk image and loads it into this floppy drive
/// </summary>
/// <param name="tapeData"></param>
public void FDD_LoadDisk(byte[] diskData)
{
// try dsk first
FloppyDisk fdd = null;
bool found = false;
foreach (DiskType type in Enum.GetValues(typeof(DiskType)))
{
switch (type)
{
case DiskType.CPCExtended:
fdd = new CPCExtendedFloppyDisk();
found = fdd.ParseDisk(diskData);
break;
case DiskType.CPC:
fdd = new CPCFloppyDisk();
found = fdd.ParseDisk(diskData);
break;
}
if (found)
{
Disk = fdd;
break;
}
}
if (!found)
{
throw new Exception(this.GetType().ToString() +
"\n\nDisk image file could not be parsed. Potentially an unknown format.");
}
}
/// <summary>
/// Ejects the current disk
/// </summary>
public void FDD_EjectDisk()
{
Disk = null;
//FLAG_READY = false;
}
/// <summary>
/// Signs whether the current active drive has a disk inserted
/// </summary>
public bool FDD_IsDiskLoaded
{
get
{
if (Disk != null)
return true;
else
return false;
}
}
#endregion
#region StateSerialization
public void SyncState(Serializer ser)
{
ser.Sync("ID", ref ID);
ser.Sync("FLAG_WRITEPROTECT", ref FLAG_WRITEPROTECT);
//ser.Sync("FLAG_DISKCHANGED", ref FLAG_DISKCHANGED);
//ser.Sync("FLAG_RECALIBRATING", ref FLAG_RECALIBRATING);
//ser.Sync("FLAG_SEEK_INTERRUPT", ref FLAG_SEEK_INTERRUPT);
//ser.Sync("IntStatus", ref IntStatus);
//ser.Sync("ST0", ref ST0);
//ser.Sync("RecalibrationCounter", ref RecalibrationCounter);
ser.Sync("SeekCounter", ref SeekCounter);
ser.Sync("SeekStatus", ref SeekStatus);
ser.Sync("SeekAge", ref SeekAge);
ser.Sync("CurrentSide", ref CurrentSide);
//ser.Sync("CurrentTrack", ref CurrentTrack);
ser.Sync("TrackIndex", ref TrackIndex);
ser.Sync("SeekingTrack", ref SeekingTrack);
//ser.Sync("CurrentSector", ref CurrentSector);
ser.Sync("SectorIndex", ref SectorIndex);
//ser.Sync("RAngles", ref RAngles);
//ser.Sync("DataPointer", ref DataPointer);
//ser.SyncEnum("CurrentState", ref CurrentState);
//ser.SyncEnum("SeekState", ref SeekState);
//ser.SyncEnum("SeekIntState", ref SeekIntState);
}
#endregion
}
#endregion
}
}

View File

@ -0,0 +1,199 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// IPortIODevice
/// </summary>
#region Attribution
/*
Implementation based on the information contained here:
http://www.cpcwiki.eu/index.php/765_FDC
and here:
http://www.cpcwiki.eu/imgs/f/f3/UPD765_Datasheet_OCRed.pdf
*/
#endregion
public partial class NECUPD765 : IPortIODevice
{
#region Dev Logging
public string outputfile = @"D:\Dropbox\Dropbox\_Programming\TASVideos\BizHawk\output\zxhawkio-" + DateTime.Now.ToString("yyyyMMdd_HHmmss") + ".csv";
public string outputString = "STATUS,WRITE,READ,CODE,MT,MF,SK,CMDCNT,RESCNT,EXECCNT,EXECLEN\r\n";
public bool writeDebug = false;
public List<string> dLog = new List<string>
{
"STATUS,WRITE,READ,CODE,MT,MF,SK,CMDCNT,RESCNT,EXECCNT,EXECLEN"
};
/*
* Status read
* Data write
* Data read
* CMD code
* CMD string
* MT flag
* MK flag
* SK flag
* */
private string[] workingArr = new string[3];
private void BuildCSVLine()
{
StringBuilder sb = new StringBuilder();
for (int i = 0; i < 3; i++)
{
sb.Append(workingArr[i]);
sb.Append(",");
workingArr[i] = "";
}
sb.Append(ActiveCommand.CommandCode).Append(",");
sb.Append(CMD_FLAG_MT).Append(",");
sb.Append(CMD_FLAG_MF).Append(",");
sb.Append(CMD_FLAG_SK).Append(",");
sb.Append(CommCounter).Append(",");
sb.Append(ResCounter).Append(",");
sb.Append(ExecCounter).Append(",");
sb.Append(ExecLength);
//sb.Append("\r\n");
//outputString += sb.ToString();
dLog.Add(sb.ToString());
}
#endregion
public void ReadStatus(ref int data)
{
// read main status register
// this can happen at any time
data = ReadMainStatus();
if (writeDebug)
{
//outputString += data + ",,," + ActiveCommand.CommandCode + "\r\n";
workingArr[0] = data.ToString();
BuildCSVLine();
//System.IO.File.WriteAllText(outputfile, outputString);
}
}
public void ReadData(ref int data)
{
// Z80 is trying to read from the data register
data = ReadDataRegister();
if (writeDebug)
{
workingArr[2] = data.ToString();
//outputString += ",," + data + "," + ActiveCommand.CommandCode + "\r\n";
BuildCSVLine();
}
}
public void WriteData(int data)
{
// Z80 is attempting to write to the data register
WriteDataRegister((byte)data);
if (writeDebug)
{
//outputString += "," + data + ",," + ActiveCommand.CommandCode + "\r\n";
workingArr[1] = data.ToString();
BuildCSVLine();
//System.IO.File.WriteAllText(outputfile, outputString);
}
}
public void Motor(int data)
{
// set disk motor on/off
if (data > 0)
FDD_FLAG_MOTOR = true;
else
FDD_FLAG_MOTOR = false;
}
/// <summary>
/// Device responds to an IN instruction
/// </summary>
/// <param name="port"></param>
/// <param name="data"></param>
/// <returns></returns>
public bool ReadPort(ushort port, ref int data)
{
BitArray bits = new BitArray(new byte[] { (byte)data });
if (port == 0x3ffd)
{
// Z80 is trying to read from the data register
data = ReadDataRegister();
if (writeDebug)
{
workingArr[2] = data.ToString();
//outputString += ",," + data + "," + ActiveCommand.CommandCode + "\r\n";
BuildCSVLine();
}
return true;
}
if (port == 0x2ffd)
{
// read main status register
// this can happen at any time
data = ReadMainStatus();
if (writeDebug)
{
//outputString += data + ",,," + ActiveCommand.CommandCode + "\r\n";
workingArr[0] = data.ToString();
BuildCSVLine();
//System.IO.File.WriteAllText(outputfile, outputString);
}
return true;
}
return false;
}
/// <summary>
/// Device responds to an OUT instruction
/// </summary>
/// <param name="port"></param>
/// <param name="data"></param>
/// <returns></returns>
public bool WritePort(ushort port, int data)
{
BitArray bits = new BitArray(new byte[] { (byte)data });
if (port == 0x3ffd)
{
// Z80 is attempting to write to the data register
WriteDataRegister((byte)data);
if (writeDebug)
{
//outputString += "," + data + ",," + ActiveCommand.CommandCode + "\r\n";
workingArr[1] = data.ToString();
BuildCSVLine();
//System.IO.File.WriteAllText(outputfile, outputString);
}
return true;
}
if (port == 0x1ffd)
{
// set disk motor on/off
FDD_FLAG_MOTOR = bits[3];
return true;
}
return false;
}
}
}

View File

@ -0,0 +1,121 @@

namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// Timimng
/// </summary>
#region Attribution
/*
Implementation based on the information contained here:
http://www.cpcwiki.eu/index.php/765_FDC
and here:
http://www.cpcwiki.eu/imgs/f/f3/UPD765_Datasheet_OCRed.pdf
*/
#endregion
public partial class NECUPD765
{
/// <summary>
/// The current Z80 cycle
/// </summary>
private long CurrentCPUCycle
{
get
{
if (_machine == null)
return 0;
else
return _machine.CPU.TotalExecutedCycles;
}
}
/// <summary>
/// The last CPU cycle when the FDC accepted an IO read/write
/// </summary>
private long LastCPUCycle;
/// <summary>
/// The current delay figure (in Z80 t-states)
/// This implementation only introduces delay upon main status register reads
/// All timing calculations should be done during the other read/write operations
/// </summary>
private long StatusDelay;
/// <summary>
/// Defines the numbers of Z80 cycles per MS
/// </summary>
private long CPUCyclesPerMs;
/// <summary>
/// The floppy drive emulated clock speed
/// </summary>
public const double DriveClock = 31250;
/// <summary>
/// The number of floppy drive cycles per MS
/// </summary>
public long DriveCyclesPerMs;
/// <summary>
/// The number of T-States in one floppy drive clock tick
/// </summary>
public long StatesPerDriveTick;
/// <summary>
/// Responsible for measuring when the floppy drive is ready to run a cycle
/// </summary>
private long TickCounter;
/// <summary>
/// Internal drive cycle counter
/// </summary>
private int DriveCycleCounter = 1;
/// <summary>
/// Initializes the timing routines
/// </summary>
private void TimingInit()
{
// z80 timing
double frameSize = _machine.GateArray.FrameLength;
double rRate = _machine.GateArray.Z80ClockSpeed / frameSize;
long tPerSecond = (long)(frameSize * rRate);
CPUCyclesPerMs = tPerSecond / 1000;
// drive timing
double dRate = DriveClock / frameSize;
long dPerSecond = (long)(frameSize * dRate);
DriveCyclesPerMs = dPerSecond / 1000;
long TStatesPerDriveCycle = (long)((double)_machine.GateArray.Z80ClockSpeed / DriveClock);
StatesPerDriveTick = TStatesPerDriveCycle;
}
/// <summary>
/// Called by reads to the main status register
/// Returns true if there is no delay
/// Returns false if read is to be deferred
/// </summary>
/// <returns></returns>
private bool CheckTiming()
{
// get delta
long delta = CurrentCPUCycle - LastCPUCycle;
if (StatusDelay >= delta)
{
// there is still delay remaining
StatusDelay -= delta;
LastCPUCycle = CurrentCPUCycle;
return false;
}
else
{
// no delay remaining
StatusDelay = 0;
LastCPUCycle = CurrentCPUCycle;
return true;
}
}
}
}

View File

@ -0,0 +1,246 @@
using BizHawk.Common;
using System.Collections.Generic;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// The NEC floppy disk controller (and floppy drive) found in the +3
/// </summary>
#region Attribution
/*
Implementation based on the information contained here:
http://www.cpcwiki.eu/index.php/765_FDC
and here:
http://www.cpcwiki.eu/imgs/f/f3/UPD765_Datasheet_OCRed.pdf
*/
#endregion
public partial class NECUPD765
{
#region Devices
/// <summary>
/// The emulated spectrum machine
/// </summary>
private CPCBase _machine;
#endregion
#region Construction & Initialization
/// <summary>
/// Main constructor
/// </summary>
/// <param name="machine"></param>
public NECUPD765()
{
InitCommandList();
}
/// <summary>
/// Initialization routine
/// </summary>
public void Init(CPCBase machine)
{
_machine = machine;
FDD_Init();
TimingInit();
Reset();
}
/// <summary>
/// Resets the FDC
/// </summary>
public void Reset()
{
// setup main status
StatusMain = 0;
Status0 = 0;
Status1 = 0;
Status2 = 0;
Status3 = 0;
SetBit(MSR_RQM, ref StatusMain);
SetPhase_Idle();
//FDC_FLAG_RQM = true;
//ActiveDirection = CommandDirection.IN;
SRT = 6;
HUT = 16;
HLT = 2;
HLT_Counter = 0;
HUT_Counter = 0;
IndexPulseCounter = 0;
CMD_FLAG_MF = false;
foreach (var d in DriveStates)
{
//d.SeekingTrack = d.CurrentTrack;
////d.SeekCounter = 0;
//d.FLAG_SEEK_INTERRUPT = false;
//d.IntStatus = 0;
//d.SeekState = SeekSubState.Idle;
//d.SeekIntState = SeekIntStatus.Normal;
}
}
/// <summary>
/// Setup the command structure
/// Each command represents one of the internal UPD765 commands
/// </summary>
private void InitCommandList()
{
CommandList = new List<Command>
{
// read data
new Command { CommandDelegate = UPD_ReadData, CommandCode = 0x06, MT = true, MF = true, SK = true, IsRead = true,
Direction = CommandDirection.OUT, ParameterByteCount = 8, ResultByteCount = 7 },
// read id
new Command { CommandDelegate = UPD_ReadID, CommandCode = 0x0a, MF = true, IsRead = true,
Direction = CommandDirection.OUT, ParameterByteCount = 1, ResultByteCount = 7 },
// specify
new Command { CommandDelegate = UPD_Specify, CommandCode = 0x03,
Direction = CommandDirection.OUT, ParameterByteCount = 2, ResultByteCount = 0 },
// read diagnostic
new Command { CommandDelegate = UPD_ReadDiagnostic, CommandCode = 0x02, MF = true, SK = true, IsRead = true,
Direction = CommandDirection.OUT, ParameterByteCount = 8, ResultByteCount = 7 },
// scan equal
new Command { CommandDelegate = UPD_ScanEqual, CommandCode = 0x11, MT = true, MF = true, SK = true, IsRead = true,
Direction = CommandDirection.IN, ParameterByteCount = 8, ResultByteCount = 7 },
// scan high or equal
new Command { CommandDelegate = UPD_ScanHighOrEqual, CommandCode = 0x1d, MT = true, MF = true, SK = true, IsRead = true,
Direction = CommandDirection.IN, ParameterByteCount = 8, ResultByteCount = 7 },
// scan low or equal
new Command { CommandDelegate = UPD_ScanLowOrEqual, CommandCode = 0x19, MT = true, MF = true, SK = true, IsRead = true,
Direction = CommandDirection.IN, ParameterByteCount = 8, ResultByteCount = 7 },
// read deleted data
new Command { CommandDelegate = UPD_ReadDeletedData, CommandCode = 0x0c, MT = true, MF = true, SK = true, IsRead = true,
Direction = CommandDirection.OUT, ParameterByteCount = 8, ResultByteCount = 7 },
// write data
new Command { CommandDelegate = UPD_WriteData, CommandCode = 0x05, MT = true, MF = true, IsWrite = true,
Direction = CommandDirection.IN, ParameterByteCount = 8, ResultByteCount = 7 },
// write id
new Command { CommandDelegate = UPD_WriteID, CommandCode = 0x0d, MF = true, IsWrite = true,
Direction = CommandDirection.IN, ParameterByteCount = 5, ResultByteCount = 7 },
// write deleted data
new Command { CommandDelegate = UPD_WriteDeletedData, CommandCode = 0x09, MT = true, MF = true, IsWrite = true,
Direction = CommandDirection.IN, ParameterByteCount = 8, ResultByteCount = 7 },
// seek
new Command { CommandDelegate = UPD_Seek, CommandCode = 0x0f,
Direction = CommandDirection.OUT, ParameterByteCount = 2, ResultByteCount = 0 },
// recalibrate (seek track00)
new Command { CommandDelegate = UPD_Recalibrate, CommandCode = 0x07,
Direction = CommandDirection.OUT, ParameterByteCount = 1, ResultByteCount = 0 },
// sense interrupt status
new Command { CommandDelegate = UPD_SenseInterruptStatus, CommandCode = 0x08,
Direction = CommandDirection.OUT, ParameterByteCount = 0, ResultByteCount = 2 },
// sense drive status
new Command { CommandDelegate = UPD_SenseDriveStatus, CommandCode = 0x04,
Direction = CommandDirection.OUT, ParameterByteCount = 1, ResultByteCount = 1 },
// version
new Command { CommandDelegate = UPD_Version, CommandCode = 0x10,
Direction = CommandDirection.OUT, ParameterByteCount = 0, ResultByteCount = 1 },
// invalid
new Command { CommandDelegate = UPD_Invalid, CommandCode = 0x00,
Direction = CommandDirection.OUT, ParameterByteCount = 0, ResultByteCount = 1 },
};
}
#endregion
#region State Serialization
public void SyncState(Serializer ser)
{
ser.BeginSection("NEC-UPD765");
#region FDD
ser.Sync("FDD_FLAG_MOTOR", ref FDD_FLAG_MOTOR);
for (int i = 0; i < 4; i++)
{
ser.BeginSection("HITDrive_" + i);
DriveStates[i].SyncState(ser);
ser.EndSection();
}
ser.Sync("DiskDriveIndex", ref _diskDriveIndex);
// set active drive
DiskDriveIndex = _diskDriveIndex;
#endregion
#region Registers
ser.Sync("_RegMain", ref StatusMain);
ser.Sync("_Reg0", ref Status0);
ser.Sync("_Reg1", ref Status1);
ser.Sync("_Reg2", ref Status2);
ser.Sync("_Reg3", ref Status3);
#endregion
#region Controller state
ser.Sync("DriveLight", ref DriveLight);
ser.SyncEnum("ActivePhase", ref ActivePhase);
//ser.SyncEnum("ActiveDirection", ref ActiveDirection);
ser.SyncEnum("ActiveInterrupt", ref ActiveInterrupt);
ser.Sync("CommBuffer", ref CommBuffer, false);
ser.Sync("CommCounter", ref CommCounter);
ser.Sync("ResBuffer", ref ResBuffer, false);
ser.Sync("ExecBuffer", ref ExecBuffer, false);
ser.Sync("ExecCounter", ref ExecCounter);
ser.Sync("ExecLength", ref ExecLength);
ser.Sync("InterruptResultBuffer", ref InterruptResultBuffer, false);
ser.Sync("ResCounter", ref ResCounter);
ser.Sync("ResLength", ref ResLength);
ser.Sync("LastSectorDataWriteByte", ref LastSectorDataWriteByte);
ser.Sync("LastSectorDataReadByte", ref LastSectorDataReadByte);
ser.Sync("LastByteReceived", ref LastByteReceived);
ser.Sync("_cmdIndex", ref _cmdIndex);
// resync the ActiveCommand
CMDIndex = _cmdIndex;
ActiveCommandParams.SyncState(ser);
ser.Sync("IndexPulseCounter", ref IndexPulseCounter);
//ser.SyncEnum("_activeStatus", ref _activeStatus);
//ser.SyncEnum("_statusRaised", ref _statusRaised);
ser.Sync("CMD_FLAG_MT", ref CMD_FLAG_MT);
ser.Sync("CMD_FLAG_MF", ref CMD_FLAG_MF);
ser.Sync("CMD_FLAG_SK", ref CMD_FLAG_SK);
ser.Sync("SRT", ref SRT);
ser.Sync("HUT", ref HUT);
ser.Sync("HLT", ref HLT);
ser.Sync("ND", ref ND);
ser.Sync("SRT_Counter", ref SRT_Counter);
ser.Sync("HUT_Counter", ref HUT_Counter);
ser.Sync("HLT_Counter", ref HLT_Counter);
ser.Sync("SectorDelayCounter", ref SectorDelayCounter);
ser.Sync("SectorID", ref SectorID);
#endregion
#region Timing
ser.Sync("LastCPUCycle", ref LastCPUCycle);
ser.Sync("StatusDelay", ref StatusDelay);
ser.Sync("TickCounter", ref TickCounter);
ser.Sync("DriveCycleCounter", ref DriveCycleCounter);
#endregion
ser.EndSection();
}
#endregion
}
}

View File

@ -0,0 +1,107 @@
using System.Collections;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// Static helper methods
/// </summary>
#region Attribution
/*
Implementation based on the information contained here:
http://www.cpcwiki.eu/index.php/765_FDC
and here:
http://www.cpcwiki.eu/imgs/f/f3/UPD765_Datasheet_OCRed.pdf
*/
#endregion
public partial class NECUPD765
{
/// <summary>
/// Returns the specified bit value from supplied byte
/// </summary>
/// <param name="bitNumber"></param>
/// <param name="dataByte"></param>
/// <returns></returns>
public static bool GetBit(int bitNumber, byte dataByte)
{
if (bitNumber < 0 || bitNumber > 7)
return false;
BitArray bi = new BitArray(new byte[] { dataByte });
return bi[bitNumber];
}
/// <summary>
/// Sets the specified bit of the supplied byte to 1
/// </summary>
/// <param name="bitNumber"></param>
/// <param name=""></param>
public static void SetBit(int bitNumber, ref byte dataByte)
{
if (bitNumber < 0 || bitNumber > 7)
return;
int db = (int)dataByte;
db |= 1 << bitNumber;
dataByte = (byte)db;
}
/// <summary>
/// Sets the specified bit of the supplied byte to 0
/// </summary>
/// <param name="bitNumber"></param>
/// <param name=""></param>
public static void UnSetBit(int bitNumber, ref byte dataByte)
{
if (bitNumber < 0 || bitNumber > 7)
return;
int db = (int)dataByte;
db &= ~(1 << bitNumber);
dataByte = (byte)db;
}
/// <summary>
/// Returns a drive number (0-3) based on the first two bits of the supplied byte
/// </summary>
/// <param name="dataByte"></param>
/// <returns></returns>
public static int GetUnitSelect(byte dataByte)
{
int driveNumber = dataByte & 0x03;
return driveNumber;
}
/// <summary>
/// Sets the first two bits of a byte based on the supplied drive number (0-3)
/// </summary>
/// <param name="driveNumber"></param>
/// <param name="dataByte"></param>
public static void SetUnitSelect(int driveNumber, ref byte dataByte)
{
switch (driveNumber)
{
case 0:
UnSetBit(SR0_US0, ref dataByte);
UnSetBit(SR0_US1, ref dataByte);
break;
case 1:
SetBit(SR0_US0, ref dataByte);
UnSetBit(SR0_US1, ref dataByte);
break;
case 2:
SetBit(SR0_US1, ref dataByte);
UnSetBit(SR0_US0, ref dataByte);
break;
case 3:
SetBit(SR0_US0, ref dataByte);
SetBit(SR0_US1, ref dataByte);
break;
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,832 @@
using BizHawk.Common;
using BizHawk.Common.NumberExtensions;
using System.Collections;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// CRT CONTROLLER (CRTC)
/// http://archive.pcjs.org/pubs/pc/datasheets/MC6845-CRT.pdf
/// http://www.cpcwiki.eu/imgs/c/c0/Hd6845.hitachi.pdf
/// http://www.cpcwiki.eu/imgs/1/13/Um6845.umc.pdf
/// http://www.cpcwiki.eu/imgs/b/b5/Um6845r.umc.pdf
/// http://www.cpcwiki.eu/index.php/CRTC
/// </summary>
public class CRCTChip
{
#region Devices
private CPCBase _machine { get; set; }
private CRCTType ChipType;
#endregion
#region Construction
public CRCTChip(CRCTType chipType, CPCBase machine)
{
_machine = machine;
ChipType = chipType;
//Reset();
}
#endregion
#region Output Lines
// State output lines
/// <summary>
/// This TTL compatible output is an active high signal which drives the monitor directly or is fed to Video Processing Logic for composite generation.
/// This signal determines the vertical position of the displayed text.
/// </summary>
public bool VSYNC { get { return _VSYNC; } }
/// <summary>
/// This TTL compatible output is an active high signal which drives the monitor directly or is fed to Video Processing Logic for composite generation.
/// This signal determines the horizontal position of the displayed text.
/// </summary>
public bool HSYNC { get { return _HSYNC; } }
/// <summary>
/// This TTL compatible output is an active high signal which indicates the CRTC is providing addressing in the active Display Area.
/// </summary>
public bool DisplayEnable { get { return DisplayEnable; } }
/// <summary>
/// This TTL compatible output indicates Cursor Display to external Video Processing Logic.Active high signal.
/// </summary>
public bool Cursor { get { return _Cursor; } }
private bool _VSYNC;
private bool _HSYNC;
private bool _DisplayEnable;
private bool _Cursor;
// Refresh memory addresses
/*
Refresh Memory Addresses (MAO-MA13) -These 14 outputs are used to refresh the CRT screen with pages of
data located within a 16K block of refresh memory. These outputs drive a TTL load and 30pF. A high level on
MAO-MA 13 is a logical "1."
*/
public bool MA0 { get { return LinearAddress.Bit(0); } }
public bool MA1 { get { return LinearAddress.Bit(1); } }
public bool MA2 { get { return LinearAddress.Bit(2); } }
public bool MA3 { get { return LinearAddress.Bit(3); } }
public bool MA4 { get { return LinearAddress.Bit(4); } }
public bool MA5 { get { return LinearAddress.Bit(5); } }
public bool MA6 { get { return LinearAddress.Bit(6); } }
public bool MA7 { get { return LinearAddress.Bit(7); } }
public bool MA8 { get { return LinearAddress.Bit(8); } }
public bool MA9 { get { return LinearAddress.Bit(9); } }
public bool MA10 { get { return LinearAddress.Bit(10); } } // cpcwiki would suggest that this isnt connected in the CPC range
public bool MA11 { get { return LinearAddress.Bit(11); } } // cpcwiki would suggest that this isnt connected in the CPC range
public bool MA12 { get { return LinearAddress.Bit(12); } } // cpcwiki would suggest that this is connected in the CPC range but not used
public bool MA13 { get { return LinearAddress.Bit(13); } } // cpcwiki would suggest that this is connected in the CPC range but not used
// Row addresses for character generators
/*
Raster Addresses (RAO-RA4) - These 5 outputs from the internal Raster Counter address the Character ROM
for the row of a character. These outputs drive a TTL load and 30pF. A high level (on RAO-RA4) is a logical "1."
*/
public bool RA0 { get { return ScanLineCTR.Bit(0); } }
public bool RA1 { get { return ScanLineCTR.Bit(1); } }
public bool RA2 { get { return ScanLineCTR.Bit(2); } }
public bool RA3 { get { return ScanLineCTR.Bit(3); } } // cpcwiki would suggest that this isnt connected in the CPC range
public bool RA4 { get { return ScanLineCTR.Bit(4); } } // cpcwiki would suggest that this isnt connected in the CPC range
/// <summary>
/// Built from R12, R13 and CLK
/// This is a logical emulator output and is how the CPC gatearray would translate the lines
/*
Memory Address Signal Signal source Signal name
A15 6845 MA13
A14 6845 MA12
A13 6845 RA2
A12 6845 RA1
A11 6845 RA0
A10 6845 MA9
A9 6845 MA8
A8 6845 MA7
A7 6845 MA6
A6 6845 MA5
A5 6845 MA4
A4 6845 MA3
A3 6845 MA2
A2 6845 MA1
A1 6845 MA0
A0 Gate-Array CLK
*/
/// </summary>
public ushort AddressLine
{
get
{
BitArray MA = new BitArray(16);
MA[0] = _CLK;
MA[1] = MA0;
MA[2] = MA1;
MA[3] = MA2;
MA[4] = MA3;
MA[5] = MA4;
MA[6] = MA5;
MA[7] = MA6;
MA[8] = MA7;
MA[9] = MA8;
MA[10] = MA9;
MA[11] = RA0;
MA[12] = RA1;
MA[13] = RA2;
MA[14] = MA12;
MA[15] = MA13;
ushort[] array = new ushort[1];
MA.CopyTo(array, 0);
return array[0];
}
}
#endregion
#region Input Lines
/// <summary>
/// This TTL compatible output indicates Cursor Display to external Video Processing Logic.Active high signal.
/// </summary>
public bool CLK { get { return _CLK; } }
/// <summary>
/// The RES input is used to Reset the CRTC. An input low level on RES forces CRTC into following status:
/// (A) All the counters in CRTC are cleared and the device stops the display operation.
/// (C) Control registers in CRTC are not affected and remain unchanged.
/// This signal is different from other M6800 family in the following functions:
/// (A) RES signal has capability of reset function only. when LPSTB is at low level.
/// (B) After RES has gone down to low level, output s ignals of MAO -MA13 and RAO - RA4, synchronizing with CLK low level, goes down to low level.
/// (At least 1 cycle CLK signal is necessary for reset.)
/// (C) The CRTC starts the Display operation immediately after the release of RES signal.
/// </summary>
public bool RESET { get { return _RESET; } }
/// <summary>
/// Light Pen Strobe (LPSTR) - This high impedance TTLIMOS compatible input latches the cu rrent Refresh Addresses in the Register File.
/// Latching is on the low to high edge and is synchronized internally to character clock.
/// </summary>
public bool LPSTB { get { return _LPSTB; } }
private bool _CLK;
private bool _RESET;
private bool _LPSTB;
#endregion
#region Internal Registers
/// <summary>
/// The currently selected register
/// </summary>
private byte AddressRegister;
/// <summary>
/// The internal register
/// The Address Register is a 5 bit write-only register used as an "indirect" or "pointer" register.
/// Its contents are the address of one of the other 18 registers in the file.When RS and CS are low,
/// the Address Register itself is addressed.When RS is high, the Register File is accessed.
/// </summary>
private byte[] Register = new byte[18];
// Horizontal timing register constants
/// <summary>
/// This 8 bit write-only register determines the horizontal frequency of HS.
/// It is the total of displayed plus non-displayed character time units minus one.
/// </summary>
private const int H_TOTAL = 0;
/// <summary>
/// This 8 bit write-only register determines the number of displayed characters per horizontal line.
/// </summary>
private const int H_DISPLAYED = 1;
/// <summary>
/// This 8 bit write-only register determines the horizontal sync postiion on the horizontal line.
/// </summary>
private const int H_SYNC_POS = 2;
/// <summary>
/// This 4 bit write-only register determines the width of the HS pulse. It may not be apparent why this width needs to be programmed.However,
/// consider that all timing widths must be programmed as multiples of the character clock period which varies.If HS width were fixed as an integral
/// number of character times, it would vary with character rate and be out of tolerance for certain monitors.
/// The rate programmable feature allows compensating HS width.
/// NOTE: Dependent on chiptype this also may include VSYNC width - check the UpdateWidths() method
/// </summary>
private const int SYNC_WIDTHS = 3;
// Vertical timing register constants
/// <summary>
/// The vertical frequency of VS is determined by both R4 and R5.The calculated number of character I ine times is usual I y an integer plus a fraction to
/// get exactly a 50 or 60Hz vertical refresh rate. The integer number of character line times minus one is programmed in the 7 bit write-only Vertical Total Register;
/// the fraction is programmed in the 5 bit write-only Vertical Scan Adjust Register as a number of scan line times.
/// </summary>
private const int V_TOTAL = 4;
private const int V_TOTAL_ADJUST = 5;
/// <summary>
/// This 7 bit write-only register determines the number of displayed character rows on the CRT screen, and is programmed in character row times.
/// </summary>
private const int V_DISPLAYED = 6;
/// <summary>
/// This 7 bit write-only register determines the vertical sync position with respect to the reference.It is programmed in character row times.
/// </summary>
private const int V_SYNC_POS = 7;
/// <summary>
/// This 2 bit write-only register controls the raster scan mode(see Figure 11 ). When bit 0 and bit 1 are reset, or bit 0 is reset and bit 1 set,
/// the non· interlace raster scan mode is selected.Two interlace modes are available.Both are interlaced 2 fields per frame.When bit 0 is set and bit 1 is reset,
/// the interlace sync raster scan mode is selected.Also when bit 0 and bit 1 are set, the interlace sync and video raster scan mode is selected.
/// </summary>
private const int INTERLACE_MODE = 8;
/// <summary>
/// This 5 bit write·only register determines the number of scan lines per character row including spacing.
/// The programmed value is a max address and is one less than the number of scan l1nes.
/// </summary>
private const int MAX_SL_ADDRESS = 9;
// Other register constants
/// <summary>
/// This 7 bit write-only register controls the cursor format(see Figure 10). Bit 5 is the blink timing control.When bit 5 is low, the blink frequency is 1/16 of the
/// vertical field rate, and when bit 5 is high, the blink frequency is 1/32 of the vertical field rate.Bit 6 is used to enable a blink.
/// The cursor start scan line is set by the lower 5 bits.
/// </summary>
private const int CURSOR_START = 10;
/// <summary>
/// This 5 bit write-only register sets the cursor end scan line
/// </summary>
private const int CURSOR_END = 11;
/// <summary>
/// Start Address Register is a 14 bit write-only register which determines the first address put out as a refresh address after vertical blanking.
/// It consists of an 8 bit lower register, and a 6 bit higher register.
/// </summary>
private const int START_ADDR_H = 12;
private const int START_ADDR_L = 13;
/// <summary>
/// This 14 bit read/write register stores the cursor location.This register consists of an 8 bit lower and 6 bit higher register.
/// </summary>
private const int CURSOR_H = 14;
private const int CURSOR_L = 15;
/// <summary>
/// This 14 bit read -only register is used to store the contents of the Address Register(H & L) when the LPSTB input pulses high.
/// This register consists of an 8 bit lower and 6 bit higher register.
/// </summary>
private const int LIGHT_PEN_H = 16;
private const int LIGHT_PEN_L = 17;
#endregion
#region Internal Fields & Properties
/// <summary>
/// Calculated when set based on R3
/// </summary>
private int HSYNCWidth;
/// <summary>
/// Calculated when set based on R3
/// </summary>
private int VSYNCWidth;
/// <summary>
/// Character pos address (0 index).
/// Feeds the MA lines
/// </summary>
private int LinearAddress;
/// <summary>
/// The currently selected Interlace Mode (based on R8)
/// </summary>
private InterlaceMode CurrentInterlaceMode
{
get
{
if (!Register[INTERLACE_MODE].Bit(0))
{
return InterlaceMode.NormalSyncMode;
}
else if (Register[INTERLACE_MODE].Bit(0))
{
if (Register[INTERLACE_MODE].Bit(1))
{
return InterlaceMode.InterlaceSyncAndVideoMode;
}
else
{
return InterlaceMode.InterlaceSyncMode;
}
}
return InterlaceMode.NormalSyncMode;
}
}
/// <summary>
/// The current cursor display mode (based on R14 & R15)
/// </summary>
private CursorControl CurrentCursorMode
{
get
{
if (!Register[CURSOR_START].Bit(6) && !Register[CURSOR_START].Bit(5))
{
return CursorControl.NonBlink;
}
else if (!Register[CURSOR_START].Bit(6) && Register[CURSOR_START].Bit(5))
{
return CursorControl.CursorNonDisplay;
}
else if (Register[CURSOR_START].Bit(6) && !Register[CURSOR_START].Bit(5))
{
return CursorControl.Blink1_16;
}
else
{
return CursorControl.Blink1_32;
}
}
}
// Counter microchips
private int HorizontalCTR { get { return _HorizontalCTR; }
set
{
if (value > 255)
_HorizontalCTR = value - 255;
}
}
private int HorizontalSyncWidthCTR
{
get { return _HorizontalSyncWidthCTR; }
set
{
if (value > 15)
_HorizontalSyncWidthCTR = value - 15;
}
}
private int CharacterRowCTR
{
get { return CharacterRowCTR; }
set
{
if (value > 127)
_CharacterRowCTR = value - 127;
}
}
private int ScanLineCTR
{
get { return ScanLineCTR; }
set
{
if (value > 31)
_ScanLineCTR = value - 31;
}
}
private int _HorizontalCTR;
private int _HorizontalSyncWidthCTR;
private int _CharacterRowCTR;
private int _ScanLineCTR;
#endregion
#region Databus Interface
/*
RegIdx Register Name Type
0 1 2 3 4
0 Horizontal Total Write Only Write Only Write Only (note 2) (note 3)
1 Horizontal Displayed Write Only Write Only Write Only (note 2) (note 3)
2 Horizontal Sync Position Write Only Write Only Write Only (note 2) (note 3)
3 H and V Sync Widths Write Only Write Only Write Only (note 2) (note 3)
4 Vertical Total Write Only Write Only Write Only (note 2) (note 3)
5 Vertical Total Adjust Write Only Write Only Write Only (note 2) (note 3)
6 Vertical Displayed Write Only Write Only Write Only (note 2) (note 3)
7 Vertical Sync position Write Only Write Only Write Only (note 2) (note 3)
8 Interlace and Skew Write Only Write Only Write Only (note 2) (note 3)
9 Maximum Raster Address Write Only Write Only Write Only (note 2) (note 3)
10 Cursor Start Raster Write Only Write Only Write Only (note 2) (note 3)
11 Cursor End Raster Write Only Write Only Write Only (note 2) (note 3)
12 Disp. Start Address (High) Read/Write Write Only Write Only Read/Write (note 2) (note 3)
13 Disp. Start Address (Low) Read/Write Write Only Write Only Read/Write (note 2) (note 3)
14 Cursor Address (High) Read/Write Read/Write Read/Write Read/Write (note 2) (note 3)
15 Cursor Address (Low) Read/Write Read/Write Read/Write Read/Write (note 2) (note 3)
16 Light Pen Address (High) Read Only Read Only Read Only Read Only (note 2) (note 3)
17 Light Pen Address (Low) Read Only Read Only Read Only Read Only (note 2) (note 3)
1. On type 0 and 1, if a Write Only register is read from, "0" is returned.
2. See the document "Extra CPC Plus Hardware Information" for more details.
3. CRTC type 4 is the same as CRTC type 3. The registers also repeat as they do on the type 3.
*/
/* CPC:
#BCXX %x0xxxx00 xxxxxxxx 6845 CRTC Index - Write
#BDXX %x0xxxx01 xxxxxxxx 6845 CRTC Data Out - Write
#BEXX %x0xxxx10 xxxxxxxx 6845 CRTC Status (as far as supported) Read -
#BFXX %x0xxxx11 xxxxxxxx 6845 CRTC Data In (as far as supported) Read -
*/
/// <summary>
/// CPU (or other device) reads from the 8-bit databus
/// </summary>
/// <param name="port"></param>
/// <param name="result"></param>
public bool ReadPort(ushort port, ref int result)
{
byte portUpper = (byte)(port >> 8);
byte portLower = (byte)(port & 0xff);
bool accessed = false;
// The 6845 is selected when bit 14 of the I/O port address is set to "0"
if (portUpper.Bit(6))
return accessed;
// Bit 9 and 8 of the I/O port address define the function to access
if (portUpper.Bit(1) && !portUpper.Bit(0))
{
// read status register
accessed = ReadStatus(ref result);
}
else if ((portUpper & 3) == 3)
{
// read data register
accessed = ReadRegister(ref result);
}
else
{
result = 0;
}
return accessed;
}
/// <summary>
/// CPU (or other device) writes to the 8-bit databus
/// </summary>
/// <param name="port"></param>
/// <param name="result"></param>
public bool WritePort(ushort port, int value)
{
byte portUpper = (byte)(port >> 8);
byte portLower = (byte)(port & 0xff);
bool accessed = false;
// The 6845 is selected when bit 14 of the I/O port address is set to "0"
if (portUpper.Bit(6))
return accessed;
var func = portUpper & 3;
switch (func)
{
// reg select
case 0:
SelectRegister(value);
break;
// data write
case 1:
WriteRegister(value);
break;
}
return accessed;
}
#endregion
#region Internal IO Methods
/// <summary>
/// Selects a specific register
/// </summary>
/// <param name="value"></param>
private void SelectRegister(int value)
{
var v = (byte)((byte)value & 0x1F);
if (v > 0 && v < 18)
{
AddressRegister = v;
}
}
/// <summary>
/// Writes to the currently latched address register
/// </summary>
/// <param name="value"></param>
private void WriteRegister(int value)
{
byte val = (byte)value;
// lightpen regs are readonly on all models
if (AddressRegister == 16 || AddressRegister == 17)
return;
// all other models can be written to
switch (AddressRegister)
{
case H_TOTAL:
case H_DISPLAYED:
case H_SYNC_POS:
case START_ADDR_L:
Register[AddressRegister] = val;
break;
case SYNC_WIDTHS:
Register[AddressRegister] = val;
UpdateWidths();
break;
case V_TOTAL_ADJUST:
case CURSOR_END:
case MAX_SL_ADDRESS:
Register[AddressRegister] = (byte)(val & 0x1F);
break;
case START_ADDR_H:
case CURSOR_H:
Register[AddressRegister] = (byte)(val & 0x3F);
break;
case V_TOTAL:
case V_DISPLAYED:
case V_SYNC_POS:
case CURSOR_START:
Register[AddressRegister] = (byte)(val & 0x7F);
break;
case INTERLACE_MODE:
Register[AddressRegister] = (byte)(val & 0x3);
break;
}
}
/// <summary>
/// Reads from the currently selected register
/// </summary>
/// <param name="data"></param>
private bool ReadRegister(ref int data)
{
bool addressed = false;
switch (AddressRegister)
{
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 11:
if ((int)ChipType == 0 || (int)ChipType == 1)
{
addressed = true;
data = 0;
}
break;
case 12:
case 13:
addressed = true;
if ((int)ChipType == 0)
data = Register[AddressRegister];
else if ((int)ChipType == 1)
data = 0;
break;
case 14:
case 15:
case 16:
case 17:
addressed = true;
data = Register[AddressRegister];
break;
default:
// registers 18-31 read as 0, on type 0 and 2. registers 18-30 read as 0 on type1, register 31 reads as 0x0ff.
if (AddressRegister >= 18 && AddressRegister <= 30)
{
switch ((int)ChipType)
{
case 0:
case 2:
case 1:
addressed = true;
data = 0;
break;
}
}
else if (AddressRegister == 31)
{
if ((int)ChipType == 1)
{
addressed = true;
data = 0x0ff;
}
else if ((int)ChipType == 0 || (int)ChipType == 2)
{
addressed = true;
data = 0;
}
}
break;
}
return addressed;
}
/// <summary>
/// Updates the V and H SYNC widths
/// </summary>
private void UpdateWidths()
{
switch (ChipType)
{
case CRCTType.HD6845S:
// Bits 7..4 define Vertical Sync Width. If 0 is programmed this gives 16 lines of VSYNC. Bits 3..0 define Horizontal Sync Width.
// If 0 is programmed no HSYNC is generated.
HSYNCWidth = (Register[SYNC_WIDTHS] >> 0) & 0x0F;
VSYNCWidth = (Register[SYNC_WIDTHS] >> 4) & 0x0F;
break;
case CRCTType.UM6845R:
// Bits 7..4 are ignored. Vertical Sync is fixed at 16 lines. Bits 3..0 define Horizontal Sync Width. If 0 is programmed no HSYNC is generated.
HSYNCWidth = (Register[SYNC_WIDTHS] >> 0) & 0x0F;
VSYNCWidth = 16;
break;
case CRCTType.MC6845:
// Bits 7..4 are ignored. Vertical Sync is fixed at 16 lines. Bits 3..0 define Horizontal Sync Width. If 0 is programmed this gives a HSYNC width of 16.
HSYNCWidth = (Register[SYNC_WIDTHS] >> 0) & 0x0F;
if (HSYNCWidth == 0)
HSYNCWidth = 16;
VSYNCWidth = 16;
break;
case CRCTType.AMS40489:
case CRCTType.AMS40226:
// Bits 7..4 define Vertical Sync Width. If 0 is programmed this gives 16 lines of VSYNC.Bits 3..0 define Horizontal Sync Width.
// If 0 is programmed this gives a HSYNC width of 16.
HSYNCWidth = (Register[SYNC_WIDTHS] >> 0) & 0x0F;
VSYNCWidth = (Register[SYNC_WIDTHS] >> 4) & 0x0F;
if (HSYNCWidth == 0)
HSYNCWidth = 16;
if (VSYNCWidth == 0)
VSYNCWidth = 16;
break;
}
}
/// <summary>
/// Reads from the status register
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
private bool ReadStatus(ref int data)
{
bool addressed = false;
switch ((int)ChipType)
{
case 1:
// read status
//todo!!
addressed = true;
break;
case 0:
case 2:
// status reg not available
break;
case 3:
case 4:
// read from internal register instead
addressed = ReadRegister(ref data);
break;
}
return addressed;
}
#endregion
#region Public Functions
/// <summary>
/// Performs a CRCT clock cycle.
/// On CPC this is called at 1Mhz == 1 Character cycle (2 bytes)
/// </summary>
public void ClockCycle()
{
// H clock
HorizontalCTR++;
if (HorizontalCTR == Register[H_TOTAL])
{
// end of current scanline
HorizontalCTR = 0;
// CRCT starts its scalines at the display area
_DisplayEnable = true;
ScanLineCTR++;
if (ScanLineCTR > Register[MAX_SL_ADDRESS])
{
// end of vertical character
ScanLineCTR = 0;
CharacterRowCTR++;
if (CharacterRowCTR == Register[V_TOTAL])
{
// check for vertical adjust
if (Register[V_TOTAL_ADJUST] > 0)
{
}
else
{
// end of CRCT frame
CharacterRowCTR = 0;
}
}
}
}
else if (HorizontalCTR == Register[H_DISPLAYED] + 1)
{
// end of display area
_DisplayEnable = false;
}
}
#endregion
#region Internal Functions
#endregion
#region Serialization
public void SyncState(Serializer ser)
{
ser.BeginSection("CRCT");
ser.SyncEnum("ChipType", ref ChipType);
ser.Sync("_VSYNC", ref _VSYNC);
ser.Sync("_HSYNC", ref _HSYNC);
ser.Sync("_DisplayEnable", ref _DisplayEnable);
ser.Sync("_Cursor", ref _Cursor);
ser.Sync("_CLK", ref _CLK);
ser.Sync("_RESET", ref _RESET);
ser.Sync("_LPSTB", ref _LPSTB);
ser.Sync("AddressRegister", ref AddressRegister);
ser.Sync("Register", ref Register, false);
ser.Sync("HSYNCWidth", ref HSYNCWidth);
ser.Sync("VSYNCWidth", ref VSYNCWidth);
ser.Sync("_HorizontalCTR", ref _HorizontalCTR);
ser.Sync("_HorizontalSyncWidthCTR", ref _HorizontalSyncWidthCTR);
ser.Sync("_CharacterRowCTR", ref _CharacterRowCTR);
ser.Sync("_ScanLineCTR", ref _ScanLineCTR);
ser.EndSection();
/*
* */
}
#endregion
#region Enums
/// <summary>
/// The types of CRCT chip found in the CPC range
/// </summary>
public enum CRCTType
{
HD6845S = 0,
UM6845 = 0,
UM6845R = 1,
MC6845 = 2,
AMS40489 = 3,
AMS40226 = 4
}
/// <summary>
/// The available interlace modes in the CRCT
/// </summary>
private enum InterlaceMode
{
NormalSyncMode,
InterlaceSyncMode,
InterlaceSyncAndVideoMode
}
/// <summary>
/// Cursor display modes
/// </summary>
private enum CursorControl
{
NonBlink,
CursorNonDisplay,
Blink1_16,
Blink1_32
}
#endregion
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,685 @@
using BizHawk.Common;
using BizHawk.Common.NumberExtensions;
using BizHawk.Emulation.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// Render pixels to the screen
/// </summary>
public class CRTDevice : IVideoProvider
{
#region Devices
private CPCBase _machine;
private CRCT_6845 CRCT => _machine.CRCT;
private AmstradGateArray GateArray => _machine.GateArray;
#endregion
#region Construction
public CRTDevice(CPCBase machine)
{
_machine = machine;
CurrentLine = new ScanLine(this);
CRCT.AttachHSYNCCallback(OnHSYNC);
CRCT.AttachVSYNCCallback(OnVSYNC);
}
#endregion
#region Palettes
/// <summary>
/// The standard CPC Pallete (ordered by firmware #)
/// http://www.cpcwiki.eu/index.php/CPC_Palette
/// </summary>
public static readonly int[] CPCFirmwarePalette =
{
Colors.ARGB(0x00, 0x00, 0x00), // Black
Colors.ARGB(0x00, 0x00, 0x80), // Blue
Colors.ARGB(0x00, 0x00, 0xFF), // Bright Blue
Colors.ARGB(0x80, 0x00, 0x00), // Red
Colors.ARGB(0x80, 0x00, 0x80), // Magenta
Colors.ARGB(0x80, 0x00, 0xFF), // Mauve
Colors.ARGB(0xFF, 0x00, 0x00), // Bright Red
Colors.ARGB(0xFF, 0x00, 0x80), // Purple
Colors.ARGB(0xFF, 0x00, 0xFF), // Bright Magenta
Colors.ARGB(0x00, 0x80, 0x00), // Green
Colors.ARGB(0x00, 0x80, 0x80), // Cyan
Colors.ARGB(0x00, 0x80, 0xFF), // Sky Blue
Colors.ARGB(0x80, 0x80, 0x00), // Yellow
Colors.ARGB(0x80, 0x80, 0x80), // White
Colors.ARGB(0x80, 0x80, 0xFF), // Pastel Blue
Colors.ARGB(0xFF, 0x80, 0x00), // Orange
Colors.ARGB(0xFF, 0x80, 0x80), // Pink
Colors.ARGB(0xFF, 0x80, 0xFF), // Pastel Magenta
Colors.ARGB(0x00, 0xFF, 0x00), // Bright Green
Colors.ARGB(0x00, 0xFF, 0x80), // Sea Green
Colors.ARGB(0x00, 0xFF, 0xFF), // Bright Cyan
Colors.ARGB(0x80, 0xFF, 0x00), // Lime
Colors.ARGB(0x80, 0xFF, 0x80), // Pastel Green
Colors.ARGB(0x80, 0xFF, 0xFF), // Pastel Cyan
Colors.ARGB(0xFF, 0xFF, 0x00), // Bright Yellow
Colors.ARGB(0xFF, 0xFF, 0x80), // Pastel Yellow
Colors.ARGB(0xFF, 0xFF, 0xFF), // Bright White
};
/// <summary>
/// The standard CPC Pallete (ordered by hardware #)
/// http://www.cpcwiki.eu/index.php/CPC_Palette
/// </summary>
public static readonly int[] CPCHardwarePalette =
{
Colors.ARGB(0x80, 0x80, 0x80), // White
Colors.ARGB(0x80, 0x80, 0x80), // White (duplicate)
Colors.ARGB(0x00, 0xFF, 0x80), // Sea Green
Colors.ARGB(0xFF, 0xFF, 0x80), // Pastel Yellow
Colors.ARGB(0x00, 0x00, 0x80), // Blue
Colors.ARGB(0xFF, 0x00, 0x80), // Purple
Colors.ARGB(0x00, 0x80, 0x80), // Cyan
Colors.ARGB(0xFF, 0x80, 0x80), // Pink
Colors.ARGB(0xFF, 0x00, 0x80), // Purple (duplicate)
Colors.ARGB(0xFF, 0xFF, 0x80), // Pastel Yellow (duplicate)
Colors.ARGB(0xFF, 0xFF, 0x00), // Bright Yellow
Colors.ARGB(0xFF, 0xFF, 0xFF), // Bright White
Colors.ARGB(0xFF, 0x00, 0x00), // Bright Red
Colors.ARGB(0xFF, 0x00, 0xFF), // Bright Magenta
Colors.ARGB(0xFF, 0x80, 0x00), // Orange
Colors.ARGB(0xFF, 0x80, 0xFF), // Pastel Magenta
Colors.ARGB(0x00, 0x00, 0x80), // Blue (duplicate)
Colors.ARGB(0x00, 0xFF, 0x80), // Sea Green (duplicate)
Colors.ARGB(0x00, 0xFF, 0x00), // Bright Green
Colors.ARGB(0x00, 0xFF, 0xFF), // Bright Cyan
Colors.ARGB(0x00, 0x00, 0x00), // Black
Colors.ARGB(0x00, 0x00, 0xFF), // Bright Blue
Colors.ARGB(0x00, 0x80, 0x00), // Green
Colors.ARGB(0x00, 0x80, 0xFF), // Sky Blue
Colors.ARGB(0x80, 0x00, 0x80), // Magenta
Colors.ARGB(0x80, 0xFF, 0x80), // Pastel Green
Colors.ARGB(0x80, 0xFF, 0x00), // Lime
Colors.ARGB(0x80, 0xFF, 0xFF), // Pastel Cyan
Colors.ARGB(0x80, 0x00, 0x00), // Red
Colors.ARGB(0x80, 0x00, 0xFF), // Mauve
Colors.ARGB(0x80, 0x80, 0x00), // Yellow
Colors.ARGB(0x80, 0x80, 0xFF), // Pastel Blue
};
#endregion
#region Public Stuff
/// <summary>
/// The current scanline that is being added to
/// (will be processed and committed to the screen buffer every HSYNC)
/// </summary>
public ScanLine CurrentLine;
/// <summary>
/// The number of top border scanlines to ommit when rendering
/// </summary>
public int TopLinesToTrim = 20;
/// <summary>
/// Count of rendered scanlines this frame
/// </summary>
public int ScanlineCounter = 0;
/// <summary>
/// Video buffer processing
/// </summary>
public int[] ProcessVideoBuffer()
{
return ScreenBuffer;
}
/// <summary>
/// Sets up buffers and the like at the start of a frame
/// </summary>
public void SetupVideo()
{
if (BufferHeight == 576)
return;
BufferWidth = 800;
BufferHeight = 576;
VirtualWidth = BufferWidth / 2;
VirtualHeight = BufferHeight / 2;
ScreenBuffer = new int[BufferWidth * BufferHeight];
}
/// <summary>
/// Fired when the CRCT flags HSYNC
/// </summary>
public void OnHSYNC()
{
}
/// <summary>
/// Fired when the CRCT flags VSYNC
/// </summary>
public void OnVSYNC()
{
}
#endregion
#region IVideoProvider
/// <summary>
/// Video output buffer
/// </summary>
public int[] ScreenBuffer;
private int _virtualWidth;
private int _virtualHeight;
private int _bufferWidth;
private int _bufferHeight;
public int BackgroundColor
{
get { return CPCHardwarePalette[0]; }
}
public int VirtualWidth
{
get { return _virtualWidth; }
set { _virtualWidth = value; }
}
public int VirtualHeight
{
get { return _virtualHeight; }
set { _virtualHeight = value; }
}
public int BufferWidth
{
get { return _bufferWidth; }
set { _bufferWidth = value; }
}
public int BufferHeight
{
get { return _bufferHeight; }
set { _bufferHeight = value; }
}
public int VsyncNumerator
{
get { return GateArray.Z80ClockSpeed * 50; }
set { }
}
public int VsyncDenominator
{
get { return GateArray.Z80ClockSpeed; }
}
public int[] GetVideoBuffer()
{
return ProcessVideoBuffer();
}
public void SetupScreenSize()
{
BufferWidth = 1024; // 512;
BufferHeight = 768;
VirtualHeight = BufferHeight;
VirtualWidth = BufferWidth;
ScreenBuffer = new int[BufferWidth * BufferHeight];
croppedBuffer = ScreenBuffer;
}
protected int[] croppedBuffer;
#endregion
#region Serialization
public void SyncState(Serializer ser)
{
ser.BeginSection("CRT");
ser.Sync("BufferWidth", ref _bufferWidth);
ser.Sync("BufferHeight", ref _bufferHeight);
ser.Sync("VirtualHeight", ref _virtualHeight);
ser.Sync("VirtualWidth", ref _virtualWidth);
ser.Sync("ScreenBuffer", ref ScreenBuffer, false);
ser.Sync("ScanlineCounter", ref ScanlineCounter);
ser.EndSection();
}
#endregion
}
/// <summary>
/// Represents a single scanline buffer
/// </summary>
public class ScanLine
{
/// <summary>
/// Array of character information
/// </summary>
public Character[] Characters;
/// <summary>
/// The screenmode that was set at the start of this scanline
/// </summary>
public int ScreenMode = 1;
/// <summary>
/// The scanline number (0 based)
/// </summary>
public int LineIndex;
/// <summary>
/// The calling CRT device
/// </summary>
private CRTDevice CRT;
public ScanLine(CRTDevice crt)
{
Reset();
CRT = crt;
}
// To be run after scanline has been fully processed
public void InitScanline(int screenMode, int lineIndex)
{
Reset();
ScreenMode = screenMode;
LineIndex = lineIndex;
}
/// <summary>
/// Adds a single scanline character into the matrix
/// </summary>
/// <param name="charIndex"></param>
/// <param name="phase"></param>
public void AddScanlineCharacter(int index, RenderPhase phase, byte vid1, byte vid2, int[] pens)
{
if (index >= 64)
{
return;
}
switch (phase)
{
case RenderPhase.BORDER:
AddBorderValue(index, CRTDevice.CPCHardwarePalette[pens[16]]);
break;
case RenderPhase.DISPLAY:
AddDisplayValue(index, vid1, vid2, pens);
break;
default:
AddSyncValue(index, phase);
break;
}
}
/// <summary>
/// Adds a HSYNC, VSYNC or HSYNC+VSYNC character into the scanline
/// </summary>
/// <param name="charIndex"></param>
/// <param name="phase"></param>
private void AddSyncValue(int charIndex, RenderPhase phase)
{
Characters[charIndex].Phase = phase;
Characters[charIndex].Pixels = new int[0];
}
/// <summary>
/// Adds a border character into the scanline
/// </summary>
/// <param name="index"></param>
/// <param name="colourValue"></param>
private void AddBorderValue(int charIndex, int colourValue)
{
Characters[charIndex].Phase = RenderPhase.BORDER;
switch (ScreenMode)
{
case 0:
Characters[charIndex].Pixels = new int[4];
break;
case 1:
Characters[charIndex].Pixels = new int[8];
break;
case 2:
Characters[charIndex].Pixels = new int[16];
break;
case 3:
Characters[charIndex].Pixels = new int[8];
break;
}
for (int i = 0; i < Characters[charIndex].Pixels.Length; i++)
{
Characters[charIndex].Pixels[i] = colourValue;
}
}
/// <summary>
/// Adds a display character into the scanline
/// Pixel matrix is calculated based on the current ScreenMode
/// </summary>
/// <param name="charIndex"></param>
/// <param name="vid1"></param>
/// <param name="vid2"></param>
public void AddDisplayValue(int charIndex, byte vid1, byte vid2, int[] pens)
{
Characters[charIndex].Phase = RenderPhase.DISPLAY;
// generate pixels based on screen mode
switch (ScreenMode)
{
// 4 bits per pixel - 2 bytes - 4 pixels (8 CRT pixels)
// RECT
case 0:
Characters[charIndex].Pixels = new int[16];
int m0Count = 0;
int pix = vid1 & 0xaa;
pix = ((pix & 0x80) >> 7) | ((pix & 0x08) >> 2) | ((pix & 0x20) >> 3) | ((pix & 0x02 << 2));
Characters[charIndex].Pixels[m0Count++] = CRTDevice.CPCHardwarePalette[pens[pix]];
Characters[charIndex].Pixels[m0Count++] = CRTDevice.CPCHardwarePalette[pens[pix]];
Characters[charIndex].Pixels[m0Count++] = CRTDevice.CPCHardwarePalette[pens[pix]];
Characters[charIndex].Pixels[m0Count++] = CRTDevice.CPCHardwarePalette[pens[pix]];
pix = vid1 & 0x55;
pix = (((pix & 0x40) >> 6) | ((pix & 0x04) >> 1) | ((pix & 0x10) >> 2) | ((pix & 0x01 << 3)));
Characters[charIndex].Pixels[m0Count++] = CRTDevice.CPCHardwarePalette[pens[pix]];
Characters[charIndex].Pixels[m0Count++] = CRTDevice.CPCHardwarePalette[pens[pix]];
Characters[charIndex].Pixels[m0Count++] = CRTDevice.CPCHardwarePalette[pens[pix]];
Characters[charIndex].Pixels[m0Count++] = CRTDevice.CPCHardwarePalette[pens[pix]];
pix = vid2 & 0xaa;
pix = ((pix & 0x80) >> 7) | ((pix & 0x08) >> 2) | ((pix & 0x20) >> 3) | ((pix & 0x02 << 2));
Characters[charIndex].Pixels[m0Count++] = CRTDevice.CPCHardwarePalette[pens[pix]];
Characters[charIndex].Pixels[m0Count++] = CRTDevice.CPCHardwarePalette[pens[pix]];
Characters[charIndex].Pixels[m0Count++] = CRTDevice.CPCHardwarePalette[pens[pix]];
Characters[charIndex].Pixels[m0Count++] = CRTDevice.CPCHardwarePalette[pens[pix]];
pix = vid2 & 0x55;
pix = (((pix & 0x40) >> 6) | ((pix & 0x04) >> 1) | ((pix & 0x10) >> 2) | ((pix & 0x01 << 3)));
Characters[charIndex].Pixels[m0Count++] = CRTDevice.CPCHardwarePalette[pens[pix]];
Characters[charIndex].Pixels[m0Count++] = CRTDevice.CPCHardwarePalette[pens[pix]];
Characters[charIndex].Pixels[m0Count++] = CRTDevice.CPCHardwarePalette[pens[pix]];
Characters[charIndex].Pixels[m0Count++] = CRTDevice.CPCHardwarePalette[pens[pix]];
/*
int m0B0P0i = vid1 & 0xaa;
int m0B0P0 = ((m0B0P0i & 0x80) >> 7) | ((m0B0P0i & 0x08) >> 2) | ((m0B0P0i & 0x20) >> 3) | ((m0B0P0i & 0x02 << 2));
int m0B0P1i = vid1 & 85;
int m0B0P1 = ((m0B0P1i & 0x40) >> 6) | ((m0B0P1i & 0x04) >> 1) | ((m0B0P1i & 0x10) >> 2) | ((m0B0P1i & 0x01 << 3));
Characters[charIndex].Pixels[m0Count++] = CRTDevice.CPCHardwarePalette[pens[m0B0P0]];
Characters[charIndex].Pixels[m0Count++] = CRTDevice.CPCHardwarePalette[pens[m0B0P0]];
Characters[charIndex].Pixels[m0Count++] = CRTDevice.CPCHardwarePalette[pens[m0B0P1]];
Characters[charIndex].Pixels[m0Count++] = CRTDevice.CPCHardwarePalette[pens[m0B0P1]];
int m0B1P0i = vid2 & 170;
int m0B1P0 = ((m0B1P0i & 0x80) >> 7) | ((m0B1P0i & 0x08) >> 2) | ((m0B1P0i & 0x20) >> 3) | ((m0B1P0i & 0x02 << 2));
int m0B1P1i = vid2 & 85;
int m0B1P1 = ((m0B1P1i & 0x40) >> 6) | ((m0B1P1i & 0x04) >> 1) | ((m0B1P1i & 0x10) >> 2) | ((m0B1P1i & 0x01 << 3));
Characters[charIndex].Pixels[m0Count++] = CRTDevice.CPCHardwarePalette[pens[m0B1P0]];
Characters[charIndex].Pixels[m0Count++] = CRTDevice.CPCHardwarePalette[pens[m0B1P0]];
Characters[charIndex].Pixels[m0Count++] = CRTDevice.CPCHardwarePalette[pens[m0B1P1]];
Characters[charIndex].Pixels[m0Count++] = CRTDevice.CPCHardwarePalette[pens[m0B1P1]];
*/
break;
// 2 bits per pixel - 2 bytes - 8 pixels (16 CRT pixels)
// SQUARE
case 1:
Characters[charIndex].Pixels = new int[8];
int m1Count = 0;
int m1B0P0 = (((vid1 & 0x80) >> 7) | ((vid1 & 0x08) >> 2));
int m1B0P1 = (((vid1 & 0x40) >> 6) | ((vid1 & 0x04) >> 1));
int m1B0P2 = (((vid1 & 0x20) >> 5) | ((vid1 & 0x02)));
int m1B0P3 = (((vid1 & 0x10) >> 4) | ((vid1 & 0x01) << 1));
Characters[charIndex].Pixels[m1Count++] = CRTDevice.CPCHardwarePalette[pens[m1B0P0]];
Characters[charIndex].Pixels[m1Count++] = CRTDevice.CPCHardwarePalette[pens[m1B0P1]];
Characters[charIndex].Pixels[m1Count++] = CRTDevice.CPCHardwarePalette[pens[m1B0P2]];
Characters[charIndex].Pixels[m1Count++] = CRTDevice.CPCHardwarePalette[pens[m1B0P3]];
int m1B1P0 = (((vid2 & 0x80) >> 7) | ((vid2 & 0x08) >> 2));
int m1B1P1 = (((vid2 & 0x40) >> 6) | ((vid2 & 0x04) >> 1));
int m1B1P2 = (((vid2 & 0x20) >> 5) | ((vid2 & 0x02)));
int m1B1P3 = (((vid2 & 0x10) >> 4) | ((vid2 & 0x01) << 1));
Characters[charIndex].Pixels[m1Count++] = CRTDevice.CPCHardwarePalette[pens[m1B1P0]];
Characters[charIndex].Pixels[m1Count++] = CRTDevice.CPCHardwarePalette[pens[m1B1P1]];
Characters[charIndex].Pixels[m1Count++] = CRTDevice.CPCHardwarePalette[pens[m1B1P2]];
Characters[charIndex].Pixels[m1Count++] = CRTDevice.CPCHardwarePalette[pens[m1B1P3]];
break;
// 1 bit per pixel - 2 bytes - 16 pixels (16 CRT pixels)
// RECT
case 2:
Characters[charIndex].Pixels = new int[16];
int m2Count = 0;
int[] pixBuff = new int[16];
for (int bit = 7; bit >= 0; bit--)
{
int val = vid1.Bit(bit) ? 1 : 0;
Characters[charIndex].Pixels[m2Count++] = CRTDevice.CPCHardwarePalette[pens[val]];
}
for (int bit = 7; bit >= 0; bit--)
{
int val = vid2.Bit(bit) ? 1 : 0;
Characters[charIndex].Pixels[m2Count++] = CRTDevice.CPCHardwarePalette[pens[val]];
}
break;
// 4 bits per pixel - 2 bytes - 4 pixels (8 CRT pixels)
// RECT
case 3:
Characters[charIndex].Pixels = new int[4];
int m3Count = 0;
int m3B0P0i = vid1 & 170;
int m3B0P0 = ((m3B0P0i & 0x80) >> 7) | ((m3B0P0i & 0x08) >> 2) | ((m3B0P0i & 0x20) >> 3) | ((m3B0P0i & 0x02 << 2));
int m3B0P1i = vid1 & 85;
int m3B0P1 = ((m3B0P1i & 0x40) >> 6) | ((m3B0P1i & 0x04) >> 1) | ((m3B0P1i & 0x10) >> 2) | ((m3B0P1i & 0x01 << 3));
Characters[charIndex].Pixels[m3Count++] = CRTDevice.CPCHardwarePalette[pens[m3B0P0]];
Characters[charIndex].Pixels[m3Count++] = CRTDevice.CPCHardwarePalette[pens[m3B0P1]];
int m3B1P0i = vid1 & 170;
int m3B1P0 = ((m3B1P0i & 0x80) >> 7) | ((m3B1P0i & 0x08) >> 2) | ((m3B1P0i & 0x20) >> 3) | ((m3B1P0i & 0x02 << 2));
int m3B1P1i = vid1 & 85;
int m3B1P1 = ((m3B1P1i & 0x40) >> 6) | ((m3B1P1i & 0x04) >> 1) | ((m3B1P1i & 0x10) >> 2) | ((m3B1P1i & 0x01 << 3));
Characters[charIndex].Pixels[m3Count++] = CRTDevice.CPCHardwarePalette[pens[m3B1P0]];
Characters[charIndex].Pixels[m3Count++] = CRTDevice.CPCHardwarePalette[pens[m3B1P1]];
break;
}
}
/// <summary>
/// Returns the number of pixels decoded in this scanline (border and display)
/// </summary>
/// <returns></returns>
private int GetPixelCount()
{
int cnt = 0;
foreach (var c in Characters)
{
if (c.Pixels != null)
cnt += c.Pixels.Length;
}
return cnt;
}
/// <summary>
/// Called at the start of HSYNC
/// Processes and adds the scanline to the Screen Buffer
/// </summary>
public void CommitScanline()
{
int hScale = 1;
int vScale = 1;
switch (ScreenMode)
{
case 0:
hScale = 1;
vScale = 2;
break;
case 1:
case 3:
hScale = 2;
vScale = 2;
break;
case 2:
hScale = 1;
vScale = 2;
break;
}
int hPix = GetPixelCount() * hScale;
//int hPix = GetPixelCount() * 2;
int leftOver = CRT.BufferWidth - hPix;
int lPad = leftOver / 2;
int rPad = lPad;
int rem = leftOver % 2;
if (rem != 0)
rPad += rem;
if (LineIndex < CRT.TopLinesToTrim)
{
return;
}
// render out the scanline
int pCount = (LineIndex - CRT.TopLinesToTrim) * vScale * CRT.BufferWidth;
// vScale
for (int s = 0; s < vScale; s++)
{
// left padding
for (int lP = 0; lP < lPad; lP++)
{
CRT.ScreenBuffer[pCount++] = 0;
}
// border and display
foreach (var c in Characters)
{
if (c.Pixels == null || c.Pixels.Length == 0)
continue;
for (int p = 0; p < c.Pixels.Length; p++)
{
// hScale
for (int h = 0; h < hScale; h++)
{
CRT.ScreenBuffer[pCount++] = c.Pixels[p];
}
//CRT.ScreenBuffer[pCount++] = c.Pixels[p];
}
}
// right padding
for (int rP = 0; rP < rPad; rP++)
{
CRT.ScreenBuffer[pCount++] = 0;
}
if (pCount != hPix)
{
}
CRT.ScanlineCounter++;
}
}
public void Reset()
{
ScreenMode = 1;
Characters = new Character[64];
for (int i = 0; i < Characters.Length; i++)
{
Characters[i] = new Character();
}
}
}
/// <summary>
/// Contains data relating to one character written on one scanline
/// </summary>
public class Character
{
/// <summary>
/// Array of pixels generated for this character
/// </summary>
public int[] Pixels;
/// <summary>
/// The type (NONE/BORDER/DISPLAY/HSYNC/VSYNC/HSYNC+VSYNC
/// </summary>
public RenderPhase Phase = RenderPhase.NONE;
public Character()
{
Pixels = new int[0];
}
}
[Flags]
public enum RenderPhase : int
{
/// <summary>
/// Nothing
/// </summary>
NONE = 0,
/// <summary>
/// Border is being rendered
/// </summary>
BORDER = 1,
/// <summary>
/// Display rendered from video RAM
/// </summary>
DISPLAY = 2,
/// <summary>
/// HSYNC in progress
/// </summary>
HSYNC = 3,
/// <summary>
/// VSYNC in process
/// </summary>
VSYNC = 4,
/// <summary>
/// HSYNC occurs within a VSYNC
/// </summary>
HSYNCandVSYNC = 5
}
}

View File

@ -0,0 +1,160 @@
using BizHawk.Common;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// The 48k keyboard device
/// </summary>
public class StandardKeyboard : IKeyboard
{
public CPCBase _machine { get; set; }
private int _currentLine;
public int CurrentLine
{
get { return _currentLine; }
set
{
// bits 0-3 contain the line
var line = value & 0x0f;
if (line > 0)
{
}
_currentLine = line;
}
}
private bool[] _keyStatus;
public bool[] KeyStatus
{
get { return _keyStatus; }
set { _keyStatus = value; }
}
private string[] _keyboardMatrix;
public string[] KeyboardMatrix
{
get { return _keyboardMatrix; }
set { _keyboardMatrix = value; }
}
private string[] _nonMatrixKeys;
public string[] NonMatrixKeys
{
get { return _nonMatrixKeys; }
set { _nonMatrixKeys = value; }
}
public StandardKeyboard(CPCBase machine)
{
_machine = machine;
//_machine.AYDevice.PortA_IN_CallBack = INCallback;
//_machine.AYDevice.PortA_OUT_CallBack = OUTCallback;
// scancode rows, ascending (Bit0 - Bit7)
KeyboardMatrix = new string[]
{
// 0x40
"Key CURUP", "Key CURRIGHT", "Key CURDOWN", "Key NUM9", "Key NUM6", "Key NUM3", "Key ENTER", "Key NUMPERIOD",
// 0x41
"Key CURLEFT", "Key COPY", "Key NUM7", "Key NUM8", "Key NUM5", "Key NUM1", "Key NUM2", "Key NUM0",
// 0x42
"Key CLR", "Key LeftBracket", "Key RETURN", "Key RightBracket", "Key NUM4", "Key SHIFT", "Key BackSlash", "Key CONTROL",
// 0x43
"Key Hat", "Key Dash", "Key @", "Key P", "Key SemiColon", "Key Colon", "Key ForwardSlash", "Key Period",
// 0x44
"Key 0", "Key 9", "Key O", "Key I", "Key L", "Key K", "Key M", "Key Comma",
// 0x45
"Key 8", "Key 7", "Key U", "Key Y", "Key H", "Key J", "Key N", "Key SPACE",
// 0x46
"Key 6", "Key 5", "Key R", "Key T", "Key G", "Key F", "Key B", "Key V",
// 0x47
"Key 4", "Key 3", "Key E", "Key W", "Key S", "Key D", "Key C", "Key X",
// 0x48
"Key 1", "Key 2", "Key ESC", "Key Q", "Key TAB", "Key A", "Key CAPSLOCK", "Key Z",
// 0x49
"P1 Up", "P1 Down", "P1 Left", "P1 Right", "P1 Fire1", "P1 Fire2", "P1 Fire3", "Key DEL",
};
// keystatus array to match the matrix
KeyStatus = new bool[8 * 10];
// nonmatrix keys (anything that hasnt already been taken)
var nonMatrix = new List<string>();
foreach (var key in _machine.CPC.AmstradCPCControllerDefinition.BoolButtons)
{
if (!KeyboardMatrix.Any(s => s == key))
nonMatrix.Add(key);
}
NonMatrixKeys = nonMatrix.ToArray();
}
/// <summary>
/// Reads the currently selected line
/// </summary>
/// <returns></returns>
public byte ReadCurrentLine()
{
var lin = _currentLine; // - 0x40;
var pos = lin * 8;
var l = KeyStatus.Skip(pos).Take(8).ToArray();
BitArray bi = new BitArray(l);
byte[] bytes = new byte[1];
bi.CopyTo(bytes, 0);
byte inv = (byte)(~bytes[0]);
return inv;
}
/// <summary>
/// Returns the index of the key within the matrix
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public int GetKeyIndexFromMatrix(string key)
{
int index = Array.IndexOf(KeyboardMatrix, key);
return index;
}
/// <summary>
/// Sets key status
/// </summary>
/// <param name="key"></param>
/// <param name="isPressed"></param>
public void SetKeyStatus(string key, bool isPressed)
{
int index = GetKeyIndexFromMatrix(key);
KeyStatus[index] = isPressed;
}
/// <summary>
/// Gets a key's status
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public bool GetKeyStatus(string key)
{
int index = GetKeyIndexFromMatrix(key);
return KeyStatus[index];
}
public void SyncState(Serializer ser)
{
ser.BeginSection("Keyboard");
ser.Sync("currentLine", ref _currentLine);
ser.Sync("keyStatus", ref _keyStatus, false);
ser.EndSection();
}
}
}

View File

@ -0,0 +1,470 @@
using BizHawk.Common;
using BizHawk.Common.NumberExtensions;
using System;
using System.Collections;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// Emulates the PPI (8255) chip
/// http://www.cpcwiki.eu/imgs/d/df/PPI_M5L8255AP-5.pdf
/// http://www.cpcwiki.eu/index.php/8255
/// </summary>
public class PPI_8255 : IPortIODevice
{
#region Devices
private CPCBase _machine;
private CRCT_6845 CRTC => _machine.CRCT;
private AmstradGateArray GateArray => _machine.GateArray;
private IPSG PSG => _machine.AYDevice;
private DatacorderDevice Tape => _machine.TapeDevice;
private IKeyboard Keyboard => _machine.KeyboardDevice;
#endregion
#region Construction
public PPI_8255(CPCBase machine)
{
_machine = machine;
Reset();
}
#endregion
#region Implementation
/// <summary>
/// BDIR Line connected to PSG
/// </summary>
public bool BDIR
{
get { return Regs[PORT_C].Bit(7); }
}
/// <summary>
/// BC1 Line connected to PSG
/// </summary>
public bool BC1
{
get { return Regs[PORT_C].Bit(6); }
}
/* Port Constants */
private const int PORT_A = 0;
private const int PORT_B = 1;
private const int PORT_C = 2;
private const int PORT_CONTROL = 3;
/// <summary>
/// The i8255 internal data registers
/// </summary>
private byte[] Regs = new byte[4];
/// <summary>
/// Returns the currently latched port direction for Port A
/// </summary>
private PortDirection DirPortA
{
get { return Regs[PORT_CONTROL].Bit(4) ? PortDirection.Input : PortDirection.Output; }
}
/// <summary>
/// Returns the currently latched port direction for Port B
/// </summary>
private PortDirection DirPortB
{
get { return Regs[PORT_CONTROL].Bit(1) ? PortDirection.Input : PortDirection.Output; }
}
/// <summary>
/// Returns the currently latched port direction for Port C (lower half)
/// </summary>
private PortDirection DirPortCL
{
get { return Regs[PORT_CONTROL].Bit(0) ? PortDirection.Input : PortDirection.Output; }
}
/// <summary>
/// Returns the currently latched port direction for Port C (upper half)
/// </summary>
private PortDirection DirPortCU
{
get { return Regs[PORT_CONTROL].Bit(3) ? PortDirection.Input : PortDirection.Output; }
}
#region OUT Methods
/// <summary>
/// Writes to Port A
/// </summary>
private void OUTPortA(int data)
{
// latch the data
Regs[PORT_A] = (byte)data;
if (DirPortA == PortDirection.Output)
{
// PSG write
PSG.PortWrite(data);
}
}
/// <summary>
/// Writes to Port B
/// </summary>
private void OUTPortB(int data)
{
// PortB is read only
// just latch the data
Regs[PORT_B] = (byte)data;
}
/// <summary>
/// Writes to Port C
/// </summary>
private void OUTPortC(int data)
{
// latch the data
Regs[PORT_C] = (byte)data;
if (DirPortCL == PortDirection.Output)
{
// lower Port C bits OUT
// keyboard line update
Keyboard.CurrentLine = Regs[PORT_C] & 0x0f;
}
if (DirPortCU == PortDirection.Output)
{
// upper Port C bits OUT
// write to PSG using latched data
PSG.SetFunction(data);
PSG.PortWrite(Regs[PORT_A]);
// cassete write data
//not implemeted
// cas motor control
Tape.TapeMotor = Regs[PORT_C].Bit(4);
}
}
/// <summary>
/// Writes to the control register
/// </summary>
/// <param name="data"></param>
private void OUTControl(int data)
{
if (data.Bit(7))
{
// update configuration
Regs[PORT_CONTROL] = (byte)data;
// Writing to PIO Control Register (with Bit7 set), automatically resets PIO Ports A,B,C to 00h each
Regs[PORT_A] = 0;
Regs[PORT_B] = 0;
Regs[PORT_C] = 0;
}
else
{
// register is used to set/reset a single bit in Port C
bool isSet = data.Bit(0);
// get the bit in PortC that we wish to change
var bit = (data >> 1) & 7;
// modify this bit
if (isSet)
{
Regs[PORT_C] = (byte)(Regs[PORT_C] | (bit * bit));
}
else
{
Regs[PORT_C] = (byte)(Regs[PORT_C] & ~(bit * bit));
}
// any other ouput business
if (DirPortCL == PortDirection.Output)
{
// update keyboard line
Keyboard.CurrentLine = Regs[PORT_C] & 0x0f;
}
if (DirPortCU == PortDirection.Output)
{
// write to PSG using latched data
PSG.SetFunction(data);
PSG.PortWrite(Regs[PORT_A]);
// cassete write data
//not implemeted
// cas motor control
Tape.TapeMotor = Regs[PORT_C].Bit(4);
}
}
}
#endregion
#region IN Methods
/// <summary>
/// Reads from Port A
/// </summary>
/// <returns></returns>
private int INPortA()
{
if (DirPortA == PortDirection.Input)
{
// read from PSG
return PSG.PortRead();
}
else
{
// Port A is set to output
// return latched value
return Regs[PORT_A];
}
}
/// <summary>
/// Reads from Port B
/// </summary>
/// <returns></returns>
private int INPortB()
{
if (DirPortB == PortDirection.Input)
{
// build the PortB output
// start with every bit reset
BitArray rBits = new BitArray(8);
// Bit0 - Vertical Sync ("1"=VSYNC active, "0"=VSYNC inactive)
if (CRTC.VSYNC)
rBits[0] = true;
// Bits1-3 - Distributor ID. Usually set to 4=Awa, 5=Schneider, or 7=Amstrad
// force AMstrad
rBits[1] = true;
rBits[2] = true;
rBits[3] = true;
// Bit4 - Screen Refresh Rate ("1"=50Hz, "0"=60Hz)
rBits[4] = true;
// Bit5 - Expansion Port /EXP pin
rBits[5] = false;
// Bit6 - Parallel/Printer port ready signal, "1" = not ready, "0" = Ready
rBits[6] = true;
// Bit7 - Cassette data input
rBits[7] = Tape.GetEarBit(_machine.CPU.TotalExecutedCycles);
// return the byte
byte[] bytes = new byte[1];
rBits.CopyTo(bytes, 0);
return bytes[0];
}
else
{
// return the latched value
return Regs[PORT_B];
}
}
/// <summary>
/// Reads from Port C
/// </summary>
/// <returns></returns>
private int INPortC()
{
// get the PortC value
int val = Regs[PORT_C];
if (DirPortCU == PortDirection.Input)
{
// upper port C bits
// remove upper half
val &= 0x0f;
// isolate control bits
var v = Regs[PORT_C] & 0xc0;
if (v == 0xc0)
{
// set reg is present. change to write reg
v = 0x80;
}
// cas wr is always set
val |= v | 0x20;
if (Tape.TapeMotor)
{
val |= 0x10;
}
}
if (DirPortCL == PortDirection.Input)
{
// lower port C bits
val |= 0x0f;
}
return val;
}
#endregion
#endregion
#region Reset
public void Reset()
{
for (int i = 0; i < 3; i++)
{
Regs[i] = 0xff;
}
Regs[3] = 0xff;
}
#endregion
#region IPortIODevice
/*
#F4XX %xxxx0x00 xxxxxxxx 8255 PIO Port A (PSG Data) Read Write
#F5XX %xxxx0x01 xxxxxxxx 8255 PIO Port B (Vsync,PrnBusy,Tape,etc.) Read -
#F6XX %xxxx0x10 xxxxxxxx 8255 PIO Port C (KeybRow,Tape,PSG Control) - Write
#F7XX %xxxx0x11 xxxxxxxx 8255 PIO Control-Register - Write
*/
/// <summary>
/// Device responds to an IN instruction
/// </summary>
/// <param name="port"></param>
/// <param name="result"></param>
/// <returns></returns>
public bool ReadPort(ushort port, ref int result)
{
byte portUpper = (byte)(port >> 8);
byte portLower = (byte)(port & 0xff);
// The 8255 responds to bit 11 reset with A10 and A12-A15 set
//if (portUpper.Bit(3))
//return false;
var PPIFunc = (port & 0x0300) >> 8; // portUpper & 3;
switch (PPIFunc)
{
// Port A Read
case 0:
// PSG (Sound/Keyboard/Joystick)
result = INPortA();
break;
// Port B Read
case 1:
// Vsync/Jumpers/PrinterBusy/CasIn/Exp
result = INPortB();
break;
// Port C Read (docs define this as write-only but we do need to do some processing)
case 2:
// KeybRow/CasOut/PSG
result = INPortC();
break;
}
return true;
}
/// <summary>
/// Device responds to an OUT instruction
/// </summary>
/// <param name="port"></param>
/// <param name="result"></param>
/// <returns></returns>
public bool WritePort(ushort port, int result)
{
byte portUpper = (byte)(port >> 8);
byte portLower = (byte)(port & 0xff);
// The 8255 responds to bit 11 reset with A10 and A12-A15 set
if (portUpper.Bit(3))
return false;
var PPIFunc = portUpper & 3;
switch (PPIFunc)
{
// Port A Write
case 0:
// PSG (Sound/Keyboard/Joystick)
OUTPortA(result);
break;
// Port B Write
case 1:
// Vsync/Jumpers/PrinterBusy/CasIn/Exp
OUTPortB(result);
break;
// Port C Write
case 2:
// KeybRow/CasOut/PSG
OUTPortC(result);
break;
// Control Register Write
case 3:
// Control
OUTControl((byte)result);
break;
}
return true;
}
#endregion
#region Serialization
public void SyncState(Serializer ser)
{
ser.BeginSection("PPI");
ser.Sync("Regs", ref Regs, false);
ser.EndSection();
}
#endregion
}
public enum PortDirection
{
Input,
Output
}
}

View File

@ -0,0 +1,888 @@
using BizHawk.Common;
using BizHawk.Emulation.Common;
using System;
using System.Collections.Generic;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// Based heavily on the YM-2149F / AY-3-8910 emulator used in Unreal Speccy
/// (Originally created under Public Domain license by SMT jan.2006) ///
/// https://github.com/mkoloberdin/unrealspeccy/blob/master/sndrender/sndchip.cpp
/// https://github.com/mkoloberdin/unrealspeccy/blob/master/sndrender/sndchip.h
/// </summary>
public class AY38912 : IPSG
{
#region Device Fields
/// <summary>
/// The emulated machine (passed in via constructor)
/// </summary>
private CPCBase _machine;
private IKeyboard _keyboard => _machine.KeyboardDevice;
private int _tStatesPerFrame;
private int _sampleRate;
private int _samplesPerFrame;
private double _tStatesPerSample;
private short[] _audioBuffer;
private int _audioBufferIndex;
private int _lastStateRendered;
private int _clockCyclesPerFrame;
private int _cyclesPerSample;
#endregion
#region Construction & Initialization
/// <summary>
/// Main constructor
/// </summary>
public AY38912(CPCBase machine)
{
_machine = machine;
//_blipL.SetRates(1000000, 44100);
//_blipL.SetRates((_machine.GateArray.FrameLength * 50) / 4, 44100);
//_blipR.SetRates(1000000, 44100);
//_blipR.SetRates((_machine.GateArray.FrameLength * 50) / 4, 44100);
}
/// <summary>
/// Initialises the AY chip
/// </summary>
public void Init(int sampleRate, int tStatesPerFrame)
{
InitTiming(sampleRate, tStatesPerFrame);
UpdateVolume();
Reset();
}
#endregion
#region AY Implementation
#region Public Properties
/// <summary>
/// AY mixer panning configuration
/// </summary>
[Flags]
public enum AYPanConfig
{
MONO = 0,
ABC = 1,
ACB = 2,
BAC = 3,
BCA = 4,
CAB = 5,
CBA = 6,
}
/// <summary>
/// The AY panning configuration
/// </summary>
public AYPanConfig PanningConfiguration
{
get
{
return _currentPanTab;
}
set
{
if (value != _currentPanTab)
{
_currentPanTab = value;
UpdateVolume();
}
}
}
/// <summary>
/// The AY chip output volume
/// (0 - 100)
/// </summary>
public int Volume
{
get
{
return _volume;
}
set
{
//value = Math.Max(0, value);
//value = Math.Max(100, value);
if (_volume == value)
{
return;
}
_volume = value;
UpdateVolume();
}
}
/// <summary>
/// The currently selected register
/// </summary>
public int SelectedRegister
{
get { return _activeRegister; }
set
{
_activeRegister = (byte)value;
}
}
#endregion
#region Public Methods
/// <summary>
/// Resets the PSG
/// </summary>
public void Reset()
{
/*
_noiseVal = 0x0FFFF;
_outABC = 0;
_outNoiseABC = 0;
_counterNoise = 0;
_counterA = 0;
_counterB = 0;
_counterC = 0;
_EnvelopeCounterBend = 0;
// clear all the registers
for (int i = 0; i < 14; i++)
{
SelectedRegister = i;
PortWrite(0);
}
randomSeed = 1;
// number of frames to update
var fr = (_audioBufferIndex * _tStatesPerFrame) / _audioBuffer.Length;
// update the audio buffer
BufferUpdate(fr);
*/
}
/// <summary>
/// 0: Inactive
/// 1: Read Register
/// 2: Write Register
/// 3: Select Register
/// </summary>
public int ActiveFunction;
public void SetFunction(int val)
{
int b = ((val & 0xc0) >> 6);
ActiveFunction = b;
}
/// <summary>
/// Reads the value from the currently selected register
/// </summary>
/// <returns></returns>
public int PortRead()
{
if (ActiveFunction == 1)
{
if (_activeRegister == 14)
{
if (PortAInput)
{
// exteral keyboard register
return _keyboard.ReadCurrentLine();
}
else
{
return _keyboard.ReadCurrentLine() & _registers[_activeRegister];
}
}
if (_activeRegister < 16)
return _registers[_activeRegister];
}
return 0;
}
/// <summary>
/// Writes to the currently selected register
/// </summary>
/// <param name="value"></param>
public void PortWrite(int value)
{
switch (ActiveFunction)
{
default:
break;
// select reg
case 3:
int b = (value & 0x0f);
SelectedRegister = b;
break;
// write reg
case 2:
if (_activeRegister == 14)
{
// external keyboard register
//return;
}
if (_activeRegister >= 0x10)
return;
byte val = (byte)value;
if (((1 << _activeRegister) & ((1 << 1) | (1 << 3) | (1 << 5) | (1 << 13))) != 0)
val &= 0x0F;
if (((1 << _activeRegister) & ((1 << 6) | (1 << 8) | (1 << 9) | (1 << 10))) != 0)
val &= 0x1F;
if (_activeRegister != 13 && _registers[_activeRegister] == val)
return;
_registers[_activeRegister] = val;
switch (_activeRegister)
{
// Channel A (Combined Pitch)
// (not written to directly)
case 0:
case 1:
_dividerA = _registers[AY_A_FINE] | (_registers[AY_A_COARSE] << 8);
break;
// Channel B (Combined Pitch)
// (not written to directly)
case 2:
case 3:
_dividerB = _registers[AY_B_FINE] | (_registers[AY_B_COARSE] << 8);
break;
// Channel C (Combined Pitch)
// (not written to directly)
case 4:
case 5:
_dividerC = _registers[AY_C_FINE] | (_registers[AY_C_COARSE] << 8);
break;
// Noise Pitch
case 6:
_dividerN = val * 2;
break;
// Mixer
case 7:
_bit0 = 0 - ((val >> 0) & 1);
_bit1 = 0 - ((val >> 1) & 1);
_bit2 = 0 - ((val >> 2) & 1);
_bit3 = 0 - ((val >> 3) & 1);
_bit4 = 0 - ((val >> 4) & 1);
_bit5 = 0 - ((val >> 5) & 1);
PortAInput = ((value & 0x40) == 0);
PortBInput = ((value & 0x80) == 0);
break;
// Channel Volumes
case 8:
_eMaskA = (val & 0x10) != 0 ? -1 : 0;
_vA = ((val & 0x0F) * 2 + 1) & ~_eMaskA;
break;
case 9:
_eMaskB = (val & 0x10) != 0 ? -1 : 0;
_vB = ((val & 0x0F) * 2 + 1) & ~_eMaskB;
break;
case 10:
_eMaskC = (val & 0x10) != 0 ? -1 : 0;
_vC = ((val & 0x0F) * 2 + 1) & ~_eMaskC;
break;
// Envelope (Combined Duration)
// (not written to directly)
case 11:
case 12:
_dividerE = _registers[AY_E_FINE] | (_registers[AY_E_COARSE] << 8);
break;
// Envelope Shape
case 13:
// reset the envelope counter
_countE = 0;
if ((_registers[AY_E_SHAPE] & 4) != 0)
{
// attack
_eState = 0;
_eDirection = 1;
}
else
{
// decay
_eState = 31;
_eDirection = -1;
}
break;
case 14:
// IO Port - not implemented
break;
}
// do audio processing
BufferUpdate((int)_machine.CurrentFrameCycle);
break;
}
}
/// <summary>
/// Start of frame
/// </summary>
public void StartFrame()
{
_audioBufferIndex = 0;
BufferUpdate(0);
}
/// <summary>
/// End of frame
/// </summary>
public void EndFrame()
{
BufferUpdate(_tStatesPerFrame);
}
/// <summary>
/// Updates the audiobuffer based on the current frame t-state
/// </summary>
/// <param name="frameCycle"></param>
public void UpdateSound(int frameCycle)
{
BufferUpdate(frameCycle);
}
#endregion
#region Private Fields
/// <summary>
/// Register indicies
/// </summary>
private const int AY_A_FINE = 0;
private const int AY_A_COARSE = 1;
private const int AY_B_FINE = 2;
private const int AY_B_COARSE = 3;
private const int AY_C_FINE = 4;
private const int AY_C_COARSE = 5;
private const int AY_NOISEPITCH = 6;
private const int AY_MIXER = 7;
private const int AY_A_VOL = 8;
private const int AY_B_VOL = 9;
private const int AY_C_VOL = 10;
private const int AY_E_FINE = 11;
private const int AY_E_COARSE = 12;
private const int AY_E_SHAPE = 13;
private const int AY_PORT_A = 14;
private const int AY_PORT_B = 15;
/// <summary>
/// The register array
/*
The AY-3-8910/8912 contains 16 internal registers as follows:
Register Function Range
0 Channel A fine pitch 8-bit (0-255)
1 Channel A course pitch 4-bit (0-15)
2 Channel B fine pitch 8-bit (0-255)
3 Channel B course pitch 4-bit (0-15)
4 Channel C fine pitch 8-bit (0-255)
5 Channel C course pitch 4-bit (0-15)
6 Noise pitch 5-bit (0-31)
7 Mixer 8-bit (see below)
8 Channel A volume 4-bit (0-15, see below)
9 Channel B volume 4-bit (0-15, see below)
10 Channel C volume 4-bit (0-15, see below)
11 Envelope fine duration 8-bit (0-255)
12 Envelope course duration 8-bit (0-255)
13 Envelope shape 4-bit (0-15)
14 I/O port A 8-bit (0-255)
15 I/O port B 8-bit (0-255) (Not present on the AY-3-8912)
* The volume registers (8, 9 and 10) contain a 4-bit setting but if bit 5 is set then that channel uses the
envelope defined by register 13 and ignores its volume setting.
* The mixer (register 7) is made up of the following bits (low=enabled):
Bit: 7 6 5 4 3 2 1 0
Register: I/O I/O Noise Noise Noise Tone Tone Tone
Channel: B A C B A C B A
The AY-3-8912 ignores bit 7 of this register.
*/
/// </summary>
private int[] _registers = new int[16];
/// <summary>
/// The currently selected register
/// </summary>
private byte _activeRegister;
private bool PortAInput = true;
private bool PortBInput = true;
/// <summary>
/// The frequency of the AY chip
/// </summary>
private static int _chipFrequency = 1000000; // 1773400;
/// <summary>
/// The rendering resolution of the chip
/// </summary>
private double _resolution = 50D * 8D / _chipFrequency;
/// <summary>
/// Channel generator state
/// </summary>
private int _bitA;
private int _bitB;
private int _bitC;
/// <summary>
/// Envelope state
/// </summary>
private int _eState;
/// <summary>
/// Envelope direction
/// </summary>
private int _eDirection;
/// <summary>
/// Noise seed
/// </summary>
private int _noiseSeed;
/// <summary>
/// Mixer state
/// </summary>
private int _bit0;
private int _bit1;
private int _bit2;
private int _bit3;
private int _bit4;
private int _bit5;
/// <summary>
/// Noise generator state
/// </summary>
private int _bitN;
/// <summary>
/// Envelope masks
/// </summary>
private int _eMaskA;
private int _eMaskB;
private int _eMaskC;
/// <summary>
/// Amplitudes
/// </summary>
private int _vA;
private int _vB;
private int _vC;
/// <summary>
/// Channel gen counters
/// </summary>
private int _countA;
private int _countB;
private int _countC;
/// <summary>
/// Envelope gen counter
/// </summary>
private int _countE;
/// <summary>
/// Noise gen counter
/// </summary>
private int _countN;
/// <summary>
/// Channel gen dividers
/// </summary>
private int _dividerA;
private int _dividerB;
private int _dividerC;
/// <summary>
/// Envelope gen divider
/// </summary>
private int _dividerE;
/// <summary>
/// Noise gen divider
/// </summary>
private int _dividerN;
/// <summary>
/// Panning table list
/// </summary>
private static List<uint[]> PanTabs = new List<uint[]>
{
// MONO
new uint[] { 50,50, 50,50, 50,50 },
// ABC
new uint[] { 100,10, 66,66, 10,100 },
// ACB
new uint[] { 100,10, 10,100, 66,66 },
// BAC
new uint[] { 66,66, 100,10, 10,100 },
// BCA
new uint[] { 10,100, 100,10, 66,66 },
// CAB
new uint[] { 66,66, 10,100, 100,10 },
// CBA
new uint[] { 10,100, 66,66, 100,10 }
};
/// <summary>
/// The currently selected panning configuration
/// </summary>
private AYPanConfig _currentPanTab = AYPanConfig.ABC;
/// <summary>
/// The current volume
/// </summary>
private int _volume = 75;
/// <summary>
/// Volume tables state
/// </summary>
private uint[][] _volumeTables;
/// <summary>
/// Volume table to be used
/// </summary>
private static uint[] AYVolumes = new uint[]
{
0x0000,0x0000,0x0340,0x0340,0x04C0,0x04C0,0x06F2,0x06F2,
0x0A44,0x0A44,0x0F13,0x0F13,0x1510,0x1510,0x227E,0x227E,
0x289F,0x289F,0x414E,0x414E,0x5B21,0x5B21,0x7258,0x7258,
0x905E,0x905E,0xB550,0xB550,0xD7A0,0xD7A0,0xFFFF,0xFFFF,
};
#endregion
#region Private Methods
/// <summary>
/// Forces an update of the volume tables
/// </summary>
private void UpdateVolume()
{
int upperFloor = 40000;
var inc = (0xFFFF - upperFloor) / 100;
var vol = inc * _volume; // ((ulong)0xFFFF * (ulong)_volume / 100UL) - 20000 ;
_volumeTables = new uint[6][];
// parent array
for (int j = 0; j < _volumeTables.Length; j++)
{
_volumeTables[j] = new uint[32];
// child array
for (int i = 0; i < _volumeTables[j].Length; i++)
{
_volumeTables[j][i] = (uint)(
(PanTabs[(int)_currentPanTab][j] * AYVolumes[i] * vol) /
(3 * 65535 * 100));
}
}
}
/// <summary>
/// Initializes timing information for the frame
/// </summary>
/// <param name="sampleRate"></param>
/// <param name="frameTactCount"></param>
private void InitTiming(int sampleRate, int frameTactCount)
{
_sampleRate = sampleRate;
_tStatesPerFrame = frameTactCount;
_samplesPerFrame = sampleRate / 50; //882
_tStatesPerSample = (double)frameTactCount / (double)_samplesPerFrame; // 90; //(int)Math.Round(((double)_tStatesPerFrame * 50D) /
//(16D * (double)_sampleRate),
//MidpointRounding.AwayFromZero);
_audioBuffer = new short[_samplesPerFrame * 2];
_audioBufferIndex = 0;
ticksPerSample = ((double)_chipFrequency / sampleRate / 8);
}
private double ticksPerSample;
private double tickCounter = 0;
/// <summary>
/// Updates the audiobuffer based on the current frame t-state
/// </summary>
/// <param name="cycle"></param>
private void BufferUpdate(int cycle)
{
if (cycle > _tStatesPerFrame)
{
// we are outside of the frame - just process the last value
cycle = _tStatesPerFrame;
}
// get the current length of the audiobuffer
int bufferLength = _samplesPerFrame; // _audioBuffer.Length;
double toEnd = ((double)(bufferLength * cycle) / (double)_tStatesPerFrame);
// loop through the number of samples we need to render
while (_audioBufferIndex < toEnd)
{
// run the AY chip processing at the correct resolution
tickCounter += ticksPerSample;
while (tickCounter > 0)
{
tickCounter--;
if (++_countA >= _dividerA)
{
_countA = 0;
_bitA ^= -1;
}
if (++_countB >= _dividerB)
{
_countB = 0;
_bitB ^= -1;
}
if (++_countC >= _dividerC)
{
_countC = 0;
_bitC ^= -1;
}
if (++_countN >= _dividerN)
{
_countN = 0;
_noiseSeed = (_noiseSeed * 2 + 1) ^ (((_noiseSeed >> 16) ^ (_noiseSeed >> 13)) & 1);
_bitN = 0 - ((_noiseSeed >> 16) & 1);
}
if (++_countE >= _dividerE)
{
_countE = 0;
_eState += +_eDirection;
if ((_eState & ~31) != 0)
{
var mask = (1 << _registers[AY_E_SHAPE]);
if ((mask & ((1 << 0) | (1 << 1) | (1 << 2) |
(1 << 3) | (1 << 4) | (1 << 5) | (1 << 6) |
(1 << 7) | (1 << 9) | (1 << 15))) != 0)
{
_eState = _eDirection = 0;
}
else if ((mask & ((1 << 8) | (1 << 12))) != 0)
{
_eState &= 31;
}
else if ((mask & ((1 << 10) | (1 << 14))) != 0)
{
_eDirection = -_eDirection;
_eState += _eDirection;
}
else
{
// 11,13
_eState = 31;
_eDirection = 0;
}
}
}
}
// mix the sample
var mixA = ((_eMaskA & _eState) | _vA) & ((_bitA | _bit0) & (_bitN | _bit3));
var mixB = ((_eMaskB & _eState) | _vB) & ((_bitB | _bit1) & (_bitN | _bit4));
var mixC = ((_eMaskC & _eState) | _vC) & ((_bitC | _bit2) & (_bitN | _bit5));
var l = _volumeTables[0][mixA];
var r = _volumeTables[1][mixA];
l += _volumeTables[2][mixB];
r += _volumeTables[3][mixB];
l += _volumeTables[4][mixC];
r += _volumeTables[5][mixC];
_audioBuffer[_audioBufferIndex * 2] = (short)l;
_audioBuffer[(_audioBufferIndex * 2) + 1] = (short)r;
_audioBufferIndex++;
}
_lastStateRendered = cycle;
}
#endregion
#endregion
#region ISoundProvider
public bool CanProvideAsync => false;
public SyncSoundMode SyncMode => SyncSoundMode.Sync;
public void SetSyncMode(SyncSoundMode mode)
{
if (mode != SyncSoundMode.Sync)
throw new InvalidOperationException("Only Sync mode is supported.");
}
public void GetSamplesAsync(short[] samples)
{
throw new NotSupportedException("Async is not available");
}
public void DiscardSamples()
{
_audioBuffer = new short[_samplesPerFrame * 2];
//_blipL.Clear();
//_blipR.Clear();
}
public void GetSamplesSync(out short[] samples, out int nsamp)
{
nsamp = _samplesPerFrame;
samples = _audioBuffer;
DiscardSamples();
tickCounter = 0;
return;
/*
_blipL.EndFrame((uint)SampleClock);
_blipR.EndFrame((uint)SampleClock);
SampleClock = 0;
int sampL = _blipL.SamplesAvailable();
int sampR = _blipR.SamplesAvailable();
if (sampL > sampR)
nsamp = sampL;
else
nsamp = sampR;
short[] buffL = new short[sampL];
short[] buffR = new short[sampR];
_blipL.ReadSamples(buffL, sampL - 1, false);
_blipR.ReadSamples(buffR, sampR - 1, false);
if (_audioBuffer.Length != nsamp * 2)
_audioBuffer = new short[nsamp * 2];
int p = 0;
for (int i = 0; i < nsamp; i++)
{
if (i < sampL)
_audioBuffer[p++] = buffL[i];
if (i < sampR)
_audioBuffer[p++] = buffR[i];
}
//nsamp = _samplesPerFrame;
samples = _audioBuffer;
DiscardSamples();
*/
}
#endregion
#region State Serialization
public int nullDump = 0;
/// <summary>
/// State serialization
/// </summary>
/// <param name="ser"></param>
public void SyncState(Serializer ser)
{
ser.BeginSection("PSG-AY");
ser.Sync("ActiveFunction", ref ActiveFunction);
ser.Sync("_tStatesPerFrame", ref _tStatesPerFrame);
ser.Sync("_sampleRate", ref _sampleRate);
ser.Sync("_samplesPerFrame", ref _samplesPerFrame);
//ser.Sync("_tStatesPerSample", ref _tStatesPerSample);
ser.Sync("_audioBufferIndex", ref _audioBufferIndex);
ser.Sync("_audioBuffer", ref _audioBuffer, false);
ser.Sync("PortAInput", ref PortAInput);
ser.Sync("PortBInput", ref PortBInput);
ser.Sync("_registers", ref _registers, false);
ser.Sync("_activeRegister", ref _activeRegister);
ser.Sync("_bitA", ref _bitA);
ser.Sync("_bitB", ref _bitB);
ser.Sync("_bitC", ref _bitC);
ser.Sync("_eState", ref _eState);
ser.Sync("_eDirection", ref _eDirection);
ser.Sync("_noiseSeed", ref _noiseSeed);
ser.Sync("_bit0", ref _bit0);
ser.Sync("_bit1", ref _bit1);
ser.Sync("_bit2", ref _bit2);
ser.Sync("_bit3", ref _bit3);
ser.Sync("_bit4", ref _bit4);
ser.Sync("_bit5", ref _bit5);
ser.Sync("_bitN", ref _bitN);
ser.Sync("_eMaskA", ref _eMaskA);
ser.Sync("_eMaskB", ref _eMaskB);
ser.Sync("_eMaskC", ref _eMaskC);
ser.Sync("_vA", ref _vA);
ser.Sync("_vB", ref _vB);
ser.Sync("_vC", ref _vC);
ser.Sync("_countA", ref _countA);
ser.Sync("_countB", ref _countB);
ser.Sync("_countC", ref _countC);
ser.Sync("_countE", ref _countE);
ser.Sync("_countN", ref _countN);
ser.Sync("_dividerA", ref _dividerA);
ser.Sync("_dividerB", ref _dividerB);
ser.Sync("_dividerC", ref _dividerC);
ser.Sync("_dividerE", ref _dividerE);
ser.Sync("_dividerN", ref _dividerN);
ser.SyncEnum("_currentPanTab", ref _currentPanTab);
ser.Sync("_volume", ref nullDump);
for (int i = 0; i < 6; i++)
{
ser.Sync("volTable" + i, ref _volumeTables[i], false);
}
if (ser.IsReader)
_volume = _machine.CPC.Settings.AYVolume;
ser.EndSection();
}
#endregion
}
}

View File

@ -0,0 +1,214 @@
using BizHawk.Common;
using BizHawk.Emulation.Common;
using System;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// Logical Beeper class
/// Used to emulate the sound generated by tape loading
/// This implementation uses BlipBuffer and should *always* output at 44100 with 882 samples per frame
/// (so that it can be mixed easily further down the line)
/// </summary>
public class Beeper : ISoundProvider, IBeeperDevice
{
#region Fields and Properties
/// <summary>
/// Sample Rate
/// This usually has to be 44100 for ISoundProvider
/// </summary>
private int _sampleRate;
public int SampleRate
{
get { return _sampleRate; }
set { _sampleRate = value; }
}
/// <summary>
/// Buzzer volume
/// Accepts an int 0-100 value
/// </summary>
private int _volume;
public int Volume
{
get
{
return VolumeConverterOut(_volume);
}
set
{
var newVol = VolumeConverterIn(value);
if (newVol != _volume)
blip.Clear();
_volume = VolumeConverterIn(value);
}
}
/// <summary>
/// The last used volume (used to modify blipbuffer delta values)
/// </summary>
private int lastVolume;
/// <summary>
/// The number of cpu cycles per frame
/// </summary>
private long _tStatesPerFrame;
/// <summary>
/// The parent emulated machine
/// </summary>
private CPCBase _machine;
/// <summary>
/// The last pulse
/// </summary>
private bool LastPulse;
/// <summary>
/// The last T-State (cpu cycle) that the last pulse was received
/// </summary>
private long LastPulseTState;
/// <summary>
/// Device blipbuffer
/// </summary>
private readonly BlipBuffer blip = new BlipBuffer(883);
#endregion
#region Private Methods
/// <summary>
/// Takes an int 0-100 and returns the relevant short volume to output
/// </summary>
/// <param name="vol"></param>
/// <returns></returns>
private int VolumeConverterIn(int vol)
{
int maxLimit = short.MaxValue / 3;
int increment = maxLimit / 100;
return vol * increment;
}
/// <summary>
/// Takes an short volume and returns the relevant int value 0-100
/// </summary>
/// <param name="vol"></param>
/// <returns></returns>
private int VolumeConverterOut(int shortvol)
{
int maxLimit = short.MaxValue / 3;
int increment = maxLimit / 100;
if (shortvol > maxLimit)
shortvol = maxLimit;
return shortvol / increment;
}
#endregion
#region Construction & Initialisation
public Beeper(CPCBase machine)
{
_machine = machine;
}
/// <summary>
/// Initialises the beeper
/// </summary>
public void Init(int sampleRate, int tStatesPerFrame)
{
blip.SetRates((4000000), sampleRate);
_sampleRate = sampleRate;
_tStatesPerFrame = tStatesPerFrame;
}
#endregion
#region IBeeperDevice
/// <summary>
/// Processes an incoming pulse value and adds it to the blipbuffer
/// </summary>
/// <param name="pulse"></param>
public void ProcessPulseValue(bool pulse)
{
if (!_machine._renderSound)
return;
if (LastPulse == pulse)
{
// no change
blip.AddDelta((uint)_machine.CurrentFrameCycle, 0);
}
else
{
if (pulse)
blip.AddDelta((uint)_machine.CurrentFrameCycle, (short)(_volume));
else
blip.AddDelta((uint)_machine.CurrentFrameCycle, -(short)(_volume));
lastVolume = _volume;
}
LastPulse = pulse;
}
#endregion
#region ISoundProvider
public bool CanProvideAsync => false;
public SyncSoundMode SyncMode => SyncSoundMode.Sync;
public void SetSyncMode(SyncSoundMode mode)
{
if (mode != SyncSoundMode.Sync)
throw new InvalidOperationException("Only Sync mode is supported.");
}
public void GetSamplesAsync(short[] samples)
{
throw new NotSupportedException("Async is not available");
}
public void DiscardSamples()
{
blip.Clear();
}
public void GetSamplesSync(out short[] samples, out int nsamp)
{
blip.EndFrame((uint)_tStatesPerFrame);
nsamp = blip.SamplesAvailable();
samples = new short[nsamp * 2];
blip.ReadSamples(samples, nsamp, true);
for (int i = 0; i < nsamp * 2; i += 2)
{
samples[i + 1] = samples[i];
}
}
#endregion
#region State Serialization
public void SyncState(Serializer ser)
{
ser.BeginSection("Buzzer");
ser.Sync("_tStatesPerFrame", ref _tStatesPerFrame);
ser.Sync("_sampleRate", ref _sampleRate);
ser.Sync("LastPulse", ref LastPulse);
ser.Sync("LastPulseTState", ref LastPulseTState);
ser.EndSection();
}
#endregion
}
}

View File

@ -0,0 +1,157 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// CPC464
/// * Memory *
/// </summary>
public partial class CPC464 : CPCBase
{
/// <summary>
/// Simulates reading from the bus
/// ROM paging should be handled here
/// </summary>
/// <param name="addr"></param>
/// <returns></returns>
public override byte ReadBus(ushort addr)
{
int divisor = addr / 0x4000;
byte result = 0xff;
switch (divisor)
{
// 0x000 or LowerROM
case 0:
if (LowerROMPaged)
result = ROMLower[addr % 0x4000];
else
result = RAM0[addr % 0x4000];
break;
// 0x4000
case 1:
result = RAM1[addr % 0x4000];
break;
// 0x8000
case 2:
result = RAM2[addr % 0x4000];
break;
// 0xc000 or UpperROM
case 3:
if (UpperROMPaged)
result = ROM0[addr % 0x4000];
else
result = RAM3[addr % 0x4000];
break;
default:
break;
}
return result;
}
/// <summary>
/// Simulates writing to the bus
/// Writes to the bus ALWAYS go to RAM, regardless of what upper and lower ROMs are paged in
/// </summary>
/// <param name="addr"></param>
/// <param name="value"></param>
public override void WriteBus(ushort addr, byte value)
{
int divisor = addr / 0x4000;
switch (divisor)
{
// RAM 0x000
case 0:
RAM0[addr % 0x4000] = value;
break;
// RAM 0x4000
case 1:
RAM1[addr % 0x4000] = value;
break;
// RAM 0x8000
case 2:
RAM2[addr % 0x4000] = value;
break;
// RAM 0xc000
case 3:
RAM3[addr % 0x4000] = value;
break;
default:
break;
}
}
/// <summary>
/// Reads a byte of data from a specified memory address
/// </summary>
/// <param name="addr"></param>
/// <returns></returns>
public override byte ReadMemory(ushort addr)
{
var data = ReadBus(addr);
return data;
}
/// <summary>
/// Writes a byte of data to a specified memory address
/// (with memory contention if appropriate)
/// </summary>
/// <param name="addr"></param>
/// <param name="value"></param>
public override void WriteMemory(ushort addr, byte value)
{
WriteBus(addr, value);
}
/// <summary>
/// Sets up the ROM
/// </summary>
/// <param name="buffer"></param>
/// <param name="startAddress"></param>
public override void InitROM(RomData[] romData)
{
foreach (var r in romData)
{
if (r.ROMType == RomData.ROMChipType.Lower)
{
for (int i = 0; i < 0x4000; i++)
{
ROMLower[i] = r.RomBytes[i];
}
}
else
{
for (int i = 0; i < 0x4000; i++)
{
switch (r.ROMPosition)
{
case 0:
ROM0[i] = r.RomBytes[i];
break;
case 7:
ROM7[i] = r.RomBytes[i];
break;
}
}
}
}
LowerROMPaged = true;
UpperROMPaged = true;
}
}
}

View File

@ -0,0 +1,107 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// CPC464
/// * Port *
/// </summary>
public partial class CPC464 : CPCBase
{
/// <summary>
/// Reads a byte of data from a specified port address
/// </summary>
/// <param name="port"></param>
/// <returns></returns>
public override byte ReadPort(ushort port)
{
BitArray portBits = new BitArray(BitConverter.GetBytes(port));
byte portUpper = (byte)(port >> 8);
byte portLower = (byte)(port & 0xff);
int result = 0xff;
if (DecodeINPort(port) == PortDevice.GateArray)
{
GateArray.ReadPort(port, ref result);
}
else if (DecodeINPort(port) == PortDevice.CRCT)
{
CRCT.ReadPort(port, ref result);
}
else if (DecodeINPort(port) == PortDevice.ROMSelect)
{
}
else if (DecodeINPort(port) == PortDevice.Printer)
{
}
else if (DecodeINPort(port) == PortDevice.PPI)
{
PPI.ReadPort(port, ref result);
}
else if (DecodeINPort(port) == PortDevice.Expansion)
{
}
return (byte)result;
}
/// <summary>
/// Writes a byte of data to a specified port address
/// Because of the port decoding, multiple devices can be written to
/// </summary>
/// <param name="port"></param>
/// <param name="value"></param>
public override void WritePort(ushort port, byte value)
{
BitArray portBits = new BitArray(BitConverter.GetBytes(port));
BitArray dataBits = new BitArray(BitConverter.GetBytes(value));
byte portUpper = (byte)(port >> 8);
byte portLower = (byte)(port & 0xff);
var devs = DecodeOUTPort(port);
foreach (var d in devs)
{
if (d == PortDevice.GateArray)
{
GateArray.WritePort(port, value);
}
else if (d == PortDevice.RAMManagement)
{
// not present in the unexpanded CPC464
}
else if (d == PortDevice.CRCT)
{
CRCT.WritePort(port, value);
}
else if (d == PortDevice.ROMSelect)
{
}
else if (d == PortDevice.Printer)
{
}
else if (d == PortDevice.PPI)
{
PPI.WritePort(port, value);
}
else if (d == PortDevice.Expansion)
{
}
}
return;
}
}
}

View File

@ -0,0 +1,48 @@
using BizHawk.Emulation.Cores.Components.Z80A;
using System;
using System.Collections.Generic;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// CPC464 construction
/// </summary>
public partial class CPC464 : CPCBase
{
#region Construction
/// <summary>
/// Main constructor
/// </summary>
/// <param name="spectrum"></param>
/// <param name="cpu"></param>
public CPC464(AmstradCPC cpc, Z80A cpu, List<byte[]> files, bool autoTape, AmstradCPC.BorderType borderType)
{
CPC = cpc;
CPU = cpu;
FrameLength = 79872;
CRCT = new CRCT_6845(CRCT_6845.CRCTType.MC6845, this);
//CRT = new CRTDevice(this);
GateArray = new AmstradGateArray(this, AmstradGateArray.GateArrayType.Amstrad40007);
PPI = new PPI_8255(this);
TapeBuzzer = new Beeper(this);
TapeBuzzer.Init(44100, FrameLength);
//AYDevice = new PSG(this, PSG.ay38910_type_t.AY38910_TYPE_8912, GateArray.PSGClockSpeed, 882 * 50);
AYDevice = new AY38912(this);
AYDevice.Init(44100, FrameLength);
KeyboardDevice = new StandardKeyboard(this);
TapeDevice = new DatacorderDevice(autoTape);
TapeDevice.Init(this);
InitializeMedia(files);
}
#endregion
}
}

View File

@ -0,0 +1,272 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// CPC6128
/// * Memory *
/// </summary>
public partial class CPC6128 : CPCBase
{
/// <summary>
/// Simulates reading from the bus
/// ROM and RAM paging should be handled here
/// </summary>
/// <param name="addr"></param>
/// <returns></returns>
public override byte ReadBus(ushort addr)
{
int divisor = addr / 0x4000;
byte result = 0xff;
switch (divisor)
{
// RAM 0x000
case 0:
if (LowerROMPaged)
{
result = ROMLower[addr % 0x4000];
}
else
{
switch (RAMConfig)
{
case 2:
result = RAM4[addr % 0x4000];
break;
default:
result = RAM0[addr % 0x4000];
break;
}
}
break;
// RAM 0x4000
case 1:
switch (RAMConfig)
{
case 0:
case 1:
result = RAM1[addr % 0x4000];
break;
case 2:
case 5:
result = RAM5[addr % 0x4000];
break;
case 3:
result = RAM3[addr % 0x4000];
break;
case 4:
result = RAM4[addr % 0x4000];
break;
case 6:
result = RAM6[addr % 0x4000];
break;
case 7:
result = RAM7[addr % 0x4000];
break;
}
break;
// RAM 0x8000
case 2:
switch (RAMConfig)
{
case 2:
result = RAM6[addr % 0x4000];
break;
default:
result = RAM2[addr % 0x4000];
break;
}
break;
// RAM 0xc000
case 3:
if (UpperROMPaged)
{
switch (UpperROMPosition)
{
case 7:
result = ROM7[addr % 0x4000];
break;
case 0:
default:
result = ROM0[addr % 0x4000];
break;
}
}
else
{
switch (RAMConfig)
{
case 1:
case 2:
case 3:
result = RAM7[addr % 0x4000];
break;
default:
result = RAM3[addr % 0x4000];
break;
}
}
break;
default:
break;
}
return result;
}
/// <summary>
/// Simulates writing to the bus
/// Writes to the bus ALWAYS go to RAM, regardless of what upper and lower ROMs are paged in
/// </summary>
/// <param name="addr"></param>
/// <param name="value"></param>
public override void WriteBus(ushort addr, byte value)
{
int divisor = addr / 0x4000;
switch (divisor)
{
// RAM 0x000
case 0:
switch (RAMConfig)
{
case 2:
RAM4[addr % 0x4000] = value;
break;
default:
RAM0[addr % 0x4000] = value;
break;
}
break;
// RAM 0x4000
case 1:
switch (RAMConfig)
{
case 0:
case 1:
RAM1[addr % 0x4000] = value;
break;
case 2:
case 5:
RAM5[addr % 0x4000] = value;
break;
case 3:
RAM3[addr % 0x4000] = value;
break;
case 4:
RAM4[addr % 0x4000] = value;
break;
case 6:
RAM6[addr % 0x4000] = value;
break;
case 7:
RAM7[addr % 0x4000] = value;
break;
}
break;
// RAM 0x8000
case 2:
switch (RAMConfig)
{
case 2:
RAM6[addr % 0x4000] = value;
break;
default:
RAM2[addr % 0x4000] = value;
break;
}
break;
// RAM 0xc000
case 3:
switch (RAMConfig)
{
case 1:
case 2:
case 3:
RAM7[addr % 0x4000] = value;
break;
default:
RAM3[addr % 0x4000] = value;
break;
}
break;
default:
break;
}
}
/// <summary>
/// Reads a byte of data from a specified memory address
/// </summary>
/// <param name="addr"></param>
/// <returns></returns>
public override byte ReadMemory(ushort addr)
{
var data = ReadBus(addr);
return data;
}
/// <summary>
/// Writes a byte of data to a specified memory address
/// (with memory contention if appropriate)
/// </summary>
/// <param name="addr"></param>
/// <param name="value"></param>
public override void WriteMemory(ushort addr, byte value)
{
WriteBus(addr, value);
}
/// <summary>
/// Sets up the ROM
/// </summary>
/// <param name="buffer"></param>
/// <param name="startAddress"></param>
public override void InitROM(RomData[] romData)
{
foreach (var r in romData)
{
if (r.ROMType == RomData.ROMChipType.Lower)
{
for (int i = 0; i < 0x4000; i++)
{
ROMLower[i] = r.RomBytes[i];
}
}
else
{
for (int i = 0; i < 0x4000; i++)
{
switch (r.ROMPosition)
{
case 0:
ROM0[i] = r.RomBytes[i];
break;
case 7:
ROM7[i] = r.RomBytes[i];
break;
}
}
}
}
LowerROMPaged = true;
UpperROMPaged = true;
}
}
}

View File

@ -0,0 +1,140 @@
using BizHawk.Common.NumberExtensions;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// CPC6128
/// * Port *
/// </summary>
public partial class CPC6128 : CPCBase
{
/// <summary>
/// Reads a byte of data from a specified port address
/// </summary>
/// <param name="port"></param>
/// <returns></returns>
public override byte ReadPort(ushort port)
{
BitArray portBits = new BitArray(BitConverter.GetBytes(port));
byte portUpper = (byte)(port >> 8);
byte portLower = (byte)(port & 0xff);
int result = 0xff;
if (DecodeINPort(port) == PortDevice.GateArray)
{
GateArray.ReadPort(port, ref result);
}
else if (DecodeINPort(port) == PortDevice.CRCT)
{
CRCT.ReadPort(port, ref result);
}
else if (DecodeINPort(port) == PortDevice.ROMSelect)
{
}
else if (DecodeINPort(port) == PortDevice.Printer)
{
}
else if (DecodeINPort(port) == PortDevice.PPI)
{
PPI.ReadPort(port, ref result);
}
else if (DecodeINPort(port) == PortDevice.Expansion)
{
if (!port.Bit(7))
{
// FDC
if (port.Bit(8) && !port.Bit(0))
{
// FDC status register
UPDDiskDevice.ReadStatus(ref result);
}
if (port.Bit(8) && port.Bit(0))
{
// FDC data register
UPDDiskDevice.ReadData(ref result);
}
}
}
return (byte)result;
}
/// <summary>
/// Writes a byte of data to a specified port address
/// Because of the port decoding, multiple devices can be written to
/// </summary>
/// <param name="port"></param>
/// <param name="value"></param>
public override void WritePort(ushort port, byte value)
{
BitArray portBits = new BitArray(BitConverter.GetBytes(port));
BitArray dataBits = new BitArray(BitConverter.GetBytes(value));
byte portUpper = (byte)(port >> 8);
byte portLower = (byte)(port & 0xff);
var devs = DecodeOUTPort(port);
foreach (var d in devs)
{
if (d == PortDevice.GateArray)
{
GateArray.WritePort(port, value);
}
else if (d == PortDevice.RAMManagement)
{
if (value.Bit(7) && value.Bit(6))
{
RAMConfig = value & 0x07;
// additional 64K bank index
var b64 = value & 0x38;
}
}
else if (d == PortDevice.CRCT)
{
CRCT.WritePort(port, value);
}
else if (d == PortDevice.ROMSelect)
{
UpperROMPosition = value;
}
else if (d == PortDevice.Printer)
{
}
else if (d == PortDevice.PPI)
{
PPI.WritePort(port, value);
}
else if (d == PortDevice.Expansion)
{
if (!port.Bit(7))
{
// FDC
if (port.Bit(8) && !port.Bit(0) || port.Bit(8) && port.Bit(0))
{
// FDC data register
UPDDiskDevice.WriteData(value);
}
if ((!port.Bit(8) && !port.Bit(0)) || (!port.Bit(8) && port.Bit(0)))
{
// FDC motor
UPDDiskDevice.Motor(value);
}
}
}
}
return;
}
}
}

View File

@ -0,0 +1,51 @@
using BizHawk.Emulation.Cores.Components.Z80A;
using System;
using System.Collections.Generic;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// CPC6128 construction
/// </summary>
public partial class CPC6128 : CPCBase
{
#region Construction
/// <summary>
/// Main constructor
/// </summary>
/// <param name="spectrum"></param>
/// <param name="cpu"></param>
public CPC6128(AmstradCPC cpc, Z80A cpu, List<byte[]> files, bool autoTape, AmstradCPC.BorderType borderType)
{
CPC = cpc;
CPU = cpu;
FrameLength = 79872;
CRCT = new CRCT_6845(CRCT_6845.CRCTType.MC6845, this);
//CRT = new CRTDevice(this);
GateArray = new AmstradGateArray(this, AmstradGateArray.GateArrayType.Amstrad40007);
PPI = new PPI_8255(this);
TapeBuzzer = new Beeper(this);
TapeBuzzer.Init(44100, FrameLength);
//AYDevice = new PSG(this, PSG.ay38910_type_t.AY38910_TYPE_8912, GateArray.PSGClockSpeed, 882 * 50);
AYDevice = new AY38912(this);
AYDevice.Init(44100, FrameLength);
KeyboardDevice = new StandardKeyboard(this);
TapeDevice = new DatacorderDevice(autoTape);
TapeDevice.Init(this);
UPDDiskDevice = new NECUPD765();
UPDDiskDevice.Init(this);
InitializeMedia(files);
}
#endregion
}
}

View File

@ -0,0 +1,295 @@
using System.Collections.Generic;
using System.Linq;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// The abstract class that all emulated models will inherit from
/// * Input *
/// </summary>
public abstract partial class CPCBase
{
string Play = "Play Tape";
string Stop = "Stop Tape";
string RTZ = "RTZ Tape";
string Record = "Record Tape";
string NextTape = "Insert Next Tape";
string PrevTape = "Insert Previous Tape";
string NextBlock = "Next Tape Block";
string PrevBlock = "Prev Tape Block";
string TapeStatus = "Get Tape Status";
string NextDisk = "Insert Next Disk";
string PrevDisk = "Insert Previous Disk";
string EjectDisk = "Eject Current Disk";
string DiskStatus = "Get Disk Status";
string HardResetStr = "Power";
string SoftResetStr = "Reset";
bool pressed_Play = false;
bool pressed_Stop = false;
bool pressed_RTZ = false;
bool pressed_NextTape = false;
bool pressed_PrevTape = false;
bool pressed_NextBlock = false;
bool pressed_PrevBlock = false;
bool pressed_TapeStatus = false;
bool pressed_NextDisk = false;
bool pressed_PrevDisk = false;
bool pressed_EjectDisk = false;
bool pressed_DiskStatus = false;
bool pressed_HardReset = false;
bool pressed_SoftReset = false;
/// <summary>
/// Cycles through all the input callbacks
/// This should be done once per frame
/// </summary>
public void PollInput()
{
CPC.InputCallbacks.Call();
lock (this)
{
// parse single keyboard matrix keys.
// J1 and J2 are scanned as part of the keyboard
for (var i = 0; i < KeyboardDevice.KeyboardMatrix.Length; i++)
{
string key = KeyboardDevice.KeyboardMatrix[i];
bool prevState = KeyboardDevice.GetKeyStatus(key);
bool currState = CPC._controller.IsPressed(key);
if (currState != prevState)
KeyboardDevice.SetKeyStatus(key, currState);
}
// non matrix keys (J2)
foreach (string k in KeyboardDevice.NonMatrixKeys)
{
if (!k.StartsWith("P2"))
continue;
bool currState = CPC._controller.IsPressed(k);
switch (k)
{
case "P2 Up":
if (currState)
KeyboardDevice.SetKeyStatus("Key 6", true);
else if (!KeyboardDevice.GetKeyStatus("Key 6"))
KeyboardDevice.SetKeyStatus("Key 6", false);
break;
case "P2 Down":
if (currState)
KeyboardDevice.SetKeyStatus("Key 5", true);
else if (!KeyboardDevice.GetKeyStatus("Key 5"))
KeyboardDevice.SetKeyStatus("Key 5", false);
break;
case "P2 Left":
if (currState)
KeyboardDevice.SetKeyStatus("Key R", true);
else if (!KeyboardDevice.GetKeyStatus("Key R"))
KeyboardDevice.SetKeyStatus("Key R", false);
break;
case "P2 Right":
if (currState)
KeyboardDevice.SetKeyStatus("Key T", true);
else if (!KeyboardDevice.GetKeyStatus("Key T"))
KeyboardDevice.SetKeyStatus("Key T", false);
break;
case "P2 Fire":
if (currState)
KeyboardDevice.SetKeyStatus("Key G", true);
else if (!KeyboardDevice.GetKeyStatus("Key G"))
KeyboardDevice.SetKeyStatus("Key G", false);
break;
}
}
}
// Tape control
if (CPC._controller.IsPressed(Play))
{
if (!pressed_Play)
{
CPC.OSD_FireInputMessage(Play);
TapeDevice.Play();
pressed_Play = true;
}
}
else
pressed_Play = false;
if (CPC._controller.IsPressed(Stop))
{
if (!pressed_Stop)
{
CPC.OSD_FireInputMessage(Stop);
TapeDevice.Stop();
pressed_Stop = true;
}
}
else
pressed_Stop = false;
if (CPC._controller.IsPressed(RTZ))
{
if (!pressed_RTZ)
{
CPC.OSD_FireInputMessage(RTZ);
TapeDevice.RTZ();
pressed_RTZ = true;
}
}
else
pressed_RTZ = false;
if (CPC._controller.IsPressed(Record))
{
}
if (CPC._controller.IsPressed(NextTape))
{
if (!pressed_NextTape)
{
CPC.OSD_FireInputMessage(NextTape);
TapeMediaIndex++;
pressed_NextTape = true;
}
}
else
pressed_NextTape = false;
if (CPC._controller.IsPressed(PrevTape))
{
if (!pressed_PrevTape)
{
CPC.OSD_FireInputMessage(PrevTape);
TapeMediaIndex--;
pressed_PrevTape = true;
}
}
else
pressed_PrevTape = false;
if (CPC._controller.IsPressed(NextBlock))
{
if (!pressed_NextBlock)
{
CPC.OSD_FireInputMessage(NextBlock);
TapeDevice.SkipBlock(true);
pressed_NextBlock = true;
}
}
else
pressed_NextBlock = false;
if (CPC._controller.IsPressed(PrevBlock))
{
if (!pressed_PrevBlock)
{
CPC.OSD_FireInputMessage(PrevBlock);
TapeDevice.SkipBlock(false);
pressed_PrevBlock = true;
}
}
else
pressed_PrevBlock = false;
if (CPC._controller.IsPressed(TapeStatus))
{
if (!pressed_TapeStatus)
{
//Spectrum.OSD_FireInputMessage(TapeStatus);
CPC.OSD_ShowTapeStatus();
pressed_TapeStatus = true;
}
}
else
pressed_TapeStatus = false;
if (CPC._controller.IsPressed(HardResetStr))
{
if (!pressed_HardReset)
{
HardReset();
pressed_HardReset = true;
}
}
else
pressed_HardReset = false;
if (CPC._controller.IsPressed(SoftResetStr))
{
if (!pressed_SoftReset)
{
SoftReset();
pressed_SoftReset = true;
}
}
else
pressed_SoftReset = false;
// disk control
if (CPC._controller.IsPressed(NextDisk))
{
if (!pressed_NextDisk)
{
CPC.OSD_FireInputMessage(NextDisk);
DiskMediaIndex++;
pressed_NextDisk = true;
}
}
else
pressed_NextDisk = false;
if (CPC._controller.IsPressed(PrevDisk))
{
if (!pressed_PrevDisk)
{
CPC.OSD_FireInputMessage(PrevDisk);
DiskMediaIndex--;
pressed_PrevDisk = true;
}
}
else
pressed_PrevDisk = false;
if (CPC._controller.IsPressed(EjectDisk))
{
if (!pressed_EjectDisk)
{
CPC.OSD_FireInputMessage(EjectDisk);
//if (UPDDiskDevice != null)
// UPDDiskDevice.FDD_EjectDisk();
}
}
else
pressed_EjectDisk = false;
if (CPC._controller.IsPressed(DiskStatus))
{
if (!pressed_DiskStatus)
{
//Spectrum.OSD_FireInputMessage(TapeStatus);
CPC.OSD_ShowDiskStatus();
pressed_DiskStatus = true;
}
}
else
pressed_DiskStatus = false;
}
/// <summary>
/// Signs whether input read has been requested
/// This forms part of the IEmulator LagFrame implementation
/// </summary>
private bool inputRead;
public bool InputRead
{
get { return inputRead; }
set { inputRead = value; }
}
}
}

View File

@ -0,0 +1,268 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// The abstract class that all emulated models will inherit from
/// * Imported media *
/// </summary>
public abstract partial class CPCBase
{
/// <summary>
/// The tape or disk image(s) that are passed in from the main ZXSpectrum class
/// </summary>
protected List<byte[]> mediaImages { get; set; }
/// <summary>
/// Tape images
/// </summary>
public List<byte[]> tapeImages { get; set; }
/// <summary>
/// Disk images
/// </summary>
public List<byte[]> diskImages { get; set; }
/// <summary>
/// The index of the currently 'loaded' tape image
/// </summary>
protected int tapeMediaIndex;
public int TapeMediaIndex
{
get { return tapeMediaIndex; }
set
{
int tmp = value;
int result = value;
if (tapeImages == null || tapeImages.Count() == 0)
{
// no tape images found
return;
}
if (value >= tapeImages.Count())
{
// media at this index does not exist - loop back to 0
result = 0;
}
else if (value < 0)
{
// negative index not allowed - move to last item in the collection
result = tapeImages.Count() - 1;
}
// load the media into the tape device
tapeMediaIndex = result;
// fire osd message
//Spectrum.OSD_TapeInserted();
LoadTapeMedia();
}
}
/// <summary>
/// The index of the currently 'loaded' disk image
/// </summary>
protected int diskMediaIndex;
public int DiskMediaIndex
{
get { return diskMediaIndex; }
set
{
int tmp = value;
int result = value;
if (diskImages == null || diskImages.Count() == 0)
{
// no tape images found
return;
}
if (value >= diskImages.Count())
{
// media at this index does not exist - loop back to 0
result = 0;
}
else if (value < 0)
{
// negative index not allowed - move to last item in the collection
result = diskImages.Count() - 1;
}
// load the media into the disk device
diskMediaIndex = result;
// fire osd message
CPC.OSD_DiskInserted();
LoadDiskMedia();
}
}
/// <summary>
/// Called on first instantiation (and subsequent core reboots)
/// </summary>
/// <param name="files"></param>
protected void InitializeMedia(List<byte[]> files)
{
mediaImages = files;
LoadAllMedia();
}
/// <summary>
/// Attempts to load all media into the relevant structures
/// </summary>
protected void LoadAllMedia()
{
tapeImages = new List<byte[]>();
diskImages = new List<byte[]>();
int cnt = 0;
foreach (var m in mediaImages)
{
switch (IdentifyMedia(m))
{
case CPCMediaType.Tape:
tapeImages.Add(m);
CPC._tapeInfo.Add(CPC._gameInfo[cnt]);
break;
case CPCMediaType.Disk:
diskImages.Add(m);
CPC._diskInfo.Add(CPC._gameInfo[cnt]);
break;
case CPCMediaType.DiskDoubleSided:
// this is a bit tricky. we will attempt to parse the double sided disk image byte array,
// then output two separate image byte arrays
List<byte[]> working = new List<byte[]>();
foreach (DiskType type in Enum.GetValues(typeof(DiskType)))
{
bool found = false;
switch (type)
{
case DiskType.CPCExtended:
found = CPCExtendedFloppyDisk.SplitDoubleSided(m, working);
break;
case DiskType.CPC:
found = CPCFloppyDisk.SplitDoubleSided(m, working);
break;
}
if (found)
{
// add side 1
diskImages.Add(working[0]);
// add side 2
diskImages.Add(working[1]);
Common.GameInfo one = new Common.GameInfo();
Common.GameInfo two = new Common.GameInfo();
var gi = CPC._gameInfo[cnt];
for (int i = 0; i < 2; i++)
{
Common.GameInfo work = new Common.GameInfo();
if (i == 0)
{
work = one;
}
else if (i == 1)
{
work = two;
}
work.FirmwareHash = gi.FirmwareHash;
work.Hash = gi.Hash;
work.Name = gi.Name + " (Parsed Side " + (i + 1) + ")";
work.Region = gi.Region;
work.NotInDatabase = gi.NotInDatabase;
work.Status = gi.Status;
work.System = gi.System;
CPC._diskInfo.Add(work);
}
}
else
{
}
}
break;
}
cnt++;
}
if (tapeImages.Count > 0)
LoadTapeMedia();
if (diskImages.Count > 0)
LoadDiskMedia();
}
/// <summary>
/// Attempts to load a tape into the tape device based on tapeMediaIndex
/// </summary>
protected void LoadTapeMedia()
{
TapeDevice.LoadTape(tapeImages[tapeMediaIndex]);
}
/// <summary>
/// Attempts to load a disk into the disk device based on diskMediaIndex
/// </summary>
protected void LoadDiskMedia()
{
if (this.GetType() == typeof(CPC464))
{
CPC.CoreComm.ShowMessage("You are trying to load one of more disk images.\n\n Please select something other than CPC 464 emulation immediately and reboot the core");
return;
}
UPDDiskDevice.FDD_LoadDisk(diskImages[diskMediaIndex]);
}
/// <summary>
/// Identifies and sorts the various media types
/// </summary>
/// <returns></returns>
private CPCMediaType IdentifyMedia(byte[] data)
{
// get first 16 bytes as a string
string hdr = Encoding.ASCII.GetString(data.Take(16).ToArray());
// disk checking first
if (hdr.ToUpper().Contains("EXTENDED CPC DSK") || hdr.ToUpper().Contains("MV - CPC"))
{
// amstrad .dsk disk file
// check for number of sides
var sides = data[0x31];
if (sides == 1)
return CPCMediaType.Disk;
else
return CPCMediaType.DiskDoubleSided;
}
// tape checking
if (hdr.ToUpper().StartsWith("ZXTAPE!"))
{
// cdt tape file
return CPCMediaType.Tape;
}
// not found
return CPCMediaType.None;
}
}
public enum CPCMediaType
{
None,
Tape,
Disk,
DiskDoubleSided
}
}

View File

@ -0,0 +1,159 @@
using System;
using System.Collections.Generic;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// The abstract class that all emulated models will inherit from
/// * Memory *
/// </summary>
public abstract partial class CPCBase
{
#region Memory Fields & Properties
/* ROM Banks */
/// <summary>
/// Lower: OS ROM
/// </summary>
public byte[] ROMLower = new byte[0x4000];
/// <summary>
/// Upper: POS 0 (usually BASIC)
/// </summary>
public byte[] ROM0 = new byte[0x4000];
/// <summary>
/// Upper: POS 7 (usually AMSDOS)
/// </summary>
public byte[] ROM7 = new byte[0x4000];
/* RAM Banks - Lower 64K */
public byte[] RAM0 = new byte[0x4000];
public byte[] RAM1 = new byte[0x4000];
public byte[] RAM2 = new byte[0x4000];
public byte[] RAM3 = new byte[0x4000];
/* RAM Banks - Upper 64K */
public byte[] RAM4 = new byte[0x4000];
public byte[] RAM5 = new byte[0x4000];
public byte[] RAM6 = new byte[0x4000];
public byte[] RAM7 = new byte[0x4000];
/// <summary>
/// Signs whether Upper ROM is paged in
/// </summary>
public bool UpperROMPaged;
/// <summary>
/// The position of the currently paged upper ROM
/// </summary>
public int UpperROMPosition;
/// <summary>
/// Signs whether Lower ROM is paged in
/// </summary>
public bool LowerROMPaged;
/// <summary>
/// The currently selected RAM config
/// </summary>
public int RAMConfig;
/// <summary>
/// Always 0 on a CPC6128
/// On a machine with more than 128K RAM (standard memory expansion) this selects each additional 64K above the first upper 64K
/// </summary>
public int RAM64KBank;
#endregion
#region Memory Related Methods
/// <summary>
/// Simulates reading from the bus
/// Paging should be handled here
/// </summary>
/// <param name="addr"></param>
/// <returns></returns>
public abstract byte ReadBus(ushort addr);
/// <summary>
/// Pushes a value onto the data bus that should be valid as long as the interrupt is true
/// </summary>
/// <param name="addr"></param>
/// <returns></returns>
public virtual byte PushBus()
{
return 0xFF;
}
/// <summary>
/// Simulates writing to the bus
/// Paging should be handled here
/// </summary>
/// <param name="addr"></param>
/// <param name="value"></param>
public abstract void WriteBus(ushort addr, byte value);
/// <summary>
/// Reads a byte of data from a specified memory address
/// (with memory contention if appropriate)
/// </summary>
/// <param name="addr"></param>
/// <returns></returns>
public abstract byte ReadMemory(ushort addr);
/// <summary>
/// Writes a byte of data to a specified memory address
/// (with memory contention if appropriate)
/// </summary>
/// <param name="addr"></param>
/// <param name="value"></param>
public abstract void WriteMemory(ushort addr, byte value);
/// <summary>
/// Sets up the ROM
/// </summary>
/// <param name="buffer"></param>
public abstract void InitROM(RomData[] romData);
/// <summary>
/// ULA reads the memory at the specified address
/// (No memory contention)
/// </summary>
/// <param name="addr"></param>
/// <returns></returns>
public virtual byte FetchScreenMemory(ushort addr)
{
int divisor = addr / 0x4000;
byte result = 0xff;
switch (divisor)
{
// 0x000
case 0:
result = RAM0[addr % 0x4000];
break;
// 0x4000
case 1:
result = RAM1[addr % 0x4000];
break;
// 0x8000
case 2:
result = RAM2[addr % 0x4000];
break;
// 0xc000 or UpperROM
case 3:
result = RAM3[addr % 0x4000];
break;
default:
break;
}
return result;
}
#endregion
}
}

View File

@ -0,0 +1,115 @@

using BizHawk.Common.NumberExtensions;
using System;
using System.Collections.Generic;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// The abstract class that all emulated models will inherit from
/// * Port Access *
/// </summary>
public abstract partial class CPCBase
{
/// <summary>
/// Reads a byte of data from a specified port address
/// </summary>
/// <param name="port"></param>
/// <returns></returns>
public abstract byte ReadPort(ushort port);
/// <summary>
/// Writes a byte of data to a specified port address
/// </summary>
/// <param name="port"></param>
/// <param name="value"></param>
public abstract void WritePort(ushort port, byte value);
/// <summary>
/// Returns a single port device enum based on the port address
/// (for IN operations)
/// https://web.archive.org/web/20090808085929/http://www.cepece.info/amstrad/docs/iopord.html
/// http://www.cpcwiki.eu/index.php/I/O_Port_Summary
/// </summary>
/// <param name="port"></param>
/// <returns></returns>
protected virtual PortDevice DecodeINPort(ushort port)
{
PortDevice dev = PortDevice.Unknown;
if (!port.Bit(15) && port.Bit(14))
dev = PortDevice.GateArray;
else if (!port.Bit(15))
dev = PortDevice.RAMManagement;
else if (!port.Bit(14))
dev = PortDevice.CRCT;
else if (!port.Bit(13))
dev = PortDevice.ROMSelect;
else if (!port.Bit(12))
dev = PortDevice.Printer;
else if (!port.Bit(11))
dev = PortDevice.PPI;
else if (!port.Bit(10))
dev = PortDevice.Expansion;
return dev;
}
/// <summary>
/// Returns a list of port device enums based on the port address
/// (for OUT operations)
/// https://web.archive.org/web/20090808085929/http://www.cepece.info/amstrad/docs/iopord.html
/// http://www.cpcwiki.eu/index.php/I/O_Port_Summary
/// </summary>
/// <param name="port"></param>
/// <returns></returns>
protected virtual List<PortDevice> DecodeOUTPort(ushort port)
{
List<PortDevice> devs = new List<PortDevice>();
if (!port.Bit(15) && port.Bit(14))
devs.Add(PortDevice.GateArray);
if (!port.Bit(15))
devs.Add(PortDevice.RAMManagement);
if (!port.Bit(14))
devs.Add(PortDevice.CRCT);
if (!port.Bit(13))
devs.Add(PortDevice.ROMSelect);
if (!port.Bit(12))
devs.Add(PortDevice.Printer);
if (!port.Bit(11))
devs.Add(PortDevice.PPI);
if (!port.Bit(10))
devs.Add(PortDevice.Expansion);
return devs;
}
/// <summary>
/// Potential port devices
/// </summary>
public enum PortDevice
{
Unknown,
GateArray,
RAMManagement,
CRCT,
ROMSelect,
Printer,
PPI,
Expansion
}
}
}

View File

@ -0,0 +1,374 @@
using BizHawk.Common;
using BizHawk.Emulation.Cores.Components.Z80A;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// The abstract class that all emulated models will inherit from
/// * Main properties / fields / contruction*
/// </summary>
public abstract partial class CPCBase
{
#region Devices
/// <summary>
/// The calling ZXSpectrum class (piped in via constructor)
/// </summary>
public AmstradCPC CPC { get; set; }
/// <summary>
/// Reference to the instantiated Z80 cpu (piped in via constructor)
/// </summary>
public Z80A CPU { get; set; }
/// <summary>
/// ROM and extended info
/// </summary>
public RomData RomData { get; set; }
/// <summary>
/// The Amstrad datacorder device
/// </summary>
public virtual DatacorderDevice TapeDevice { get; set; }
/// <summary>
/// beeper output for the tape
/// </summary>
public IBeeperDevice TapeBuzzer { get; set; }
/// <summary>
/// Device representing the AY-3-8912 chip found in the CPC
/// </summary>
public IPSG AYDevice { get; set; }
/// <summary>
/// The keyboard device
/// Technically, this is controlled by the PSG, but has been abstracted due to the port over from ZXHawk
/// </summary>
public IKeyboard KeyboardDevice { get; set; }
/// <summary>
/// The Amstrad disk drive
/// </summary>
public virtual NECUPD765 UPDDiskDevice { get; set; }
/// <summary>
/// The Cathode Ray Tube Controller chip
/// </summary>
public CRCT_6845 CRCT { get; set; }
/// <summary>
/// The Amstrad gate array
/// </summary>
public AmstradGateArray GateArray { get; set; }
/// <summary>
/// Renders pixels to the screen
/// </summary>
//public CRTDevice CRT { get; set; }
/// <summary>
/// The PPI contoller chip
/// </summary>
public PPI_8255 PPI { get; set; }
/// <summary>
/// The length of a standard frame in CPU cycles
/// </summary>
public int FrameLength;
#endregion
#region Emulator State
/// <summary>
/// Signs whether the frame has ended
/// </summary>
public bool FrameCompleted;
/// <summary>
/// Overflow from the previous frame (in Z80 cycles)
/// </summary>
public int OverFlow;
/// <summary>
/// The total number of frames rendered
/// </summary>
public int FrameCount;
/// <summary>
/// The current cycle (T-State) that we are at in the frame
/// </summary>
public long _frameCycles;
/// <summary>
/// Stores where we are in the frame after each CPU cycle
/// </summary>
public long LastFrameStartCPUTick;
/// <summary>
/// Gets the current frame cycle according to the CPU tick count
/// </summary>
public virtual long CurrentFrameCycle => GateArray.FrameClock; // CPU.TotalExecutedCycles - LastFrameStartCPUTick;
/// <summary>
/// Non-Deterministic bools
/// </summary>
public bool _render;
public bool _renderSound;
#endregion
#region Constants
/// <summary>
/// Mask constants & misc
/// </summary>
protected const int BORDER_BIT = 0x07;
protected const int EAR_BIT = 0x10;
protected const int MIC_BIT = 0x08;
protected const int TAPE_BIT = 0x40;
protected const int AY_SAMPLE_RATE = 16;
#endregion
#region Emulation Loop
/// <summary>
/// Executes a single frame
/// </summary>
public virtual void ExecuteFrame(bool render, bool renderSound)
{
GateArray.FrameEnd = false;
CRCT.lineCounter = 0;
InputRead = false;
_render = render;
_renderSound = renderSound;
FrameCompleted = false;
if (UPDDiskDevice == null || !UPDDiskDevice.FDD_IsDiskLoaded)
TapeDevice.StartFrame();
if (_renderSound)
{
AYDevice.StartFrame();
}
PollInput();
//CRT.SetupVideo();
//CRT.ScanlineCounter = 0;
while (!GateArray.FrameEnd)
{
GateArray.ClockCycle();
// cycle the tape device
if (UPDDiskDevice == null || !UPDDiskDevice.FDD_IsDiskLoaded)
TapeDevice.TapeCycle();
}
// we have reached the end of a frame
LastFrameStartCPUTick = CPU.TotalExecutedCycles; // - OverFlow;
if (AYDevice != null)
AYDevice.EndFrame();
FrameCount++;
if (UPDDiskDevice == null || !UPDDiskDevice.FDD_IsDiskLoaded)
TapeDevice.EndFrame();
FrameCompleted = true;
// is this a lag frame?
CPC.IsLagFrame = !InputRead;
// FDC debug
if (UPDDiskDevice != null && UPDDiskDevice.writeDebug)
{
// only write UPD log every second
if (FrameCount % 10 == 0)
{
System.IO.File.AppendAllLines(UPDDiskDevice.outputfile, UPDDiskDevice.dLog);
UPDDiskDevice.dLog = new System.Collections.Generic.List<string>();
//System.IO.File.WriteAllText(UPDDiskDevice.outputfile, UPDDiskDevice.outputString);
}
}
GateArray.FrameClock = 0;
}
#endregion
#region Reset Functions
/// <summary>
/// Hard reset of the emulated machine
/// </summary>
public virtual void HardReset()
{
/*
//ULADevice.ResetInterrupt();
ROMPaged = 0;
SpecialPagingMode = false;
RAMPaged = 0;
CPU.RegPC = 0;
Spectrum.SetCpuRegister("SP", 0xFFFF);
Spectrum.SetCpuRegister("IY", 0xFFFF);
Spectrum.SetCpuRegister("IX", 0xFFFF);
Spectrum.SetCpuRegister("AF", 0xFFFF);
Spectrum.SetCpuRegister("BC", 0xFFFF);
Spectrum.SetCpuRegister("DE", 0xFFFF);
Spectrum.SetCpuRegister("HL", 0xFFFF);
Spectrum.SetCpuRegister("SP", 0xFFFF);
Spectrum.SetCpuRegister("Shadow AF", 0xFFFF);
Spectrum.SetCpuRegister("Shadow BC", 0xFFFF);
Spectrum.SetCpuRegister("Shadow DE", 0xFFFF);
Spectrum.SetCpuRegister("Shadow HL", 0xFFFF);
CPU.Regs[CPU.I] = 0;
CPU.Regs[CPU.R] = 0;
TapeDevice.Reset();
if (AYDevice != null)
AYDevice.Reset();
byte[][] rams = new byte[][]
{
RAM0,
RAM1,
RAM2,
RAM3,
RAM4,
RAM5,
RAM6,
RAM7
};
foreach (var r in rams)
{
for (int i = 0; i < r.Length; i++)
{
r[i] = 0x00;
}
}
*/
}
/// <summary>
/// Soft reset of the emulated machine
/// </summary>
public virtual void SoftReset()
{
/*
//ULADevice.ResetInterrupt();
ROMPaged = 0;
SpecialPagingMode = false;
RAMPaged = 0;
CPU.RegPC = 0;
Spectrum.SetCpuRegister("SP", 0xFFFF);
Spectrum.SetCpuRegister("IY", 0xFFFF);
Spectrum.SetCpuRegister("IX", 0xFFFF);
Spectrum.SetCpuRegister("AF", 0xFFFF);
Spectrum.SetCpuRegister("BC", 0xFFFF);
Spectrum.SetCpuRegister("DE", 0xFFFF);
Spectrum.SetCpuRegister("HL", 0xFFFF);
Spectrum.SetCpuRegister("SP", 0xFFFF);
Spectrum.SetCpuRegister("Shadow AF", 0xFFFF);
Spectrum.SetCpuRegister("Shadow BC", 0xFFFF);
Spectrum.SetCpuRegister("Shadow DE", 0xFFFF);
Spectrum.SetCpuRegister("Shadow HL", 0xFFFF);
CPU.Regs[CPU.I] = 0;
CPU.Regs[CPU.R] = 0;
TapeDevice.Reset();
if (AYDevice != null)
AYDevice.Reset();
byte[][] rams = new byte[][]
{
RAM0,
RAM1,
RAM2,
RAM3,
RAM4,
RAM5,
RAM6,
RAM7
};
foreach (var r in rams)
{
for (int i = 0; i < r.Length; i++)
{
r[i] = 0x00;
}
}
*/
}
#endregion
#region IStatable
public void SyncState(Serializer ser)
{
ser.BeginSection("CPCMachine");
ser.Sync("FrameCompleted", ref FrameCompleted);
ser.Sync("OverFlow", ref OverFlow);
ser.Sync("FrameCount", ref FrameCount);
ser.Sync("_frameCycles", ref _frameCycles);
ser.Sync("inputRead", ref inputRead);
ser.Sync("LastFrameStartCPUTick", ref LastFrameStartCPUTick);
ser.Sync("ROMLower", ref ROMLower, false);
ser.Sync("ROM0", ref ROM0, false);
ser.Sync("ROM7", ref ROM7, false);
ser.Sync("RAM0", ref RAM0, false);
ser.Sync("RAM1", ref RAM1, false);
ser.Sync("RAM2", ref RAM2, false);
ser.Sync("RAM3", ref RAM3, false);
ser.Sync("RAM4", ref RAM4, false);
ser.Sync("RAM5", ref RAM5, false);
ser.Sync("RAM6", ref RAM6, false);
ser.Sync("RAM7", ref RAM7, false);
ser.Sync("UpperROMPosition", ref UpperROMPosition);
ser.Sync("UpperROMPaged", ref UpperROMPaged);
ser.Sync("LowerROMPaged", ref LowerROMPaged);
ser.Sync("RAMConfig", ref RAMConfig);
ser.Sync("RAM64KBank", ref RAM64KBank);
CRCT.SyncState(ser);
//CRT.SyncState(ser);
GateArray.SyncState(ser);
KeyboardDevice.SyncState(ser);
TapeBuzzer.SyncState(ser);
AYDevice.SyncState(ser);
ser.Sync("tapeMediaIndex", ref tapeMediaIndex);
if (ser.IsReader)
TapeMediaIndex = tapeMediaIndex;
TapeDevice.SyncState(ser);
ser.Sync("diskMediaIndex", ref diskMediaIndex);
if (ser.IsReader)
DiskMediaIndex = diskMediaIndex;
if (UPDDiskDevice != null)
{
UPDDiskDevice.SyncState(ser);
}
ser.EndSection();
}
#endregion
}
}

View File

@ -0,0 +1,543 @@
using BizHawk.Common;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Components.Z80A;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// The abstract class that all emulated models will inherit from
/// * Amstrad Gate Array *
/// https://web.archive.org/web/20170612081209/http://www.grimware.org/doku.php/documentations/devices/gatearray
/// </summary>
public abstract class GateArrayBase : IVideoProvider
{
public int Z80ClockSpeed = 4000000;
public int FrameLength = 79872;
#region Devices
private CPCBase _machine;
private Z80A CPU => _machine.CPU;
private CRCT_6845 CRCT => _machine.CRCT;
private IPSG PSG => _machine.AYDevice;
#endregion
#region Constants
/// <summary>
/// CRTC Register constants
/// </summary>
public const int HOR_TOTAL = 0;
public const int HOR_DISPLAYED = 1;
public const int HOR_SYNC_POS = 2;
public const int HOR_AND_VER_SYNC_WIDTHS = 3;
public const int VER_TOTAL = 4;
public const int VER_TOTAL_ADJUST = 5;
public const int VER_DISPLAYED = 6;
public const int VER_SYNC_POS = 7;
public const int INTERLACE_SKEW = 8;
public const int MAX_RASTER_ADDR = 9;
public const int CUR_START_RASTER = 10;
public const int CUR_END_RASTER = 11;
public const int DISP_START_ADDR_H = 12;
public const int DISP_START_ADDR_L = 13;
public const int CUR_ADDR_H = 14;
public const int CUR_ADDR_L = 15;
public const int LPEN_ADDR_H = 16;
public const int LPEN_ADDR_L = 17;
#endregion
#region Palletes
/// <summary>
/// The standard CPC Pallete (ordered by firmware #)
/// http://www.cpcwiki.eu/index.php/CPC_Palette
/// </summary>
private static readonly int[] CPCFirmwarePalette =
{
Colors.ARGB(0x00, 0x00, 0x00), // Black
Colors.ARGB(0x00, 0x00, 0x80), // Blue
Colors.ARGB(0x00, 0x00, 0xFF), // Bright Blue
Colors.ARGB(0x80, 0x00, 0x00), // Red
Colors.ARGB(0x80, 0x00, 0x80), // Magenta
Colors.ARGB(0x80, 0x00, 0xFF), // Mauve
Colors.ARGB(0xFF, 0x00, 0x00), // Bright Red
Colors.ARGB(0xFF, 0x00, 0x80), // Purple
Colors.ARGB(0xFF, 0x00, 0xFF), // Bright Magenta
Colors.ARGB(0x00, 0x80, 0x00), // Green
Colors.ARGB(0x00, 0x80, 0x80), // Cyan
Colors.ARGB(0x00, 0x80, 0xFF), // Sky Blue
Colors.ARGB(0x80, 0x80, 0x00), // Yellow
Colors.ARGB(0x80, 0x80, 0x80), // White
Colors.ARGB(0x80, 0x80, 0xFF), // Pastel Blue
Colors.ARGB(0xFF, 0x80, 0x00), // Orange
Colors.ARGB(0xFF, 0x80, 0x80), // Pink
Colors.ARGB(0xFF, 0x80, 0xFF), // Pastel Magenta
Colors.ARGB(0x00, 0xFF, 0x00), // Bright Green
Colors.ARGB(0x00, 0xFF, 0x80), // Sea Green
Colors.ARGB(0x00, 0xFF, 0xFF), // Bright Cyan
Colors.ARGB(0x80, 0xFF, 0x00), // Lime
Colors.ARGB(0x80, 0xFF, 0x80), // Pastel Green
Colors.ARGB(0x80, 0xFF, 0xFF), // Pastel Cyan
Colors.ARGB(0xFF, 0xFF, 0x00), // Bright Yellow
Colors.ARGB(0xFF, 0xFF, 0x80), // Pastel Yellow
Colors.ARGB(0xFF, 0xFF, 0xFF), // Bright White
};
/// <summary>
/// The standard CPC Pallete (ordered by hardware #)
/// http://www.cpcwiki.eu/index.php/CPC_Palette
/// </summary>
private static readonly int[] CPCHardwarePalette =
{
Colors.ARGB(0x80, 0x80, 0x80), // White
Colors.ARGB(0x80, 0x80, 0x80), // White (duplicate)
Colors.ARGB(0x00, 0xFF, 0x80), // Sea Green
Colors.ARGB(0xFF, 0xFF, 0x80), // Pastel Yellow
Colors.ARGB(0x00, 0x00, 0x80), // Blue
Colors.ARGB(0xFF, 0x00, 0x80), // Purple
Colors.ARGB(0x00, 0x80, 0x80), // Cyan
Colors.ARGB(0xFF, 0x80, 0x80), // Pink
Colors.ARGB(0xFF, 0x00, 0x80), // Purple (duplicate)
Colors.ARGB(0xFF, 0xFF, 0x80), // Pastel Yellow (duplicate)
Colors.ARGB(0xFF, 0xFF, 0x00), // Bright Yellow
Colors.ARGB(0xFF, 0xFF, 0xFF), // Bright White
Colors.ARGB(0xFF, 0x00, 0x00), // Bright Red
Colors.ARGB(0xFF, 0x00, 0xFF), // Bright Magenta
Colors.ARGB(0xFF, 0x80, 0x00), // Orange
Colors.ARGB(0xFF, 0x80, 0xFF), // Pastel Magenta
Colors.ARGB(0x00, 0x00, 0x80), // Blue (duplicate)
Colors.ARGB(0x00, 0xFF, 0x80), // Sea Green (duplicate)
Colors.ARGB(0x00, 0xFF, 0x00), // Bright Green
Colors.ARGB(0x00, 0xFF, 0xFF), // Bright Cyan
Colors.ARGB(0x00, 0x00, 0x00), // Black
Colors.ARGB(0x00, 0x00, 0xFF), // Bright Blue
Colors.ARGB(0x00, 0x80, 0x00), // Green
Colors.ARGB(0x00, 0x80, 0xFF), // Sky Blue
Colors.ARGB(0x80, 0x00, 0x80), // Magenta
Colors.ARGB(0x80, 0xFF, 0x80), // Pastel Green
Colors.ARGB(0x80, 0xFF, 0x00), // Lime
Colors.ARGB(0x80, 0xFF, 0xFF), // Pastel Cyan
Colors.ARGB(0x80, 0x00, 0x00), // Red
Colors.ARGB(0x80, 0x00, 0xFF), // Mauve
Colors.ARGB(0x80, 0x80, 0x00), // Yellow
Colors.ARGB(0x80, 0x80, 0xFF), // Pastel Blue
};
#endregion
#region Construction
public GateArrayBase(CPCBase machine)
{
_machine = machine;
PenColours = new int[17];
SetupScreenSize();
Reset();
}
/// <summary>
/// Inits the pen lookup table
/// </summary>
public void SetupScreenMapping()
{
for (int m = 0; m < 4; m++)
{
Lookup[m] = new int[256 * 8];
int pos = 0;
for (int b = 0; b < 256; b++)
{
switch (m)
{
case 1:
int pc = (((b & 0x80) >> 7) | ((b & 0x80) >> 2));
Lookup[m][pos++] = pc;
Lookup[m][pos++] = pc;
pc = (((b & 0x40) >> 6) | ((b & 0x04) >> 1));
Lookup[m][pos++] = pc;
Lookup[m][pos++] = pc;
pc = (((b & 0x20) >> 5) | (b & 0x02));
Lookup[m][pos++] = pc;
Lookup[m][pos++] = pc;
pc = (((b & 0x10) >> 4) | ((b & 0x01) << 1));
break;
case 2:
for (int i = 7; i >= 0; i--)
{
bool pixel_on = ((b & (1 << i)) != 0);
Lookup[m][pos++] = pixel_on ? 1 : 0;
}
break;
case 3:
case 0:
int pc2 = (b & 0xAA);
pc2 = (
((pc2 & 0x80) >> 7) |
((pc2 & 0x08) >> 2) |
((pc2 & 0x20) >> 3) |
((pc2 & 0x02) << 2));
Lookup[m][pos++] = pc2;
Lookup[m][pos++] = pc2;
Lookup[m][pos++] = pc2;
Lookup[m][pos++] = pc2;
pc2 = (b & 0x55);
pc2 = (
((pc2 & 0x40) >> 6) |
((pc2 & 0x04) >> 1) |
((pc2 & 0x10) >> 2) |
((pc2 & 0x01) << 3));
Lookup[m][pos++] = pc2;
Lookup[m][pos++] = pc2;
Lookup[m][pos++] = pc2;
Lookup[m][pos++] = pc2;
break;
}
}
}
}
#endregion
#region State
private int[] PenColours;
private int CurrentPen;
private int ScreenMode;
private int INTScanlineCnt;
private int VSYNCDelyCnt;
private int[][] Lookup = new int[4][];
private bool DoModeUpdate;
private int LatchedMode;
private int buffPos;
public bool FrameEnd;
public bool WaitLine;
#endregion
#region Clock Operations
/// <summary>
/// The gatearray runs on a 16Mhz clock
/// (for the purposes of emulation, we will use a 4Mhz clock)
/// From this it generates:
/// 1Mhz clock for the CRTC chip
/// 1Mhz clock for the AY-3-8912 PSG
/// 4Mhz clock for the Z80 CPU
/// </summary>
public void ClockCycle()
{
// 4-phase clock
for (int i = 1; i < 5; i++)
{
switch (i)
{
// Phase 1
case 1:
CRCT.ClockCycle();
CPU.ExecuteOne();
break;
// Phase 2
case 2:
CPU.ExecuteOne();
break;
// Phase 3
case 3:
// video fetch
break;
// Phase 4
case 4:
// video fetch
break;
}
}
}
#endregion
#region Internal Methods
/// <summary>
/// Selects the pen
/// </summary>
/// <param name="data"></param>
public virtual void SetPen(BitArray bi)
{
if (bi[4])
{
// border select
CurrentPen = 16;
}
else
{
// pen select
byte[] b = new byte[1];
bi.CopyTo(b, 0);
CurrentPen = b[0] & 0x0f;
}
}
/// <summary>
/// Selects colour for the currently selected pen
/// </summary>
/// <param name="data"></param>
public virtual void SetPenColour(BitArray bi)
{
byte[] b = new byte[1];
bi.CopyTo(b, 0);
var colour = b[0] & 0x1f;
PenColours[CurrentPen] = colour;
}
/// <summary>
/// Returns the actual ARGB pen colour value
/// </summary>
/// <param name="idx"></param>
/// <returns></returns>
public virtual int GetPenColour(int idx)
{
return CPCHardwarePalette[PenColours[idx]];
}
/// <summary>
/// Screen mode and ROM config
/// </summary>
/// <param name="data"></param>
public virtual void SetReg2(BitArray bi)
{
byte[] b = new byte[1];
bi.CopyTo(b, 0);
// screen mode
var mode = b[0] & 0x03;
ScreenMode = mode;
// ROM
// upper
if ((b[0] & 0x08) != 0)
{
_machine.UpperROMPaged = false;
}
else
{
_machine.UpperROMPaged = true;
}
// lower
if ((b[0] & 0x04) != 0)
{
_machine.LowerROMPaged = false;
}
else
{
_machine.LowerROMPaged = true;
}
// INT delay
if ((b[0] & 0x10) != 0)
{
INTScanlineCnt = 0;
}
}
/// <summary>
/// Only available on machines with a 64KB memory expansion
/// Default assume we dont have this
/// </summary>
/// <param name="data"></param>
public virtual void SetRAM(BitArray bi)
{
return;
}
public void InterruptACK()
{
INTScanlineCnt &= 0x01f;
}
#endregion
#region Reset
public void Reset()
{
CurrentPen = 0;
ScreenMode = 1;
for (int i = 0; i < 17; i++)
PenColours[i] = 0;
INTScanlineCnt = 0;
VSYNCDelyCnt = 0;
}
#endregion
#region IPortIODevice
/// <summary>
/// Device responds to an IN instruction
/// </summary>
/// <param name="port"></param>
/// <param name="result"></param>
/// <returns></returns>
public bool ReadPort(ushort port, ref int result)
{
// gate array is OUT only
return false;
}
/// <summary>
/// Device responds to an OUT instruction
/// </summary>
/// <param name="port"></param>
/// <param name="result"></param>
/// <returns></returns>
public bool WritePort(ushort port, int result)
{
BitArray portBits = new BitArray(BitConverter.GetBytes(port));
BitArray dataBits = new BitArray(BitConverter.GetBytes((byte)result));
// The gate array responds to port 0x7F
bool accessed = !portBits[15];
if (!accessed)
return false;
// Bit 9 and 8 of the data byte define the function to access
if (!dataBits[6] && !dataBits[7])
{
// select pen
SetPen(dataBits);
}
if (dataBits[6] && !dataBits[7])
{
// select colour for selected pen
SetPenColour(dataBits);
}
if (!dataBits[6] && dataBits[7])
{
// select screen mode, ROM configuration and interrupt control
SetReg2(dataBits);
}
if (dataBits[6] && dataBits[7])
{
// RAM memory management
SetRAM(dataBits);
}
return true;
}
#endregion
#region IVideoProvider
/// <summary>
/// Video output buffer
/// </summary>
public int[] ScreenBuffer;
private int _virtualWidth;
private int _virtualHeight;
private int _bufferWidth;
private int _bufferHeight;
public int BackgroundColor
{
get { return CPCHardwarePalette[16]; }
}
public int VirtualWidth
{
get { return _virtualWidth; }
set { _virtualWidth = value; }
}
public int VirtualHeight
{
get { return _virtualHeight; }
set { _virtualHeight = value; }
}
public int BufferWidth
{
get { return _bufferWidth; }
set { _bufferWidth = value; }
}
public int BufferHeight
{
get { return _bufferHeight; }
set { _bufferHeight = value; }
}
public int VsyncNumerator
{
get { return Z80ClockSpeed * 50; }
set { }
}
public int VsyncDenominator
{
get { return Z80ClockSpeed; }
}
public int[] GetVideoBuffer()
{
return ScreenBuffer;
}
protected void SetupScreenSize()
{
/*
* Rect Pixels: Mode 0: 160×200 pixels with 16 colors (4 bpp)
Sqaure Pixels: Mode 1: 320×200 pixels with 4 colors (2 bpp)
Rect Pixels: Mode 2: 640×200 pixels with 2 colors (1 bpp)
Rect Pixels: Mode 3: 160×200 pixels with 4 colors (2bpp) (this is not an official mode, but rather a side-effect of the hardware)
*
* */
// define maximum screen buffer size
// to fit all possible resolutions, 640x400 should do it
// therefore a scanline will take two buffer rows
// and buffer columns will be:
// Mode 1: 2 pixels
// Mode 2: 1 pixel
// Mode 0: 4 pixels
// Mode 3: 4 pixels
BufferWidth = 640;
BufferHeight = 400;
VirtualHeight = BufferHeight;
VirtualWidth = BufferWidth;
ScreenBuffer = new int[BufferWidth * BufferHeight];
croppedBuffer = ScreenBuffer;
}
protected int[] croppedBuffer;
#endregion
}
}

View File

@ -0,0 +1,18 @@

namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// The various CPC models CPCHawk emulates
/// </summary>
public enum MachineType
{
/// <summary>
/// Original Amstrad CPC model with builtin datacorder
/// </summary>
CPC464,
/// <summary>
/// 128K model with builtin 3" disk drive
/// </summary>
CPC6128,
}
}

View File

@ -0,0 +1,258 @@
using System.Text;
using BizHawk.Common;
using System;
using System.Collections.Generic;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// Logical object representing a standard +3 disk image
/// </summary>
public class CPCExtendedFloppyDisk : FloppyDisk
{
/// <summary>
/// The format type
/// </summary>
public override DiskType DiskFormatType => DiskType.CPCExtended;
/// <summary>
/// Attempts to parse incoming disk data
/// </summary>
/// <param name="diskData"></param>
/// <returns>
/// TRUE: disk parsed
/// FALSE: unable to parse disk
/// </returns>
public override bool ParseDisk(byte[] data)
{
// look for standard magic string
string ident = Encoding.ASCII.GetString(data, 0, 16);
if (!ident.ToUpper().Contains("EXTENDED CPC DSK"))
{
// incorrect format
return false;
}
// read the disk information block
DiskHeader.DiskIdent = ident;
DiskHeader.DiskCreatorString = Encoding.ASCII.GetString(data, 0x22, 14);
DiskHeader.NumberOfTracks = data[0x30];
DiskHeader.NumberOfSides = data[0x31];
DiskHeader.TrackSizes = new int[DiskHeader.NumberOfTracks * DiskHeader.NumberOfSides];
DiskTracks = new Track[DiskHeader.NumberOfTracks * DiskHeader.NumberOfSides];
DiskData = data;
int pos = 0x34;
if (DiskHeader.NumberOfSides > 1)
{
StringBuilder sbm = new StringBuilder();
sbm.AppendLine();
sbm.AppendLine();
sbm.AppendLine("The detected disk image contains multiple sides.");
sbm.AppendLine("This is NOT currently supported in CPCHawk.");
sbm.AppendLine("Please find an alternate image/dump where each side has been saved as a separate *.dsk image (and use the mutli-disk bundler tool to load into Bizhawk).");
throw new System.NotImplementedException(sbm.ToString());
}
for (int i = 0; i < DiskHeader.NumberOfTracks * DiskHeader.NumberOfSides; i++)
{
DiskHeader.TrackSizes[i] = data[pos++] * 256;
}
// move to first track information block
pos = 0x100;
// parse each track
for (int i = 0; i < DiskHeader.NumberOfTracks * DiskHeader.NumberOfSides; i++)
{
// check for unformatted track
if (DiskHeader.TrackSizes[i] == 0)
{
DiskTracks[i] = new Track();
DiskTracks[i].Sectors = new Sector[0];
continue;
}
int p = pos;
DiskTracks[i] = new Track();
// track info block
DiskTracks[i].TrackIdent = Encoding.ASCII.GetString(data, p, 12);
p += 16;
DiskTracks[i].TrackNumber = data[p++];
DiskTracks[i].SideNumber = data[p++];
DiskTracks[i].DataRate = data[p++];
DiskTracks[i].RecordingMode = data[p++];
DiskTracks[i].SectorSize = data[p++];
DiskTracks[i].NumberOfSectors = data[p++];
DiskTracks[i].GAP3Length = data[p++];
DiskTracks[i].FillerByte = data[p++];
int dpos = pos + 0x100;
// sector info list
DiskTracks[i].Sectors = new Sector[DiskTracks[i].NumberOfSectors];
for (int s = 0; s < DiskTracks[i].NumberOfSectors; s++)
{
DiskTracks[i].Sectors[s] = new Sector();
DiskTracks[i].Sectors[s].TrackNumber = data[p++];
DiskTracks[i].Sectors[s].SideNumber = data[p++];
DiskTracks[i].Sectors[s].SectorID = data[p++];
DiskTracks[i].Sectors[s].SectorSize = data[p++];
DiskTracks[i].Sectors[s].Status1 = data[p++];
DiskTracks[i].Sectors[s].Status2 = data[p++];
DiskTracks[i].Sectors[s].ActualDataByteLength = MediaConverter.GetWordValue(data, p);
p += 2;
// sector data - begins at 0x100 offset from the start of the track info block (in this case dpos)
DiskTracks[i].Sectors[s].SectorData = new byte[DiskTracks[i].Sectors[s].ActualDataByteLength];
// copy the data
for (int b = 0; b < DiskTracks[i].Sectors[s].ActualDataByteLength; b++)
{
DiskTracks[i].Sectors[s].SectorData[b] = data[dpos + b];
}
// check for multiple weak/random sectors stored
if (DiskTracks[i].Sectors[s].SectorSize <= 7)
{
// sectorsize n=8 is equivilent to n=0 - FDC will use DTL for length
int specifiedSize = 0x80 << DiskTracks[i].Sectors[s].SectorSize;
if (specifiedSize < DiskTracks[i].Sectors[s].ActualDataByteLength)
{
// more data stored than sectorsize defines
// check for multiple weak/random copies
if (DiskTracks[i].Sectors[s].ActualDataByteLength % specifiedSize != 0)
{
DiskTracks[i].Sectors[s].ContainsMultipleWeakSectors = true;
}
}
}
// move dpos to the next sector data postion
dpos += DiskTracks[i].Sectors[s].ActualDataByteLength;
}
// move to the next track info block
pos += DiskHeader.TrackSizes[i];
}
// run protection scheme detector
ParseProtection();
return true;
}
/// <summary>
/// Takes a double-sided disk byte array and converts into 2 single-sided arrays
/// </summary>
/// <param name="data"></param>
/// <param name="results"></param>
/// <returns></returns>
public static bool SplitDoubleSided(byte[] data, List<byte[]> results)
{
// look for standard magic string
string ident = Encoding.ASCII.GetString(data, 0, 16);
if (!ident.ToUpper().Contains("EXTENDED CPC DSK"))
{
// incorrect format
return false;
}
byte[] S0 = new byte[data.Length];
byte[] S1 = new byte[data.Length];
// disk info block
Array.Copy(data, 0, S0, 0, 0x100);
Array.Copy(data, 0, S1, 0, 0x100);
// change side number
S0[0x31] = 1;
S1[0x31] = 1;
// extended format has different track sizes
int[] trkSizes = new int[data[0x30] * data[0x31]];
int pos = 0x34;
for (int i = 0; i < data[0x30] * data[0x31]; i++)
{
trkSizes[i] = data[pos] * 256;
// clear destination trk sizes (will be added later)
S0[pos] = 0;
S1[pos] = 0;
pos++;
}
// start at track info blocks
int mPos = 0x100;
int s0Pos = 0x100;
int s0tCount = 0;
int s1tCount = 0;
int s1Pos = 0x100;
int tCount = 0;
while (tCount < data[0x30] * data[0x31])
{
// which side is this?
var side = data[mPos + 0x11];
if (side == 0)
{
// side 1
Array.Copy(data, mPos, S0, s0Pos, trkSizes[tCount]);
s0Pos += trkSizes[tCount];
// trk size table
S0[0x34 + s0tCount++] = (byte)(trkSizes[tCount] / 256);
}
else if (side == 1)
{
// side 2
Array.Copy(data, mPos, S1, s1Pos, trkSizes[tCount]);
s1Pos += trkSizes[tCount];
// trk size table
S1[0x34 + s1tCount++] = (byte)(trkSizes[tCount] / 256);
}
mPos += trkSizes[tCount++];
}
byte[] s0final = new byte[s0Pos];
byte[] s1final = new byte[s1Pos];
Array.Copy(S0, 0, s0final, 0, s0Pos);
Array.Copy(S1, 0, s1final, 0, s1Pos);
results.Add(s0final);
results.Add(s1final);
return true;
}
/// <summary>
/// State serlialization
/// </summary>
/// <param name="ser"></param>
public override void SyncState(Serializer ser)
{
ser.BeginSection("Plus3FloppyDisk");
ser.Sync("CylinderCount", ref CylinderCount);
ser.Sync("SideCount", ref SideCount);
ser.Sync("BytesPerTrack", ref BytesPerTrack);
ser.Sync("WriteProtected", ref WriteProtected);
ser.SyncEnum("Protection", ref Protection);
ser.Sync("DirtyData", ref DirtyData);
if (DirtyData)
{
}
// sync deterministic track and sector counters
ser.Sync(" _randomCounter", ref _randomCounter);
RandomCounter = _randomCounter;
ser.EndSection();
}
}
}

View File

@ -0,0 +1,241 @@
using System.Text;
using BizHawk.Common;
using System.Collections.Generic;
using System;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// Logical object representing a standard +3 disk image
/// </summary>
public class CPCFloppyDisk : FloppyDisk
{
/// <summary>
/// The format type
/// </summary>
public override DiskType DiskFormatType => DiskType.CPC;
/// <summary>
/// Attempts to parse incoming disk data
/// </summary>
/// <param name="diskData"></param>
/// <returns>
/// TRUE: disk parsed
/// FALSE: unable to parse disk
/// </returns>
public override bool ParseDisk(byte[] data)
{
// look for standard magic string
string ident = Encoding.ASCII.GetString(data, 0, 16);
if (!ident.ToUpper().Contains("MV - CPC"))
{
// incorrect format
return false;
}
// read the disk information block
DiskHeader.DiskIdent = ident;
DiskHeader.DiskCreatorString = Encoding.ASCII.GetString(data, 0x22, 14);
DiskHeader.NumberOfTracks = data[0x30];
DiskHeader.NumberOfSides = data[0x31];
DiskHeader.TrackSizes = new int[DiskHeader.NumberOfTracks * DiskHeader.NumberOfSides];
DiskTracks = new Track[DiskHeader.NumberOfTracks * DiskHeader.NumberOfSides];
DiskData = data;
int pos = 0x32;
if (DiskHeader.NumberOfSides > 1)
{
StringBuilder sbm = new StringBuilder();
sbm.AppendLine();
sbm.AppendLine();
sbm.AppendLine("The detected disk image contains multiple sides.");
sbm.AppendLine("This is NOT currently supported in CPCHawk.");
sbm.AppendLine("Please find an alternate image/dump where each side has been saved as a separate *.dsk image (and use the mutli-disk bundler tool to load into Bizhawk).");
throw new System.NotImplementedException(sbm.ToString());
}
// standard CPC format all track sizes are the same in the image
for (int i = 0; i < DiskHeader.NumberOfTracks * DiskHeader.NumberOfSides; i++)
{
DiskHeader.TrackSizes[i] = MediaConverter.GetWordValue(data, pos);
}
// move to first track information block
pos = 0x100;
// parse each track
for (int i = 0; i < DiskHeader.NumberOfTracks * DiskHeader.NumberOfSides; i++)
{
// check for unformatted track
if (DiskHeader.TrackSizes[i] == 0)
{
DiskTracks[i] = new Track();
DiskTracks[i].Sectors = new Sector[0];
continue;
}
int p = pos;
DiskTracks[i] = new Track();
// track info block
DiskTracks[i].TrackIdent = Encoding.ASCII.GetString(data, p, 12);
p += 16;
DiskTracks[i].TrackNumber = data[p++];
DiskTracks[i].SideNumber = data[p++];
p += 2;
DiskTracks[i].SectorSize = data[p++];
DiskTracks[i].NumberOfSectors = data[p++];
DiskTracks[i].GAP3Length = data[p++];
DiskTracks[i].FillerByte = data[p++];
int dpos = pos + 0x100;
// sector info list
DiskTracks[i].Sectors = new Sector[DiskTracks[i].NumberOfSectors];
for (int s = 0; s < DiskTracks[i].NumberOfSectors; s++)
{
DiskTracks[i].Sectors[s] = new Sector();
DiskTracks[i].Sectors[s].TrackNumber = data[p++];
DiskTracks[i].Sectors[s].SideNumber = data[p++];
DiskTracks[i].Sectors[s].SectorID = data[p++];
DiskTracks[i].Sectors[s].SectorSize = data[p++];
DiskTracks[i].Sectors[s].Status1 = data[p++];
DiskTracks[i].Sectors[s].Status2 = data[p++];
DiskTracks[i].Sectors[s].ActualDataByteLength = MediaConverter.GetWordValue(data, p);
p += 2;
// actualdatabytelength value is calculated now
if (DiskTracks[i].Sectors[s].SectorSize == 0)
{
// no sectorsize specified - DTL will be used at runtime
DiskTracks[i].Sectors[s].ActualDataByteLength = DiskHeader.TrackSizes[i];
}
else if (DiskTracks[i].Sectors[s].SectorSize > 6)
{
// invalid - wrap around to 0
DiskTracks[i].Sectors[s].ActualDataByteLength = DiskHeader.TrackSizes[i];
}
else if (DiskTracks[i].Sectors[s].SectorSize == 6)
{
// only 0x1800 bytes are stored
DiskTracks[i].Sectors[s].ActualDataByteLength = 0x1800;
}
else
{
// valid sector size for this format
DiskTracks[i].Sectors[s].ActualDataByteLength = 0x80 << DiskTracks[i].Sectors[s].SectorSize;
}
// sector data - begins at 0x100 offset from the start of the track info block (in this case dpos)
DiskTracks[i].Sectors[s].SectorData = new byte[DiskTracks[i].Sectors[s].ActualDataByteLength];
// copy the data
for (int b = 0; b < DiskTracks[i].Sectors[s].ActualDataByteLength; b++)
{
DiskTracks[i].Sectors[s].SectorData[b] = data[dpos + b];
}
// move dpos to the next sector data postion
dpos += DiskTracks[i].Sectors[s].ActualDataByteLength;
}
// move to the next track info block
pos += DiskHeader.TrackSizes[i];
}
// run protection scheme detector
ParseProtection();
return true;
}
/// <summary>
/// Takes a double-sided disk byte array and converts into 2 single-sided arrays
/// </summary>
/// <param name="data"></param>
/// <param name="results"></param>
/// <returns></returns>
public static bool SplitDoubleSided(byte[] data, List<byte[]> results)
{
// look for standard magic string
string ident = Encoding.ASCII.GetString(data, 0, 16);
if (!ident.ToUpper().Contains("MV - CPC"))
{
// incorrect format
return false;
}
byte[] S0 = new byte[data.Length];
byte[] S1 = new byte[data.Length];
// disk info block
Array.Copy(data, 0, S0, 0, 0x100);
Array.Copy(data, 0, S1, 0, 0x100);
// change side number
S0[0x31] = 1;
S1[0x31] = 1;
int trkSize = MediaConverter.GetWordValue(data, 0x32);
// start at track info blocks
int mPos = 0x100;
int s0Pos = 0x100;
int s1Pos = 0x100;
while (mPos < trkSize * data[0x30] * data[0x31])
{
// which side is this?
var side = data[mPos + 0x11];
if (side == 0)
{
// side 1
Array.Copy(data, mPos, S0, s0Pos, trkSize);
s0Pos += trkSize;
}
else if (side == 1)
{
// side 2
Array.Copy(data, mPos, S1, s1Pos, trkSize);
s1Pos += trkSize;
}
mPos += trkSize;
}
byte[] s0final = new byte[s0Pos];
byte[] s1final = new byte[s1Pos];
Array.Copy(S0, 0, s0final, 0, s0Pos);
Array.Copy(S1, 0, s1final, 0, s1Pos);
results.Add(s0final);
results.Add(s1final);
return true;
}
/// <summary>
/// State serlialization
/// </summary>
/// <param name="ser"></param>
public override void SyncState(Serializer ser)
{
ser.BeginSection("Plus3FloppyDisk");
ser.Sync("CylinderCount", ref CylinderCount);
ser.Sync("SideCount", ref SideCount);
ser.Sync("BytesPerTrack", ref BytesPerTrack);
ser.Sync("WriteProtected", ref WriteProtected);
ser.SyncEnum("Protection", ref Protection);
ser.Sync("DirtyData", ref DirtyData);
if (DirtyData)
{
}
ser.EndSection();
}
}
}

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// This is called first when importing disk images
/// Disk images can be single or double-sided, so we need to handle that
/// </summary>
public class DiskHandler
{
}
}

View File

@ -0,0 +1,19 @@

namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// The different disk formats ZXHawk currently supports
/// </summary>
public enum DiskType
{
/// <summary>
/// Standard CPCEMU disk format (used in the built-in +3 disk drive)
/// </summary>
CPC,
/// <summary>
/// Extended CPCEMU disk format (used in the built-in +3 disk drive)
/// </summary>
CPCExtended
}
}

View File

@ -0,0 +1,750 @@
using BizHawk.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// This abstract class defines a logical floppy disk
/// </summary>
public abstract class FloppyDisk
{
/// <summary>
/// The disk format type
/// </summary>
public abstract DiskType DiskFormatType { get; }
/// <summary>
/// Disk information header
/// </summary>
public Header DiskHeader = new Header();
/// <summary>
/// Track array
/// </summary>
public Track[] DiskTracks = null;
/// <summary>
/// No. of tracks per side
/// </summary>
public int CylinderCount;
/// <summary>
/// The number of physical sides
/// </summary>
public int SideCount;
/// <summary>
/// The number of bytes per track
/// </summary>
public int BytesPerTrack;
/// <summary>
/// The write-protect tab on the disk
/// </summary>
public bool WriteProtected;
/// <summary>
/// The detected protection scheme (if any)
/// </summary>
public ProtectionType Protection;
/// <summary>
/// The actual disk image data
/// </summary>
public byte[] DiskData;
/// <summary>
/// If TRUE then data on the disk has changed (been written to)
/// This will be used to determine whether the disk data needs to be included
/// in any SyncState operations
/// </summary>
protected bool DirtyData = false;
/// <summary>
/// Used to deterministically choose a 'random' sector when dealing with weak reads
/// </summary>
public int RandomCounter
{
get { return _randomCounter; }
set
{
_randomCounter = value;
foreach (var trk in DiskTracks)
{
foreach (var sec in trk.Sectors)
{
sec.RandSecCounter = _randomCounter;
}
}
}
}
protected int _randomCounter;
/// <summary>
/// Attempts to parse incoming disk data
/// </summary>
/// <param name="diskData"></param>
/// <returns>
/// TRUE: disk parsed
/// FALSE: unable to parse disk
/// </returns>
public virtual bool ParseDisk(byte[] diskData)
{
// default result
// override in inheriting class
return false;
}
/// <summary>
/// Examines the floppydisk data to work out what protection (if any) is present
/// If possible it will also fix the disk data for this protection
/// This should be run at the end of the ParseDisk() method
/// </summary>
public virtual void ParseProtection()
{
int[] weakArr = new int[2];
// speedlock
if (DetectSpeedlock(ref weakArr))
{
Protection = ProtectionType.Speedlock;
Sector sec = DiskTracks[0].Sectors[1];
if (!sec.ContainsMultipleWeakSectors)
{
byte[] origData = sec.SectorData.ToArray();
List<byte> data = new List<byte>();
for (int m = 0; m < 3; m++)
{
for (int i = 0; i < 512; i++)
{
// deterministic 'random' implementation
int n = origData[i] + m + 1;
if (n > 0xff)
n = n - 0xff;
else if (n < 0)
n = 0xff + n;
byte nByte = (byte)n;
if (m == 0)
{
data.Add(origData[i]);
continue;
}
if (i < weakArr[0])
{
data.Add(origData[i]);
}
else if (weakArr[1] > 0)
{
data.Add(nByte);
weakArr[1]--;
}
else
{
data.Add(origData[i]);
}
}
}
sec.SectorData = data.ToArray();
sec.ActualDataByteLength = data.Count();
sec.ContainsMultipleWeakSectors = true;
}
}
else if (DetectAlkatraz(ref weakArr))
{
Protection = ProtectionType.Alkatraz;
}
else if (DetectPaulOwens(ref weakArr))
{
Protection = ProtectionType.PaulOwens;
}
else if (DetectHexagon(ref weakArr))
{
Protection = ProtectionType.Hexagon;
}
else if (DetectShadowOfTheBeast())
{
Protection = ProtectionType.ShadowOfTheBeast;
}
}
/// <summary>
/// Detection routine for shadow of the beast game
/// Still cannot get this to work, but at least the game is detected
/// </summary>
/// <returns></returns>
public bool DetectShadowOfTheBeast()
{
if (DiskTracks[0].Sectors.Length != 9)
return false;
var zeroSecs = DiskTracks[0].Sectors;
if (zeroSecs[0].SectorID != 65 ||
zeroSecs[1].SectorID != 66 ||
zeroSecs[2].SectorID != 67 ||
zeroSecs[3].SectorID != 68 ||
zeroSecs[4].SectorID != 69 ||
zeroSecs[5].SectorID != 70 ||
zeroSecs[6].SectorID != 71 ||
zeroSecs[7].SectorID != 72 ||
zeroSecs[8].SectorID != 73)
return false;
var oneSecs = DiskTracks[1].Sectors;
if (oneSecs.Length != 8)
return false;
if (oneSecs[0].SectorID != 17 ||
oneSecs[1].SectorID != 18 ||
oneSecs[2].SectorID != 19 ||
oneSecs[3].SectorID != 20 ||
oneSecs[4].SectorID != 21 ||
oneSecs[5].SectorID != 22 ||
oneSecs[6].SectorID != 23 ||
oneSecs[7].SectorID != 24)
return false;
return true;
}
/// <summary>
/// Detect speedlock weak sector
/// </summary>
/// <param name="weak"></param>
/// <returns></returns>
public bool DetectSpeedlock(ref int[] weak)
{
// SPEEDLOCK NOTES (-asni 2018-05-01)
// ---------------------------------
// Speedlock is one of the more common +3 disk protections and there are a few different versions
// Usually, track 0 sector 1 (ID 2) has data CRC errors that result in certain bytes returning a different value every time they are read
// Speedlock will generally read this track a number of times during the load process
// and if the correct bytes are not different between reads, the load fails
// always must have track 0 containing 9 sectors
if (DiskTracks[0].Sectors.Length != 9)
return false;
// check for SPEEDLOCK ident in sector 0
string ident = Encoding.ASCII.GetString(DiskTracks[0].Sectors[0].SectorData, 0, DiskTracks[0].Sectors[0].SectorData.Length);
if (!ident.ToUpper().Contains("SPEEDLOCK"))
return false;
// check for correct sector 0 lengths
if (DiskTracks[0].Sectors[0].SectorSize != 2 ||
DiskTracks[0].Sectors[0].SectorData.Length < 0x200)
return false;
// sector[1] (SectorID 2) contains the weak sectors
Sector sec = DiskTracks[0].Sectors[1];
// check for correct sector 1 lengths
if (sec.SectorSize != 2 ||
sec.SectorData.Length < 0x200)
return false;
// secID 2 needs a CRC error
//if (!(sec.Status1.Bit(5) || sec.Status2.Bit(5)))
//return false;
// check for filler
bool startFillerFound = true;
for (int i = 0; i < 250; i++)
{
if (sec.SectorData[i] != sec.SectorData[i + 1])
{
startFillerFound = false;
break;
}
}
if (!startFillerFound)
{
weak[0] = 0;
weak[1] = 0x200;
}
else
{
weak[0] = 0x150;
weak[1] = 0x20;
}
return true;
}
/// <summary>
/// Detect Alkatraz
/// </summary>
/// <param name="weak"></param>
/// <returns></returns>
public bool DetectAlkatraz(ref int[] weak)
{
try
{
var data1 = DiskTracks[0].Sectors[0].SectorData;
var data2 = DiskTracks[0].Sectors[0].SectorData.Length;
}
catch (Exception)
{
return false;
}
// check for ALKATRAZ ident in sector 0
string ident = Encoding.ASCII.GetString(DiskTracks[0].Sectors[0].SectorData, 0, DiskTracks[0].Sectors[0].SectorData.Length);
if (!ident.ToUpper().Contains("ALKATRAZ PROTECTION SYSTEM"))
return false;
// ALKATRAZ NOTES (-asni 2018-05-01)
// ---------------------------------
// Alkatraz protection appears to revolve around a track on the disk with 18 sectors,
// (track position is not consistent) with the sector ID info being incorrect:
// TrackID is consistent between the sectors although is usually high (233, 237 etc)
// SideID is fairly random looking but with all IDs being even
// SectorID is also fairly random looking but contains both odd and even numbers
//
// There doesnt appear to be any CRC errors in this track, but the sector size is always 1 (256 bytes)
// Each sector contains different filler byte
// Once track 0 is loaded the CPU completely reads all the sectors in this track one-by-one.
// Data transferred during execution must be correct, also result ST0, ST1 and ST2 must be 64, 128 and 0 respectively
// Immediately following this track are a number of tracks and sectors with a DAM set.
// These are all read in sector by sector
// Again, Alkatraz appears to require that ST0, ST1, and ST2 result bytes are set to 64, 128 and 0 respectively
// (so the CM in ST2 needs to be reset)
return true;
}
/// <summary>
/// Detect Paul Owens
/// </summary>
/// <param name="weak"></param>
/// <returns></returns>
public bool DetectPaulOwens(ref int[] weak)
{
try
{
var data1 = DiskTracks[0].Sectors[2].SectorData;
var data2 = DiskTracks[0].Sectors[2].SectorData.Length;
}
catch (Exception)
{
return false;
}
// check for PAUL OWENS ident in sector 2
string ident = Encoding.ASCII.GetString(DiskTracks[0].Sectors[2].SectorData, 0, DiskTracks[0].Sectors[2].SectorData.Length);
if (!ident.ToUpper().Contains("PAUL OWENS"))
return false;
// Paul Owens Disk Protection Notes (-asni 2018-05-01)
// ---------------------------------------------------
//
// This scheme looks a little similar to Alkatraz with incorrect sector ID info in many places
// and deleted address marks (although these do not seem to show the strict relience on removing the CM mark from ST2 result that Alkatraz does)
// There are also data CRC errors but these dont look to be read more than once/checked for changes during load
// Main identifiers:
//
// * There are more than 10 cylinders
// * Cylinder 1 has no sector data
// * The sector ID infomation in most cases contains incorrect track IDs
// * Tracks 0 (boot) and 5 appear to be pretty much the only tracks that do not have incorrect sector ID marks
return true;
}
/// <summary>
/// Detect Hexagon copy protection
/// </summary>
/// <param name="weak"></param>
/// <returns></returns>
public bool DetectHexagon(ref int[] weak)
{
try
{
var data1 = DiskTracks[0].Sectors.Length;
var data2 = DiskTracks[0].Sectors[8].ActualDataByteLength;
var data3 = DiskTracks[0].Sectors[8].SectorData;
var data4 = DiskTracks[0].Sectors[8].SectorData.Length;
var data5 = DiskTracks[1].Sectors[0];
}
catch (Exception)
{
return false;
}
if (DiskTracks[0].Sectors.Length != 10 || DiskTracks[0].Sectors[8].ActualDataByteLength != 512)
return false;
// check for Hexagon ident in sector 8
string ident = Encoding.ASCII.GetString(DiskTracks[0].Sectors[8].SectorData, 0, DiskTracks[0].Sectors[8].SectorData.Length);
if (ident.ToUpper().Contains("GON DISK PROT"))
return true;
// hexagon protection may not be labelled as such
var track = DiskTracks[1];
var sector = track.Sectors[0];
if (sector.SectorSize == 6 && sector.Status1 == 0x20 && sector.Status2 == 0x60)
{
if (track.Sectors.Length == 1)
return true;
}
// Hexagon Copy Protection Notes (-asni 2018-05-01)
// ---------------------------------------------------
//
//
return false;
}
/*
/// <summary>
/// Should be run at the end of the ParseDisk process
/// If speedlock is detected the flag is set in the disk image
/// </summary>
/// <returns></returns>
protected virtual void SpeedlockDetection()
{
if (DiskTracks.Length == 0)
return;
// check for speedlock copyright notice
string ident = Encoding.ASCII.GetString(DiskData, 0x100, 0x1400);
if (!ident.ToUpper().Contains("SPEEDLOCK"))
{
// speedlock not found
return;
}
// get cylinder 0
var cyl = DiskTracks[0];
// get sector with ID=2
var sec = cyl.Sectors.Where(a => a.SectorID == 2).FirstOrDefault();
if (sec == null)
return;
// check for already multiple weak copies
if (sec.ContainsMultipleWeakSectors || sec.SectorData.Length != 0x80 << sec.SectorSize)
return;
// check for invalid crcs in sector 2
if (sec.Status1.Bit(5) || sec.Status2.Bit(5))
{
Protection = ProtectionType.Speedlock;
}
else
{
return;
}
// we are going to create a total of 5 weak sector copies
// keeping the original copy
byte[] origData = sec.SectorData.ToArray();
List<byte> data = new List<byte>();
//Random rnd = new Random();
for (int i = 0; i < 6; i++)
{
for (int s = 0; s < origData.Length; s++)
{
if (i == 0)
{
data.Add(origData[s]);
continue;
}
// deterministic 'random' implementation
int n = origData[s] + i + 1;
if (n > 0xff)
n = n - 0xff;
else if (n < 0)
n = 0xff + n;
byte nByte = (byte)n;
if (s < 336)
{
// non weak data
data.Add(origData[s]);
}
else if (s < 511)
{
// weak data
data.Add(nByte);
}
else if (s == 511)
{
// final sector byte
data.Add(nByte);
}
else
{
// speedlock sector should not be more than 512 bytes
// but in case it is just do non weak
data.Add(origData[i]);
}
}
}
// commit the sector data
sec.SectorData = data.ToArray();
sec.ContainsMultipleWeakSectors = true;
sec.ActualDataByteLength = data.Count();
}
*/
/// <summary>
/// Returns the track count for the disk
/// </summary>
/// <returns></returns>
public virtual int GetTrackCount()
{
return DiskHeader.NumberOfTracks * DiskHeader.NumberOfSides;
}
/// <summary>
/// Reads the current sector ID info
/// </summary>
/// <param name="track"></param>
/// <returns></returns>
public virtual CHRN ReadID(byte trackIndex, byte side, int sectorIndex)
{
if (side != 0)
return null;
if (DiskTracks.Length <= trackIndex || trackIndex < 0)
{
// invalid track - wrap around
trackIndex = 0;
}
var track = DiskTracks[trackIndex];
if (track.NumberOfSectors <= sectorIndex)
{
// invalid sector - wrap around
sectorIndex = 0;
}
var sector = track.Sectors[sectorIndex];
CHRN chrn = new CHRN();
chrn.C = sector.TrackNumber;
chrn.H = sector.SideNumber;
chrn.R = sector.SectorID;
// wrap around for N > 7
if (sector.SectorSize > 7)
{
chrn.N = (byte)(sector.SectorSize - 7);
}
else if (sector.SectorSize < 0)
{
chrn.N = 0;
}
else
{
chrn.N = sector.SectorSize;
}
chrn.Flag1 = (byte)(sector.Status1 & 0x25);
chrn.Flag2 = (byte)(sector.Status2 & 0x61);
chrn.DataBytes = sector.ActualData;
return chrn;
}
/// <summary>
/// State serialization routines
/// </summary>
/// <param name="ser"></param>
public abstract void SyncState(Serializer ser);
public class Header
{
public string DiskIdent { get; set; }
public string DiskCreatorString { get; set; }
public byte NumberOfTracks { get; set; }
public byte NumberOfSides { get; set; }
public int[] TrackSizes { get; set; }
}
public class Track
{
public string TrackIdent { get; set; }
public byte TrackNumber { get; set; }
public byte SideNumber { get; set; }
public byte DataRate { get; set; }
public byte RecordingMode { get; set; }
public byte SectorSize { get; set; }
public byte NumberOfSectors { get; set; }
public byte GAP3Length { get; set; }
public byte FillerByte { get; set; }
public Sector[] Sectors { get; set; }
/// <summary>
/// Presents a contiguous byte array of all sector data for this track
/// (including any multiple weak/random data)
/// </summary>
public byte[] TrackSectorData
{
get
{
List<byte> list = new List<byte>();
foreach (var sec in Sectors)
{
list.AddRange(sec.ActualData);
}
return list.ToArray();
}
}
}
public class Sector
{
public byte TrackNumber { get; set; }
public byte SideNumber { get; set; }
public byte SectorID { get; set; }
public byte SectorSize { get; set; }
public byte Status1 { get; set; }
public byte Status2 { get; set; }
public int ActualDataByteLength { get; set; }
public byte[] SectorData { get; set; }
public bool ContainsMultipleWeakSectors { get; set; }
public int WeakReadIndex = 0;
public void SectorReadCompleted()
{
if (ContainsMultipleWeakSectors)
WeakReadIndex++;
}
public int DataLen
{
get
{
if (!ContainsMultipleWeakSectors)
{
return ActualDataByteLength;
}
else
{
return ActualDataByteLength / (ActualDataByteLength / (0x80 << SectorSize));
}
}
}
public int RandSecCounter = 0;
public byte[] ActualData
{
get
{
if (!ContainsMultipleWeakSectors)
{
// check whether filler bytes are needed
int size = 0x80 << SectorSize;
if (size > ActualDataByteLength)
{
List<byte> l = new List<byte>();
l.AddRange(SectorData);
for (int i = 0; i < size - ActualDataByteLength; i++)
{
//l.Add(SectorData[i]);
l.Add(SectorData.Last());
}
return l.ToArray();
}
else
{
return SectorData;
}
}
else
{
// weak read neccessary
int copies = ActualDataByteLength / (0x80 << SectorSize);
// handle index wrap-around
if (WeakReadIndex > copies - 1)
WeakReadIndex = copies - 1;
// get the sector data based on the current weakreadindex
int step = WeakReadIndex * (0x80 << SectorSize);
byte[] res = new byte[(0x80 << SectorSize)];
Array.Copy(SectorData, step, res, 0, 0x80 << SectorSize);
return res;
/*
int copies = ActualDataByteLength / (0x80 << SectorSize);
Random rnd = new Random();
int r = rnd.Next(0, copies - 1);
int step = r * (0x80 << SectorSize);
byte[] res = new byte[(0x80 << SectorSize)];
Array.Copy(SectorData, step, res, 0, 0x80 << SectorSize);
return res;
*/
}
}
}
public CHRN SectorIDInfo
{
get
{
return new CHRN
{
C = TrackNumber,
H = SideNumber,
R = SectorID,
N = SectorSize,
Flag1 = Status1,
Flag2 = Status2,
};
}
}
}
}
/// <summary>
/// Defines the type of speedlock detection found
/// </summary>
public enum ProtectionType
{
None,
Speedlock,
Alkatraz,
Hexagon,
Frontier,
PaulOwens,
ShadowOfTheBeast
}
}

View File

@ -0,0 +1,153 @@
using System;
using System.IO;
using System.IO.Compression;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// Abtract class that represents all Media Converters
/// </summary>
public abstract class MediaConverter
{
/// <summary>
/// The type of serializer
/// </summary>
public abstract MediaConverterType FormatType { get; }
/// <summary>
/// Signs whether this class can be used to read the data format
/// </summary>
public virtual bool IsReader
{
get
{
return false;
}
}
/// <summary>
/// Signs whether this class can be used to write the data format
/// </summary>
public virtual bool IsWriter
{
get
{
return false;
}
}
/// <summary>
/// Serialization method
/// </summary>
/// <param name="data"></param>
public virtual void Read(byte[] data)
{
throw new NotImplementedException(this.GetType().ToString() +
"Read operation is not implemented for this converter");
}
/// <summary>
/// DeSerialization method
/// </summary>
/// <param name="data"></param>
public virtual void Write(byte[] data)
{
throw new NotImplementedException(this.GetType().ToString() +
"Write operation is not implemented for this converter");
}
/// <summary>
/// Serializer does a quick check, returns TRUE if file is detected as this type
/// </summary>
/// <param name="data"></param>
public virtual bool CheckType(byte[] data)
{
throw new NotImplementedException(this.GetType().ToString() +
"Check type operation is not implemented for this converter");
}
#region Static Tools
/// <summary>
/// Converts an int32 value into a byte array
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
public static byte[] GetBytes(int value)
{
byte[] buf = new byte[4];
buf[0] = (byte)value;
buf[1] = (byte)(value >> 8);
buf[2] = (byte)(value >> 16);
buf[3] = (byte)(value >> 24);
return buf;
}
/// <summary>
/// Returns an int32 from a byte array based on offset
/// </summary>
/// <param name="buf"></param>
/// <param name="offsetIndex"></param>
/// <returns></returns>
public static int GetInt32(byte[] buf, int offsetIndex)
{
return buf[offsetIndex] | buf[offsetIndex + 1] << 8 | buf[offsetIndex + 2] << 16 | buf[offsetIndex + 3] << 24;
}
/// <summary>
/// Returns an uint16 from a byte array based on offset
/// </summary>
/// <param name="buf"></param>
/// <param name="offsetIndex"></param>
/// <returns></returns>
public static ushort GetWordValue(byte[] buf, int offsetIndex)
{
return (ushort)(buf[offsetIndex] | buf[offsetIndex + 1] << 8);
}
/// <summary>
/// Updates a byte array with a uint16 value based on offset
/// </summary>
/// <param name="buf"></param>
/// <param name="offsetIndex"></param>
/// <param name="value"></param>
public static void SetWordValue(byte[] buf, int offsetIndex, ushort value)
{
buf[offsetIndex] = (byte)value;
buf[offsetIndex + 1] = (byte)(value >> 8);
}
/// <summary>
/// Takes a PauseInMilliseconds value and returns the value in T-States
/// </summary>
/// <param name="pauseInMS"></param>
/// <returns></returns>
public static int TranslatePause(int pauseInMS)
{
// t-states per millisecond
var tspms = (69888 * 50) / 1000;
// get value
int res = pauseInMS * tspms;
return res;
}
/// <summary>
/// Decompresses a byte array that is Z-RLE compressed
/// </summary>
/// <param name="sourceBuffer"></param>
/// <param name="destBuffer"></param>
public static void DecompressZRLE(byte[] sourceBuffer, ref byte[] destBuffer)
{
MemoryStream stream = new MemoryStream();
stream.Write(sourceBuffer, 0, sourceBuffer.Length);
stream.Position = 0;
stream.ReadByte();
stream.ReadByte();
DeflateStream ds = new DeflateStream(stream, CompressionMode.Decompress, false);
ds.Read(destBuffer, 0, destBuffer.Length);
}
#endregion
}
}

View File

@ -0,0 +1,13 @@

namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// Represents the different types of media serializer avaiable
/// </summary>
public enum MediaConverterType
{
NONE,
CDT,
DSK
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,16 @@

namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// Represents the possible commands that can be raised from each tape block
/// </summary>
public enum TapeCommand
{
NONE,
STOP_THE_TAPE,
STOP_THE_TAPE_48K,
BEGIN_GROUP,
END_GROUP,
SHOW_MESSAGE,
}
}

View File

@ -0,0 +1,288 @@
using BizHawk.Common;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// Represents a tape block
/// </summary>
public class TapeDataBlock
{
/// <summary>
/// Either the TZX block ID, or -1 in the case of non-tzx blocks
/// </summary>
private int _blockID = -1;
public int BlockID
{
get { return _blockID; }
set {
_blockID = value;
if (MetaData == null)
MetaData = new Dictionary<BlockDescriptorTitle, string>();
AddMetaData(BlockDescriptorTitle.Block_ID, value.ToString());
}
}
/// <summary>
/// The block type
/// </summary>
private BlockType _blockType;
public BlockType BlockDescription
{
get { return _blockType; }
set {
_blockType = value;
if (MetaData == null)
MetaData = new Dictionary<BlockDescriptorTitle, string>();
}
}
/// <summary>
/// Byte array containing the raw block data
/// </summary>
private byte[] _blockData;
public byte[] BlockData
{
get { return _blockData; }
set { _blockData = value; }
}
/// <summary>
/// An array of bytearray encoded strings (stored in this format for easy Bizhawk serialization)
/// Its basically tape information
/// </summary>
private byte[][] _tapeDescriptionData;
/// <summary>
/// Returns the Tape Description Data in a human readable format
/// </summary>
public List<string> TapeDescriptionData
{
get
{
List<string> data = new List<string>();
foreach (byte[] b in _tapeDescriptionData)
{
data.Add(Encoding.ASCII.GetString(b));
}
return data;
}
}
#region Block Meta Data
/// <summary>
/// Dictionary of block related data
/// </summary>
public Dictionary<BlockDescriptorTitle, string> MetaData { get; set; }
/// <summary>
/// Adds a single metadata item to the Dictionary
/// </summary>
/// <param name="descriptor"></param>
/// <param name="data"></param>
public void AddMetaData(BlockDescriptorTitle descriptor, string data)
{
// check whether entry already exists
bool check = MetaData.ContainsKey(descriptor);
if (check)
{
// already exists - update
MetaData[descriptor] = data;
}
else
{
// create new
MetaData.Add(descriptor, data);
}
}
#endregion
/// <summary>
/// List containing the pulse timing values
/// </summary>
public List<int> DataPeriods = new List<int>();
public bool InitialPulseLevel;
/// <summary>
/// Command that is raised by this data block
/// (that may or may not need to be acted on)
/// </summary>
private TapeCommand _command = TapeCommand.NONE;
public TapeCommand Command
{
get { return _command; }
set { _command = value; }
}
/// <summary>
/// The defined post-block pause
/// </summary>
private int _pauseInMS;
public int PauseInMS
{
get { return _pauseInMS; }
set { _pauseInMS = value; }
}
/// <summary>
/// Returns the data periods as an array
/// (primarily to aid in bizhawk state serialization)
/// </summary>
/// <returns></returns>
public int[] GetDataPeriodsArray()
{
return DataPeriods.ToArray();
}
/// <summary>
/// Accepts an array of data periods and updates the DataPeriods list accordingly
/// (primarily to aid in bizhawk state serialization)
/// </summary>
/// <returns></returns>
public void SetDataPeriodsArray(int[] periodArray)
{
DataPeriods = new List<int>();
if (periodArray == null)
return;
DataPeriods = periodArray.ToList();
}
/// <summary>
/// Bizhawk state serialization
/// </summary>
/// <param name="ser"></param>
public void SyncState(Serializer ser, int blockPosition)
{
ser.BeginSection("DataBlock" + blockPosition);
ser.Sync("_blockID", ref _blockID);
//ser.SyncFixedString("_blockDescription", ref _blockDescription, 200);
ser.SyncEnum("_blockType", ref _blockType);
ser.Sync("_blockData", ref _blockData, true);
ser.SyncEnum("_command", ref _command);
int[] tempArray = null;
if (ser.IsWriter)
{
tempArray = GetDataPeriodsArray();
ser.Sync("_periods", ref tempArray, true);
}
else
{
ser.Sync("_periods", ref tempArray, true);
SetDataPeriodsArray(tempArray);
}
ser.EndSection();
}
}
/// <summary>
/// The types of TZX blocks
/// </summary>
public enum BlockType
{
Standard_Speed_Data_Block = 0x10,
Turbo_Speed_Data_Block = 0x11,
Pure_Tone = 0x12,
Pulse_Sequence = 0x13,
Pure_Data_Block = 0x14,
Direct_Recording = 0x15,
CSW_Recording = 0x18,
Generalized_Data_Block = 0x19,
Pause_or_Stop_the_Tape = 0x20,
Group_Start = 0x21,
Group_End = 0x22,
Jump_to_Block = 0x23,
Loop_Start = 0x24,
Loop_End = 0x25,
Call_Sequence = 0x26,
Return_From_Sequence = 0x27,
Select_Block = 0x28,
Stop_the_Tape_48K = 0x2A,
Set_Signal_Level = 0x2B,
Text_Description = 0x30,
Message_Block = 0x31,
Archive_Info = 0x32,
Hardware_Type = 0x33,
Custom_Info_Block = 0x35,
Glue_Block = 0x5A,
// depreciated blocks
C64_ROM_Type_Data_Block = 0x16,
C64_Turbo_Tape_Data_Block = 0x17,
Emulation_Info = 0x34,
Snapshot_Block = 0x40,
// unsupported / undetected
Unsupported,
// PZX blocks
PZXT,
PULS,
DATA,
BRWS,
PAUS,
// zxhawk proprietry
PAUSE_BLOCK,
WAV_Recording
}
/// <summary>
/// Different title possibilities
/// </summary>
public enum BlockDescriptorTitle
{
Undefined,
Block_ID,
Program,
Data_Bytes,
Bytes,
Pilot_Pulse_Length,
Pilot_Pulse_Count,
First_Sync_Length,
Second_Sync_Length,
Zero_Bit_Length,
One_Bit_Length,
Data_Length,
Bits_In_Last_Byte,
Pause_After_Data,
Pulse_Length,
Pulse_Count,
Text_Description,
Title,
Publisher,
Author,
Year,
Language,
Type,
Price,
Protection,
Origin,
Comments,
Needs_Parsing
}
}

View File

@ -0,0 +1,69 @@

namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// Information about Amstrad ROM
/// </summary>
public class RomData
{
/// <summary>
/// ROM Contents
/// </summary>
public byte[] RomBytes
{
get { return _romBytes; }
set { _romBytes = value; }
}
private byte[] _romBytes;
public enum ROMChipType
{
Lower,
Upper
}
/// <summary>
/// Whether this is an Upper or Lower ROM
/// </summary>
public ROMChipType ROMType;
/// <summary>
/// The designated ROM position for this ROM
/// </summary>
public int ROMPosition;
/// <summary>
/// Initialise a RomData object
/// </summary>
/// <param name="machineType"></param>
/// <param name="rom"></param>
/// <param name="type"></param>
/// <param name="romPosition"></param>
/// <returns></returns>
public static RomData InitROM(MachineType machineType, byte[] rom, ROMChipType type, int romPosition = 0)
{
RomData RD = new RomData();
RD.RomBytes = new byte[rom.Length];
RD.RomBytes = rom;
RD.ROMType = type;
if (type == ROMChipType.Upper)
{
RD.ROMPosition = romPosition;
}
for (int i = 0; i < rom.Length; i++)
RD.RomBytes[i] = rom[i];
switch (machineType)
{
case MachineType.CPC464:
break;
case MachineType.CPC6128:
break;
}
return RD;
}
}
}

View File

@ -0,0 +1,217 @@
using BizHawk.Emulation.Common;
using System;
using System.Collections.Generic;
using System.Linq;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// My attempt at mixing multiple ISoundProvider sources together and outputting another ISoundProvider
/// Currently only supports SyncSoundMode.Sync
/// Attached ISoundProvider sources must already be stereo 44.1khz and ideally sound buffers should be the same length (882)
/// (if not, only 882 samples of their buffer will be used)
/// </summary>
internal sealed class SoundProviderMixer : ISoundProvider
{
private class Provider
{
public ISoundProvider SoundProvider { get; set; }
public string ProviderDescription { get; set; }
public int MaxVolume { get; set; }
public short[] Buffer { get; set; }
public int NSamp { get; set; }
}
private bool _stereo = true;
public bool Stereo
{
get { return _stereo; }
set { _stereo = value; }
}
private readonly List<Provider> SoundProviders;
public SoundProviderMixer(params ISoundProvider[] soundProviders)
{
SoundProviders = new List<Provider>();
foreach (var s in soundProviders)
{
SoundProviders.Add(new Provider
{
SoundProvider = s,
MaxVolume = short.MaxValue,
});
}
EqualizeVolumes();
}
public SoundProviderMixer(short maxVolume, string description, params ISoundProvider[] soundProviders)
{
SoundProviders = new List<Provider>();
foreach (var s in soundProviders)
{
SoundProviders.Add(new Provider
{
SoundProvider = s,
MaxVolume = maxVolume,
ProviderDescription = description
});
}
EqualizeVolumes();
}
public void AddSource(ISoundProvider source, string description)
{
SoundProviders.Add(new Provider
{
SoundProvider = source,
MaxVolume = short.MaxValue,
ProviderDescription = description
});
EqualizeVolumes();
}
public void AddSource(ISoundProvider source, short maxVolume, string description)
{
SoundProviders.Add(new Provider
{
SoundProvider = source,
MaxVolume = maxVolume,
ProviderDescription = description
});
EqualizeVolumes();
}
public void DisableSource(ISoundProvider source)
{
var sp = SoundProviders.Where(a => a.SoundProvider == source);
if (sp.Count() == 1)
SoundProviders.Remove(sp.First());
else if (sp.Count() > 1)
foreach (var s in sp)
SoundProviders.Remove(s);
EqualizeVolumes();
}
public void EqualizeVolumes()
{
if (SoundProviders.Count < 1)
return;
int eachVolume = short.MaxValue / SoundProviders.Count;
foreach (var source in SoundProviders)
{
source.MaxVolume = eachVolume;
}
}
#region ISoundProvider
public bool CanProvideAsync => false;
public SyncSoundMode SyncMode => SyncSoundMode.Sync;
public void SetSyncMode(SyncSoundMode mode)
{
if (mode != SyncSoundMode.Sync)
throw new InvalidOperationException("Only Sync mode is supported.");
}
public void GetSamplesAsync(short[] samples)
{
throw new NotSupportedException("Async is not available");
}
public void DiscardSamples()
{
foreach (var soundSource in SoundProviders)
{
soundSource.SoundProvider.DiscardSamples();
}
}
public void GetSamplesSync(out short[] samples, out int nsamp)
{
samples = null;
nsamp = 0;
// get samples from all the providers
foreach (var sp in SoundProviders)
{
int sampCount;
short[] samp;
sp.SoundProvider.GetSamplesSync(out samp, out sampCount);
sp.NSamp = sampCount;
sp.Buffer = samp;
}
// are all the sample lengths the same?
var firstEntry = SoundProviders.First();
bool sameCount = SoundProviders.All(s => s.NSamp == firstEntry.NSamp);
if (!sameCount)
{
// this is a bit hacky, really all ISoundProviders should be supplying 44100 with 882 samples per frame.
// we will make sure this happens (no matter how it sounds)
if (SoundProviders.Count > 1)
{
for (int i = 0; i < SoundProviders.Count; i++)
{
int ns = SoundProviders[i].NSamp;
short[] buff = new short[882 * 2];
for (int b = 0; b < 882 * 2; b++)
{
if (b == SoundProviders[i].Buffer.Length - 1)
{
// end of source buffer
break;
}
buff[b] = SoundProviders[i].Buffer[b];
}
// save back to the soundprovider
SoundProviders[i].NSamp = 882;
SoundProviders[i].Buffer = buff;
}
}
else
{
// just process what we have as-is
}
}
// mix the soundproviders together
nsamp = 882;
samples = new short[nsamp * 2];
for (int i = 0; i < samples.Length; i++)
{
short sectorVal = 0;
foreach (var sp in SoundProviders)
{
if (i < sp.Buffer.Length)
{
if (sp.Buffer[i] > sp.MaxVolume)
sectorVal += (short)sp.MaxVolume;
else
sectorVal += sp.Buffer[i];
}
}
samples[i] = sectorVal;
}
}
#endregion
}
}

View File

@ -0,0 +1,33 @@
## CPCHawk
This may or may not work out. But I figured I could at least start by building on the existing ZXHawk implementation (the machines do have CPU, tape format, PSG and disk drive/controller in common).
We'll see how that goes...
#### In Place (but probably requires more work)
* CPC464 model template
* Non-paged memory
* Standard lower and upper ROM
* Port IO decoding
* CRCT (Cathode Ray Tube Controller) chip emulation
* Amstrad Gate Array chip emulation
* Video rendering (mode 1)
* i8255 Programmable Peripheral Interface (PPI) chip emulation
* AY-3-8912 PSG Port IO
* Keyboard/Joystick
* .CDT tape image file support
#### Not Yet
* CPC664, CPC6128, CPC464plus, CPC6128plus, GX4000 models
* RAM banking
* Upper ROM banking
* Video rendering (modes 0, 2 & 3)
* AY-3-8912 PSG sound output
* Datacorder (tape) device
* FDC and FDD devices
* .DSK image parsing and identification (to auto differenciate from ZX Spectrum disk bootloader)
* Expansion IO
-Asnivor

View File

@ -43,6 +43,7 @@ namespace BizHawk.Emulation.Cores
C64,
ZXSpectrum,
AmstradCPC,
INT,
A26, A52, A78, LNX,

View File

@ -60,6 +60,56 @@ namespace BizHawk.Emulation.Cores.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
internal static byte[] CPC_AMSDOS_0_5_ROM {
get {
object obj = ResourceManager.GetObject("CPC_AMSDOS_0_5_ROM", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
internal static byte[] CPC_BASIC_1_0_ROM {
get {
object obj = ResourceManager.GetObject("CPC_BASIC_1_0_ROM", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
internal static byte[] CPC_BASIC_1_1_ROM {
get {
object obj = ResourceManager.GetObject("CPC_BASIC_1_1_ROM", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
internal static byte[] CPC_OS_6128_ROM {
get {
object obj = ResourceManager.GetObject("CPC_OS_6128_ROM", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
internal static byte[] OS_464_ROM {
get {
object obj = ResourceManager.GetObject("OS_464_ROM", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>

View File

@ -151,4 +151,19 @@
<data name="ZX_plus2_rom" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\plus2.rom.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>
<data name="CPC_AMSDOS_0_5_ROM" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\CPC_AMSDOS_0.5.ROM.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="CPC_BASIC_1_0_ROM" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\CPC_BASIC_1.0.ROM.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="CPC_BASIC_1_1_ROM" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\CPC_BASIC_1.1.ROM.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="CPC_OS_6128_ROM" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\CPC_OS_6128.ROM.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="OS_464_ROM" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\OS_464.ROM.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More