ZXHawk: Some comment and group structure cleanup

This commit is contained in:
Asnivor 2019-01-02 14:02:09 +00:00
parent 3766e2380c
commit 2b7014f8b8
15 changed files with 153 additions and 166 deletions

View File

@ -317,27 +317,33 @@
<Compile Include="Computers\Commodore64\SaveState.cs" />
<Compile Include="Computers\Commodore64\User\UserPortDevice.cs" />
<Compile Include="Computers\SinclairSpectrum\Hardware\Abstraction\IFDDHost.cs" />
<Compile Include="Computers\SinclairSpectrum\Hardware\Input\StandardKeyboard.cs" />
<Compile Include="Computers\SinclairSpectrum\Hardware\SoundOuput\AY38912.cs" />
<Compile Include="Computers\SinclairSpectrum\Hardware\SoundOuput\Beeper.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\CPUMonitor.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\Pentagon128K\Pentagon128.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\Pentagon128K\Pentagon128.Memory.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\Pentagon128K\Pentagon128.Port.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\Pentagon128K\Pentagon128.Screen.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\ULA.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum128KPlus2a\ZX128Plus2a.Screen.cs" />
<Compile Include="Computers\SinclairSpectrum\Hardware\SoundOuput\Beeper.cs" />
<Compile Include="Computers\SinclairSpectrum\Media\Disk\FloppyDisk.cs" />
<Compile Include="Computers\SinclairSpectrum\Hardware\Abstraction\IJoystick.cs" />
<Compile Include="Computers\SinclairSpectrum\Hardware\Abstraction\IPortIODevice.cs" />
<Compile Include="Computers\SinclairSpectrum\Hardware\Abstraction\IPSG.cs" />
<Compile Include="Computers\SinclairSpectrum\Hardware\Disk\CHRN.cs" />
<Compile Include="Computers\SinclairSpectrum\Hardware\Disk\NECUPD765.cs" />
<Compile Include="Computers\SinclairSpectrum\Hardware\Disk\NECUPD765.Definitions.cs" />
<Compile Include="Computers\SinclairSpectrum\Hardware\Disk\NECUPD765.FDC.cs" />
<Compile Include="Computers\SinclairSpectrum\Hardware\Disk\NECUPD765.FDD.cs" />
<Compile Include="Computers\SinclairSpectrum\Hardware\Disk\NECUPD765.IPortIODevice.cs" />
<Compile Include="Computers\SinclairSpectrum\Hardware\Disk\NECUPD765.Timing.cs" />
<Compile Include="Computers\SinclairSpectrum\Hardware\Disk\NECUPS765.Static.cs" />
<Compile Include="Computers\SinclairSpectrum\Hardware\Disk\NECUPD765.Definitions.cs">
<DependentUpon>NECUPD765.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\Hardware\Disk\NECUPD765.FDC.cs">
<DependentUpon>NECUPD765.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\Hardware\Disk\NECUPD765.FDD.cs">
<DependentUpon>NECUPD765.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\Hardware\Disk\NECUPD765.IPortIODevice.cs">
<DependentUpon>NECUPD765.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\Hardware\Disk\NECUPD765.Timing.cs">
<DependentUpon>NECUPD765.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\Hardware\Disk\NECUPS765.Static.cs">
<DependentUpon>NECUPD765.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\Hardware\Input\CursorJoystick.cs" />
<Compile Include="Computers\SinclairSpectrum\Hardware\Input\SinclairJoystick2.cs" />
<Compile Include="Computers\SinclairSpectrum\Hardware\Input\SinclairJoystick1.cs" />
@ -346,10 +352,6 @@
<Compile Include="Computers\SinclairSpectrum\Hardware\Abstraction\IKeyboard.cs" />
<Compile Include="Computers\SinclairSpectrum\Hardware\Input\KempstonJoystick.cs" />
<Compile Include="Computers\SinclairSpectrum\Hardware\Abstraction\IBeeperDevice.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum128KPlus2a\ZX128Plus2a.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum128KPlus2a\ZX128Plus2a.Memory.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum128KPlus2a\ZX128Plus2a.Port.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum16K\ZX16.cs" />
<Compile Include="Computers\SinclairSpectrum\Media\Disk\CPCFormat\CPCExtendedFloppyDisk.cs" />
<Compile Include="Computers\SinclairSpectrum\Media\Disk\CPCFormat\CPCFloppyDisk.cs" />
<Compile Include="Computers\SinclairSpectrum\Media\Disk\DiskType.cs" />
@ -372,30 +374,94 @@
<Compile Include="Computers\SinclairSpectrum\SoundProviderMixer.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\MachineType.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\SpectrumBase.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\SpectrumBase.Input.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\SpectrumBase.Port.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\SpectrumBase.Memory.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum128KPlus2\ZX128Plus2.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum128KPlus3\ZX128Plus3.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum128KPlus3\ZX128Plus3.Memory.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum128KPlus3\ZX128Plus3.Port.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum128K\ZX128.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum128K\ZX128.Memory.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum128K\ZX128.Port.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum48K\ZX48.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum48K\ZX48.Memory.cs" />
<Compile Include="Computers\SinclairSpectrum\Hardware\Rom\RomData.cs" />
<Compile Include="Computers\SinclairSpectrum\ZXSpectrum.Controllers.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\SpectrumBase.Input.cs">
<DependentUpon>SpectrumBase.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\Machine\SpectrumBase.Port.cs">
<DependentUpon>SpectrumBase.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\Machine\SpectrumBase.Memory.cs">
<DependentUpon>SpectrumBase.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\Machine\SpectrumBase.Media.cs">
<DependentUpon>SpectrumBase.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\Machine\ULA.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\CPUMonitor.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum48K\ZX48.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum48K\ZX48.Memory.cs">
<DependentUpon>ZX48.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum48K\ZX48.Port.cs">
<DependentUpon>ZX48.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum48K\ZX48.Screen.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum16K\ZX16.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum128K\ZX128.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum128K\ZX128.Memory.cs">
<DependentUpon>ZX128.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum128K\ZX128.Port.cs">
<DependentUpon>ZX128.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum128K\ZX128.Screen.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum128KPlus2\ZX128Plus2.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum128KPlus2a\ZX128Plus2a.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum128KPlus2a\ZX128Plus2a.Memory.cs">
<DependentUpon>ZX128Plus2a.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum128KPlus2a\ZX128Plus2a.Port.cs">
<DependentUpon>ZX128Plus2a.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum128KPlus2a\ZX128Plus2a.Screen.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum128KPlus3\ZX128Plus3.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum128KPlus3\ZX128Plus3.Memory.cs">
<DependentUpon>ZX128Plus3.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\Machine\ZXSpectrum128KPlus3\ZX128Plus3.Port.cs">
<DependentUpon>ZX128Plus3.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\Machine\Pentagon128K\Pentagon128.cs" />
<Compile Include="Computers\SinclairSpectrum\Machine\Pentagon128K\Pentagon128.Memory.cs">
<DependentUpon>Pentagon128.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\Machine\Pentagon128K\Pentagon128.Port.cs">
<DependentUpon>Pentagon128.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\Machine\Pentagon128K\Pentagon128.Screen.cs" />
<None Include="Computers\SinclairSpectrum\readme.md" />
<Compile Include="Computers\SinclairSpectrum\Hardware\Rom\RomData.cs" />
<Compile Include="Computers\SinclairSpectrum\ZXSpectrum.cs" />
<Compile Include="Computers\SinclairSpectrum\ZXSpectrum.IDebuggable.cs" />
<Compile Include="Computers\SinclairSpectrum\ZXSpectrum.IEmulator.cs" />
<Compile Include="Computers\SinclairSpectrum\ZXSpectrum.IInputPollable.cs" />
<Compile Include="Computers\SinclairSpectrum\ZXSpectrum.ICodeDataLog.cs" />
<Compile Include="Computers\SinclairSpectrum\ZXSpectrum.IMemoryDomains.cs" />
<Compile Include="Computers\SinclairSpectrum\ZXSpectrum.ISettable.cs" />
<Compile Include="Computers\SinclairSpectrum\ZXSpectrum.IStatable.cs" />
<Compile Include="Computers\SinclairSpectrum\ZXSpectrum.Messaging.cs" />
<Compile Include="Computers\SinclairSpectrum\ZXSpectrum.Util.cs" />
<Compile Include="Computers\SinclairSpectrum\ZXSpectrum.IDebuggable.cs">
<DependentUpon>ZXSpectrum.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\ZXSpectrum.IEmulator.cs">
<DependentUpon>ZXSpectrum.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\ZXSpectrum.IInputPollable.cs">
<DependentUpon>ZXSpectrum.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\ZXSpectrum.ICodeDataLog.cs">
<DependentUpon>ZXSpectrum.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\ZXSpectrum.IMemoryDomains.cs">
<DependentUpon>ZXSpectrum.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\ZXSpectrum.ISettable.cs">
<DependentUpon>ZXSpectrum.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\ZXSpectrum.IStatable.cs">
<DependentUpon>ZXSpectrum.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\ZXSpectrum.Messaging.cs">
<DependentUpon>ZXSpectrum.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\ZXSpectrum.Util.cs">
<DependentUpon>ZXSpectrum.cs</DependentUpon>
</Compile>
<Compile Include="Computers\SinclairSpectrum\ZXSpectrum.Controllers.cs">
<DependentUpon>ZXSpectrum.cs</DependentUpon>
</Compile>
<Compile Include="Consoles\Atari\2600\Atari2600.cs" />
<Compile Include="Consoles\Atari\2600\Atari2600.Core.cs">
<DependentUpon>Atari2600.cs</DependentUpon>
@ -1500,13 +1566,7 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="Computers\SinclairSpectrum\Hardware\Input\StandardKeyboard.cs" />
<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" />
<None Include="Consoles\Coleco\docs\colecovision tech1.pdf" />
<None Include="Consoles\Coleco\docs\colecovision tech2.pdf" />

