diff --git a/BizHawk.Emulation.Cores/BizHawk.Emulation.Cores.csproj b/BizHawk.Emulation.Cores/BizHawk.Emulation.Cores.csproj
index c4d8705210..f57d61d6eb 100644
--- a/BizHawk.Emulation.Cores/BizHawk.Emulation.Cores.csproj
+++ b/BizHawk.Emulation.Cores/BizHawk.Emulation.Cores.csproj
@@ -317,27 +317,33 @@
+
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
+
+ NECUPD765.cs
+
+
+ NECUPD765.cs
+
+
+ NECUPD765.cs
+
+
+ NECUPD765.cs
+
+
+ NECUPD765.cs
+
+
+ NECUPD765.cs
+
@@ -346,10 +352,6 @@
-
-
-
-
@@ -372,30 +374,94 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ SpectrumBase.cs
+
+
+ SpectrumBase.cs
+
+
+ SpectrumBase.cs
+
+
+ SpectrumBase.cs
+
+
+
+
+
+ ZX48.cs
+
+
+ ZX48.cs
+
+
+
+
+
+ ZX128.cs
+
+
+ ZX128.cs
+
+
+
+
+
+ ZX128Plus2a.cs
+
+
+ ZX128Plus2a.cs
+
+
+
+
+ ZX128Plus3.cs
+
+
+ ZX128Plus3.cs
+
+
+
+ Pentagon128.cs
+
+
+ Pentagon128.cs
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+ ZXSpectrum.cs
+
+
+ ZXSpectrum.cs
+
+
+ ZXSpectrum.cs
+
+
+ ZXSpectrum.cs
+
+
+ ZXSpectrum.cs
+
+
+ ZXSpectrum.cs
+
+
+ ZXSpectrum.cs
+
+
+ ZXSpectrum.cs
+
+
+ ZXSpectrum.cs
+
+
+ ZXSpectrum.cs
+
Atari2600.cs
@@ -1500,13 +1566,7 @@
-
-
-
-
-
-
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Datacorder/DatacorderDevice.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Datacorder/DatacorderDevice.cs
index c47af9c1b0..3ae4eafd72 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Datacorder/DatacorderDevice.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Datacorder/DatacorderDevice.cs
@@ -131,13 +131,16 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
///
/// 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)
+ /// Primary purpose is to detect tape traps and manage auto play
///
public void EndFrame()
{
MonitorFrame();
}
+ ///
+ /// No longer in use
+ ///
public void StartFrame()
{
//_buzzer.ProcessPulseValue(currentState);
@@ -296,14 +299,11 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
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)
@@ -522,7 +522,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
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)
{
@@ -532,14 +531,12 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
_machine.Spectrum.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)
@@ -548,13 +545,12 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
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);
- }
+ {
+ sbd.Append(" - ");
+ sbd.Append(bl.MetaData.First().Key + ": " + bl.MetaData.First().Value);
+ }
_machine.Spectrum.OSD_TapePlayingSkipBlockInfo(sbd.ToString());
}
@@ -583,7 +579,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
}
_monitorTimeOut = 2000;
-
break;
case TapeCommand.STOP_THE_TAPE_48K:
if (is48k)
@@ -626,17 +621,14 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
// update waitEdge with current position within the current block
_waitEdge = _dataBlocks[_currentDataBlockIndex].DataPeriods.Count() > 0 ? _dataBlocks[_currentDataBlockIndex].DataPeriods[_position] : 0;
+
// flip the current state
FlipTapeState();
-
}
// update lastCycle and return currentstate
_lastCycle = cpuCycle - (long)cycles;
- // play the buzzer
- //_buzzer.ProcessPulseValue(false, currentState);
-
return currentState;
}
@@ -648,6 +640,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
///
/// Flash loading implementation
/// (Deterministic Emulation must be FALSE)
+ /// CURRENTLY NOT ENABLED/WORKING
///
private bool FlashLoad()
{
@@ -961,47 +954,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
if (_machine.UPDDiskDevice == null || !_machine.UPDDiskDevice.FDD_IsDiskLoaded)
MonitorRead();
- /*
-
- if (TapeIsPlaying)
- {
- if (GetEarBit(_cpu.TotalExecutedCycles))
- {
- result &= ~(TAPE_BIT); // reset is EAR ON
- }
- else
- {
- result |= (TAPE_BIT); // set is EAR Off
- }
- }
- else
- {
- if (_machine.KeyboardDevice.IsIssue2Keyboard)
- {
- if ((_machine.LASTULAOutByte & (EAR_BIT + MIC_BIT)) == 0)
- {
- result &= ~(TAPE_BIT);
- }
- else
- {
- result |= (TAPE_BIT);
- }
- }
- else
- {
- if ((_machine.LASTULAOutByte & EAR_BIT) == 0)
- {
- result &= ~(TAPE_BIT);
- }
- else
- {
- result |= TAPE_BIT;
- }
- }
- }
-
- */
-
return true;
}
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/StandardKeyboard.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/StandardKeyboard.cs
index 7e23f843a7..77cb18d38c 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/StandardKeyboard.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/StandardKeyboard.cs
@@ -183,7 +183,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
return (byte)index;
}
-
#region IPortIODevice
///
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/SoundOuput/Beeper.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/SoundOuput/Beeper.cs
index 5b518b031c..a3f5dec9c4 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/SoundOuput/Beeper.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/SoundOuput/Beeper.cs
@@ -8,9 +8,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// Logical Beeper class
/// Represents the piezoelectric buzzer used in the Spectrum to produce sound
/// The beeper is controlled by rapidly toggling bit 4 of port &FE
- ///
/// It is instantiated twice, once for speccy beeper output, and once tape buzzer emulation
- ///
/// 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)
///
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.Input.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.Input.cs
index b64fa125eb..18345b0077 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.Input.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.Input.cs
@@ -198,7 +198,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
{
if (!pressed_TapeStatus)
{
- //Spectrum.OSD_FireInputMessage(TapeStatus);
Spectrum.OSD_ShowTapeStatus();
pressed_TapeStatus = true;
}
@@ -269,7 +268,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
{
if (!pressed_DiskStatus)
{
- //Spectrum.OSD_FireInputMessage(TapeStatus);
Spectrum.OSD_ShowDiskStatus();
pressed_DiskStatus = true;
}
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.Media.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.Media.cs
index 57525f6028..46d6a62de2 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.Media.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.Media.cs
@@ -63,6 +63,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
// load the media into the tape device
tapeMediaIndex = result;
+
// fire osd message
if (!IsLoadState)
Spectrum.OSD_TapeInserted();
@@ -232,10 +233,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
Spectrum.CoreComm.ShowMessage("You are trying to load one of more disk images.\n\n Please select ZX Spectrum +3 emulation immediately and reboot the core");
return;
}
- else
- {
- //Spectrum.CoreComm.ShowMessage("You are attempting to load a disk into the +3 disk drive.\n\nThis DOES NOT currently work properly but IS under active development.");
- }
UPDDiskDevice.FDD_LoadDisk(diskImages[diskMediaIndex]);
}
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.Memory.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.Memory.cs
index 7c39525cdf..475c0cd6bd 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.Memory.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.Memory.cs
@@ -199,6 +199,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
///
/// Monitors ROM access
/// Used to auto start/stop the tape device when appropriate
+ /// * This isnt really used anymore for tape trap detection *
///
///
public virtual void TestForTapeTraps(int addr)
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.Port.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.Port.cs
index d1c0f29271..3f5cb5a477 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.Port.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.Port.cs
@@ -34,22 +34,5 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
///
///
public abstract void WritePort(ushort port, byte value);
-
- ///
- /// Increments the CPU totalCycles counter by the tStates value specified
- ///
- ///
- //public virtual void PortContention(int tStates)
- //{
- // CPU.TotalExecutedCycles += tStates;
- //}
-
- ///
- /// Simulates IO port contention based on the supplied address
- /// This method is for 48k and 128k/+2 machines only and should be overridden for other models
- ///
- ///
- //public abstract void ContendPort(ushort addr);
-
}
}
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.cs
index eca5cf0c54..a03e22ed25 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.cs
@@ -72,11 +72,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
///
public virtual IJoystick[] JoystickCollection { get; set; }
- ///
- /// Signs whether the disk motor is on or off
- ///
- //protected bool DiskMotorState;
-
///
/// +3/2a printer port strobe
///
@@ -153,8 +148,8 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
FrameCompleted = false;
- if (UPDDiskDevice == null || !UPDDiskDevice.FDD_IsDiskLoaded)
- TapeDevice.StartFrame();
+ //if (UPDDiskDevice == null || !UPDDiskDevice.FDD_IsDiskLoaded)
+ //TapeDevice.StartFrame();
if (_renderSound)
{
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ULA.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ULA.cs
index 00a3be3bef..5951326a93 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ULA.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ULA.cs
@@ -785,7 +785,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
///
public int GetContentionValue(int tstate)
{
- //tstate += MemoryContentionOffset;
if (tstate >= FrameCycleLength)
tstate -= FrameCycleLength;
@@ -801,7 +800,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
///
public int GetPortContentionValue(int tstate)
{
- //tstate += PortContentionOffset;
if (tstate >= FrameCycleLength)
tstate -= FrameCycleLength;
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128KPlus3/ZX128Plus3.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128KPlus3/ZX128Plus3.cs
index c27f74a265..f681ec3bd0 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128KPlus3/ZX128Plus3.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128KPlus3/ZX128Plus3.cs
@@ -18,8 +18,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
public ZX128Plus3(ZXSpectrum spectrum, Z80A cpu, ZXSpectrum.BorderType borderType, List files, List joysticks)
{
Spectrum = spectrum;
- CPU = cpu;
-
+ CPU = cpu;
CPUMon = new CPUMonitor(this);
CPUMon.machineType = MachineType.ZXSpectrum128Plus3;
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum48K/ZX48.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum48K/ZX48.cs
index 1f2508dd63..3291f5c20a 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum48K/ZX48.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum48K/ZX48.cs
@@ -22,8 +22,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
CPU = cpu;
CPUMon = new CPUMonitor(this);
-
- //ULADevice = new ULA48(this);
ULADevice = new Screen48(this);
BuzzerDevice = new Beeper(this);
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.IMemoryDomains.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.IMemoryDomains.cs
index 16b439ed71..5a645c8d71 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.IMemoryDomains.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.IMemoryDomains.cs
@@ -92,25 +92,10 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
SyncByteArrayDomain("RAM - BANK 7 (Shadow Screen)", _machine.RAM7);
break;
}
- /*
- SyncByteArrayDomain("ROM0", _machine.ROM0);
- SyncByteArrayDomain("ROM1", _machine.ROM1);
- SyncByteArrayDomain("ROM2", _machine.ROM2);
- SyncByteArrayDomain("ROM3", _machine.ROM3);
- 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];
@@ -120,8 +105,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
{
var m = new MemoryDomainByteArray(name, MemoryDomain.Endian.Little, data, true, 1);
_byteArrayDomains.Add(name, m);
- }
-
+ }
}
}
}
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.ISettable.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.ISettable.cs
index 5d07d4fc07..1e8e491ca6 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.ISettable.cs
@@ -242,6 +242,11 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
Dictionary Data = new Dictionary();
+ ///
+ /// Detailed info to be displayed within the settings UIs
+ ///
+ ///
+ ///
public static ZXMachineMetaData GetMetaObject(MachineType type)
{
ZXMachineMetaData m = new ZXMachineMetaData();
@@ -345,6 +350,11 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
return m;
}
+ ///
+ /// Returns machine metadata as a formatted string (to be displayed in a textbox)
+ ///
+ ///
+ ///
public static string GetMetaString(MachineType type)
{
var m = GetMetaObject(type);
@@ -410,8 +420,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
sb.Append(builder[i]);
sb.Append("\r\n");
}
-
- //sb.Append("\r\n");
}
return sb.ToString();
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.Util.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.Util.cs
index d5a46ca3b3..21fd979f96 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.Util.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.Util.cs
@@ -35,7 +35,10 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
_machine.WriteBus(addr, value);
}
-
+ ///
+ /// Called by MainForm so that the core label can display a more detailed tooltip about the emulated spectrum model
+ ///
+ ///
public string GetMachineType()
{
string m = "";
@@ -59,17 +62,31 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
case MachineType.ZXSpectrum128Plus3:
m = "(Amstrad) ZX Spectrum 128K +3";
break;
+ case MachineType.Pentagon128:
+ m = "(Clone) Pentagon 128K";
+ break;
}
return m;
}
+ ///
+ /// Called by MainForm - dumps a close approximation of the Spectaculator SZX snapshot format
+ /// DEV use only - this is nowhere near accurate
+ ///
+ ///
public byte[] GetSZXSnapshot()
{
return SZX.ExportSZX(_machine);
- //return System.Text.Encoding.Default.GetString(data);
}
+ ///
+ /// Utility method to get MemberName from an object
+ ///
+ ///
+ ///
+ ///
+ ///
public static string GetMemberName(Expression> memberAccess)
{
return ((MemberExpression)memberAccess.Body).Member.Name;