Remove empty docs

This commit is contained in:
YoshiRulz 2019-06-06 16:41:10 +10:00
parent ceb490828f
commit 2642ef4049
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
165 changed files with 0 additions and 1013 deletions

View File

@ -129,8 +129,6 @@ namespace BizHawk.Client.Common
/// <summary>
/// Test to determine whether the supplied firmware file matches something in the firmware database
/// </summary>
/// <param name="f"></param>
/// <returns></returns>
public bool CanFileBeImported(string f)
{
try

View File

@ -460,8 +460,6 @@ namespace BizHawk.Client.Common
/// <summary>
/// Returns index of the state right above the given frame
/// </summary>
/// <param name="frame"></param>
/// <returns></returns>
public int GetStateIndexByFrame(int frame)
{
return _states.IndexOfKey(GetStateClosestToFrame(frame).Key);
@ -470,8 +468,6 @@ namespace BizHawk.Client.Common
/// <summary>
/// Returns frame of the state at the given index
/// </summary>
/// <param name="index"></param>
/// <returns></returns>
public int GetStateFrameByIndex(int index)
{
// feos: this is called super often by decay

View File

@ -29,8 +29,6 @@ namespace BizHawk.Client.DBMan
/// <summary>
/// Choose output directory
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button2_Click(object sender, EventArgs e)
{
var fbd = new FolderBrowserDialog();
@ -45,8 +43,6 @@ namespace BizHawk.Client.DBMan
/// <summary>
/// Add import files to the list box
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void buttonAddFiles_Click(object sender, EventArgs e)
{
var ofd = new OpenFileDialog();
@ -70,8 +66,6 @@ namespace BizHawk.Client.DBMan
/// <summary>
/// Removes selected input files from the listbox
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void buttonRemove_Click(object sender, EventArgs e)
{
List<string> files = new List<string>();
@ -90,8 +84,6 @@ namespace BizHawk.Client.DBMan
/// <summary>
/// Attempt to process all selected files
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void buttonStartProcessing_Click(object sender, EventArgs e)
{
// initial checks

View File

@ -17,8 +17,6 @@ namespace BizHawk.Client.DBMan
/// <summary>
/// Parses multiple DAT files and returns a single GamesDB format csv string
/// </summary>
/// <param name="filePath"></param>
/// <returns></returns>
public abstract string ParseDAT(string[] filePath);
protected List<string> IncomingData = new List<string>();
@ -170,8 +168,6 @@ namespace BizHawk.Client.DBMan
/// <summary>
/// Used to get the correct system code (that each gamedb csv needs)
/// </summary>
/// <param name="type"></param>
/// <returns></returns>
public static string GetSystemCode(SystemType type)
{
switch (type)

View File

@ -27,8 +27,6 @@ namespace BizHawk.Client.DBMan
/// <summary>
/// Parses multiple DAT files and returns a single GamesDB format csv string
/// </summary>
/// <param name="filePath"></param>
/// <returns></returns>
public override string ParseDAT(string[] filePath)
{
foreach (var s in filePath)
@ -116,7 +114,6 @@ namespace BizHawk.Client.DBMan
/// Detailed info here: https://www.tosecdev.org/tosec-naming-convention
/// Guts of this has been reused from here: https://github.com/Asnivor/MedLaunch/blob/master/MedLaunch/_Debug/DATDB/Platforms/TOSEC/StringConverterToSec.cs
/// </summary>
/// <param name="g"></param>
private void ParseNOINTROFlags(GameDB g)
{
string nameString = g.Name;

View File

@ -27,8 +27,6 @@ namespace BizHawk.Client.DBMan
/// <summary>
/// Parses multiple DAT files and returns a single GamesDB format csv string
/// </summary>
/// <param name="filePath"></param>
/// <returns></returns>
public override string ParseDAT(string[] filePath)
{
foreach (var s in filePath)
@ -121,7 +119,6 @@ namespace BizHawk.Client.DBMan
/// Detailed info here: https://www.tosecdev.org/tosec-naming-convention
/// Guts of this has been reused from here: https://github.com/Asnivor/MedLaunch/blob/master/MedLaunch/_Debug/DATDB/Platforms/TOSEC/StringConverterToSec.cs
/// </summary>
/// <param name="g"></param>
private void ParseTOSECFlags(GameDB g)
{
string nameString = g.Name;

View File

@ -136,7 +136,6 @@ namespace BizHawk.Client.EmuHawk
/// opens an avi file for recording with the supplied enumerator used to name files.
/// set a video codec token first.
/// </summary>
/// <param name="nameProvider"></param>
public void OpenFile(IEnumerator<string> nameProvider)
{
_nameProvider = nameProvider;

View File

@ -160,7 +160,6 @@ namespace BizHawk.Client.EmuHawk
/// <summary>
/// returns a string containing the commandline sent to ffmpeg and recent console (stderr) output
/// </summary>
/// <returns></returns>
private string ffmpeg_geterror()
{
if (_ffmpeg.StartInfo.RedirectStandardError)

View File

@ -43,7 +43,6 @@ namespace BizHawk.Client.EmuHawk
/// <summary>
/// get a list of canned presets
/// </summary>
/// <returns></returns>
public static FormatPreset[] GetPresets()
{
return new[]

View File

@ -105,7 +105,6 @@ namespace BizHawk.Client.EmuHawk
// /// <summary>
// /// name that command line parameters can refer to
// /// </summary>
// /// <returns></returns>
// string ShortName();
}

View File

@ -267,7 +267,6 @@ namespace BizHawk.Client.EmuHawk
/// <summary>
/// write big endian 16 bit unsigned
/// </summary>
/// <param name="v"></param>
void writeBE16(UInt16 v)
{
byte[] b = new byte[2];
@ -279,7 +278,6 @@ namespace BizHawk.Client.EmuHawk
/// <summary>
/// write big endian 32 bit unsigned
/// </summary>
/// <param name="v"></param>
void writeBE32(UInt32 v)
{
byte[] b = new byte[4];
@ -293,7 +291,6 @@ namespace BizHawk.Client.EmuHawk
/// <summary>
/// write big endian 64 bit unsigned
/// </summary>
/// <param name="v"></param>
void writeBE64(UInt64 v)
{
byte[] b = new byte[8];
@ -309,7 +306,6 @@ namespace BizHawk.Client.EmuHawk
/// write variable length value
/// encoding is similar to MIDI
/// </summary>
/// <param name="v"></param>
void writeVar(UInt64 v)
{
byte[] b = new byte[10];
@ -333,7 +329,6 @@ namespace BizHawk.Client.EmuHawk
/// write variable length value
/// encoding is similar to MIDI
/// </summary>
/// <param name="v"></param>
private void writeVar(int v)
{
if (v < 0)
@ -365,7 +360,6 @@ namespace BizHawk.Client.EmuHawk
/// actually write a packet to file
/// timestamp sequence must be nondecreasing
/// </summary>
/// <param name="j"></param>
void writeActual(JMDPacket j)
{
if (j.timestamp < timestampoff)
@ -408,7 +402,6 @@ namespace BizHawk.Client.EmuHawk
/// assemble JMDPacket and send to packetqueue
/// one audio packet is split up into many many JMD packets, since JMD requires only 2 samples (1 left, 1 right) per packet
/// </summary>
/// <param name="samples"></param>
public void AddSamples(short[] samples)
{
if (!stereo)
@ -459,7 +452,6 @@ namespace BizHawk.Client.EmuHawk
/// will be written when order-appropriate wrt video
/// the sound packets added must be internally ordered (but need not match video order)
/// </summary>
/// <param name="j"></param>
void writesound(JMDPacket j)
{
while (vstorage.Count > 0)
@ -479,7 +471,6 @@ namespace BizHawk.Client.EmuHawk
/// will be written when order-appropriate wrt audio
/// the video packets added must be internally ordered (but need not match audio order)
/// </summary>
/// <param name="j"></param>
void writevideo(JMDPacket j)
{
while (astorage.Count > 0)
@ -593,8 +584,6 @@ namespace BizHawk.Client.EmuHawk
/// can be changed in future
/// should always match IVideoProvider
/// </summary>
/// <param name="width"></param>
/// <param name="height"></param>
public void SetVideoParameters(int width, int height)
{
// each frame is dumped independently with its own resolution tag, so we don't care to store this

View File

@ -24,9 +24,6 @@ namespace BizHawk.Client.EmuHawk
private readonly int _capacity;
/// <summary>
///
/// </summary>
/// <param name="capacity">total number of buffers to keep around</param>
public ReusableBufferPool(int capacity)
{
@ -153,8 +150,6 @@ namespace BizHawk.Client.EmuHawk
/// <summary>
/// big endian 64 bit unsigned
/// </summary>
/// <param name="v"></param>
/// <param name="stream"></param>
static void WriteBE64(ulong v, Stream stream)
{
byte[] b = new byte[8];
@ -169,8 +164,6 @@ namespace BizHawk.Client.EmuHawk
/// <summary>
/// big endian 32 bit unsigned
/// </summary>
/// <param name="v"></param>
/// <param name="stream"></param>
static void WriteBE32(uint v, Stream stream)
{
byte[] b = new byte[4];
@ -185,8 +178,6 @@ namespace BizHawk.Client.EmuHawk
/// <summary>
/// big endian 32 bit unsigned
/// </summary>
/// <param name="v"></param>
/// <param name="stream"></param>
static void WriteBE32(int v, Stream stream)
{
byte[] b = new byte[4];
@ -213,7 +204,6 @@ namespace BizHawk.Client.EmuHawk
/// <summary>
/// seems to be different than standard CRC32?????
/// </summary>
/// <param name="buf"></param>
/// <returns>crc32, nut variant</returns>
static uint NutCRC32(byte[] buf)
{
@ -510,8 +500,6 @@ namespace BizHawk.Client.EmuHawk
ReusableBufferPool<byte> _pool;
/// <summary>
/// </summary>
/// <param name="payload">frame data</param>
/// <param name="payloadlen">actual length of frame data</param>
/// <param name="pts">presentation timestamp</param>
@ -562,9 +550,6 @@ namespace BizHawk.Client.EmuHawk
/// <summary>
/// compare two NutFrames by pts
/// </summary>
/// <param name="lhs"></param>
/// <param name="rhs"></param>
/// <returns></returns>
public static bool operator <=(NutFrame lhs, NutFrame rhs)
{
BigInteger left = new BigInteger(lhs.pts);
@ -587,7 +572,6 @@ namespace BizHawk.Client.EmuHawk
/// <summary>
/// write out frame, with syncpoint and all headers
/// </summary>
/// <param name="dest"></param>
public void WriteData(Stream dest)
{
dest.Write(data, 0, actual_length);

View File

@ -149,7 +149,6 @@ namespace BizHawk.Client.EmuHawk
/// <summary>
/// Add a given color value to the octree
/// </summary>
/// <param name="pixel"></param>
public void AddColor(int pixel)
{
// Check if this request is for the same color as the last
@ -267,8 +266,6 @@ namespace BizHawk.Client.EmuHawk
/// <summary>
/// Get the palette index for the passed color
/// </summary>
/// <param name="pixel"></param>
/// <returns></returns>
public int GetPaletteIndex(int pixel)
{
int ret = -1;

View File

@ -104,7 +104,6 @@ namespace BizHawk.Client.EmuHawk
/// <summary>
/// open a new underlying stream
/// </summary>
/// <param name="next"></param>
private void opencurrent(Stream next)
{
file = new BinaryWriter(next, Encoding.ASCII);

View File

@ -125,7 +125,6 @@ namespace BizHawk.Client.EmuHawk.CustomControls
/// </summary>
/// <param name="maxWidth">the max width to render the string in</param>
/// <param name="charFit">the number of characters that will fit under <see cref="maxWidth"/> restriction</param>
/// <param name="charFitWidth"></param>
public Size MeasureString(string str, Font font, float maxWidth, out int charFit, out int charFitWidth)
{
SetFont(font);

View File

@ -530,7 +530,6 @@ namespace BizHawk.Client.EmuHawk
/// <summary>
/// Calls QueryItemBkColor callback for all visible cells and fills in the background of those cells.
/// </summary>
/// <param name="e"></param>
private void DoBackGroundCallback(PaintEventArgs e, List<RollColumn> visibleColumns)
{
int startIndex = FirstVisibleRow;

View File

@ -289,7 +289,6 @@ namespace BizHawk.Client.EmuHawk
/// <summary>
/// Returns all columns including those that are not visible
/// </summary>
/// <returns></returns>
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public RollColumns AllColumns => _columns;

View File

@ -288,7 +288,6 @@ namespace BizHawk.Client.EmuHawk.CustomControls
/// <summary>
/// Paint the System Icon in the top left corner.
/// </summary>
/// <param name="e"></param>
protected override void OnPaint(PaintEventArgs e)
{
if (m_sysIcon != null)

View File

@ -141,9 +141,6 @@ namespace BizHawk.Client.EmuHawk
/// <summary>
/// returns a new surface
/// </summary>
/// <param name="xpad"></param>
/// <param name="ypad"></param>
/// <returns></returns>
public DisplaySurface ToPaddedSurface(int xpad0, int ypad0, int xpad1, int ypad1)
{
int new_width = Width + xpad0 + xpad1;

View File

@ -42,7 +42,6 @@
/// when a Tool sets WantsToControlRewind
/// Returns whether or not the rewind action actually occured
/// </summary>
/// <returns></returns>
bool Rewind();
bool WantsToControlRestartMovie { get; }

View File

@ -66,7 +66,6 @@ namespace BizHawk.Common.BizInvoke
/// <summary>
/// allocate size bytes at any address
/// </summary>
/// <param name="size"></param>
public MemoryBlock(ulong size)
: this(0, size)
{
@ -75,8 +74,6 @@ namespace BizHawk.Common.BizInvoke
/// <summary>
/// allocate size bytes starting at a particular address
/// </summary>
/// <param name="start"></param>
/// <param name="size"></param>
public MemoryBlock(ulong start, ulong size)
{
if (OSTailoredCode.CurrentOS != OSTailoredCode.DistinctOS.Windows)
@ -192,7 +189,6 @@ namespace BizHawk.Common.BizInvoke
/// <summary>
/// take a hash of the current full contents of the block, including unreadable areas
/// </summary>
/// <returns></returns>
public byte[] FullHash()
{
if (!Active)

View File

@ -12,9 +12,6 @@ namespace BizHawk.Common.BizInvoke
/// <summary>
/// copy `len` bytes from `src` to `dest`
/// </summary>
/// <param name="src"></param>
/// <param name="dst"></param>
/// <param name="len"></param>
public static void CopySome(Stream src, Stream dst, long len)
{
var buff = new byte[4096];

View File

@ -19,7 +19,6 @@ namespace BizHawk.Common
/// <summary>
/// return true if an array type is not 0-based
/// </summary>
/// <param name="t"></param>
private static bool IsNonZeroBaedArray(Type t)
{
if (!t.IsArray)

View File

@ -205,7 +205,6 @@ namespace BizHawk.Common.ReflectionExtensions
/// <summary>
/// the address of a field relative to the address an object reference of that type points to. this function is very expensive to call.
/// </summary>
/// <param name="field"></param>
public static IntPtr GetManagedOffset(this FieldInfo field)
{
Type type = field.DeclaringType;

View File

@ -16,9 +16,6 @@ namespace BizHawk.Common
/// <summary>
/// Resolve an entry point and throw an exception if that resolution is NULL
/// </summary>
/// <param name="dll"></param>
/// <param name="entryPoint"></param>
/// <returns></returns>
public static IntPtr SafeResolve(this IImportResolver dll, string entryPoint)
{
var ret = dll.Resolve(entryPoint);

View File

@ -21,7 +21,6 @@ namespace BizHawk.Common
/// <summary>
/// set all properties (not fields!) of obj with a DefaultValueAttribute to that value
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="obj">the obj to act on</param>
public static void SetDefaultValues<T>(T obj)
{

View File

@ -408,7 +408,6 @@ namespace BizHawk.Common
/// <summary>
/// Functionally the same as WaitOne(), but pumps com messa
/// </summary>
/// <param name="handle"></param>
public static void HackyComWaitOne(WaitHandle handle)
{
uint nativeResult; // result of the native wait API (WaitForMultipleObjects or MsgWaitForMultipleObjectsEx)

View File

@ -216,7 +216,6 @@ namespace BizHawk.Emulation.Common
/// Get the latency in input samples introduced by the resampler.
/// </summary>
/// <param name="st">Resampler state</param>
/// <returns></returns>
[DllImport("libspeexdsp.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern int speex_resampler_get_input_latency(IntPtr st);
@ -224,7 +223,6 @@ namespace BizHawk.Emulation.Common
/// Get the latency in output samples introduced by the resampler.
/// </summary>
/// <param name="st">Resampler state</param>
/// <returns></returns>
[DllImport("libspeexdsp.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern int speex_resampler_get_output_latency(IntPtr st);

View File

@ -13,8 +13,6 @@ namespace BizHawk.Emulation.Cores.Computers.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))
@ -51,7 +49,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Called when certain input presses are detected
/// </summary>
/// <param name="input"></param>
public void OSD_FireInputMessage(string input)
{
StringBuilder sb = new StringBuilder();
@ -467,8 +464,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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)

View File

@ -13,8 +13,6 @@ namespace BizHawk.Emulation.Cores.Computers.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)
@ -28,8 +26,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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);

View File

@ -10,20 +10,16 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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

@ -14,7 +14,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Parses a new disk image and loads it into this floppy drive
/// </summary>
/// <param name="diskData"></param>
void FDD_LoadDisk(byte[] diskData);
/// <summary>

View File

@ -24,15 +24,11 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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

@ -36,21 +36,16 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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

@ -11,8 +11,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Initlization routine
/// </summary>
/// <param name="sampleRate"></param>
/// <param name="tStatesPerFrame"></param>
void Init(int sampleRate, int tStatesPerFrame);
void SetFunction(int data);
@ -27,7 +25,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Writes to the PSG
/// </summary>
/// <param name="value"></param>
void PortWrite(int value);
/// <summary>
@ -59,13 +56,11 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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

@ -9,17 +9,11 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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

@ -29,7 +29,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Initializes the datacorder device
/// </summary>
/// <param name="machine"></param>
public void Init(CPCBase machine)
{
_machine = machine;
@ -296,7 +295,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// TRUE: skip forward
/// FALSE: skip backward
/// </summary>
/// <param name="skipForward"></param>
public void SkipBlock(bool skipForward)
{
int blockCount = _dataBlocks.Count;
@ -354,7 +352,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Inserts a new tape and sets up the tape device accordingly
/// </summary>
/// <param name="tapeData"></param>
public void LoadTape(byte[] tapeData)
{
// instantiate converters
@ -416,8 +413,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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
@ -768,7 +763,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Device responds to an IN instruction
/// </summary>
/// <returns></returns>
public bool ReadPort()
{
if (TapeIsPlaying)
@ -800,8 +794,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Device responds to an OUT instruction
/// </summary>
/// <param name="state"></param>
/// <returns></returns>
public void WritePort(bool state)
{
// not implemented
@ -821,7 +813,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Bizhawk state serialization
/// </summary>
/// <param name="ser"></param>
public void SyncState(Serializer ser)
{
ser.BeginSection(nameof(DatacorderDevice));

View File

@ -2471,7 +2471,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Handles CPU writing to the data register
/// </summary>
/// <param name="data"></param>
private void WriteDataRegister(byte data)
{
if (!GetBit(MSR_RQM, StatusMain) || GetBit(MSR_DIO, StatusMain))
@ -2523,9 +2522,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// Returns TRUE if successful. FALSE if otherwise
/// Called only in idle phase
/// </summary>
/// <param name="cmdByte"></param>
/// <param name="direction"></param>
/// <returns></returns>
private bool ParseCommandByte(byte cmdByte)
{
// clear counters
@ -2618,7 +2614,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Parses the first 5 command argument bytes that are of the standard format
/// </summary>
/// <param name="paramIndex"></param>
private void ParseParamByteStandard(int index)
{
byte currByte = CommBuffer[index];

View File

@ -69,7 +69,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Searches for the requested sector
/// </summary>
/// <returns></returns>
private FloppyDisk.Sector GetSector()
{
FloppyDisk.Sector sector = null;
@ -155,7 +154,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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
@ -335,8 +333,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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
@ -378,10 +374,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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;
@ -449,8 +441,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Populates a result buffer
/// </summary>
/// <param name="resBuffer"></param>
/// <param name="chrn"></param>
public void FillResult(ref byte[] resBuffer, CHRN chrn)
{
// clear results
@ -480,7 +470,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Populates the result buffer with ReadID data
/// </summary>
/// <returns></returns>
public void ReadID(ref byte[] resBuffer)
{
if (CheckDriveStatus() == false)
@ -797,7 +786,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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

View File

@ -122,9 +122,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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 });
@ -165,9 +162,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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 });

View File

@ -96,7 +96,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// Returns true if there is no delay
/// Returns false if read is to be deferred
/// </summary>
/// <returns></returns>
private bool CheckTiming()
{
// get delta

View File

@ -30,7 +30,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Main constructor
/// </summary>
/// <param name="machine"></param>
public NECUPD765()
{
InitCommandList();

View File

@ -18,9 +18,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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)
@ -34,8 +31,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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)
@ -51,8 +46,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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)
@ -68,8 +61,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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;
@ -79,8 +70,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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)

View File

@ -1197,9 +1197,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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
@ -1209,9 +1206,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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));
@ -1306,7 +1300,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// Screenmode is defined at each HSYNC (start of a new character line)
/// Therefore we pass the mode in via constructor
/// </summary>
/// <param name="screenMode"></param>
//public CharacterLine(int screenMode)
//{
//ScreenMode = screenMode;
@ -1319,7 +1312,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Adds a new horizontal character to the list
/// </summary>
/// <param name="phase"></param>
public void AddCharacter(Phase phase)
{
Phases.Add(phase);

View File

@ -873,7 +873,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Selects a register
/// </summary>
/// <param name="data"></param>
private void RegisterSelect(int data)
{
SelectedRegister = data & 0x1F;
@ -909,7 +908,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Writes to the currently selected register
/// </summary>
/// <param name="data"></param>
private void WriteRegister(int data)
{
// 16 and 17 are read only registers on all types
@ -953,7 +951,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Reads from the currently selected register
/// </summary>
/// <param name="data"></param>
private bool ReadRegister(ref int data)
{
bool addressed = false;
@ -1029,8 +1026,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Reads from the status register
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
private bool ReadStatus(ref int data)
{
bool addressed = false;
@ -1107,9 +1102,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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);
@ -1143,9 +1135,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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);

View File

@ -48,7 +48,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// The only constructor
/// </summary>
/// <param name="type"></param>
public CRTC6845(CRTCType type)
{
ChipType = type;
@ -363,8 +362,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// CPU (or other device) reads from the 8-bit databus
/// </summary>
/// <param name="port"></param>
/// <param name="result"></param>
public virtual bool ReadPort(ushort port, ref int result)
{
byte portUpper = (byte)(port >> 8);
@ -398,8 +395,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// CPU (or other device) writes to the 8-bit databus
/// </summary>
/// <param name="port"></param>
/// <param name="result"></param>
public virtual bool WritePort(ushort port, int value)
{
byte portUpper = (byte)(port >> 8);
@ -496,7 +491,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Selects a specific register
/// </summary>
/// <param name="value"></param>
private void SelectRegister(int value)
{
var v = (byte)((byte)value & 0x1F);
@ -509,8 +503,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Attempts to read from the currently selected register
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
private bool ReadRegister(ref int data)
{
switch ((int)ChipType)
@ -527,8 +519,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Attempts to write to the currently selected register
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
private void WriteRegister(int data)
{
switch ((int)ChipType)
@ -544,8 +534,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Attempts to read from the internal status register (if present)
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
private bool ReadStatus(ref int data)
{
switch ((int)ChipType)
@ -756,8 +744,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Read Register (HD6845S & UM6845)
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
private bool ReadRegister_Type0(ref int data)
{
// Type 0 - write only register returns 0 when it is read from
@ -805,8 +791,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Read Register (UM6845R)
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
private bool ReadRegister_Type1(ref int data)
{
// Type 1 - write only register returns 0 when it is read from
@ -865,8 +849,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Read Register (MC6845)
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
private bool ReadRegister_Type2(ref int data)
{
switch (AddressRegister)
@ -916,8 +898,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Read Register (AMS40489 & pre-ASIC)
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
private bool ReadRegister_Type3_4(ref int data)
{
// unsure of the register sizes at the moment
@ -984,7 +964,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Write Active Register (HD6845S & UM6845)
/// </summary>
/// <param name="data"></param>
private void WriteRegister_Type0(int data)
{
byte v = (byte)data;
@ -1022,7 +1001,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Write Active Register (HD6845S & UM6845)
/// </summary>
/// <param name="data"></param>
private void WriteRegister_Type1(int data)
{
byte v = (byte)data;
@ -1062,7 +1040,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Write Active Register (MC6845)
/// </summary>
/// <param name="data"></param>
private void WriteRegister_Type2(int data)
{
byte v = (byte)data;
@ -1102,7 +1079,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Write Active Register (MC6845)
/// </summary>
/// <param name="data"></param>
private void WriteRegister_Type3_4(int data)
{
// unsure of the register sizes at the moment
@ -1132,8 +1108,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// Read Status Register (UM6845R)
/// This is fully implemented
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
private bool ReadStatus_Type1(ref int data)
{
// Bit6: Set when latched LPEN strobe input is received / Reset when R17 or R16 is read from
@ -1147,8 +1121,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// Status Register is unavailable but attempts to read will return the currently
/// selected register data instead
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
private bool ReadStatus_Type3_4(ref int data)
{
return ReadRegister(ref data);
@ -1158,8 +1130,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// Read Status Register (HD6845S & UM6845)
/// No status register available
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
private bool ReadStatus_Unavailable(ref int data)
{
return false;

View File

@ -306,8 +306,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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)
@ -332,8 +330,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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;
@ -343,8 +339,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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;
@ -377,9 +371,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// 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;
@ -521,7 +512,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Returns the number of pixels decoded in this scanline (border and display)
/// </summary>
/// <returns></returns>
private int GetPixelCount()
{
int cnt = 0;

View File

@ -102,7 +102,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Reads the currently selected line
/// </summary>
/// <returns></returns>
public byte ReadCurrentLine()
{
var lin = _currentLine; // - 0x40;
@ -118,8 +117,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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);
@ -129,8 +126,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Sets key status
/// </summary>
/// <param name="key"></param>
/// <param name="isPressed"></param>
public void SetKeyStatus(string key, bool isPressed)
{
int index = GetKeyIndexFromMatrix(key);
@ -140,8 +135,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Gets a key's status
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public bool GetKeyStatus(string key)
{
int index = GetKeyIndexFromMatrix(key);

View File

@ -154,7 +154,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Writes to the control register
/// </summary>
/// <param name="data"></param>
private void OUTControl(int data)
{
if (data.Bit(7))
@ -214,7 +213,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Reads from Port A
/// </summary>
/// <returns></returns>
private int INPortA()
{
if (DirPortA == PortDirection.Input)
@ -233,7 +231,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Reads from Port B
/// </summary>
/// <returns></returns>
private int INPortB()
{
if (DirPortB == PortDirection.Input)
@ -279,7 +276,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Reads from Port C
/// </summary>
/// <returns></returns>
private int INPortC()
{
// get the PortC value
@ -349,9 +345,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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);
@ -396,9 +389,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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);

View File

@ -186,7 +186,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Reads the value from the currently selected register
/// </summary>
/// <returns></returns>
public int PortRead()
{
if (ActiveFunction == 1)
@ -215,7 +214,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Writes to the currently selected register
/// </summary>
/// <param name="value"></param>
public void PortWrite(int value)
{
switch (ActiveFunction)
@ -363,7 +361,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Updates the audiobuffer based on the current frame t-state
/// </summary>
/// <param name="frameCycle"></param>
public void UpdateSound(int frameCycle)
{
BufferUpdate(frameCycle);
@ -613,8 +610,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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;
@ -636,7 +631,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Updates the audiobuffer based on the current frame t-state
/// </summary>
/// <param name="cycle"></param>
private void BufferUpdate(int cycle)
{
if (cycle > _tStatesPerFrame)
@ -822,7 +816,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// State serialization
/// </summary>
/// <param name="ser"></param>
public void SyncState(Serializer ser)
{
ser.BeginSection("PSG-AY");

View File

@ -82,8 +82,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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;
@ -95,8 +93,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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;
@ -134,7 +130,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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)

View File

@ -16,8 +16,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// 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;
@ -61,8 +59,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// 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;
@ -96,8 +92,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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);
@ -108,8 +102,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// 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);
@ -119,8 +111,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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)

View File

@ -16,8 +16,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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));
@ -58,8 +56,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// 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));

View File

@ -14,8 +14,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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;

View File

@ -16,8 +16,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// 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;
@ -127,8 +125,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// 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;
@ -211,8 +207,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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);
@ -223,8 +217,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// 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);
@ -234,8 +226,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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)

View File

@ -17,8 +17,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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));
@ -72,8 +70,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// 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));

View File

@ -14,8 +14,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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;

View File

@ -105,7 +105,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Called on first instantiation (and subsequent core reboots)
/// </summary>
/// <param name="files"></param>
protected void InitializeMedia(List<byte[]> files)
{
mediaImages = files;
@ -227,7 +226,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Identifies and sorts the various media types
/// </summary>
/// <returns></returns>
private CPCMediaType IdentifyMedia(byte[] data)
{
// get first 16 bytes as a string

View File

@ -71,15 +71,11 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// 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;
@ -89,38 +85,29 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// 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;

View File

@ -14,15 +14,11 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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>
@ -31,8 +27,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// 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;
@ -67,8 +61,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// 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>();

View File

@ -276,7 +276,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Selects the pen
/// </summary>
/// <param name="data"></param>
public virtual void SetPen(BitArray bi)
{
if (bi[4])
@ -296,7 +295,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Selects colour for the currently selected pen
/// </summary>
/// <param name="data"></param>
public virtual void SetPenColour(BitArray bi)
{
byte[] b = new byte[1];
@ -308,8 +306,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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]];
@ -318,7 +314,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Screen mode and ROM config
/// </summary>
/// <param name="data"></param>
public virtual void SetReg2(BitArray bi)
{
byte[] b = new byte[1];
@ -361,7 +356,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// 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;
@ -397,9 +391,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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
@ -409,9 +400,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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));

View File

@ -18,7 +18,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Attempts to parse incoming disk data
/// </summary>
/// <param name="diskData"></param>
/// <returns>
/// TRUE: disk parsed
/// FALSE: unable to parse disk
@ -149,9 +148,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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
@ -231,7 +227,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// State serlialization
/// </summary>
/// <param name="ser"></param>
public override void SyncState(Serializer ser)
{
ser.BeginSection("Plus3FloppyDisk");

View File

@ -18,7 +18,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Attempts to parse incoming disk data
/// </summary>
/// <param name="diskData"></param>
/// <returns>
/// TRUE: disk parsed
/// FALSE: unable to parse disk
@ -154,9 +153,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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
@ -218,7 +214,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// State serlialization
/// </summary>
/// <param name="ser"></param>
public override void SyncState(Serializer ser)
{
ser.BeginSection("Plus3FloppyDisk");

View File

@ -88,7 +88,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Attempts to parse incoming disk data
/// </summary>
/// <param name="diskData"></param>
/// <returns>
/// TRUE: disk parsed
/// FALSE: unable to parse disk
@ -183,7 +182,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// 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)
@ -222,8 +220,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Detect speedlock weak sector
/// </summary>
/// <param name="weak"></param>
/// <returns></returns>
public bool DetectSpeedlock(ref int[] weak)
{
// SPEEDLOCK NOTES (-asni 2018-05-01)
@ -287,8 +283,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Detect Alkatraz
/// </summary>
/// <param name="weak"></param>
/// <returns></returns>
public bool DetectAlkatraz(ref int[] weak)
{
try
@ -330,8 +324,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Detect Paul Owens
/// </summary>
/// <param name="weak"></param>
/// <returns></returns>
public bool DetectPaulOwens(ref int[] weak)
{
try
@ -368,8 +360,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Detect Hexagon copy protection
/// </summary>
/// <param name="weak"></param>
/// <returns></returns>
public bool DetectHexagon(ref int[] weak)
{
try
@ -417,7 +407,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// 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()
{
@ -515,7 +504,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Returns the track count for the disk
/// </summary>
/// <returns></returns>
public virtual int GetTrackCount()
{
return DiskHeader.NumberOfTracks * DiskHeader.NumberOfSides;
@ -524,8 +512,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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)
@ -578,7 +564,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// State serialization routines
/// </summary>
/// <param name="ser"></param>
public abstract void SyncState(Serializer ser);

View File

@ -39,7 +39,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Serialization method
/// </summary>
/// <param name="data"></param>
public virtual void Read(byte[] data)
{
throw new NotImplementedException(this.GetType().ToString() +
@ -49,7 +48,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// DeSerialization method
/// </summary>
/// <param name="data"></param>
public virtual void Write(byte[] data)
{
throw new NotImplementedException(this.GetType().ToString() +
@ -59,7 +57,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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() +
@ -71,8 +68,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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];
@ -86,9 +81,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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;
@ -97,9 +89,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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);
@ -108,9 +97,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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;
@ -120,8 +106,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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
@ -135,8 +119,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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();

View File

@ -63,8 +63,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// However all timings are based on spectrum timings (3.5Mhz)
/// so need to be adjusted for the CPC (4Mhz)
/// </summary>
/// <param name="db"></param>
/// <returns></returns>
private TapeDataBlock ConvertClock(TapeDataBlock db)
{
TapeDataBlock tb = new TapeDataBlock();
@ -110,7 +108,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Returns TRUE if tzx header is detected
/// </summary>
/// <param name="data"></param>
public override bool CheckType(byte[] data)
{
/*
@ -147,7 +144,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// DeSerialization method
/// </summary>
/// <param name="data"></param>
public override void Read(byte[] data)
{
// clear existing tape blocks
@ -207,8 +203,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Processes a TZX block
/// </summary>
/// <param name="data"></param>
/// <param name="id"></param>
private void ProcessBlock(byte[] data, int id)
{
// process based on detected block ID
@ -1674,9 +1668,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Used to process either a standard or turbo data block
/// </summary>
/// <param name="block"></param>
/// <param name="blockData"></param>
/// <returns></returns>
private TapeDataBlock DecodeDataBlock
(
TapeDataBlock block,
@ -1900,9 +1891,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Used to process either a standard or turbo data block
/// </summary>
/// <param name="block"></param>
/// <param name="blockData"></param>
/// <returns></returns>
private TapeDataBlock DecodeDataBlock
(
TapeDataBlock block,
@ -1957,7 +1945,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// If neccessary a seperate PAUSE block will be created
/// </summary>
/// <param name="original"></param>
private void CreatePauseBlock(TapeDataBlock original)
{
if (original.PauseInMS > 0)

View File

@ -88,8 +88,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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
@ -143,7 +141,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// Returns the data periods as an array
/// (primarily to aid in bizhawk state serialization)
/// </summary>
/// <returns></returns>
public int[] GetDataPeriodsArray()
{
return DataPeriods.ToArray();
@ -153,7 +150,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// 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>();
@ -167,7 +163,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <summary>
/// Bizhawk state serialization
/// </summary>
/// <param name="ser"></param>
public void SyncState(Serializer ser, int blockPosition)
{
ser.BeginSection("DataBlock" + blockPosition);

View File

@ -35,11 +35,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
/// <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();

View File

@ -10,20 +10,16 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <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

@ -14,7 +14,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Parses a new disk image and loads it into this floppy drive
/// </summary>
/// <param name="diskData"></param>
void FDD_LoadDisk(byte[] diskData);
/// <summary>

View File

@ -24,15 +24,11 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <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

@ -43,36 +43,26 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Sets the spectrum key status
/// </summary>
/// <param name="key"></param>
/// <param name="isPressed"></param>
void SetKeyStatus(string key, bool isPressed);
/// <summary>
/// Gets the status of a spectrum key
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
bool GetKeyStatus(string key);
/// <summary>
/// Returns the query byte
/// </summary>
/// <param name="lines"></param>
/// <returns></returns>
byte GetLineStatus(byte lines);
/// <summary>
/// Reads a keyboard byte
/// </summary>
/// <param name="addr"></param>
/// <returns></returns>
byte ReadKeyboardByte(ushort addr);
/// <summary>
/// Looks up a key in the keyboard matrix and returns the relevent byte value
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
byte GetByteFromKeyMatrix(string key);
void SyncState(Serializer ser);

View File

@ -11,8 +11,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Initlization routine
/// </summary>
/// <param name="sampleRate"></param>
/// <param name="tStatesPerFrame"></param>
void Init(int sampleRate, int tStatesPerFrame);
/// <summary>
@ -25,7 +23,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Writes to the PSG
/// </summary>
/// <param name="value"></param>
void PortWrite(int value);
/// <summary>
@ -57,13 +54,11 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <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

@ -9,17 +9,11 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <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

@ -30,7 +30,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Initializes the datacorder device
/// </summary>
/// <param name="machine"></param>
public void Init(SpectrumBase machine)
{
_machine = machine;
@ -263,7 +262,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// TRUE: skip forward
/// FALSE: skip backward
/// </summary>
/// <param name="skipForward"></param>
public void SkipBlock(bool skipForward)
{
int blockCount = _dataBlocks.Count;
@ -318,7 +316,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Inserts a new tape and sets up the tape device accordingly
/// </summary>
/// <param name="tapeData"></param>
public void LoadTape(byte[] tapeData)
{
// instantiate converters
@ -463,8 +460,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <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
@ -929,9 +924,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <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)
{
if (TapeIsPlaying)
@ -961,9 +953,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <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)
{
if (!TapeIsPlaying)
@ -981,7 +970,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Bizhawk state serialization
/// </summary>
/// <param name="ser"></param>
public void SyncState(Serializer ser)
{
ser.BeginSection(nameof(DatacorderDevice));

View File

@ -2413,7 +2413,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Handles CPU reading from the data register
/// </summary>
/// <returns></returns>
private byte ReadDataRegister()
{
// default return value
@ -2478,7 +2477,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Handles CPU writing to the data register
/// </summary>
/// <param name="data"></param>
private void WriteDataRegister(byte data)
{
if (!GetBit(MSR_RQM, StatusMain) || GetBit(MSR_DIO, StatusMain))
@ -2530,9 +2528,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// Returns TRUE if successful. FALSE if otherwise
/// Called only in idle phase
/// </summary>
/// <param name="cmdByte"></param>
/// <param name="direction"></param>
/// <returns></returns>
private bool ParseCommandByte(byte cmdByte)
{
// clear counters
@ -2625,7 +2620,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Parses the first 5 command argument bytes that are of the standard format
/// </summary>
/// <param name="paramIndex"></param>
private void ParseParamByteStandard(int index)
{
byte currByte = CommBuffer[index];

View File

@ -69,7 +69,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Searches for the requested sector
/// </summary>
/// <returns></returns>
private FloppyDisk.Sector GetSector()
{
FloppyDisk.Sector sector = null;
@ -155,7 +154,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <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
@ -335,8 +333,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <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
@ -378,10 +374,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <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;
@ -449,8 +441,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Populates a result buffer
/// </summary>
/// <param name="resBuffer"></param>
/// <param name="chrn"></param>
public void FillResult(ref byte[] resBuffer, CHRN chrn)
{
// clear results
@ -480,7 +470,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Populates the result buffer with ReadID data
/// </summary>
/// <returns></returns>
public void ReadID(ref byte[] resBuffer)
{
if (CheckDriveStatus() == false)
@ -797,7 +786,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <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

View File

@ -74,9 +74,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <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 });
@ -117,9 +114,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <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 });

View File

@ -96,7 +96,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// Returns true if there is no delay
/// Returns false if read is to be deferred
/// </summary>
/// <returns></returns>
private bool CheckTiming()
{
// get delta

View File

@ -30,7 +30,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Main constructor
/// </summary>
/// <param name="machine"></param>
public NECUPD765()
{
InitCommandList();

View File

@ -18,9 +18,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <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)
@ -34,8 +31,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <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)
@ -51,8 +46,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <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)
@ -68,8 +61,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <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;
@ -79,8 +70,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <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)

View File

@ -57,8 +57,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Sets the joystick line based on key pressed
/// </summary>
/// <param name="key"></param>
/// <param name="isPressed"></param>
public void SetJoyInput(string key, bool isPressed)
{
var pos = GetBitPos(key);
@ -84,8 +82,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Gets the state of a particular joystick binding
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public bool GetJoyInput(string key)
{
var pos = GetBitPos(key);
@ -101,8 +97,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Gets the bit position of a particular joystick binding from the matrix
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public int GetBitPos(string key)
{
int index = Array.IndexOf(ButtonCollection, key);

View File

@ -44,8 +44,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Sets the joystick line based on key pressed
/// </summary>
/// <param name="key"></param>
/// <param name="isPressed"></param>
public void SetJoyInput(string key, bool isPressed)
{
var pos = GetBitPos(key);
@ -58,8 +56,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Gets the state of a particular joystick binding
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public bool GetJoyInput(string key)
{
var pos = GetBitPos(key);
@ -81,8 +77,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Gets the bit position of a particular joystick binding from the matrix
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public int GetBitPos(string key)
{
int index = Array.IndexOf(ButtonCollection, key);

View File

@ -43,8 +43,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Sets the joystick line based on key pressed
/// </summary>
/// <param name="key"></param>
/// <param name="isPressed"></param>
public void SetJoyInput(string key, bool isPressed)
{
var pos = GetBitPos(key);
@ -57,8 +55,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Gets the state of a particular joystick binding
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public bool GetJoyInput(string key)
{
var pos = GetBitPos(key);
@ -80,8 +76,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Gets the bit position of a particular joystick binding from the matrix
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public int GetBitPos(string key)
{
int index = Array.IndexOf(ButtonCollection, key);

View File

@ -57,8 +57,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Sets the joystick line based on key pressed
/// </summary>
/// <param name="key"></param>
/// <param name="isPressed"></param>
public void SetJoyInput(string key, bool isPressed)
{
var pos = GetBitPos(key);
@ -84,8 +82,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Gets the state of a particular joystick binding
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public bool GetJoyInput(string key)
{
var pos = GetBitPos(key);
@ -100,8 +96,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Gets the bit position of a particular joystick binding from the matrix
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public int GetBitPos(string key)
{
int index = Array.IndexOf(ButtonCollection, key);

View File

@ -57,8 +57,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Sets the joystick line based on key pressed
/// </summary>
/// <param name="key"></param>
/// <param name="isPressed"></param>
public void SetJoyInput(string key, bool isPressed)
{
var pos = GetBitPos(key);
@ -84,8 +82,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Gets the state of a particular joystick binding
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public bool GetJoyInput(string key)
{
var pos = GetBitPos(key);
@ -100,8 +96,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Gets the bit position of a particular joystick binding from the matrix
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public int GetBitPos(string key)
{
int index = Array.IndexOf(ButtonCollection, key);

View File

@ -188,9 +188,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <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)
{
/*
@ -264,9 +261,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <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)
{
// not implemented

View File

@ -170,7 +170,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Used for snapshot generation
/// </summary>
/// <returns></returns>
public int[] ExportRegisters()
{
return _registers;
@ -223,7 +222,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Reads the value from the currently selected register
/// </summary>
/// <returns></returns>
public int PortRead()
{
return _registers[_activeRegister];
@ -232,7 +230,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Writes to the currently selected register
/// </summary>
/// <param name="value"></param>
public void PortWrite(int value)
{
if (_activeRegister >= 0x10)
@ -347,7 +344,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Updates the audiobuffer based on the current frame t-state
/// </summary>
/// <param name="frameCycle"></param>
public void UpdateSound(int frameCycle)
{
BufferUpdate(frameCycle);
@ -595,8 +591,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <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;
@ -620,7 +614,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Updates the audiobuffer based on the current frame t-state
/// </summary>
/// <param name="cycle"></param>
private void BufferUpdate(int cycle)
{
if (cycle > _tStatesPerFrame)
@ -763,7 +756,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// State serialization
/// </summary>
/// <param name="ser"></param>
public void SyncState(Serializer ser)
{
ser.BeginSection("PSG-AY");

View File

@ -103,7 +103,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Looks up the current BUSRQ address that is about to be signalled on the upcoming cycle
/// </summary>
/// <returns></returns>
private ushort AscertainBUSRQAddress()
{
ushort addr = 0;
@ -172,7 +171,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// Running every cycle, this determines whether the upcoming BUSRQ is for an IO operation
/// Also processes any contention
/// </summary>
/// <returns></returns>
private bool CheckIO()
{
bool isIO = false;
@ -245,8 +243,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// Returns TRUE if the supplied T-cycle within an IO operation has the possibility of being contended
/// This can be different based on the emulated ZX Spectrum model
/// </summary>
/// <param name="T"></param>
/// <returns></returns>
private bool IsIOCycleContended(int T)
{
bool lowBitSet = (lastPortAddr & 0x0001) != 0;
@ -384,7 +380,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Called when the first byte of an instruction is fetched
/// </summary>
/// <param name="firstByte"></param>
public void OnExecFetch(ushort firstByte)
{
// fetch instruction without incrementing pc

View File

@ -41,8 +41,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// Simulates reading from the bus (no contention)
/// Paging should be handled here
/// </summary>
/// <param name="addr"></param>
/// <returns></returns>
public override byte ReadBus(ushort addr)
{
int divisor = addr / 0x4000;
@ -111,8 +109,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// Simulates writing to the bus (no contention)
/// Paging should be handled here
/// </summary>
/// <param name="addr"></param>
/// <param name="value"></param>
public override void WriteBus(ushort addr, byte value)
{
int divisor = addr / 0x4000;
@ -181,8 +177,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// Reads a byte of data from a specified memory address
/// (with memory contention if appropriate)
/// </summary>
/// <param name="addr"></param>
/// <returns></returns>
public override byte ReadMemory(ushort addr)
{
var data = ReadBus(addr);
@ -192,8 +186,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Returns the ROM/RAM enum that relates to this particular memory read operation
/// </summary>
/// <param name="addr"></param>
/// <returns></returns>
public override ZXSpectrum.CDLResult ReadCDL(ushort addr)
{
var result = new ZXSpectrum.CDLResult();
@ -262,8 +254,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// 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);
@ -272,7 +262,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Checks whether supplied address is in a potentially contended bank
/// </summary>
/// <param name="addr"></param>
public override bool IsContended(ushort addr)
{
var a = addr & 0xc000;
@ -302,7 +291,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Returns TRUE if there is a contended bank paged in
/// </summary>
/// <returns></returns>
public override bool ContendedBankPaged()
{
switch (RAMPaged)
@ -322,8 +310,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// (No memory contention)
/// Will read RAM5 (screen0) by default, unless RAM7 (screen1) is selected as output
/// </summary>
/// <param name="addr"></param>
/// <returns></returns>
public override byte FetchScreenMemory(ushort addr)
{
byte value = new byte();
@ -347,8 +333,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Sets up the ROM
/// </summary>
/// <param name="buffer"></param>
/// <param name="startAddress"></param>
public override void InitROM(RomData romData)
{
RomData = romData;

View File

@ -11,8 +11,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Reads a byte of data from a specified port address
/// </summary>
/// <param name="port"></param>
/// <returns></returns>
public override byte ReadPort(ushort port)
{
bool deviceAddressed = true;
@ -79,8 +77,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Writes a byte of data to a specified port address
/// </summary>
/// <param name="port"></param>
/// <param name="value"></param>
public override void WritePort(ushort port, byte value)
{
// get a BitArray of the port

View File

@ -14,8 +14,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Main constructor
/// </summary>
/// <param name="spectrum"></param>
/// <param name="cpu"></param>
public Pentagon128(ZXSpectrum spectrum, Z80A cpu, ZXSpectrum.BorderType borderType, List<byte[]> files, List<JoystickType> joysticks)
{
Spectrum = spectrum;

View File

@ -279,7 +279,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Instantiates the joysticks array
/// </summary>
/// <param name="joys"></param>
protected void InitJoysticks(List<JoystickType> joys)
{
List<IJoystick> jCollection = new List<IJoystick>();
@ -300,9 +299,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Instantiates a new IJoystick object
/// </summary>
/// <param name="type"></param>
/// <param name="playerNumber"></param>
/// <returns></returns>
public IJoystick InstantiateJoystick(JoystickType type, int playerNumber)
{
switch (type)
@ -325,8 +321,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Returns a IJoystick object depending on the type (or null if not found)
/// </summary>
/// <param name="type"></param>
/// <returns></returns>
protected IJoystick LocateUniqueJoystick(JoystickType type)
{
return JoystickCollection.Where(a => a.JoyType == type).FirstOrDefault();

View File

@ -115,7 +115,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Called on first instantiation (and subsequent core reboots)
/// </summary>
/// <param name="files"></param>
protected void InitializeMedia(List<byte[]> files)
{
mediaImages = files;
@ -240,7 +239,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Identifies and sorts the various media types
/// </summary>
/// <returns></returns>
private SpectrumMediaType IdentifyMedia(byte[] data)
{
// get first 16 bytes as a string

View File

@ -96,15 +96,11 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// 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;
@ -114,8 +110,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// Simulates writing to the bus
/// Paging should be handled here
/// </summary>
/// <param name="addr"></param>
/// <param name="value"></param>
public virtual void WriteBus(ushort addr, byte value)
{
throw new NotImplementedException("Must be overriden");
@ -125,37 +119,28 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// 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>
/// Returns the ROM/RAM enum that relates to this particular memory read operation
/// </summary>
/// <param name="addr"></param>
/// <returns></returns>
public abstract ZXSpectrum.CDLResult ReadCDL(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)
{
var value = ReadBus((ushort)((addr & 0x3FFF) + 0x4000));
@ -166,14 +151,12 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Checks whether supplied address is in a potentially contended bank
/// </summary>
/// <param name="addr"></param>
public abstract bool IsContended(ushort addr);
/// <summary>
/// Returns TRUE if there is a contended bank paged in
/// </summary>
/// <returns></returns>
public abstract bool ContendedBankPaged();
#endregion
@ -183,7 +166,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Detects whether this is a 48k machine (or a 128k in 48k mode)
/// </summary>
/// <returns></returns>
public virtual bool IsIn48kMode()
{
if (this.GetType() == typeof(ZX48) ||
@ -201,7 +183,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// 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)
{
if (TapeDevice.TapeIsPlaying)

View File

@ -24,15 +24,11 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <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);
}
}

View File

@ -137,7 +137,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// Cycles the ULA clock
/// Handles interrupt generation
/// </summary>
/// <param name="currentCycle"></param>
public virtual void CycleClock(long totalCycles)
{
// render the screen
@ -306,7 +305,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Constructor
/// </summary>
/// <param name="contPattern"></param>
public RenderTable(ULA ula, MachineType machineType)
{
_ula = ula;
@ -318,7 +316,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Initializes the renderer
/// </summary>
/// <param name="machineType"></param>
private void InitRenderer(MachineType machineType)
{
for (var t = 0; t < _ula.FrameCycleLength; t++)
@ -549,7 +546,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Renders to the screen buffer based on the current cycle
/// </summary>
/// <param name="toCycle"></param>
public void RenderScreen(int toCycle)
{
// check boundaries
@ -690,8 +686,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Returns floating bus value (if available)
/// </summary>
/// <param name="tstate"></param>
/// <returns></returns>
public void ReadFloatingBus(int tstate, ref int result, ushort port)
{
tstate += FloatingBusOffset;
@ -773,7 +767,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Returns the contention value for the current t-state
/// </summary>
/// <returns></returns>
public int GetContentionValue()
{
return GetContentionValue((int)_machine.CurrentFrameCycle);
@ -782,7 +775,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Returns the contention value for the supplied t-state
/// </summary>
/// <returns></returns>
public int GetContentionValue(int tstate)
{
if (tstate >= FrameCycleLength)
@ -797,7 +789,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Returns the contention value for the supplied t-state
/// </summary>
/// <returns></returns>
public int GetPortContentionValue(int tstate)
{
if (tstate >= FrameCycleLength)

View File

@ -41,8 +41,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// Simulates reading from the bus (no contention)
/// Paging should be handled here
/// </summary>
/// <param name="addr"></param>
/// <returns></returns>
public override byte ReadBus(ushort addr)
{
int divisor = addr / 0x4000;
@ -111,8 +109,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// Simulates writing to the bus (no contention)
/// Paging should be handled here
/// </summary>
/// <param name="addr"></param>
/// <param name="value"></param>
public override void WriteBus(ushort addr, byte value)
{
int divisor = addr / 0x4000;
@ -181,8 +177,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// Reads a byte of data from a specified memory address
/// (with memory contention if appropriate)
/// </summary>
/// <param name="addr"></param>
/// <returns></returns>
public override byte ReadMemory(ushort addr)
{
var data = ReadBus(addr);
@ -192,8 +186,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Returns the ROM/RAM enum that relates to this particular memory read operation
/// </summary>
/// <param name="addr"></param>
/// <returns></returns>
public override ZXSpectrum.CDLResult ReadCDL(ushort addr)
{
var result = new ZXSpectrum.CDLResult();
@ -262,8 +254,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// 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);
@ -272,7 +262,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Checks whether supplied address is in a potentially contended bank
/// </summary>
/// <param name="addr"></param>
public override bool IsContended(ushort addr)
{
var a = addr & 0xc000;
@ -302,7 +291,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Returns TRUE if there is a contended bank paged in
/// </summary>
/// <returns></returns>
public override bool ContendedBankPaged()
{
switch (RAMPaged)
@ -322,8 +310,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// (No memory contention)
/// Will read RAM5 (screen0) by default, unless RAM7 (screen1) is selected as output
/// </summary>
/// <param name="addr"></param>
/// <returns></returns>
public override byte FetchScreenMemory(ushort addr)
{
byte value = new byte();
@ -347,8 +333,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Sets up the ROM
/// </summary>
/// <param name="buffer"></param>
/// <param name="startAddress"></param>
public override void InitROM(RomData romData)
{
RomData = romData;

View File

@ -11,8 +11,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Reads a byte of data from a specified port address
/// </summary>
/// <param name="port"></param>
/// <returns></returns>
public override byte ReadPort(ushort port)
{
bool deviceAddressed = true;
@ -79,8 +77,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Writes a byte of data to a specified port address
/// </summary>
/// <param name="port"></param>
/// <param name="value"></param>
public override void WritePort(ushort port, byte value)
{
// get a BitArray of the port

View File

@ -14,8 +14,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
/// <summary>
/// Main constructor
/// </summary>
/// <param name="spectrum"></param>
/// <param name="cpu"></param>
public ZX128(ZXSpectrum spectrum, Z80A cpu, ZXSpectrum.BorderType borderType, List<byte[]> files, List<JoystickType> joysticks)
{
Spectrum = spectrum;

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