View File

@ -131,13 +131,16 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <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)
/// Primary purpose is to detect tape traps and manage auto play
/// </summary>
public void EndFrame()
{
MonitorFrame();
}
/// <summary>
/// No longer in use
/// </summary>
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
/// <summary>
/// Flash loading implementation
/// (Deterministic Emulation must be FALSE)
/// CURRENTLY NOT ENABLED/WORKING
/// </summary>
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;
}

View File

@ -183,7 +183,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
return (byte)index;
}
#region IPortIODevice
/// <summary>

View File

@ -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)
/// </summary>

View File

@ -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;
}

View File

@ -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]);
}

View File

@ -199,6 +199,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Monitors ROM access
/// Used to auto start/stop the tape device when appropriate
/// * This isnt really used anymore for tape trap detection *
/// </summary>
/// <param name="addr"></param>
public virtual void TestForTapeTraps(int addr)

View File

@ -34,22 +34,5 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <param name="port"></param>
/// <param name="value"></param>
public abstract void WritePort(ushort port, byte value);
/// <summary>
/// Increments the CPU totalCycles counter by the tStates value specified
/// </summary>
/// <param name="tStates"></param>
//public virtual void PortContention(int tStates)
//{
// CPU.TotalExecutedCycles += tStates;
//}
/// <summary>
/// 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
/// </summary>
/// <param name="addr"></param>
//public abstract void ContendPort(ushort addr);
}
}

View File

@ -72,11 +72,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// </summary>
public virtual IJoystick[] JoystickCollection { get; set; }
/// <summary>
/// Signs whether the disk motor is on or off
/// </summary>
//protected bool DiskMotorState;
/// <summary>
/// +3/2a printer port strobe
/// </summary>
@ -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)
{

View File

@ -785,7 +785,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <returns></returns>
public int GetContentionValue(int tstate)
{
//tstate += MemoryContentionOffset;
if (tstate >= FrameCycleLength)
tstate -= FrameCycleLength;
@ -801,7 +800,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <returns></returns>
public int GetPortContentionValue(int tstate)
{
//tstate += PortContentionOffset;
if (tstate >= FrameCycleLength)
tstate -= FrameCycleLength;

View File

@ -18,8 +18,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
public ZX128Plus3(ZXSpectrum spectrum, Z80A cpu, ZXSpectrum.BorderType borderType, List<byte[]> files, List<JoystickType> joysticks)
{
Spectrum = spectrum;
CPU = cpu;
CPU = cpu;
CPUMon = new CPUMonitor(this);
CPUMon.machineType = MachineType.ZXSpectrum128Plus3;

View File

@ -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);

View File

@ -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);
}
}
}
}
}

View File

@ -242,6 +242,11 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
Dictionary<string, string> Data = new Dictionary<string, string>();
/// <summary>
/// Detailed info to be displayed within the settings UIs
/// </summary>
/// <param name="type"></param>
/// <returns></returns>
public static ZXMachineMetaData GetMetaObject(MachineType type)
{
ZXMachineMetaData m = new ZXMachineMetaData();
@ -345,6 +350,11 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
return m;
}
/// <summary>
/// Returns machine metadata as a formatted string (to be displayed in a textbox)
/// </summary>
/// <param name="type"></param>
/// <returns></returns>
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();

View File

@ -35,7 +35,10 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
_machine.WriteBus(addr, value);
}
/// <summary>
/// Called by MainForm so that the core label can display a more detailed tooltip about the emulated spectrum model
/// </summary>
/// <returns></returns>
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;
}
/// <summary>
/// Called by MainForm - dumps a close approximation of the Spectaculator SZX snapshot format
/// DEV use only - this is nowhere near accurate
/// </summary>
/// <returns></returns>
public byte[] GetSZXSnapshot()
{
return SZX.ExportSZX(_machine);
//return System.Text.Encoding.Default.GetString(data);
}
/// <summary>
/// Utility method to get MemberName from an object
/// </summary>
/// <typeparam name="T"></typeparam>
/// <typeparam name="TValue"></typeparam>
/// <param name="memberAccess"></param>
/// <returns></returns>
public static string GetMemberName<T, TValue>(Expression<Func<T, TValue>> memberAccess)
{
return ((MemberExpression)memberAccess.Body).Member.Name;