Remove empty docs
This commit is contained in:
parent
ceb490828f
commit
2642ef4049
|
@ -129,8 +129,6 @@ namespace BizHawk.Client.Common
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Test to determine whether the supplied firmware file matches something in the firmware database
|
/// Test to determine whether the supplied firmware file matches something in the firmware database
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="f"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool CanFileBeImported(string f)
|
public bool CanFileBeImported(string f)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
|
@ -460,8 +460,6 @@ namespace BizHawk.Client.Common
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns index of the state right above the given frame
|
/// Returns index of the state right above the given frame
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="frame"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public int GetStateIndexByFrame(int frame)
|
public int GetStateIndexByFrame(int frame)
|
||||||
{
|
{
|
||||||
return _states.IndexOfKey(GetStateClosestToFrame(frame).Key);
|
return _states.IndexOfKey(GetStateClosestToFrame(frame).Key);
|
||||||
|
@ -470,8 +468,6 @@ namespace BizHawk.Client.Common
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns frame of the state at the given index
|
/// Returns frame of the state at the given index
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="index"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public int GetStateFrameByIndex(int index)
|
public int GetStateFrameByIndex(int index)
|
||||||
{
|
{
|
||||||
// feos: this is called super often by decay
|
// feos: this is called super often by decay
|
||||||
|
|
|
@ -29,8 +29,6 @@ namespace BizHawk.Client.DBMan
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Choose output directory
|
/// Choose output directory
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
private void button2_Click(object sender, EventArgs e)
|
private void button2_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var fbd = new FolderBrowserDialog();
|
var fbd = new FolderBrowserDialog();
|
||||||
|
@ -45,8 +43,6 @@ namespace BizHawk.Client.DBMan
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add import files to the list box
|
/// Add import files to the list box
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
private void buttonAddFiles_Click(object sender, EventArgs e)
|
private void buttonAddFiles_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var ofd = new OpenFileDialog();
|
var ofd = new OpenFileDialog();
|
||||||
|
@ -70,8 +66,6 @@ namespace BizHawk.Client.DBMan
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Removes selected input files from the listbox
|
/// Removes selected input files from the listbox
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
private void buttonRemove_Click(object sender, EventArgs e)
|
private void buttonRemove_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
List<string> files = new List<string>();
|
List<string> files = new List<string>();
|
||||||
|
@ -90,8 +84,6 @@ namespace BizHawk.Client.DBMan
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Attempt to process all selected files
|
/// Attempt to process all selected files
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
private void buttonStartProcessing_Click(object sender, EventArgs e)
|
private void buttonStartProcessing_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
// initial checks
|
// initial checks
|
||||||
|
|
|
@ -17,8 +17,6 @@ namespace BizHawk.Client.DBMan
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Parses multiple DAT files and returns a single GamesDB format csv string
|
/// Parses multiple DAT files and returns a single GamesDB format csv string
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="filePath"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public abstract string ParseDAT(string[] filePath);
|
public abstract string ParseDAT(string[] filePath);
|
||||||
|
|
||||||
protected List<string> IncomingData = new List<string>();
|
protected List<string> IncomingData = new List<string>();
|
||||||
|
@ -170,8 +168,6 @@ namespace BizHawk.Client.DBMan
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to get the correct system code (that each gamedb csv needs)
|
/// Used to get the correct system code (that each gamedb csv needs)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="type"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static string GetSystemCode(SystemType type)
|
public static string GetSystemCode(SystemType type)
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
|
|
|
@ -27,8 +27,6 @@ namespace BizHawk.Client.DBMan
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Parses multiple DAT files and returns a single GamesDB format csv string
|
/// Parses multiple DAT files and returns a single GamesDB format csv string
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="filePath"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public override string ParseDAT(string[] filePath)
|
public override string ParseDAT(string[] filePath)
|
||||||
{
|
{
|
||||||
foreach (var s in filePath)
|
foreach (var s in filePath)
|
||||||
|
@ -116,7 +114,6 @@ namespace BizHawk.Client.DBMan
|
||||||
/// Detailed info here: https://www.tosecdev.org/tosec-naming-convention
|
/// 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
|
/// Guts of this has been reused from here: https://github.com/Asnivor/MedLaunch/blob/master/MedLaunch/_Debug/DATDB/Platforms/TOSEC/StringConverterToSec.cs
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="g"></param>
|
|
||||||
private void ParseNOINTROFlags(GameDB g)
|
private void ParseNOINTROFlags(GameDB g)
|
||||||
{
|
{
|
||||||
string nameString = g.Name;
|
string nameString = g.Name;
|
||||||
|
|
|
@ -27,8 +27,6 @@ namespace BizHawk.Client.DBMan
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Parses multiple DAT files and returns a single GamesDB format csv string
|
/// Parses multiple DAT files and returns a single GamesDB format csv string
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="filePath"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public override string ParseDAT(string[] filePath)
|
public override string ParseDAT(string[] filePath)
|
||||||
{
|
{
|
||||||
foreach (var s in filePath)
|
foreach (var s in filePath)
|
||||||
|
@ -121,7 +119,6 @@ namespace BizHawk.Client.DBMan
|
||||||
/// Detailed info here: https://www.tosecdev.org/tosec-naming-convention
|
/// 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
|
/// Guts of this has been reused from here: https://github.com/Asnivor/MedLaunch/blob/master/MedLaunch/_Debug/DATDB/Platforms/TOSEC/StringConverterToSec.cs
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="g"></param>
|
|
||||||
private void ParseTOSECFlags(GameDB g)
|
private void ParseTOSECFlags(GameDB g)
|
||||||
{
|
{
|
||||||
string nameString = g.Name;
|
string nameString = g.Name;
|
||||||
|
|
|
@ -136,7 +136,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// opens an avi file for recording with the supplied enumerator used to name files.
|
/// opens an avi file for recording with the supplied enumerator used to name files.
|
||||||
/// set a video codec token first.
|
/// set a video codec token first.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="nameProvider"></param>
|
|
||||||
public void OpenFile(IEnumerator<string> nameProvider)
|
public void OpenFile(IEnumerator<string> nameProvider)
|
||||||
{
|
{
|
||||||
_nameProvider = nameProvider;
|
_nameProvider = nameProvider;
|
||||||
|
|
|
@ -160,7 +160,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// returns a string containing the commandline sent to ffmpeg and recent console (stderr) output
|
/// returns a string containing the commandline sent to ffmpeg and recent console (stderr) output
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
private string ffmpeg_geterror()
|
private string ffmpeg_geterror()
|
||||||
{
|
{
|
||||||
if (_ffmpeg.StartInfo.RedirectStandardError)
|
if (_ffmpeg.StartInfo.RedirectStandardError)
|
||||||
|
|
|
@ -43,7 +43,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// get a list of canned presets
|
/// get a list of canned presets
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
public static FormatPreset[] GetPresets()
|
public static FormatPreset[] GetPresets()
|
||||||
{
|
{
|
||||||
return new[]
|
return new[]
|
||||||
|
|
|
@ -105,7 +105,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
// /// <summary>
|
// /// <summary>
|
||||||
// /// name that command line parameters can refer to
|
// /// name that command line parameters can refer to
|
||||||
// /// </summary>
|
// /// </summary>
|
||||||
// /// <returns></returns>
|
|
||||||
// string ShortName();
|
// string ShortName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -267,7 +267,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// write big endian 16 bit unsigned
|
/// write big endian 16 bit unsigned
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="v"></param>
|
|
||||||
void writeBE16(UInt16 v)
|
void writeBE16(UInt16 v)
|
||||||
{
|
{
|
||||||
byte[] b = new byte[2];
|
byte[] b = new byte[2];
|
||||||
|
@ -279,7 +278,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// write big endian 32 bit unsigned
|
/// write big endian 32 bit unsigned
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="v"></param>
|
|
||||||
void writeBE32(UInt32 v)
|
void writeBE32(UInt32 v)
|
||||||
{
|
{
|
||||||
byte[] b = new byte[4];
|
byte[] b = new byte[4];
|
||||||
|
@ -293,7 +291,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// write big endian 64 bit unsigned
|
/// write big endian 64 bit unsigned
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="v"></param>
|
|
||||||
void writeBE64(UInt64 v)
|
void writeBE64(UInt64 v)
|
||||||
{
|
{
|
||||||
byte[] b = new byte[8];
|
byte[] b = new byte[8];
|
||||||
|
@ -309,7 +306,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// write variable length value
|
/// write variable length value
|
||||||
/// encoding is similar to MIDI
|
/// encoding is similar to MIDI
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="v"></param>
|
|
||||||
void writeVar(UInt64 v)
|
void writeVar(UInt64 v)
|
||||||
{
|
{
|
||||||
byte[] b = new byte[10];
|
byte[] b = new byte[10];
|
||||||
|
@ -333,7 +329,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// write variable length value
|
/// write variable length value
|
||||||
/// encoding is similar to MIDI
|
/// encoding is similar to MIDI
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="v"></param>
|
|
||||||
private void writeVar(int v)
|
private void writeVar(int v)
|
||||||
{
|
{
|
||||||
if (v < 0)
|
if (v < 0)
|
||||||
|
@ -365,7 +360,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// actually write a packet to file
|
/// actually write a packet to file
|
||||||
/// timestamp sequence must be nondecreasing
|
/// timestamp sequence must be nondecreasing
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="j"></param>
|
|
||||||
void writeActual(JMDPacket j)
|
void writeActual(JMDPacket j)
|
||||||
{
|
{
|
||||||
if (j.timestamp < timestampoff)
|
if (j.timestamp < timestampoff)
|
||||||
|
@ -408,7 +402,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// assemble JMDPacket and send to packetqueue
|
/// 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
|
/// one audio packet is split up into many many JMD packets, since JMD requires only 2 samples (1 left, 1 right) per packet
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="samples"></param>
|
|
||||||
public void AddSamples(short[] samples)
|
public void AddSamples(short[] samples)
|
||||||
{
|
{
|
||||||
if (!stereo)
|
if (!stereo)
|
||||||
|
@ -459,7 +452,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// will be written when order-appropriate wrt video
|
/// will be written when order-appropriate wrt video
|
||||||
/// the sound packets added must be internally ordered (but need not match video order)
|
/// the sound packets added must be internally ordered (but need not match video order)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="j"></param>
|
|
||||||
void writesound(JMDPacket j)
|
void writesound(JMDPacket j)
|
||||||
{
|
{
|
||||||
while (vstorage.Count > 0)
|
while (vstorage.Count > 0)
|
||||||
|
@ -479,7 +471,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// will be written when order-appropriate wrt audio
|
/// will be written when order-appropriate wrt audio
|
||||||
/// the video packets added must be internally ordered (but need not match audio order)
|
/// the video packets added must be internally ordered (but need not match audio order)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="j"></param>
|
|
||||||
void writevideo(JMDPacket j)
|
void writevideo(JMDPacket j)
|
||||||
{
|
{
|
||||||
while (astorage.Count > 0)
|
while (astorage.Count > 0)
|
||||||
|
@ -593,8 +584,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// can be changed in future
|
/// can be changed in future
|
||||||
/// should always match IVideoProvider
|
/// should always match IVideoProvider
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="width"></param>
|
|
||||||
/// <param name="height"></param>
|
|
||||||
public void SetVideoParameters(int width, int height)
|
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
|
// each frame is dumped independently with its own resolution tag, so we don't care to store this
|
||||||
|
|
|
@ -24,9 +24,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
private readonly int _capacity;
|
private readonly int _capacity;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="capacity">total number of buffers to keep around</param>
|
/// <param name="capacity">total number of buffers to keep around</param>
|
||||||
public ReusableBufferPool(int capacity)
|
public ReusableBufferPool(int capacity)
|
||||||
{
|
{
|
||||||
|
@ -153,8 +150,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// big endian 64 bit unsigned
|
/// big endian 64 bit unsigned
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="v"></param>
|
|
||||||
/// <param name="stream"></param>
|
|
||||||
static void WriteBE64(ulong v, Stream stream)
|
static void WriteBE64(ulong v, Stream stream)
|
||||||
{
|
{
|
||||||
byte[] b = new byte[8];
|
byte[] b = new byte[8];
|
||||||
|
@ -169,8 +164,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// big endian 32 bit unsigned
|
/// big endian 32 bit unsigned
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="v"></param>
|
|
||||||
/// <param name="stream"></param>
|
|
||||||
static void WriteBE32(uint v, Stream stream)
|
static void WriteBE32(uint v, Stream stream)
|
||||||
{
|
{
|
||||||
byte[] b = new byte[4];
|
byte[] b = new byte[4];
|
||||||
|
@ -185,8 +178,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// big endian 32 bit unsigned
|
/// big endian 32 bit unsigned
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="v"></param>
|
|
||||||
/// <param name="stream"></param>
|
|
||||||
static void WriteBE32(int v, Stream stream)
|
static void WriteBE32(int v, Stream stream)
|
||||||
{
|
{
|
||||||
byte[] b = new byte[4];
|
byte[] b = new byte[4];
|
||||||
|
@ -213,7 +204,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// seems to be different than standard CRC32?????
|
/// seems to be different than standard CRC32?????
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="buf"></param>
|
|
||||||
/// <returns>crc32, nut variant</returns>
|
/// <returns>crc32, nut variant</returns>
|
||||||
static uint NutCRC32(byte[] buf)
|
static uint NutCRC32(byte[] buf)
|
||||||
{
|
{
|
||||||
|
@ -510,8 +500,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
ReusableBufferPool<byte> _pool;
|
ReusableBufferPool<byte> _pool;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="payload">frame data</param>
|
/// <param name="payload">frame data</param>
|
||||||
/// <param name="payloadlen">actual length of frame data</param>
|
/// <param name="payloadlen">actual length of frame data</param>
|
||||||
/// <param name="pts">presentation timestamp</param>
|
/// <param name="pts">presentation timestamp</param>
|
||||||
|
@ -562,9 +550,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// compare two NutFrames by pts
|
/// compare two NutFrames by pts
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="lhs"></param>
|
|
||||||
/// <param name="rhs"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static bool operator <=(NutFrame lhs, NutFrame rhs)
|
public static bool operator <=(NutFrame lhs, NutFrame rhs)
|
||||||
{
|
{
|
||||||
BigInteger left = new BigInteger(lhs.pts);
|
BigInteger left = new BigInteger(lhs.pts);
|
||||||
|
@ -587,7 +572,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// write out frame, with syncpoint and all headers
|
/// write out frame, with syncpoint and all headers
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dest"></param>
|
|
||||||
public void WriteData(Stream dest)
|
public void WriteData(Stream dest)
|
||||||
{
|
{
|
||||||
dest.Write(data, 0, actual_length);
|
dest.Write(data, 0, actual_length);
|
||||||
|
|
|
@ -149,7 +149,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add a given color value to the octree
|
/// Add a given color value to the octree
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pixel"></param>
|
|
||||||
public void AddColor(int pixel)
|
public void AddColor(int pixel)
|
||||||
{
|
{
|
||||||
// Check if this request is for the same color as the last
|
// Check if this request is for the same color as the last
|
||||||
|
@ -267,8 +266,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the palette index for the passed color
|
/// Get the palette index for the passed color
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pixel"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public int GetPaletteIndex(int pixel)
|
public int GetPaletteIndex(int pixel)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
|
@ -104,7 +104,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// open a new underlying stream
|
/// open a new underlying stream
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="next"></param>
|
|
||||||
private void opencurrent(Stream next)
|
private void opencurrent(Stream next)
|
||||||
{
|
{
|
||||||
file = new BinaryWriter(next, Encoding.ASCII);
|
file = new BinaryWriter(next, Encoding.ASCII);
|
||||||
|
|
|
@ -125,7 +125,6 @@ namespace BizHawk.Client.EmuHawk.CustomControls
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="maxWidth">the max width to render the string in</param>
|
/// <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="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)
|
public Size MeasureString(string str, Font font, float maxWidth, out int charFit, out int charFitWidth)
|
||||||
{
|
{
|
||||||
SetFont(font);
|
SetFont(font);
|
||||||
|
|
|
@ -530,7 +530,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Calls QueryItemBkColor callback for all visible cells and fills in the background of those cells.
|
/// Calls QueryItemBkColor callback for all visible cells and fills in the background of those cells.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="e"></param>
|
|
||||||
private void DoBackGroundCallback(PaintEventArgs e, List<RollColumn> visibleColumns)
|
private void DoBackGroundCallback(PaintEventArgs e, List<RollColumn> visibleColumns)
|
||||||
{
|
{
|
||||||
int startIndex = FirstVisibleRow;
|
int startIndex = FirstVisibleRow;
|
||||||
|
|
|
@ -289,7 +289,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns all columns including those that are not visible
|
/// Returns all columns including those that are not visible
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
[Browsable(false)]
|
[Browsable(false)]
|
||||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||||
public RollColumns AllColumns => _columns;
|
public RollColumns AllColumns => _columns;
|
||||||
|
|
|
@ -288,7 +288,6 @@ namespace BizHawk.Client.EmuHawk.CustomControls
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Paint the System Icon in the top left corner.
|
/// Paint the System Icon in the top left corner.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="e"></param>
|
|
||||||
protected override void OnPaint(PaintEventArgs e)
|
protected override void OnPaint(PaintEventArgs e)
|
||||||
{
|
{
|
||||||
if (m_sysIcon != null)
|
if (m_sysIcon != null)
|
||||||
|
|
|
@ -141,9 +141,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// returns a new surface
|
/// returns a new surface
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="xpad"></param>
|
|
||||||
/// <param name="ypad"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public DisplaySurface ToPaddedSurface(int xpad0, int ypad0, int xpad1, int ypad1)
|
public DisplaySurface ToPaddedSurface(int xpad0, int ypad0, int xpad1, int ypad1)
|
||||||
{
|
{
|
||||||
int new_width = Width + xpad0 + xpad1;
|
int new_width = Width + xpad0 + xpad1;
|
||||||
|
|
|
@ -42,7 +42,6 @@
|
||||||
/// when a Tool sets WantsToControlRewind
|
/// when a Tool sets WantsToControlRewind
|
||||||
/// Returns whether or not the rewind action actually occured
|
/// Returns whether or not the rewind action actually occured
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
bool Rewind();
|
bool Rewind();
|
||||||
|
|
||||||
bool WantsToControlRestartMovie { get; }
|
bool WantsToControlRestartMovie { get; }
|
||||||
|
|
|
@ -66,7 +66,6 @@ namespace BizHawk.Common.BizInvoke
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// allocate size bytes at any address
|
/// allocate size bytes at any address
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="size"></param>
|
|
||||||
public MemoryBlock(ulong size)
|
public MemoryBlock(ulong size)
|
||||||
: this(0, size)
|
: this(0, size)
|
||||||
{
|
{
|
||||||
|
@ -75,8 +74,6 @@ namespace BizHawk.Common.BizInvoke
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// allocate size bytes starting at a particular address
|
/// allocate size bytes starting at a particular address
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="start"></param>
|
|
||||||
/// <param name="size"></param>
|
|
||||||
public MemoryBlock(ulong start, ulong size)
|
public MemoryBlock(ulong start, ulong size)
|
||||||
{
|
{
|
||||||
if (OSTailoredCode.CurrentOS != OSTailoredCode.DistinctOS.Windows)
|
if (OSTailoredCode.CurrentOS != OSTailoredCode.DistinctOS.Windows)
|
||||||
|
@ -192,7 +189,6 @@ namespace BizHawk.Common.BizInvoke
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// take a hash of the current full contents of the block, including unreadable areas
|
/// take a hash of the current full contents of the block, including unreadable areas
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
public byte[] FullHash()
|
public byte[] FullHash()
|
||||||
{
|
{
|
||||||
if (!Active)
|
if (!Active)
|
||||||
|
|
|
@ -12,9 +12,6 @@ namespace BizHawk.Common.BizInvoke
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// copy `len` bytes from `src` to `dest`
|
/// copy `len` bytes from `src` to `dest`
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="src"></param>
|
|
||||||
/// <param name="dst"></param>
|
|
||||||
/// <param name="len"></param>
|
|
||||||
public static void CopySome(Stream src, Stream dst, long len)
|
public static void CopySome(Stream src, Stream dst, long len)
|
||||||
{
|
{
|
||||||
var buff = new byte[4096];
|
var buff = new byte[4096];
|
||||||
|
|
|
@ -19,7 +19,6 @@ namespace BizHawk.Common
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// return true if an array type is not 0-based
|
/// return true if an array type is not 0-based
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="t"></param>
|
|
||||||
private static bool IsNonZeroBaedArray(Type t)
|
private static bool IsNonZeroBaedArray(Type t)
|
||||||
{
|
{
|
||||||
if (!t.IsArray)
|
if (!t.IsArray)
|
||||||
|
|
|
@ -205,7 +205,6 @@ namespace BizHawk.Common.ReflectionExtensions
|
||||||
/// <summary>
|
/// <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.
|
/// 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>
|
/// </summary>
|
||||||
/// <param name="field"></param>
|
|
||||||
public static IntPtr GetManagedOffset(this FieldInfo field)
|
public static IntPtr GetManagedOffset(this FieldInfo field)
|
||||||
{
|
{
|
||||||
Type type = field.DeclaringType;
|
Type type = field.DeclaringType;
|
||||||
|
|
|
@ -16,9 +16,6 @@ namespace BizHawk.Common
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Resolve an entry point and throw an exception if that resolution is NULL
|
/// Resolve an entry point and throw an exception if that resolution is NULL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dll"></param>
|
|
||||||
/// <param name="entryPoint"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static IntPtr SafeResolve(this IImportResolver dll, string entryPoint)
|
public static IntPtr SafeResolve(this IImportResolver dll, string entryPoint)
|
||||||
{
|
{
|
||||||
var ret = dll.Resolve(entryPoint);
|
var ret = dll.Resolve(entryPoint);
|
||||||
|
|
|
@ -21,7 +21,6 @@ namespace BizHawk.Common
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// set all properties (not fields!) of obj with a DefaultValueAttribute to that value
|
/// set all properties (not fields!) of obj with a DefaultValueAttribute to that value
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="T"></typeparam>
|
|
||||||
/// <param name="obj">the obj to act on</param>
|
/// <param name="obj">the obj to act on</param>
|
||||||
public static void SetDefaultValues<T>(T obj)
|
public static void SetDefaultValues<T>(T obj)
|
||||||
{
|
{
|
||||||
|
|
|
@ -408,7 +408,6 @@ namespace BizHawk.Common
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Functionally the same as WaitOne(), but pumps com messa
|
/// Functionally the same as WaitOne(), but pumps com messa
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="handle"></param>
|
|
||||||
public static void HackyComWaitOne(WaitHandle handle)
|
public static void HackyComWaitOne(WaitHandle handle)
|
||||||
{
|
{
|
||||||
uint nativeResult; // result of the native wait API (WaitForMultipleObjects or MsgWaitForMultipleObjectsEx)
|
uint nativeResult; // result of the native wait API (WaitForMultipleObjects or MsgWaitForMultipleObjectsEx)
|
||||||
|
|
|
@ -216,7 +216,6 @@ namespace BizHawk.Emulation.Common
|
||||||
/// Get the latency in input samples introduced by the resampler.
|
/// Get the latency in input samples introduced by the resampler.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="st">Resampler state</param>
|
/// <param name="st">Resampler state</param>
|
||||||
/// <returns></returns>
|
|
||||||
[DllImport("libspeexdsp.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport("libspeexdsp.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern int speex_resampler_get_input_latency(IntPtr st);
|
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.
|
/// Get the latency in output samples introduced by the resampler.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="st">Resampler state</param>
|
/// <param name="st">Resampler state</param>
|
||||||
/// <returns></returns>
|
|
||||||
[DllImport("libspeexdsp.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport("libspeexdsp.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern int speex_resampler_get_output_latency(IntPtr st);
|
public static extern int speex_resampler_get_output_latency(IntPtr st);
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Writes a message to the OSD
|
/// Writes a message to the OSD
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="message"></param>
|
|
||||||
/// <param name="category"></param>
|
|
||||||
public void SendMessage(string message, MessageCategory category)
|
public void SendMessage(string message, MessageCategory category)
|
||||||
{
|
{
|
||||||
if (!CheckMessageSettings(category))
|
if (!CheckMessageSettings(category))
|
||||||
|
@ -51,7 +49,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when certain input presses are detected
|
/// Called when certain input presses are detected
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="input"></param>
|
|
||||||
public void OSD_FireInputMessage(string input)
|
public void OSD_FireInputMessage(string input)
|
||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
@ -467,8 +464,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks whether message category is allowed to be sent
|
/// Checks whether message category is allowed to be sent
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="category"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool CheckMessageSettings(MessageCategory category)
|
public bool CheckMessageSettings(MessageCategory category)
|
||||||
{
|
{
|
||||||
switch (Settings.OSDMessageVerbosity)
|
switch (Settings.OSDMessageVerbosity)
|
||||||
|
|
|
@ -13,8 +13,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Helper method that returns a single INT32 from a BitArray
|
/// Helper method that returns a single INT32 from a BitArray
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="bitarray"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static int GetIntFromBitArray(BitArray bitArray)
|
public static int GetIntFromBitArray(BitArray bitArray)
|
||||||
{
|
{
|
||||||
if (bitArray.Length > 32)
|
if (bitArray.Length > 32)
|
||||||
|
@ -28,8 +26,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// POKEs a memory bus address
|
/// POKEs a memory bus address
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <param name="value"></param>
|
|
||||||
public void PokeMemory(ushort addr, byte value)
|
public void PokeMemory(ushort addr, byte value)
|
||||||
{
|
{
|
||||||
_machine.WriteBus(addr, value);
|
_machine.WriteBus(addr, value);
|
||||||
|
|
|
@ -10,20 +10,16 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initialisation
|
/// Initialisation
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sampleRate"></param>
|
|
||||||
/// <param name="tStatesPerFrame"></param>
|
|
||||||
void Init(int sampleRate, int tStatesPerFrame);
|
void Init(int sampleRate, int tStatesPerFrame);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Processes an incoming pulse value and adds it to the blipbuffer
|
/// Processes an incoming pulse value and adds it to the blipbuffer
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pulse"></param>
|
|
||||||
void ProcessPulseValue(bool pulse);
|
void ProcessPulseValue(bool pulse);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// State serialization
|
/// State serialization
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ser"></param>
|
|
||||||
void SyncState(Serializer ser);
|
void SyncState(Serializer ser);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Parses a new disk image and loads it into this floppy drive
|
/// Parses a new disk image and loads it into this floppy drive
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="diskData"></param>
|
|
||||||
void FDD_LoadDisk(byte[] diskData);
|
void FDD_LoadDisk(byte[] diskData);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -24,15 +24,11 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the joystick line based on key pressed
|
/// Sets the joystick line based on key pressed
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <param name="isPressed"></param>
|
|
||||||
void SetJoyInput(string key, bool isPressed);
|
void SetJoyInput(string key, bool isPressed);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the state of a particular joystick binding
|
/// Gets the state of a particular joystick binding
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
bool GetJoyInput(string key);
|
bool GetJoyInput(string key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,21 +36,16 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads the current line status
|
/// Reads the current line status
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
byte ReadCurrentLine();
|
byte ReadCurrentLine();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the CPC key status
|
/// Sets the CPC key status
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <param name="isPressed"></param>
|
|
||||||
void SetKeyStatus(string key, bool isPressed);
|
void SetKeyStatus(string key, bool isPressed);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the status of a CPC key
|
/// Gets the status of a CPC key
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
bool GetKeyStatus(string key);
|
bool GetKeyStatus(string key);
|
||||||
|
|
||||||
void SyncState(Serializer ser);
|
void SyncState(Serializer ser);
|
||||||
|
|
|
@ -11,8 +11,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initlization routine
|
/// Initlization routine
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sampleRate"></param>
|
|
||||||
/// <param name="tStatesPerFrame"></param>
|
|
||||||
void Init(int sampleRate, int tStatesPerFrame);
|
void Init(int sampleRate, int tStatesPerFrame);
|
||||||
|
|
||||||
void SetFunction(int data);
|
void SetFunction(int data);
|
||||||
|
@ -27,7 +25,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Writes to the PSG
|
/// Writes to the PSG
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="value"></param>
|
|
||||||
void PortWrite(int value);
|
void PortWrite(int value);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -59,13 +56,11 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Updates the sound based on number of frame cycles
|
/// Updates the sound based on number of frame cycles
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="frameCycle"></param>
|
|
||||||
void UpdateSound(int frameCycle);
|
void UpdateSound(int frameCycle);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// IStatable serialization
|
/// IStatable serialization
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ser"></param>
|
|
||||||
void SyncState(Serializer ser);
|
void SyncState(Serializer ser);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,17 +9,11 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Device responds to an IN instruction
|
/// Device responds to an IN instruction
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="result"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
bool ReadPort(ushort port, ref int result);
|
bool ReadPort(ushort port, ref int result);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Device responds to an OUT instruction
|
/// Device responds to an OUT instruction
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="result"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
bool WritePort(ushort port, int result);
|
bool WritePort(ushort port, int result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes the datacorder device
|
/// Initializes the datacorder device
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="machine"></param>
|
|
||||||
public void Init(CPCBase machine)
|
public void Init(CPCBase machine)
|
||||||
{
|
{
|
||||||
_machine = machine;
|
_machine = machine;
|
||||||
|
@ -296,7 +295,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// TRUE: skip forward
|
/// TRUE: skip forward
|
||||||
/// FALSE: skip backward
|
/// FALSE: skip backward
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="skipForward"></param>
|
|
||||||
public void SkipBlock(bool skipForward)
|
public void SkipBlock(bool skipForward)
|
||||||
{
|
{
|
||||||
int blockCount = _dataBlocks.Count;
|
int blockCount = _dataBlocks.Count;
|
||||||
|
@ -354,7 +352,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Inserts a new tape and sets up the tape device accordingly
|
/// Inserts a new tape and sets up the tape device accordingly
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="tapeData"></param>
|
|
||||||
public void LoadTape(byte[] tapeData)
|
public void LoadTape(byte[] tapeData)
|
||||||
{
|
{
|
||||||
// instantiate converters
|
// instantiate converters
|
||||||
|
@ -416,8 +413,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Simulates the spectrum 'EAR' input reading data from the tape
|
/// Simulates the spectrum 'EAR' input reading data from the tape
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cpuCycles"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool GetEarBit(long cpuCycle)
|
public bool GetEarBit(long cpuCycle)
|
||||||
{
|
{
|
||||||
// decide how many cycles worth of data we are capturing
|
// decide how many cycles worth of data we are capturing
|
||||||
|
@ -768,7 +763,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Device responds to an IN instruction
|
/// Device responds to an IN instruction
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
public bool ReadPort()
|
public bool ReadPort()
|
||||||
{
|
{
|
||||||
if (TapeIsPlaying)
|
if (TapeIsPlaying)
|
||||||
|
@ -800,8 +794,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Device responds to an OUT instruction
|
/// Device responds to an OUT instruction
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="state"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public void WritePort(bool state)
|
public void WritePort(bool state)
|
||||||
{
|
{
|
||||||
// not implemented
|
// not implemented
|
||||||
|
@ -821,7 +813,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bizhawk state serialization
|
/// Bizhawk state serialization
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ser"></param>
|
|
||||||
public void SyncState(Serializer ser)
|
public void SyncState(Serializer ser)
|
||||||
{
|
{
|
||||||
ser.BeginSection(nameof(DatacorderDevice));
|
ser.BeginSection(nameof(DatacorderDevice));
|
||||||
|
|
|
@ -2471,7 +2471,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Handles CPU writing to the data register
|
/// Handles CPU writing to the data register
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
private void WriteDataRegister(byte data)
|
private void WriteDataRegister(byte data)
|
||||||
{
|
{
|
||||||
if (!GetBit(MSR_RQM, StatusMain) || GetBit(MSR_DIO, StatusMain))
|
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
|
/// Returns TRUE if successful. FALSE if otherwise
|
||||||
/// Called only in idle phase
|
/// Called only in idle phase
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cmdByte"></param>
|
|
||||||
/// <param name="direction"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
private bool ParseCommandByte(byte cmdByte)
|
private bool ParseCommandByte(byte cmdByte)
|
||||||
{
|
{
|
||||||
// clear counters
|
// clear counters
|
||||||
|
@ -2618,7 +2614,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Parses the first 5 command argument bytes that are of the standard format
|
/// Parses the first 5 command argument bytes that are of the standard format
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="paramIndex"></param>
|
|
||||||
private void ParseParamByteStandard(int index)
|
private void ParseParamByteStandard(int index)
|
||||||
{
|
{
|
||||||
byte currByte = CommBuffer[index];
|
byte currByte = CommBuffer[index];
|
||||||
|
|
|
@ -69,7 +69,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Searches for the requested sector
|
/// Searches for the requested sector
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
private FloppyDisk.Sector GetSector()
|
private FloppyDisk.Sector GetSector()
|
||||||
{
|
{
|
||||||
FloppyDisk.Sector sector = null;
|
FloppyDisk.Sector sector = null;
|
||||||
|
@ -155,7 +154,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Parses a new disk image and loads it into this floppy drive
|
/// Parses a new disk image and loads it into this floppy drive
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="tapeData"></param>
|
|
||||||
public void FDD_LoadDisk(byte[] diskData)
|
public void FDD_LoadDisk(byte[] diskData)
|
||||||
{
|
{
|
||||||
// we are only going to load into the first drive
|
// we are only going to load into the first drive
|
||||||
|
@ -335,8 +333,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Moves the head across the disk cylinders
|
/// Moves the head across the disk cylinders
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="direction"></param>
|
|
||||||
/// <param name="cylinderCount"></param>
|
|
||||||
public void MoveHead(SkipDirection direction, int cylinderCount)
|
public void MoveHead(SkipDirection direction, int cylinderCount)
|
||||||
{
|
{
|
||||||
// get total tracks
|
// get total tracks
|
||||||
|
@ -378,10 +374,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Finds a supplied sector
|
/// Finds a supplied sector
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="resBuffer"></param>
|
|
||||||
/// <param name=""></param>
|
|
||||||
/// <param name=""></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public FloppyDisk.Sector FindSector(ref byte[] resBuffer, CommandParameters prms)
|
public FloppyDisk.Sector FindSector(ref byte[] resBuffer, CommandParameters prms)
|
||||||
{
|
{
|
||||||
int index =CurrentSector;
|
int index =CurrentSector;
|
||||||
|
@ -449,8 +441,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Populates a result buffer
|
/// Populates a result buffer
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="resBuffer"></param>
|
|
||||||
/// <param name="chrn"></param>
|
|
||||||
public void FillResult(ref byte[] resBuffer, CHRN chrn)
|
public void FillResult(ref byte[] resBuffer, CHRN chrn)
|
||||||
{
|
{
|
||||||
// clear results
|
// clear results
|
||||||
|
@ -480,7 +470,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Populates the result buffer with ReadID data
|
/// Populates the result buffer with ReadID data
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
public void ReadID(ref byte[] resBuffer)
|
public void ReadID(ref byte[] resBuffer)
|
||||||
{
|
{
|
||||||
if (CheckDriveStatus() == false)
|
if (CheckDriveStatus() == false)
|
||||||
|
@ -797,7 +786,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Parses a new disk image and loads it into this floppy drive
|
/// Parses a new disk image and loads it into this floppy drive
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="tapeData"></param>
|
|
||||||
public void FDD_LoadDisk(byte[] diskData)
|
public void FDD_LoadDisk(byte[] diskData)
|
||||||
{
|
{
|
||||||
// try dsk first
|
// try dsk first
|
||||||
|
|
|
@ -122,9 +122,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Device responds to an IN instruction
|
/// Device responds to an IN instruction
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="data"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool ReadPort(ushort port, ref int data)
|
public bool ReadPort(ushort port, ref int data)
|
||||||
{
|
{
|
||||||
BitArray bits = new BitArray(new byte[] { (byte)data });
|
BitArray bits = new BitArray(new byte[] { (byte)data });
|
||||||
|
@ -165,9 +162,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Device responds to an OUT instruction
|
/// Device responds to an OUT instruction
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="data"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool WritePort(ushort port, int data)
|
public bool WritePort(ushort port, int data)
|
||||||
{
|
{
|
||||||
BitArray bits = new BitArray(new byte[] { (byte)data });
|
BitArray bits = new BitArray(new byte[] { (byte)data });
|
||||||
|
|
|
@ -96,7 +96,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// Returns true if there is no delay
|
/// Returns true if there is no delay
|
||||||
/// Returns false if read is to be deferred
|
/// Returns false if read is to be deferred
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
private bool CheckTiming()
|
private bool CheckTiming()
|
||||||
{
|
{
|
||||||
// get delta
|
// get delta
|
||||||
|
|
|
@ -30,7 +30,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Main constructor
|
/// Main constructor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="machine"></param>
|
|
||||||
public NECUPD765()
|
public NECUPD765()
|
||||||
{
|
{
|
||||||
InitCommandList();
|
InitCommandList();
|
||||||
|
|
|
@ -18,9 +18,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the specified bit value from supplied byte
|
/// Returns the specified bit value from supplied byte
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="bitNumber"></param>
|
|
||||||
/// <param name="dataByte"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static bool GetBit(int bitNumber, byte dataByte)
|
public static bool GetBit(int bitNumber, byte dataByte)
|
||||||
{
|
{
|
||||||
if (bitNumber < 0 || bitNumber > 7)
|
if (bitNumber < 0 || bitNumber > 7)
|
||||||
|
@ -34,8 +31,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the specified bit of the supplied byte to 1
|
/// Sets the specified bit of the supplied byte to 1
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="bitNumber"></param>
|
|
||||||
/// <param name=""></param>
|
|
||||||
public static void SetBit(int bitNumber, ref byte dataByte)
|
public static void SetBit(int bitNumber, ref byte dataByte)
|
||||||
{
|
{
|
||||||
if (bitNumber < 0 || bitNumber > 7)
|
if (bitNumber < 0 || bitNumber > 7)
|
||||||
|
@ -51,8 +46,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the specified bit of the supplied byte to 0
|
/// Sets the specified bit of the supplied byte to 0
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="bitNumber"></param>
|
|
||||||
/// <param name=""></param>
|
|
||||||
public static void UnSetBit(int bitNumber, ref byte dataByte)
|
public static void UnSetBit(int bitNumber, ref byte dataByte)
|
||||||
{
|
{
|
||||||
if (bitNumber < 0 || bitNumber > 7)
|
if (bitNumber < 0 || bitNumber > 7)
|
||||||
|
@ -68,8 +61,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a drive number (0-3) based on the first two bits of the supplied byte
|
/// Returns a drive number (0-3) based on the first two bits of the supplied byte
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dataByte"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static int GetUnitSelect(byte dataByte)
|
public static int GetUnitSelect(byte dataByte)
|
||||||
{
|
{
|
||||||
int driveNumber = dataByte & 0x03;
|
int driveNumber = dataByte & 0x03;
|
||||||
|
@ -79,8 +70,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the first two bits of a byte based on the supplied drive number (0-3)
|
/// Sets the first two bits of a byte based on the supplied drive number (0-3)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="driveNumber"></param>
|
|
||||||
/// <param name="dataByte"></param>
|
|
||||||
public static void SetUnitSelect(int driveNumber, ref byte dataByte)
|
public static void SetUnitSelect(int driveNumber, ref byte dataByte)
|
||||||
{
|
{
|
||||||
switch (driveNumber)
|
switch (driveNumber)
|
||||||
|
|
|
@ -1197,9 +1197,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Device responds to an IN instruction
|
/// Device responds to an IN instruction
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="result"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool ReadPort(ushort port, ref int result)
|
public bool ReadPort(ushort port, ref int result)
|
||||||
{
|
{
|
||||||
// gate array is OUT only
|
// gate array is OUT only
|
||||||
|
@ -1209,9 +1206,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Device responds to an OUT instruction
|
/// Device responds to an OUT instruction
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="result"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool WritePort(ushort port, int result)
|
public bool WritePort(ushort port, int result)
|
||||||
{
|
{
|
||||||
BitArray portBits = new BitArray(BitConverter.GetBytes(port));
|
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)
|
/// Screenmode is defined at each HSYNC (start of a new character line)
|
||||||
/// Therefore we pass the mode in via constructor
|
/// Therefore we pass the mode in via constructor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="screenMode"></param>
|
|
||||||
//public CharacterLine(int screenMode)
|
//public CharacterLine(int screenMode)
|
||||||
//{
|
//{
|
||||||
//ScreenMode = screenMode;
|
//ScreenMode = screenMode;
|
||||||
|
@ -1319,7 +1312,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a new horizontal character to the list
|
/// Adds a new horizontal character to the list
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="phase"></param>
|
|
||||||
public void AddCharacter(Phase phase)
|
public void AddCharacter(Phase phase)
|
||||||
{
|
{
|
||||||
Phases.Add(phase);
|
Phases.Add(phase);
|
||||||
|
|
|
@ -873,7 +873,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Selects a register
|
/// Selects a register
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
private void RegisterSelect(int data)
|
private void RegisterSelect(int data)
|
||||||
{
|
{
|
||||||
SelectedRegister = data & 0x1F;
|
SelectedRegister = data & 0x1F;
|
||||||
|
@ -909,7 +908,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Writes to the currently selected register
|
/// Writes to the currently selected register
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
private void WriteRegister(int data)
|
private void WriteRegister(int data)
|
||||||
{
|
{
|
||||||
// 16 and 17 are read only registers on all types
|
// 16 and 17 are read only registers on all types
|
||||||
|
@ -953,7 +951,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads from the currently selected register
|
/// Reads from the currently selected register
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
private bool ReadRegister(ref int data)
|
private bool ReadRegister(ref int data)
|
||||||
{
|
{
|
||||||
bool addressed = false;
|
bool addressed = false;
|
||||||
|
@ -1029,8 +1026,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads from the status register
|
/// Reads from the status register
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
private bool ReadStatus(ref int data)
|
private bool ReadStatus(ref int data)
|
||||||
{
|
{
|
||||||
bool addressed = false;
|
bool addressed = false;
|
||||||
|
@ -1107,9 +1102,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Device responds to an IN instruction
|
/// Device responds to an IN instruction
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="result"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool ReadPort(ushort port, ref int result)
|
public bool ReadPort(ushort port, ref int result)
|
||||||
{
|
{
|
||||||
byte portUpper = (byte)(port >> 8);
|
byte portUpper = (byte)(port >> 8);
|
||||||
|
@ -1143,9 +1135,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Device responds to an OUT instruction
|
/// Device responds to an OUT instruction
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="result"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool WritePort(ushort port, int result)
|
public bool WritePort(ushort port, int result)
|
||||||
{
|
{
|
||||||
byte portUpper = (byte)(port >> 8);
|
byte portUpper = (byte)(port >> 8);
|
||||||
|
|
|
@ -48,7 +48,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The only constructor
|
/// The only constructor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="type"></param>
|
|
||||||
public CRTC6845(CRTCType type)
|
public CRTC6845(CRTCType type)
|
||||||
{
|
{
|
||||||
ChipType = type;
|
ChipType = type;
|
||||||
|
@ -363,8 +362,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// CPU (or other device) reads from the 8-bit databus
|
/// CPU (or other device) reads from the 8-bit databus
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="result"></param>
|
|
||||||
public virtual bool ReadPort(ushort port, ref int result)
|
public virtual bool ReadPort(ushort port, ref int result)
|
||||||
{
|
{
|
||||||
byte portUpper = (byte)(port >> 8);
|
byte portUpper = (byte)(port >> 8);
|
||||||
|
@ -398,8 +395,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// CPU (or other device) writes to the 8-bit databus
|
/// CPU (or other device) writes to the 8-bit databus
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="result"></param>
|
|
||||||
public virtual bool WritePort(ushort port, int value)
|
public virtual bool WritePort(ushort port, int value)
|
||||||
{
|
{
|
||||||
byte portUpper = (byte)(port >> 8);
|
byte portUpper = (byte)(port >> 8);
|
||||||
|
@ -496,7 +491,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Selects a specific register
|
/// Selects a specific register
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="value"></param>
|
|
||||||
private void SelectRegister(int value)
|
private void SelectRegister(int value)
|
||||||
{
|
{
|
||||||
var v = (byte)((byte)value & 0x1F);
|
var v = (byte)((byte)value & 0x1F);
|
||||||
|
@ -509,8 +503,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Attempts to read from the currently selected register
|
/// Attempts to read from the currently selected register
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
private bool ReadRegister(ref int data)
|
private bool ReadRegister(ref int data)
|
||||||
{
|
{
|
||||||
switch ((int)ChipType)
|
switch ((int)ChipType)
|
||||||
|
@ -527,8 +519,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Attempts to write to the currently selected register
|
/// Attempts to write to the currently selected register
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
private void WriteRegister(int data)
|
private void WriteRegister(int data)
|
||||||
{
|
{
|
||||||
switch ((int)ChipType)
|
switch ((int)ChipType)
|
||||||
|
@ -544,8 +534,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Attempts to read from the internal status register (if present)
|
/// Attempts to read from the internal status register (if present)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
private bool ReadStatus(ref int data)
|
private bool ReadStatus(ref int data)
|
||||||
{
|
{
|
||||||
switch ((int)ChipType)
|
switch ((int)ChipType)
|
||||||
|
@ -756,8 +744,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Read Register (HD6845S & UM6845)
|
/// Read Register (HD6845S & UM6845)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
private bool ReadRegister_Type0(ref int data)
|
private bool ReadRegister_Type0(ref int data)
|
||||||
{
|
{
|
||||||
// Type 0 - write only register returns 0 when it is read from
|
// Type 0 - write only register returns 0 when it is read from
|
||||||
|
@ -805,8 +791,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Read Register (UM6845R)
|
/// Read Register (UM6845R)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
private bool ReadRegister_Type1(ref int data)
|
private bool ReadRegister_Type1(ref int data)
|
||||||
{
|
{
|
||||||
// Type 1 - write only register returns 0 when it is read from
|
// Type 1 - write only register returns 0 when it is read from
|
||||||
|
@ -865,8 +849,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Read Register (MC6845)
|
/// Read Register (MC6845)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
private bool ReadRegister_Type2(ref int data)
|
private bool ReadRegister_Type2(ref int data)
|
||||||
{
|
{
|
||||||
switch (AddressRegister)
|
switch (AddressRegister)
|
||||||
|
@ -916,8 +898,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Read Register (AMS40489 & pre-ASIC)
|
/// Read Register (AMS40489 & pre-ASIC)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
private bool ReadRegister_Type3_4(ref int data)
|
private bool ReadRegister_Type3_4(ref int data)
|
||||||
{
|
{
|
||||||
// unsure of the register sizes at the moment
|
// unsure of the register sizes at the moment
|
||||||
|
@ -984,7 +964,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write Active Register (HD6845S & UM6845)
|
/// Write Active Register (HD6845S & UM6845)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
private void WriteRegister_Type0(int data)
|
private void WriteRegister_Type0(int data)
|
||||||
{
|
{
|
||||||
byte v = (byte)data;
|
byte v = (byte)data;
|
||||||
|
@ -1022,7 +1001,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write Active Register (HD6845S & UM6845)
|
/// Write Active Register (HD6845S & UM6845)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
private void WriteRegister_Type1(int data)
|
private void WriteRegister_Type1(int data)
|
||||||
{
|
{
|
||||||
byte v = (byte)data;
|
byte v = (byte)data;
|
||||||
|
@ -1062,7 +1040,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write Active Register (MC6845)
|
/// Write Active Register (MC6845)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
private void WriteRegister_Type2(int data)
|
private void WriteRegister_Type2(int data)
|
||||||
{
|
{
|
||||||
byte v = (byte)data;
|
byte v = (byte)data;
|
||||||
|
@ -1102,7 +1079,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write Active Register (MC6845)
|
/// Write Active Register (MC6845)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
private void WriteRegister_Type3_4(int data)
|
private void WriteRegister_Type3_4(int data)
|
||||||
{
|
{
|
||||||
// unsure of the register sizes at the moment
|
// unsure of the register sizes at the moment
|
||||||
|
@ -1132,8 +1108,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// Read Status Register (UM6845R)
|
/// Read Status Register (UM6845R)
|
||||||
/// This is fully implemented
|
/// This is fully implemented
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
private bool ReadStatus_Type1(ref int data)
|
private bool ReadStatus_Type1(ref int data)
|
||||||
{
|
{
|
||||||
// Bit6: Set when latched LPEN strobe input is received / Reset when R17 or R16 is read from
|
// 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
|
/// Status Register is unavailable but attempts to read will return the currently
|
||||||
/// selected register data instead
|
/// selected register data instead
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
private bool ReadStatus_Type3_4(ref int data)
|
private bool ReadStatus_Type3_4(ref int data)
|
||||||
{
|
{
|
||||||
return ReadRegister(ref data);
|
return ReadRegister(ref data);
|
||||||
|
@ -1158,8 +1130,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// Read Status Register (HD6845S & UM6845)
|
/// Read Status Register (HD6845S & UM6845)
|
||||||
/// No status register available
|
/// No status register available
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
private bool ReadStatus_Unavailable(ref int data)
|
private bool ReadStatus_Unavailable(ref int data)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -306,8 +306,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a single scanline character into the matrix
|
/// Adds a single scanline character into the matrix
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="charIndex"></param>
|
|
||||||
/// <param name="phase"></param>
|
|
||||||
public void AddScanlineCharacter(int index, RenderPhase phase, byte vid1, byte vid2, int[] pens)
|
public void AddScanlineCharacter(int index, RenderPhase phase, byte vid1, byte vid2, int[] pens)
|
||||||
{
|
{
|
||||||
if (index >= 64)
|
if (index >= 64)
|
||||||
|
@ -332,8 +330,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a HSYNC, VSYNC or HSYNC+VSYNC character into the scanline
|
/// Adds a HSYNC, VSYNC or HSYNC+VSYNC character into the scanline
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="charIndex"></param>
|
|
||||||
/// <param name="phase"></param>
|
|
||||||
private void AddSyncValue(int charIndex, RenderPhase phase)
|
private void AddSyncValue(int charIndex, RenderPhase phase)
|
||||||
{
|
{
|
||||||
Characters[charIndex].Phase = phase;
|
Characters[charIndex].Phase = phase;
|
||||||
|
@ -343,8 +339,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a border character into the scanline
|
/// Adds a border character into the scanline
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="index"></param>
|
|
||||||
/// <param name="colourValue"></param>
|
|
||||||
private void AddBorderValue(int charIndex, int colourValue)
|
private void AddBorderValue(int charIndex, int colourValue)
|
||||||
{
|
{
|
||||||
Characters[charIndex].Phase = RenderPhase.BORDER;
|
Characters[charIndex].Phase = RenderPhase.BORDER;
|
||||||
|
@ -377,9 +371,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// Adds a display character into the scanline
|
/// Adds a display character into the scanline
|
||||||
/// Pixel matrix is calculated based on the current ScreenMode
|
/// Pixel matrix is calculated based on the current ScreenMode
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="charIndex"></param>
|
|
||||||
/// <param name="vid1"></param>
|
|
||||||
/// <param name="vid2"></param>
|
|
||||||
public void AddDisplayValue(int charIndex, byte vid1, byte vid2, int[] pens)
|
public void AddDisplayValue(int charIndex, byte vid1, byte vid2, int[] pens)
|
||||||
{
|
{
|
||||||
Characters[charIndex].Phase = RenderPhase.DISPLAY;
|
Characters[charIndex].Phase = RenderPhase.DISPLAY;
|
||||||
|
@ -521,7 +512,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the number of pixels decoded in this scanline (border and display)
|
/// Returns the number of pixels decoded in this scanline (border and display)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
private int GetPixelCount()
|
private int GetPixelCount()
|
||||||
{
|
{
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
|
|
|
@ -102,7 +102,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads the currently selected line
|
/// Reads the currently selected line
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
public byte ReadCurrentLine()
|
public byte ReadCurrentLine()
|
||||||
{
|
{
|
||||||
var lin = _currentLine; // - 0x40;
|
var lin = _currentLine; // - 0x40;
|
||||||
|
@ -118,8 +117,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the index of the key within the matrix
|
/// Returns the index of the key within the matrix
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public int GetKeyIndexFromMatrix(string key)
|
public int GetKeyIndexFromMatrix(string key)
|
||||||
{
|
{
|
||||||
int index = Array.IndexOf(KeyboardMatrix, key);
|
int index = Array.IndexOf(KeyboardMatrix, key);
|
||||||
|
@ -129,8 +126,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets key status
|
/// Sets key status
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <param name="isPressed"></param>
|
|
||||||
public void SetKeyStatus(string key, bool isPressed)
|
public void SetKeyStatus(string key, bool isPressed)
|
||||||
{
|
{
|
||||||
int index = GetKeyIndexFromMatrix(key);
|
int index = GetKeyIndexFromMatrix(key);
|
||||||
|
@ -140,8 +135,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a key's status
|
/// Gets a key's status
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool GetKeyStatus(string key)
|
public bool GetKeyStatus(string key)
|
||||||
{
|
{
|
||||||
int index = GetKeyIndexFromMatrix(key);
|
int index = GetKeyIndexFromMatrix(key);
|
||||||
|
|
|
@ -154,7 +154,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Writes to the control register
|
/// Writes to the control register
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
private void OUTControl(int data)
|
private void OUTControl(int data)
|
||||||
{
|
{
|
||||||
if (data.Bit(7))
|
if (data.Bit(7))
|
||||||
|
@ -214,7 +213,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads from Port A
|
/// Reads from Port A
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
private int INPortA()
|
private int INPortA()
|
||||||
{
|
{
|
||||||
if (DirPortA == PortDirection.Input)
|
if (DirPortA == PortDirection.Input)
|
||||||
|
@ -233,7 +231,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads from Port B
|
/// Reads from Port B
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
private int INPortB()
|
private int INPortB()
|
||||||
{
|
{
|
||||||
if (DirPortB == PortDirection.Input)
|
if (DirPortB == PortDirection.Input)
|
||||||
|
@ -279,7 +276,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads from Port C
|
/// Reads from Port C
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
private int INPortC()
|
private int INPortC()
|
||||||
{
|
{
|
||||||
// get the PortC value
|
// get the PortC value
|
||||||
|
@ -349,9 +345,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Device responds to an IN instruction
|
/// Device responds to an IN instruction
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="result"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool ReadPort(ushort port, ref int result)
|
public bool ReadPort(ushort port, ref int result)
|
||||||
{
|
{
|
||||||
byte portUpper = (byte)(port >> 8);
|
byte portUpper = (byte)(port >> 8);
|
||||||
|
@ -396,9 +389,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Device responds to an OUT instruction
|
/// Device responds to an OUT instruction
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="result"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool WritePort(ushort port, int result)
|
public bool WritePort(ushort port, int result)
|
||||||
{
|
{
|
||||||
byte portUpper = (byte)(port >> 8);
|
byte portUpper = (byte)(port >> 8);
|
||||||
|
|
|
@ -186,7 +186,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads the value from the currently selected register
|
/// Reads the value from the currently selected register
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
public int PortRead()
|
public int PortRead()
|
||||||
{
|
{
|
||||||
if (ActiveFunction == 1)
|
if (ActiveFunction == 1)
|
||||||
|
@ -215,7 +214,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Writes to the currently selected register
|
/// Writes to the currently selected register
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="value"></param>
|
|
||||||
public void PortWrite(int value)
|
public void PortWrite(int value)
|
||||||
{
|
{
|
||||||
switch (ActiveFunction)
|
switch (ActiveFunction)
|
||||||
|
@ -363,7 +361,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Updates the audiobuffer based on the current frame t-state
|
/// Updates the audiobuffer based on the current frame t-state
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="frameCycle"></param>
|
|
||||||
public void UpdateSound(int frameCycle)
|
public void UpdateSound(int frameCycle)
|
||||||
{
|
{
|
||||||
BufferUpdate(frameCycle);
|
BufferUpdate(frameCycle);
|
||||||
|
@ -613,8 +610,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes timing information for the frame
|
/// Initializes timing information for the frame
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sampleRate"></param>
|
|
||||||
/// <param name="frameTactCount"></param>
|
|
||||||
private void InitTiming(int sampleRate, int frameTactCount)
|
private void InitTiming(int sampleRate, int frameTactCount)
|
||||||
{
|
{
|
||||||
_sampleRate = sampleRate;
|
_sampleRate = sampleRate;
|
||||||
|
@ -636,7 +631,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Updates the audiobuffer based on the current frame t-state
|
/// Updates the audiobuffer based on the current frame t-state
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cycle"></param>
|
|
||||||
private void BufferUpdate(int cycle)
|
private void BufferUpdate(int cycle)
|
||||||
{
|
{
|
||||||
if (cycle > _tStatesPerFrame)
|
if (cycle > _tStatesPerFrame)
|
||||||
|
@ -822,7 +816,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// State serialization
|
/// State serialization
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ser"></param>
|
|
||||||
public void SyncState(Serializer ser)
|
public void SyncState(Serializer ser)
|
||||||
{
|
{
|
||||||
ser.BeginSection("PSG-AY");
|
ser.BeginSection("PSG-AY");
|
||||||
|
|
|
@ -82,8 +82,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Takes an int 0-100 and returns the relevant short volume to output
|
/// Takes an int 0-100 and returns the relevant short volume to output
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="vol"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
private int VolumeConverterIn(int vol)
|
private int VolumeConverterIn(int vol)
|
||||||
{
|
{
|
||||||
int maxLimit = short.MaxValue / 3;
|
int maxLimit = short.MaxValue / 3;
|
||||||
|
@ -95,8 +93,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Takes an short volume and returns the relevant int value 0-100
|
/// Takes an short volume and returns the relevant int value 0-100
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="vol"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
private int VolumeConverterOut(int shortvol)
|
private int VolumeConverterOut(int shortvol)
|
||||||
{
|
{
|
||||||
int maxLimit = short.MaxValue / 3;
|
int maxLimit = short.MaxValue / 3;
|
||||||
|
@ -134,7 +130,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Processes an incoming pulse value and adds it to the blipbuffer
|
/// Processes an incoming pulse value and adds it to the blipbuffer
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pulse"></param>
|
|
||||||
public void ProcessPulseValue(bool pulse)
|
public void ProcessPulseValue(bool pulse)
|
||||||
{
|
{
|
||||||
if (!_machine._renderSound)
|
if (!_machine._renderSound)
|
||||||
|
|
|
@ -16,8 +16,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// Simulates reading from the bus
|
/// Simulates reading from the bus
|
||||||
/// ROM paging should be handled here
|
/// ROM paging should be handled here
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public override byte ReadBus(ushort addr)
|
public override byte ReadBus(ushort addr)
|
||||||
{
|
{
|
||||||
int divisor = addr / 0x4000;
|
int divisor = addr / 0x4000;
|
||||||
|
@ -61,8 +59,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// Simulates writing to the bus
|
/// Simulates writing to the bus
|
||||||
/// Writes to the bus ALWAYS go to RAM, regardless of what upper and lower ROMs are paged in
|
/// Writes to the bus ALWAYS go to RAM, regardless of what upper and lower ROMs are paged in
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <param name="value"></param>
|
|
||||||
public override void WriteBus(ushort addr, byte value)
|
public override void WriteBus(ushort addr, byte value)
|
||||||
{
|
{
|
||||||
int divisor = addr / 0x4000;
|
int divisor = addr / 0x4000;
|
||||||
|
@ -96,8 +92,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads a byte of data from a specified memory address
|
/// Reads a byte of data from a specified memory address
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public override byte ReadMemory(ushort addr)
|
public override byte ReadMemory(ushort addr)
|
||||||
{
|
{
|
||||||
var data = ReadBus(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
|
/// Writes a byte of data to a specified memory address
|
||||||
/// (with memory contention if appropriate)
|
/// (with memory contention if appropriate)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <param name="value"></param>
|
|
||||||
public override void WriteMemory(ushort addr, byte value)
|
public override void WriteMemory(ushort addr, byte value)
|
||||||
{
|
{
|
||||||
WriteBus(addr, value);
|
WriteBus(addr, value);
|
||||||
|
@ -119,8 +111,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets up the ROM
|
/// Sets up the ROM
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="buffer"></param>
|
|
||||||
/// <param name="startAddress"></param>
|
|
||||||
public override void InitROM(RomData[] romData)
|
public override void InitROM(RomData[] romData)
|
||||||
{
|
{
|
||||||
foreach (var r in romData)
|
foreach (var r in romData)
|
||||||
|
|
|
@ -16,8 +16,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads a byte of data from a specified port address
|
/// Reads a byte of data from a specified port address
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public override byte ReadPort(ushort port)
|
public override byte ReadPort(ushort port)
|
||||||
{
|
{
|
||||||
BitArray portBits = new BitArray(BitConverter.GetBytes(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
|
/// Writes a byte of data to a specified port address
|
||||||
/// Because of the port decoding, multiple devices can be written to
|
/// Because of the port decoding, multiple devices can be written to
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="value"></param>
|
|
||||||
public override void WritePort(ushort port, byte value)
|
public override void WritePort(ushort port, byte value)
|
||||||
{
|
{
|
||||||
BitArray portBits = new BitArray(BitConverter.GetBytes(port));
|
BitArray portBits = new BitArray(BitConverter.GetBytes(port));
|
||||||
|
|
|
@ -14,8 +14,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Main constructor
|
/// Main constructor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="spectrum"></param>
|
|
||||||
/// <param name="cpu"></param>
|
|
||||||
public CPC464(AmstradCPC cpc, Z80A cpu, List<byte[]> files, bool autoTape, AmstradCPC.BorderType borderType)
|
public CPC464(AmstradCPC cpc, Z80A cpu, List<byte[]> files, bool autoTape, AmstradCPC.BorderType borderType)
|
||||||
{
|
{
|
||||||
CPC = cpc;
|
CPC = cpc;
|
||||||
|
|
|
@ -16,8 +16,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// Simulates reading from the bus
|
/// Simulates reading from the bus
|
||||||
/// ROM and RAM paging should be handled here
|
/// ROM and RAM paging should be handled here
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public override byte ReadBus(ushort addr)
|
public override byte ReadBus(ushort addr)
|
||||||
{
|
{
|
||||||
int divisor = addr / 0x4000;
|
int divisor = addr / 0x4000;
|
||||||
|
@ -127,8 +125,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// Simulates writing to the bus
|
/// Simulates writing to the bus
|
||||||
/// Writes to the bus ALWAYS go to RAM, regardless of what upper and lower ROMs are paged in
|
/// Writes to the bus ALWAYS go to RAM, regardless of what upper and lower ROMs are paged in
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <param name="value"></param>
|
|
||||||
public override void WriteBus(ushort addr, byte value)
|
public override void WriteBus(ushort addr, byte value)
|
||||||
{
|
{
|
||||||
int divisor = addr / 0x4000;
|
int divisor = addr / 0x4000;
|
||||||
|
@ -211,8 +207,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads a byte of data from a specified memory address
|
/// Reads a byte of data from a specified memory address
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public override byte ReadMemory(ushort addr)
|
public override byte ReadMemory(ushort addr)
|
||||||
{
|
{
|
||||||
var data = ReadBus(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
|
/// Writes a byte of data to a specified memory address
|
||||||
/// (with memory contention if appropriate)
|
/// (with memory contention if appropriate)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <param name="value"></param>
|
|
||||||
public override void WriteMemory(ushort addr, byte value)
|
public override void WriteMemory(ushort addr, byte value)
|
||||||
{
|
{
|
||||||
WriteBus(addr, value);
|
WriteBus(addr, value);
|
||||||
|
@ -234,8 +226,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets up the ROM
|
/// Sets up the ROM
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="buffer"></param>
|
|
||||||
/// <param name="startAddress"></param>
|
|
||||||
public override void InitROM(RomData[] romData)
|
public override void InitROM(RomData[] romData)
|
||||||
{
|
{
|
||||||
foreach (var r in romData)
|
foreach (var r in romData)
|
||||||
|
|
|
@ -17,8 +17,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads a byte of data from a specified port address
|
/// Reads a byte of data from a specified port address
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public override byte ReadPort(ushort port)
|
public override byte ReadPort(ushort port)
|
||||||
{
|
{
|
||||||
BitArray portBits = new BitArray(BitConverter.GetBytes(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
|
/// Writes a byte of data to a specified port address
|
||||||
/// Because of the port decoding, multiple devices can be written to
|
/// Because of the port decoding, multiple devices can be written to
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="value"></param>
|
|
||||||
public override void WritePort(ushort port, byte value)
|
public override void WritePort(ushort port, byte value)
|
||||||
{
|
{
|
||||||
BitArray portBits = new BitArray(BitConverter.GetBytes(port));
|
BitArray portBits = new BitArray(BitConverter.GetBytes(port));
|
||||||
|
|
|
@ -14,8 +14,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Main constructor
|
/// Main constructor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="spectrum"></param>
|
|
||||||
/// <param name="cpu"></param>
|
|
||||||
public CPC6128(AmstradCPC cpc, Z80A cpu, List<byte[]> files, bool autoTape, AmstradCPC.BorderType borderType)
|
public CPC6128(AmstradCPC cpc, Z80A cpu, List<byte[]> files, bool autoTape, AmstradCPC.BorderType borderType)
|
||||||
{
|
{
|
||||||
CPC = cpc;
|
CPC = cpc;
|
||||||
|
|
|
@ -105,7 +105,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called on first instantiation (and subsequent core reboots)
|
/// Called on first instantiation (and subsequent core reboots)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="files"></param>
|
|
||||||
protected void InitializeMedia(List<byte[]> files)
|
protected void InitializeMedia(List<byte[]> files)
|
||||||
{
|
{
|
||||||
mediaImages = files;
|
mediaImages = files;
|
||||||
|
@ -227,7 +226,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Identifies and sorts the various media types
|
/// Identifies and sorts the various media types
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
private CPCMediaType IdentifyMedia(byte[] data)
|
private CPCMediaType IdentifyMedia(byte[] data)
|
||||||
{
|
{
|
||||||
// get first 16 bytes as a string
|
// get first 16 bytes as a string
|
||||||
|
|
|
@ -71,15 +71,11 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// Simulates reading from the bus
|
/// Simulates reading from the bus
|
||||||
/// Paging should be handled here
|
/// Paging should be handled here
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public abstract byte ReadBus(ushort addr);
|
public abstract byte ReadBus(ushort addr);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Pushes a value onto the data bus that should be valid as long as the interrupt is true
|
/// Pushes a value onto the data bus that should be valid as long as the interrupt is true
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public virtual byte PushBus()
|
public virtual byte PushBus()
|
||||||
{
|
{
|
||||||
return 0xFF;
|
return 0xFF;
|
||||||
|
@ -89,38 +85,29 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// Simulates writing to the bus
|
/// Simulates writing to the bus
|
||||||
/// Paging should be handled here
|
/// Paging should be handled here
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <param name="value"></param>
|
|
||||||
public abstract void WriteBus(ushort addr, byte value);
|
public abstract void WriteBus(ushort addr, byte value);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads a byte of data from a specified memory address
|
/// Reads a byte of data from a specified memory address
|
||||||
/// (with memory contention if appropriate)
|
/// (with memory contention if appropriate)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public abstract byte ReadMemory(ushort addr);
|
public abstract byte ReadMemory(ushort addr);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Writes a byte of data to a specified memory address
|
/// Writes a byte of data to a specified memory address
|
||||||
/// (with memory contention if appropriate)
|
/// (with memory contention if appropriate)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <param name="value"></param>
|
|
||||||
public abstract void WriteMemory(ushort addr, byte value);
|
public abstract void WriteMemory(ushort addr, byte value);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets up the ROM
|
/// Sets up the ROM
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="buffer"></param>
|
|
||||||
public abstract void InitROM(RomData[] romData);
|
public abstract void InitROM(RomData[] romData);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ULA reads the memory at the specified address
|
/// ULA reads the memory at the specified address
|
||||||
/// (No memory contention)
|
/// (No memory contention)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public virtual byte FetchScreenMemory(ushort addr)
|
public virtual byte FetchScreenMemory(ushort addr)
|
||||||
{
|
{
|
||||||
int divisor = addr / 0x4000;
|
int divisor = addr / 0x4000;
|
||||||
|
|
|
@ -14,15 +14,11 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads a byte of data from a specified port address
|
/// Reads a byte of data from a specified port address
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public abstract byte ReadPort(ushort port);
|
public abstract byte ReadPort(ushort port);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Writes a byte of data to a specified port address
|
/// Writes a byte of data to a specified port address
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="value"></param>
|
|
||||||
public abstract void WritePort(ushort port, byte value);
|
public abstract void WritePort(ushort port, byte value);
|
||||||
|
|
||||||
/// <summary>
|
/// <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
|
/// https://web.archive.org/web/20090808085929/http://www.cepece.info/amstrad/docs/iopord.html
|
||||||
/// http://www.cpcwiki.eu/index.php/I/O_Port_Summary
|
/// http://www.cpcwiki.eu/index.php/I/O_Port_Summary
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
protected virtual PortDevice DecodeINPort(ushort port)
|
protected virtual PortDevice DecodeINPort(ushort port)
|
||||||
{
|
{
|
||||||
PortDevice dev = PortDevice.Unknown;
|
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
|
/// https://web.archive.org/web/20090808085929/http://www.cepece.info/amstrad/docs/iopord.html
|
||||||
/// http://www.cpcwiki.eu/index.php/I/O_Port_Summary
|
/// http://www.cpcwiki.eu/index.php/I/O_Port_Summary
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
protected virtual List<PortDevice> DecodeOUTPort(ushort port)
|
protected virtual List<PortDevice> DecodeOUTPort(ushort port)
|
||||||
{
|
{
|
||||||
List<PortDevice> devs = new List<PortDevice>();
|
List<PortDevice> devs = new List<PortDevice>();
|
||||||
|
|
|
@ -276,7 +276,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Selects the pen
|
/// Selects the pen
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
public virtual void SetPen(BitArray bi)
|
public virtual void SetPen(BitArray bi)
|
||||||
{
|
{
|
||||||
if (bi[4])
|
if (bi[4])
|
||||||
|
@ -296,7 +295,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Selects colour for the currently selected pen
|
/// Selects colour for the currently selected pen
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
public virtual void SetPenColour(BitArray bi)
|
public virtual void SetPenColour(BitArray bi)
|
||||||
{
|
{
|
||||||
byte[] b = new byte[1];
|
byte[] b = new byte[1];
|
||||||
|
@ -308,8 +306,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the actual ARGB pen colour value
|
/// Returns the actual ARGB pen colour value
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="idx"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public virtual int GetPenColour(int idx)
|
public virtual int GetPenColour(int idx)
|
||||||
{
|
{
|
||||||
return CPCHardwarePalette[PenColours[idx]];
|
return CPCHardwarePalette[PenColours[idx]];
|
||||||
|
@ -318,7 +314,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Screen mode and ROM config
|
/// Screen mode and ROM config
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
public virtual void SetReg2(BitArray bi)
|
public virtual void SetReg2(BitArray bi)
|
||||||
{
|
{
|
||||||
byte[] b = new byte[1];
|
byte[] b = new byte[1];
|
||||||
|
@ -361,7 +356,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// Only available on machines with a 64KB memory expansion
|
/// Only available on machines with a 64KB memory expansion
|
||||||
/// Default assume we dont have this
|
/// Default assume we dont have this
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
public virtual void SetRAM(BitArray bi)
|
public virtual void SetRAM(BitArray bi)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -397,9 +391,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Device responds to an IN instruction
|
/// Device responds to an IN instruction
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="result"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool ReadPort(ushort port, ref int result)
|
public bool ReadPort(ushort port, ref int result)
|
||||||
{
|
{
|
||||||
// gate array is OUT only
|
// gate array is OUT only
|
||||||
|
@ -409,9 +400,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Device responds to an OUT instruction
|
/// Device responds to an OUT instruction
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="result"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool WritePort(ushort port, int result)
|
public bool WritePort(ushort port, int result)
|
||||||
{
|
{
|
||||||
BitArray portBits = new BitArray(BitConverter.GetBytes(port));
|
BitArray portBits = new BitArray(BitConverter.GetBytes(port));
|
||||||
|
|
|
@ -18,7 +18,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Attempts to parse incoming disk data
|
/// Attempts to parse incoming disk data
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="diskData"></param>
|
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// TRUE: disk parsed
|
/// TRUE: disk parsed
|
||||||
/// FALSE: unable to parse disk
|
/// FALSE: unable to parse disk
|
||||||
|
@ -149,9 +148,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Takes a double-sided disk byte array and converts into 2 single-sided arrays
|
/// Takes a double-sided disk byte array and converts into 2 single-sided arrays
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
/// <param name="results"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static bool SplitDoubleSided(byte[] data, List<byte[]> results)
|
public static bool SplitDoubleSided(byte[] data, List<byte[]> results)
|
||||||
{
|
{
|
||||||
// look for standard magic string
|
// look for standard magic string
|
||||||
|
@ -231,7 +227,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// State serlialization
|
/// State serlialization
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ser"></param>
|
|
||||||
public override void SyncState(Serializer ser)
|
public override void SyncState(Serializer ser)
|
||||||
{
|
{
|
||||||
ser.BeginSection("Plus3FloppyDisk");
|
ser.BeginSection("Plus3FloppyDisk");
|
||||||
|
|
|
@ -18,7 +18,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Attempts to parse incoming disk data
|
/// Attempts to parse incoming disk data
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="diskData"></param>
|
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// TRUE: disk parsed
|
/// TRUE: disk parsed
|
||||||
/// FALSE: unable to parse disk
|
/// FALSE: unable to parse disk
|
||||||
|
@ -154,9 +153,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Takes a double-sided disk byte array and converts into 2 single-sided arrays
|
/// Takes a double-sided disk byte array and converts into 2 single-sided arrays
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
/// <param name="results"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static bool SplitDoubleSided(byte[] data, List<byte[]> results)
|
public static bool SplitDoubleSided(byte[] data, List<byte[]> results)
|
||||||
{
|
{
|
||||||
// look for standard magic string
|
// look for standard magic string
|
||||||
|
@ -218,7 +214,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// State serlialization
|
/// State serlialization
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ser"></param>
|
|
||||||
public override void SyncState(Serializer ser)
|
public override void SyncState(Serializer ser)
|
||||||
{
|
{
|
||||||
ser.BeginSection("Plus3FloppyDisk");
|
ser.BeginSection("Plus3FloppyDisk");
|
||||||
|
|
|
@ -88,7 +88,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Attempts to parse incoming disk data
|
/// Attempts to parse incoming disk data
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="diskData"></param>
|
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// TRUE: disk parsed
|
/// TRUE: disk parsed
|
||||||
/// FALSE: unable to parse disk
|
/// FALSE: unable to parse disk
|
||||||
|
@ -183,7 +182,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// Detection routine for shadow of the beast game
|
/// Detection routine for shadow of the beast game
|
||||||
/// Still cannot get this to work, but at least the game is detected
|
/// Still cannot get this to work, but at least the game is detected
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
public bool DetectShadowOfTheBeast()
|
public bool DetectShadowOfTheBeast()
|
||||||
{
|
{
|
||||||
if (DiskTracks[0].Sectors.Length != 9)
|
if (DiskTracks[0].Sectors.Length != 9)
|
||||||
|
@ -222,8 +220,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Detect speedlock weak sector
|
/// Detect speedlock weak sector
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="weak"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool DetectSpeedlock(ref int[] weak)
|
public bool DetectSpeedlock(ref int[] weak)
|
||||||
{
|
{
|
||||||
// SPEEDLOCK NOTES (-asni 2018-05-01)
|
// SPEEDLOCK NOTES (-asni 2018-05-01)
|
||||||
|
@ -287,8 +283,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Detect Alkatraz
|
/// Detect Alkatraz
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="weak"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool DetectAlkatraz(ref int[] weak)
|
public bool DetectAlkatraz(ref int[] weak)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -330,8 +324,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Detect Paul Owens
|
/// Detect Paul Owens
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="weak"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool DetectPaulOwens(ref int[] weak)
|
public bool DetectPaulOwens(ref int[] weak)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -368,8 +360,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Detect Hexagon copy protection
|
/// Detect Hexagon copy protection
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="weak"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool DetectHexagon(ref int[] weak)
|
public bool DetectHexagon(ref int[] weak)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -417,7 +407,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// Should be run at the end of the ParseDisk process
|
/// Should be run at the end of the ParseDisk process
|
||||||
/// If speedlock is detected the flag is set in the disk image
|
/// If speedlock is detected the flag is set in the disk image
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
protected virtual void SpeedlockDetection()
|
protected virtual void SpeedlockDetection()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -515,7 +504,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the track count for the disk
|
/// Returns the track count for the disk
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
public virtual int GetTrackCount()
|
public virtual int GetTrackCount()
|
||||||
{
|
{
|
||||||
return DiskHeader.NumberOfTracks * DiskHeader.NumberOfSides;
|
return DiskHeader.NumberOfTracks * DiskHeader.NumberOfSides;
|
||||||
|
@ -524,8 +512,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads the current sector ID info
|
/// Reads the current sector ID info
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="track"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public virtual CHRN ReadID(byte trackIndex, byte side, int sectorIndex)
|
public virtual CHRN ReadID(byte trackIndex, byte side, int sectorIndex)
|
||||||
{
|
{
|
||||||
if (side != 0)
|
if (side != 0)
|
||||||
|
@ -578,7 +564,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// State serialization routines
|
/// State serialization routines
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ser"></param>
|
|
||||||
public abstract void SyncState(Serializer ser);
|
public abstract void SyncState(Serializer ser);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Serialization method
|
/// Serialization method
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
public virtual void Read(byte[] data)
|
public virtual void Read(byte[] data)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException(this.GetType().ToString() +
|
throw new NotImplementedException(this.GetType().ToString() +
|
||||||
|
@ -49,7 +48,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// DeSerialization method
|
/// DeSerialization method
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
public virtual void Write(byte[] data)
|
public virtual void Write(byte[] data)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException(this.GetType().ToString() +
|
throw new NotImplementedException(this.GetType().ToString() +
|
||||||
|
@ -59,7 +57,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Serializer does a quick check, returns TRUE if file is detected as this type
|
/// Serializer does a quick check, returns TRUE if file is detected as this type
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
public virtual bool CheckType(byte[] data)
|
public virtual bool CheckType(byte[] data)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException(this.GetType().ToString() +
|
throw new NotImplementedException(this.GetType().ToString() +
|
||||||
|
@ -71,8 +68,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts an int32 value into a byte array
|
/// Converts an int32 value into a byte array
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="value"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static byte[] GetBytes(int value)
|
public static byte[] GetBytes(int value)
|
||||||
{
|
{
|
||||||
byte[] buf = new byte[4];
|
byte[] buf = new byte[4];
|
||||||
|
@ -86,9 +81,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns an int32 from a byte array based on offset
|
/// Returns an int32 from a byte array based on offset
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="buf"></param>
|
|
||||||
/// <param name="offsetIndex"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static int GetInt32(byte[] buf, int offsetIndex)
|
public static int GetInt32(byte[] buf, int offsetIndex)
|
||||||
{
|
{
|
||||||
return buf[offsetIndex] | buf[offsetIndex + 1] << 8 | buf[offsetIndex + 2] << 16 | buf[offsetIndex + 3] << 24;
|
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>
|
/// <summary>
|
||||||
/// Returns an uint16 from a byte array based on offset
|
/// Returns an uint16 from a byte array based on offset
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="buf"></param>
|
|
||||||
/// <param name="offsetIndex"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static ushort GetWordValue(byte[] buf, int offsetIndex)
|
public static ushort GetWordValue(byte[] buf, int offsetIndex)
|
||||||
{
|
{
|
||||||
return (ushort)(buf[offsetIndex] | buf[offsetIndex + 1] << 8);
|
return (ushort)(buf[offsetIndex] | buf[offsetIndex + 1] << 8);
|
||||||
|
@ -108,9 +97,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Updates a byte array with a uint16 value based on offset
|
/// Updates a byte array with a uint16 value based on offset
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="buf"></param>
|
|
||||||
/// <param name="offsetIndex"></param>
|
|
||||||
/// <param name="value"></param>
|
|
||||||
public static void SetWordValue(byte[] buf, int offsetIndex, ushort value)
|
public static void SetWordValue(byte[] buf, int offsetIndex, ushort value)
|
||||||
{
|
{
|
||||||
buf[offsetIndex] = (byte)value;
|
buf[offsetIndex] = (byte)value;
|
||||||
|
@ -120,8 +106,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Takes a PauseInMilliseconds value and returns the value in T-States
|
/// Takes a PauseInMilliseconds value and returns the value in T-States
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pauseInMS"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static int TranslatePause(int pauseInMS)
|
public static int TranslatePause(int pauseInMS)
|
||||||
{
|
{
|
||||||
// t-states per millisecond
|
// t-states per millisecond
|
||||||
|
@ -135,8 +119,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Decompresses a byte array that is Z-RLE compressed
|
/// Decompresses a byte array that is Z-RLE compressed
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sourceBuffer"></param>
|
|
||||||
/// <param name="destBuffer"></param>
|
|
||||||
public static void DecompressZRLE(byte[] sourceBuffer, ref byte[] destBuffer)
|
public static void DecompressZRLE(byte[] sourceBuffer, ref byte[] destBuffer)
|
||||||
{
|
{
|
||||||
MemoryStream stream = new MemoryStream();
|
MemoryStream stream = new MemoryStream();
|
||||||
|
|
|
@ -63,8 +63,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// However all timings are based on spectrum timings (3.5Mhz)
|
/// However all timings are based on spectrum timings (3.5Mhz)
|
||||||
/// so need to be adjusted for the CPC (4Mhz)
|
/// so need to be adjusted for the CPC (4Mhz)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="db"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
private TapeDataBlock ConvertClock(TapeDataBlock db)
|
private TapeDataBlock ConvertClock(TapeDataBlock db)
|
||||||
{
|
{
|
||||||
TapeDataBlock tb = new TapeDataBlock();
|
TapeDataBlock tb = new TapeDataBlock();
|
||||||
|
@ -110,7 +108,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns TRUE if tzx header is detected
|
/// Returns TRUE if tzx header is detected
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
public override bool CheckType(byte[] data)
|
public override bool CheckType(byte[] data)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -147,7 +144,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// DeSerialization method
|
/// DeSerialization method
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
public override void Read(byte[] data)
|
public override void Read(byte[] data)
|
||||||
{
|
{
|
||||||
// clear existing tape blocks
|
// clear existing tape blocks
|
||||||
|
@ -207,8 +203,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Processes a TZX block
|
/// Processes a TZX block
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
/// <param name="id"></param>
|
|
||||||
private void ProcessBlock(byte[] data, int id)
|
private void ProcessBlock(byte[] data, int id)
|
||||||
{
|
{
|
||||||
// process based on detected block ID
|
// process based on detected block ID
|
||||||
|
@ -1674,9 +1668,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to process either a standard or turbo data block
|
/// Used to process either a standard or turbo data block
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="block"></param>
|
|
||||||
/// <param name="blockData"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
private TapeDataBlock DecodeDataBlock
|
private TapeDataBlock DecodeDataBlock
|
||||||
(
|
(
|
||||||
TapeDataBlock block,
|
TapeDataBlock block,
|
||||||
|
@ -1900,9 +1891,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to process either a standard or turbo data block
|
/// Used to process either a standard or turbo data block
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="block"></param>
|
|
||||||
/// <param name="blockData"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
private TapeDataBlock DecodeDataBlock
|
private TapeDataBlock DecodeDataBlock
|
||||||
(
|
(
|
||||||
TapeDataBlock block,
|
TapeDataBlock block,
|
||||||
|
@ -1957,7 +1945,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// If neccessary a seperate PAUSE block will be created
|
/// If neccessary a seperate PAUSE block will be created
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="original"></param>
|
|
||||||
private void CreatePauseBlock(TapeDataBlock original)
|
private void CreatePauseBlock(TapeDataBlock original)
|
||||||
{
|
{
|
||||||
if (original.PauseInMS > 0)
|
if (original.PauseInMS > 0)
|
||||||
|
|
|
@ -88,8 +88,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a single metadata item to the Dictionary
|
/// Adds a single metadata item to the Dictionary
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="descriptor"></param>
|
|
||||||
/// <param name="data"></param>
|
|
||||||
public void AddMetaData(BlockDescriptorTitle descriptor, string data)
|
public void AddMetaData(BlockDescriptorTitle descriptor, string data)
|
||||||
{
|
{
|
||||||
// check whether entry already exists
|
// check whether entry already exists
|
||||||
|
@ -143,7 +141,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// Returns the data periods as an array
|
/// Returns the data periods as an array
|
||||||
/// (primarily to aid in bizhawk state serialization)
|
/// (primarily to aid in bizhawk state serialization)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
public int[] GetDataPeriodsArray()
|
public int[] GetDataPeriodsArray()
|
||||||
{
|
{
|
||||||
return DataPeriods.ToArray();
|
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
|
/// Accepts an array of data periods and updates the DataPeriods list accordingly
|
||||||
/// (primarily to aid in bizhawk state serialization)
|
/// (primarily to aid in bizhawk state serialization)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
public void SetDataPeriodsArray(int[] periodArray)
|
public void SetDataPeriodsArray(int[] periodArray)
|
||||||
{
|
{
|
||||||
DataPeriods = new List<int>();
|
DataPeriods = new List<int>();
|
||||||
|
@ -167,7 +163,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bizhawk state serialization
|
/// Bizhawk state serialization
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ser"></param>
|
|
||||||
public void SyncState(Serializer ser, int blockPosition)
|
public void SyncState(Serializer ser, int blockPosition)
|
||||||
{
|
{
|
||||||
ser.BeginSection("DataBlock" + blockPosition);
|
ser.BeginSection("DataBlock" + blockPosition);
|
||||||
|
|
|
@ -35,11 +35,6 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initialise a RomData object
|
/// Initialise a RomData object
|
||||||
/// </summary>
|
/// </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)
|
public static RomData InitROM(MachineType machineType, byte[] rom, ROMChipType type, int romPosition = 0)
|
||||||
{
|
{
|
||||||
RomData RD = new RomData();
|
RomData RD = new RomData();
|
||||||
|
|
|
@ -10,20 +10,16 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initialisation
|
/// Initialisation
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sampleRate"></param>
|
|
||||||
/// <param name="tStatesPerFrame"></param>
|
|
||||||
void Init(int sampleRate, int tStatesPerFrame);
|
void Init(int sampleRate, int tStatesPerFrame);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Processes an incoming pulse value and adds it to the blipbuffer
|
/// Processes an incoming pulse value and adds it to the blipbuffer
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pulse"></param>
|
|
||||||
void ProcessPulseValue(bool pulse);
|
void ProcessPulseValue(bool pulse);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// State serialization
|
/// State serialization
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ser"></param>
|
|
||||||
void SyncState(Serializer ser);
|
void SyncState(Serializer ser);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Parses a new disk image and loads it into this floppy drive
|
/// Parses a new disk image and loads it into this floppy drive
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="diskData"></param>
|
|
||||||
void FDD_LoadDisk(byte[] diskData);
|
void FDD_LoadDisk(byte[] diskData);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -24,15 +24,11 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the joystick line based on key pressed
|
/// Sets the joystick line based on key pressed
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <param name="isPressed"></param>
|
|
||||||
void SetJoyInput(string key, bool isPressed);
|
void SetJoyInput(string key, bool isPressed);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the state of a particular joystick binding
|
/// Gets the state of a particular joystick binding
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
bool GetJoyInput(string key);
|
bool GetJoyInput(string key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,36 +43,26 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the spectrum key status
|
/// Sets the spectrum key status
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <param name="isPressed"></param>
|
|
||||||
void SetKeyStatus(string key, bool isPressed);
|
void SetKeyStatus(string key, bool isPressed);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the status of a spectrum key
|
/// Gets the status of a spectrum key
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
bool GetKeyStatus(string key);
|
bool GetKeyStatus(string key);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the query byte
|
/// Returns the query byte
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="lines"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
byte GetLineStatus(byte lines);
|
byte GetLineStatus(byte lines);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads a keyboard byte
|
/// Reads a keyboard byte
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
byte ReadKeyboardByte(ushort addr);
|
byte ReadKeyboardByte(ushort addr);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a key in the keyboard matrix and returns the relevent byte value
|
/// Looks up a key in the keyboard matrix and returns the relevent byte value
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
byte GetByteFromKeyMatrix(string key);
|
byte GetByteFromKeyMatrix(string key);
|
||||||
|
|
||||||
void SyncState(Serializer ser);
|
void SyncState(Serializer ser);
|
||||||
|
|
|
@ -11,8 +11,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initlization routine
|
/// Initlization routine
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sampleRate"></param>
|
|
||||||
/// <param name="tStatesPerFrame"></param>
|
|
||||||
void Init(int sampleRate, int tStatesPerFrame);
|
void Init(int sampleRate, int tStatesPerFrame);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -25,7 +23,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Writes to the PSG
|
/// Writes to the PSG
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="value"></param>
|
|
||||||
void PortWrite(int value);
|
void PortWrite(int value);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -57,13 +54,11 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Updates the sound based on number of frame cycles
|
/// Updates the sound based on number of frame cycles
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="frameCycle"></param>
|
|
||||||
void UpdateSound(int frameCycle);
|
void UpdateSound(int frameCycle);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// IStatable serialization
|
/// IStatable serialization
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ser"></param>
|
|
||||||
void SyncState(Serializer ser);
|
void SyncState(Serializer ser);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,17 +9,11 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Device responds to an IN instruction
|
/// Device responds to an IN instruction
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="result"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
bool ReadPort(ushort port, ref int result);
|
bool ReadPort(ushort port, ref int result);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Device responds to an OUT instruction
|
/// Device responds to an OUT instruction
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="result"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
bool WritePort(ushort port, int result);
|
bool WritePort(ushort port, int result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes the datacorder device
|
/// Initializes the datacorder device
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="machine"></param>
|
|
||||||
public void Init(SpectrumBase machine)
|
public void Init(SpectrumBase machine)
|
||||||
{
|
{
|
||||||
_machine = machine;
|
_machine = machine;
|
||||||
|
@ -263,7 +262,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// TRUE: skip forward
|
/// TRUE: skip forward
|
||||||
/// FALSE: skip backward
|
/// FALSE: skip backward
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="skipForward"></param>
|
|
||||||
public void SkipBlock(bool skipForward)
|
public void SkipBlock(bool skipForward)
|
||||||
{
|
{
|
||||||
int blockCount = _dataBlocks.Count;
|
int blockCount = _dataBlocks.Count;
|
||||||
|
@ -318,7 +316,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Inserts a new tape and sets up the tape device accordingly
|
/// Inserts a new tape and sets up the tape device accordingly
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="tapeData"></param>
|
|
||||||
public void LoadTape(byte[] tapeData)
|
public void LoadTape(byte[] tapeData)
|
||||||
{
|
{
|
||||||
// instantiate converters
|
// instantiate converters
|
||||||
|
@ -463,8 +460,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Simulates the spectrum 'EAR' input reading data from the tape
|
/// Simulates the spectrum 'EAR' input reading data from the tape
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cpuCycles"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool GetEarBit(long cpuCycle)
|
public bool GetEarBit(long cpuCycle)
|
||||||
{
|
{
|
||||||
// decide how many cycles worth of data we are capturing
|
// decide how many cycles worth of data we are capturing
|
||||||
|
@ -929,9 +924,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Device responds to an IN instruction
|
/// Device responds to an IN instruction
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="result"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool ReadPort(ushort port, ref int result)
|
public bool ReadPort(ushort port, ref int result)
|
||||||
{
|
{
|
||||||
if (TapeIsPlaying)
|
if (TapeIsPlaying)
|
||||||
|
@ -961,9 +953,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Device responds to an OUT instruction
|
/// Device responds to an OUT instruction
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="result"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool WritePort(ushort port, int result)
|
public bool WritePort(ushort port, int result)
|
||||||
{
|
{
|
||||||
if (!TapeIsPlaying)
|
if (!TapeIsPlaying)
|
||||||
|
@ -981,7 +970,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bizhawk state serialization
|
/// Bizhawk state serialization
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ser"></param>
|
|
||||||
public void SyncState(Serializer ser)
|
public void SyncState(Serializer ser)
|
||||||
{
|
{
|
||||||
ser.BeginSection(nameof(DatacorderDevice));
|
ser.BeginSection(nameof(DatacorderDevice));
|
||||||
|
|
|
@ -2413,7 +2413,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Handles CPU reading from the data register
|
/// Handles CPU reading from the data register
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
private byte ReadDataRegister()
|
private byte ReadDataRegister()
|
||||||
{
|
{
|
||||||
// default return value
|
// default return value
|
||||||
|
@ -2478,7 +2477,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Handles CPU writing to the data register
|
/// Handles CPU writing to the data register
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
|
||||||
private void WriteDataRegister(byte data)
|
private void WriteDataRegister(byte data)
|
||||||
{
|
{
|
||||||
if (!GetBit(MSR_RQM, StatusMain) || GetBit(MSR_DIO, StatusMain))
|
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
|
/// Returns TRUE if successful. FALSE if otherwise
|
||||||
/// Called only in idle phase
|
/// Called only in idle phase
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cmdByte"></param>
|
|
||||||
/// <param name="direction"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
private bool ParseCommandByte(byte cmdByte)
|
private bool ParseCommandByte(byte cmdByte)
|
||||||
{
|
{
|
||||||
// clear counters
|
// clear counters
|
||||||
|
@ -2625,7 +2620,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Parses the first 5 command argument bytes that are of the standard format
|
/// Parses the first 5 command argument bytes that are of the standard format
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="paramIndex"></param>
|
|
||||||
private void ParseParamByteStandard(int index)
|
private void ParseParamByteStandard(int index)
|
||||||
{
|
{
|
||||||
byte currByte = CommBuffer[index];
|
byte currByte = CommBuffer[index];
|
||||||
|
|
|
@ -69,7 +69,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Searches for the requested sector
|
/// Searches for the requested sector
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
private FloppyDisk.Sector GetSector()
|
private FloppyDisk.Sector GetSector()
|
||||||
{
|
{
|
||||||
FloppyDisk.Sector sector = null;
|
FloppyDisk.Sector sector = null;
|
||||||
|
@ -155,7 +154,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Parses a new disk image and loads it into this floppy drive
|
/// Parses a new disk image and loads it into this floppy drive
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="tapeData"></param>
|
|
||||||
public void FDD_LoadDisk(byte[] diskData)
|
public void FDD_LoadDisk(byte[] diskData)
|
||||||
{
|
{
|
||||||
// we are only going to load into the first drive
|
// we are only going to load into the first drive
|
||||||
|
@ -335,8 +333,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Moves the head across the disk cylinders
|
/// Moves the head across the disk cylinders
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="direction"></param>
|
|
||||||
/// <param name="cylinderCount"></param>
|
|
||||||
public void MoveHead(SkipDirection direction, int cylinderCount)
|
public void MoveHead(SkipDirection direction, int cylinderCount)
|
||||||
{
|
{
|
||||||
// get total tracks
|
// get total tracks
|
||||||
|
@ -378,10 +374,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Finds a supplied sector
|
/// Finds a supplied sector
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="resBuffer"></param>
|
|
||||||
/// <param name=""></param>
|
|
||||||
/// <param name=""></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public FloppyDisk.Sector FindSector(ref byte[] resBuffer, CommandParameters prms)
|
public FloppyDisk.Sector FindSector(ref byte[] resBuffer, CommandParameters prms)
|
||||||
{
|
{
|
||||||
int index =CurrentSector;
|
int index =CurrentSector;
|
||||||
|
@ -449,8 +441,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Populates a result buffer
|
/// Populates a result buffer
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="resBuffer"></param>
|
|
||||||
/// <param name="chrn"></param>
|
|
||||||
public void FillResult(ref byte[] resBuffer, CHRN chrn)
|
public void FillResult(ref byte[] resBuffer, CHRN chrn)
|
||||||
{
|
{
|
||||||
// clear results
|
// clear results
|
||||||
|
@ -480,7 +470,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Populates the result buffer with ReadID data
|
/// Populates the result buffer with ReadID data
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
public void ReadID(ref byte[] resBuffer)
|
public void ReadID(ref byte[] resBuffer)
|
||||||
{
|
{
|
||||||
if (CheckDriveStatus() == false)
|
if (CheckDriveStatus() == false)
|
||||||
|
@ -797,7 +786,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Parses a new disk image and loads it into this floppy drive
|
/// Parses a new disk image and loads it into this floppy drive
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="tapeData"></param>
|
|
||||||
public void FDD_LoadDisk(byte[] diskData)
|
public void FDD_LoadDisk(byte[] diskData)
|
||||||
{
|
{
|
||||||
// try dsk first
|
// try dsk first
|
||||||
|
|
|
@ -74,9 +74,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Device responds to an IN instruction
|
/// Device responds to an IN instruction
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="data"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool ReadPort(ushort port, ref int data)
|
public bool ReadPort(ushort port, ref int data)
|
||||||
{
|
{
|
||||||
BitArray bits = new BitArray(new byte[] { (byte)data });
|
BitArray bits = new BitArray(new byte[] { (byte)data });
|
||||||
|
@ -117,9 +114,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Device responds to an OUT instruction
|
/// Device responds to an OUT instruction
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="data"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool WritePort(ushort port, int data)
|
public bool WritePort(ushort port, int data)
|
||||||
{
|
{
|
||||||
BitArray bits = new BitArray(new byte[] { (byte)data });
|
BitArray bits = new BitArray(new byte[] { (byte)data });
|
||||||
|
|
|
@ -96,7 +96,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// Returns true if there is no delay
|
/// Returns true if there is no delay
|
||||||
/// Returns false if read is to be deferred
|
/// Returns false if read is to be deferred
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
private bool CheckTiming()
|
private bool CheckTiming()
|
||||||
{
|
{
|
||||||
// get delta
|
// get delta
|
||||||
|
|
|
@ -30,7 +30,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Main constructor
|
/// Main constructor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="machine"></param>
|
|
||||||
public NECUPD765()
|
public NECUPD765()
|
||||||
{
|
{
|
||||||
InitCommandList();
|
InitCommandList();
|
||||||
|
|
|
@ -18,9 +18,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the specified bit value from supplied byte
|
/// Returns the specified bit value from supplied byte
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="bitNumber"></param>
|
|
||||||
/// <param name="dataByte"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static bool GetBit(int bitNumber, byte dataByte)
|
public static bool GetBit(int bitNumber, byte dataByte)
|
||||||
{
|
{
|
||||||
if (bitNumber < 0 || bitNumber > 7)
|
if (bitNumber < 0 || bitNumber > 7)
|
||||||
|
@ -34,8 +31,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the specified bit of the supplied byte to 1
|
/// Sets the specified bit of the supplied byte to 1
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="bitNumber"></param>
|
|
||||||
/// <param name=""></param>
|
|
||||||
public static void SetBit(int bitNumber, ref byte dataByte)
|
public static void SetBit(int bitNumber, ref byte dataByte)
|
||||||
{
|
{
|
||||||
if (bitNumber < 0 || bitNumber > 7)
|
if (bitNumber < 0 || bitNumber > 7)
|
||||||
|
@ -51,8 +46,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the specified bit of the supplied byte to 0
|
/// Sets the specified bit of the supplied byte to 0
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="bitNumber"></param>
|
|
||||||
/// <param name=""></param>
|
|
||||||
public static void UnSetBit(int bitNumber, ref byte dataByte)
|
public static void UnSetBit(int bitNumber, ref byte dataByte)
|
||||||
{
|
{
|
||||||
if (bitNumber < 0 || bitNumber > 7)
|
if (bitNumber < 0 || bitNumber > 7)
|
||||||
|
@ -68,8 +61,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a drive number (0-3) based on the first two bits of the supplied byte
|
/// Returns a drive number (0-3) based on the first two bits of the supplied byte
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dataByte"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static int GetUnitSelect(byte dataByte)
|
public static int GetUnitSelect(byte dataByte)
|
||||||
{
|
{
|
||||||
int driveNumber = dataByte & 0x03;
|
int driveNumber = dataByte & 0x03;
|
||||||
|
@ -79,8 +70,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the first two bits of a byte based on the supplied drive number (0-3)
|
/// Sets the first two bits of a byte based on the supplied drive number (0-3)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="driveNumber"></param>
|
|
||||||
/// <param name="dataByte"></param>
|
|
||||||
public static void SetUnitSelect(int driveNumber, ref byte dataByte)
|
public static void SetUnitSelect(int driveNumber, ref byte dataByte)
|
||||||
{
|
{
|
||||||
switch (driveNumber)
|
switch (driveNumber)
|
||||||
|
|
|
@ -57,8 +57,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the joystick line based on key pressed
|
/// Sets the joystick line based on key pressed
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <param name="isPressed"></param>
|
|
||||||
public void SetJoyInput(string key, bool isPressed)
|
public void SetJoyInput(string key, bool isPressed)
|
||||||
{
|
{
|
||||||
var pos = GetBitPos(key);
|
var pos = GetBitPos(key);
|
||||||
|
@ -84,8 +82,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the state of a particular joystick binding
|
/// Gets the state of a particular joystick binding
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool GetJoyInput(string key)
|
public bool GetJoyInput(string key)
|
||||||
{
|
{
|
||||||
var pos = GetBitPos(key);
|
var pos = GetBitPos(key);
|
||||||
|
@ -101,8 +97,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the bit position of a particular joystick binding from the matrix
|
/// Gets the bit position of a particular joystick binding from the matrix
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public int GetBitPos(string key)
|
public int GetBitPos(string key)
|
||||||
{
|
{
|
||||||
int index = Array.IndexOf(ButtonCollection, key);
|
int index = Array.IndexOf(ButtonCollection, key);
|
||||||
|
|
|
@ -44,8 +44,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the joystick line based on key pressed
|
/// Sets the joystick line based on key pressed
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <param name="isPressed"></param>
|
|
||||||
public void SetJoyInput(string key, bool isPressed)
|
public void SetJoyInput(string key, bool isPressed)
|
||||||
{
|
{
|
||||||
var pos = GetBitPos(key);
|
var pos = GetBitPos(key);
|
||||||
|
@ -58,8 +56,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the state of a particular joystick binding
|
/// Gets the state of a particular joystick binding
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool GetJoyInput(string key)
|
public bool GetJoyInput(string key)
|
||||||
{
|
{
|
||||||
var pos = GetBitPos(key);
|
var pos = GetBitPos(key);
|
||||||
|
@ -81,8 +77,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the bit position of a particular joystick binding from the matrix
|
/// Gets the bit position of a particular joystick binding from the matrix
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public int GetBitPos(string key)
|
public int GetBitPos(string key)
|
||||||
{
|
{
|
||||||
int index = Array.IndexOf(ButtonCollection, key);
|
int index = Array.IndexOf(ButtonCollection, key);
|
||||||
|
|
|
@ -43,8 +43,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the joystick line based on key pressed
|
/// Sets the joystick line based on key pressed
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <param name="isPressed"></param>
|
|
||||||
public void SetJoyInput(string key, bool isPressed)
|
public void SetJoyInput(string key, bool isPressed)
|
||||||
{
|
{
|
||||||
var pos = GetBitPos(key);
|
var pos = GetBitPos(key);
|
||||||
|
@ -57,8 +55,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the state of a particular joystick binding
|
/// Gets the state of a particular joystick binding
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool GetJoyInput(string key)
|
public bool GetJoyInput(string key)
|
||||||
{
|
{
|
||||||
var pos = GetBitPos(key);
|
var pos = GetBitPos(key);
|
||||||
|
@ -80,8 +76,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the bit position of a particular joystick binding from the matrix
|
/// Gets the bit position of a particular joystick binding from the matrix
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public int GetBitPos(string key)
|
public int GetBitPos(string key)
|
||||||
{
|
{
|
||||||
int index = Array.IndexOf(ButtonCollection, key);
|
int index = Array.IndexOf(ButtonCollection, key);
|
||||||
|
|
|
@ -57,8 +57,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the joystick line based on key pressed
|
/// Sets the joystick line based on key pressed
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <param name="isPressed"></param>
|
|
||||||
public void SetJoyInput(string key, bool isPressed)
|
public void SetJoyInput(string key, bool isPressed)
|
||||||
{
|
{
|
||||||
var pos = GetBitPos(key);
|
var pos = GetBitPos(key);
|
||||||
|
@ -84,8 +82,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the state of a particular joystick binding
|
/// Gets the state of a particular joystick binding
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool GetJoyInput(string key)
|
public bool GetJoyInput(string key)
|
||||||
{
|
{
|
||||||
var pos = GetBitPos(key);
|
var pos = GetBitPos(key);
|
||||||
|
@ -100,8 +96,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the bit position of a particular joystick binding from the matrix
|
/// Gets the bit position of a particular joystick binding from the matrix
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public int GetBitPos(string key)
|
public int GetBitPos(string key)
|
||||||
{
|
{
|
||||||
int index = Array.IndexOf(ButtonCollection, key);
|
int index = Array.IndexOf(ButtonCollection, key);
|
||||||
|
|
|
@ -57,8 +57,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the joystick line based on key pressed
|
/// Sets the joystick line based on key pressed
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <param name="isPressed"></param>
|
|
||||||
public void SetJoyInput(string key, bool isPressed)
|
public void SetJoyInput(string key, bool isPressed)
|
||||||
{
|
{
|
||||||
var pos = GetBitPos(key);
|
var pos = GetBitPos(key);
|
||||||
|
@ -84,8 +82,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the state of a particular joystick binding
|
/// Gets the state of a particular joystick binding
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool GetJoyInput(string key)
|
public bool GetJoyInput(string key)
|
||||||
{
|
{
|
||||||
var pos = GetBitPos(key);
|
var pos = GetBitPos(key);
|
||||||
|
@ -100,8 +96,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the bit position of a particular joystick binding from the matrix
|
/// Gets the bit position of a particular joystick binding from the matrix
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public int GetBitPos(string key)
|
public int GetBitPos(string key)
|
||||||
{
|
{
|
||||||
int index = Array.IndexOf(ButtonCollection, key);
|
int index = Array.IndexOf(ButtonCollection, key);
|
||||||
|
|
|
@ -188,9 +188,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Device responds to an IN instruction
|
/// Device responds to an IN instruction
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="result"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool ReadPort(ushort port, ref int result)
|
public bool ReadPort(ushort port, ref int result)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -264,9 +261,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Device responds to an OUT instruction
|
/// Device responds to an OUT instruction
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="result"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool WritePort(ushort port, int result)
|
public bool WritePort(ushort port, int result)
|
||||||
{
|
{
|
||||||
// not implemented
|
// not implemented
|
||||||
|
|
|
@ -170,7 +170,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used for snapshot generation
|
/// Used for snapshot generation
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
public int[] ExportRegisters()
|
public int[] ExportRegisters()
|
||||||
{
|
{
|
||||||
return _registers;
|
return _registers;
|
||||||
|
@ -223,7 +222,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads the value from the currently selected register
|
/// Reads the value from the currently selected register
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
public int PortRead()
|
public int PortRead()
|
||||||
{
|
{
|
||||||
return _registers[_activeRegister];
|
return _registers[_activeRegister];
|
||||||
|
@ -232,7 +230,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Writes to the currently selected register
|
/// Writes to the currently selected register
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="value"></param>
|
|
||||||
public void PortWrite(int value)
|
public void PortWrite(int value)
|
||||||
{
|
{
|
||||||
if (_activeRegister >= 0x10)
|
if (_activeRegister >= 0x10)
|
||||||
|
@ -347,7 +344,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Updates the audiobuffer based on the current frame t-state
|
/// Updates the audiobuffer based on the current frame t-state
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="frameCycle"></param>
|
|
||||||
public void UpdateSound(int frameCycle)
|
public void UpdateSound(int frameCycle)
|
||||||
{
|
{
|
||||||
BufferUpdate(frameCycle);
|
BufferUpdate(frameCycle);
|
||||||
|
@ -595,8 +591,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes timing information for the frame
|
/// Initializes timing information for the frame
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sampleRate"></param>
|
|
||||||
/// <param name="frameTactCount"></param>
|
|
||||||
private void InitTiming(int sampleRate, int frameTactCount)
|
private void InitTiming(int sampleRate, int frameTactCount)
|
||||||
{
|
{
|
||||||
_sampleRate = sampleRate;
|
_sampleRate = sampleRate;
|
||||||
|
@ -620,7 +614,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Updates the audiobuffer based on the current frame t-state
|
/// Updates the audiobuffer based on the current frame t-state
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cycle"></param>
|
|
||||||
private void BufferUpdate(int cycle)
|
private void BufferUpdate(int cycle)
|
||||||
{
|
{
|
||||||
if (cycle > _tStatesPerFrame)
|
if (cycle > _tStatesPerFrame)
|
||||||
|
@ -763,7 +756,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// State serialization
|
/// State serialization
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ser"></param>
|
|
||||||
public void SyncState(Serializer ser)
|
public void SyncState(Serializer ser)
|
||||||
{
|
{
|
||||||
ser.BeginSection("PSG-AY");
|
ser.BeginSection("PSG-AY");
|
||||||
|
|
|
@ -103,7 +103,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up the current BUSRQ address that is about to be signalled on the upcoming cycle
|
/// Looks up the current BUSRQ address that is about to be signalled on the upcoming cycle
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
private ushort AscertainBUSRQAddress()
|
private ushort AscertainBUSRQAddress()
|
||||||
{
|
{
|
||||||
ushort addr = 0;
|
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
|
/// Running every cycle, this determines whether the upcoming BUSRQ is for an IO operation
|
||||||
/// Also processes any contention
|
/// Also processes any contention
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
private bool CheckIO()
|
private bool CheckIO()
|
||||||
{
|
{
|
||||||
bool isIO = false;
|
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
|
/// 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
|
/// This can be different based on the emulated ZX Spectrum model
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="T"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
private bool IsIOCycleContended(int T)
|
private bool IsIOCycleContended(int T)
|
||||||
{
|
{
|
||||||
bool lowBitSet = (lastPortAddr & 0x0001) != 0;
|
bool lowBitSet = (lastPortAddr & 0x0001) != 0;
|
||||||
|
@ -384,7 +380,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when the first byte of an instruction is fetched
|
/// Called when the first byte of an instruction is fetched
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="firstByte"></param>
|
|
||||||
public void OnExecFetch(ushort firstByte)
|
public void OnExecFetch(ushort firstByte)
|
||||||
{
|
{
|
||||||
// fetch instruction without incrementing pc
|
// fetch instruction without incrementing pc
|
||||||
|
|
|
@ -41,8 +41,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// Simulates reading from the bus (no contention)
|
/// Simulates reading from the bus (no contention)
|
||||||
/// Paging should be handled here
|
/// Paging should be handled here
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public override byte ReadBus(ushort addr)
|
public override byte ReadBus(ushort addr)
|
||||||
{
|
{
|
||||||
int divisor = addr / 0x4000;
|
int divisor = addr / 0x4000;
|
||||||
|
@ -111,8 +109,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// Simulates writing to the bus (no contention)
|
/// Simulates writing to the bus (no contention)
|
||||||
/// Paging should be handled here
|
/// Paging should be handled here
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <param name="value"></param>
|
|
||||||
public override void WriteBus(ushort addr, byte value)
|
public override void WriteBus(ushort addr, byte value)
|
||||||
{
|
{
|
||||||
int divisor = addr / 0x4000;
|
int divisor = addr / 0x4000;
|
||||||
|
@ -181,8 +177,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// Reads a byte of data from a specified memory address
|
/// Reads a byte of data from a specified memory address
|
||||||
/// (with memory contention if appropriate)
|
/// (with memory contention if appropriate)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public override byte ReadMemory(ushort addr)
|
public override byte ReadMemory(ushort addr)
|
||||||
{
|
{
|
||||||
var data = ReadBus(addr);
|
var data = ReadBus(addr);
|
||||||
|
@ -192,8 +186,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the ROM/RAM enum that relates to this particular memory read operation
|
/// Returns the ROM/RAM enum that relates to this particular memory read operation
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public override ZXSpectrum.CDLResult ReadCDL(ushort addr)
|
public override ZXSpectrum.CDLResult ReadCDL(ushort addr)
|
||||||
{
|
{
|
||||||
var result = new ZXSpectrum.CDLResult();
|
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
|
/// Writes a byte of data to a specified memory address
|
||||||
/// (with memory contention if appropriate)
|
/// (with memory contention if appropriate)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <param name="value"></param>
|
|
||||||
public override void WriteMemory(ushort addr, byte value)
|
public override void WriteMemory(ushort addr, byte value)
|
||||||
{
|
{
|
||||||
WriteBus(addr, value);
|
WriteBus(addr, value);
|
||||||
|
@ -272,7 +262,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks whether supplied address is in a potentially contended bank
|
/// Checks whether supplied address is in a potentially contended bank
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
public override bool IsContended(ushort addr)
|
public override bool IsContended(ushort addr)
|
||||||
{
|
{
|
||||||
var a = addr & 0xc000;
|
var a = addr & 0xc000;
|
||||||
|
@ -302,7 +291,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns TRUE if there is a contended bank paged in
|
/// Returns TRUE if there is a contended bank paged in
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
public override bool ContendedBankPaged()
|
public override bool ContendedBankPaged()
|
||||||
{
|
{
|
||||||
switch (RAMPaged)
|
switch (RAMPaged)
|
||||||
|
@ -322,8 +310,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// (No memory contention)
|
/// (No memory contention)
|
||||||
/// Will read RAM5 (screen0) by default, unless RAM7 (screen1) is selected as output
|
/// Will read RAM5 (screen0) by default, unless RAM7 (screen1) is selected as output
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public override byte FetchScreenMemory(ushort addr)
|
public override byte FetchScreenMemory(ushort addr)
|
||||||
{
|
{
|
||||||
byte value = new byte();
|
byte value = new byte();
|
||||||
|
@ -347,8 +333,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets up the ROM
|
/// Sets up the ROM
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="buffer"></param>
|
|
||||||
/// <param name="startAddress"></param>
|
|
||||||
public override void InitROM(RomData romData)
|
public override void InitROM(RomData romData)
|
||||||
{
|
{
|
||||||
RomData = romData;
|
RomData = romData;
|
||||||
|
|
|
@ -11,8 +11,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads a byte of data from a specified port address
|
/// Reads a byte of data from a specified port address
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public override byte ReadPort(ushort port)
|
public override byte ReadPort(ushort port)
|
||||||
{
|
{
|
||||||
bool deviceAddressed = true;
|
bool deviceAddressed = true;
|
||||||
|
@ -79,8 +77,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Writes a byte of data to a specified port address
|
/// Writes a byte of data to a specified port address
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="value"></param>
|
|
||||||
public override void WritePort(ushort port, byte value)
|
public override void WritePort(ushort port, byte value)
|
||||||
{
|
{
|
||||||
// get a BitArray of the port
|
// get a BitArray of the port
|
||||||
|
|
|
@ -14,8 +14,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Main constructor
|
/// Main constructor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="spectrum"></param>
|
|
||||||
/// <param name="cpu"></param>
|
|
||||||
public Pentagon128(ZXSpectrum spectrum, Z80A cpu, ZXSpectrum.BorderType borderType, List<byte[]> files, List<JoystickType> joysticks)
|
public Pentagon128(ZXSpectrum spectrum, Z80A cpu, ZXSpectrum.BorderType borderType, List<byte[]> files, List<JoystickType> joysticks)
|
||||||
{
|
{
|
||||||
Spectrum = spectrum;
|
Spectrum = spectrum;
|
||||||
|
|
|
@ -279,7 +279,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Instantiates the joysticks array
|
/// Instantiates the joysticks array
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="joys"></param>
|
|
||||||
protected void InitJoysticks(List<JoystickType> joys)
|
protected void InitJoysticks(List<JoystickType> joys)
|
||||||
{
|
{
|
||||||
List<IJoystick> jCollection = new List<IJoystick>();
|
List<IJoystick> jCollection = new List<IJoystick>();
|
||||||
|
@ -300,9 +299,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Instantiates a new IJoystick object
|
/// Instantiates a new IJoystick object
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="type"></param>
|
|
||||||
/// <param name="playerNumber"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public IJoystick InstantiateJoystick(JoystickType type, int playerNumber)
|
public IJoystick InstantiateJoystick(JoystickType type, int playerNumber)
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
|
@ -325,8 +321,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a IJoystick object depending on the type (or null if not found)
|
/// Returns a IJoystick object depending on the type (or null if not found)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="type"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
protected IJoystick LocateUniqueJoystick(JoystickType type)
|
protected IJoystick LocateUniqueJoystick(JoystickType type)
|
||||||
{
|
{
|
||||||
return JoystickCollection.Where(a => a.JoyType == type).FirstOrDefault();
|
return JoystickCollection.Where(a => a.JoyType == type).FirstOrDefault();
|
||||||
|
|
|
@ -115,7 +115,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called on first instantiation (and subsequent core reboots)
|
/// Called on first instantiation (and subsequent core reboots)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="files"></param>
|
|
||||||
protected void InitializeMedia(List<byte[]> files)
|
protected void InitializeMedia(List<byte[]> files)
|
||||||
{
|
{
|
||||||
mediaImages = files;
|
mediaImages = files;
|
||||||
|
@ -240,7 +239,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Identifies and sorts the various media types
|
/// Identifies and sorts the various media types
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
private SpectrumMediaType IdentifyMedia(byte[] data)
|
private SpectrumMediaType IdentifyMedia(byte[] data)
|
||||||
{
|
{
|
||||||
// get first 16 bytes as a string
|
// get first 16 bytes as a string
|
||||||
|
|
|
@ -96,15 +96,11 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// Simulates reading from the bus
|
/// Simulates reading from the bus
|
||||||
/// Paging should be handled here
|
/// Paging should be handled here
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public abstract byte ReadBus(ushort addr);
|
public abstract byte ReadBus(ushort addr);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Pushes a value onto the data bus that should be valid as long as the interrupt is true
|
/// Pushes a value onto the data bus that should be valid as long as the interrupt is true
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public virtual byte PushBus()
|
public virtual byte PushBus()
|
||||||
{
|
{
|
||||||
return 0xFF;
|
return 0xFF;
|
||||||
|
@ -114,8 +110,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// Simulates writing to the bus
|
/// Simulates writing to the bus
|
||||||
/// Paging should be handled here
|
/// Paging should be handled here
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <param name="value"></param>
|
|
||||||
public virtual void WriteBus(ushort addr, byte value)
|
public virtual void WriteBus(ushort addr, byte value)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException("Must be overriden");
|
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
|
/// Reads a byte of data from a specified memory address
|
||||||
/// (with memory contention if appropriate)
|
/// (with memory contention if appropriate)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public abstract byte ReadMemory(ushort addr);
|
public abstract byte ReadMemory(ushort addr);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the ROM/RAM enum that relates to this particular memory read operation
|
/// Returns the ROM/RAM enum that relates to this particular memory read operation
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public abstract ZXSpectrum.CDLResult ReadCDL(ushort addr);
|
public abstract ZXSpectrum.CDLResult ReadCDL(ushort addr);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Writes a byte of data to a specified memory address
|
/// Writes a byte of data to a specified memory address
|
||||||
/// (with memory contention if appropriate)
|
/// (with memory contention if appropriate)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <param name="value"></param>
|
|
||||||
public abstract void WriteMemory(ushort addr, byte value);
|
public abstract void WriteMemory(ushort addr, byte value);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets up the ROM
|
/// Sets up the ROM
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="buffer"></param>
|
|
||||||
public abstract void InitROM(RomData romData);
|
public abstract void InitROM(RomData romData);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ULA reads the memory at the specified address
|
/// ULA reads the memory at the specified address
|
||||||
/// (No memory contention)
|
/// (No memory contention)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public virtual byte FetchScreenMemory(ushort addr)
|
public virtual byte FetchScreenMemory(ushort addr)
|
||||||
{
|
{
|
||||||
var value = ReadBus((ushort)((addr & 0x3FFF) + 0x4000));
|
var value = ReadBus((ushort)((addr & 0x3FFF) + 0x4000));
|
||||||
|
@ -166,14 +151,12 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks whether supplied address is in a potentially contended bank
|
/// Checks whether supplied address is in a potentially contended bank
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
public abstract bool IsContended(ushort addr);
|
public abstract bool IsContended(ushort addr);
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns TRUE if there is a contended bank paged in
|
/// Returns TRUE if there is a contended bank paged in
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
public abstract bool ContendedBankPaged();
|
public abstract bool ContendedBankPaged();
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -183,7 +166,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Detects whether this is a 48k machine (or a 128k in 48k mode)
|
/// Detects whether this is a 48k machine (or a 128k in 48k mode)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
public virtual bool IsIn48kMode()
|
public virtual bool IsIn48kMode()
|
||||||
{
|
{
|
||||||
if (this.GetType() == typeof(ZX48) ||
|
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
|
/// Used to auto start/stop the tape device when appropriate
|
||||||
/// * This isnt really used anymore for tape trap detection *
|
/// * This isnt really used anymore for tape trap detection *
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
public virtual void TestForTapeTraps(int addr)
|
public virtual void TestForTapeTraps(int addr)
|
||||||
{
|
{
|
||||||
if (TapeDevice.TapeIsPlaying)
|
if (TapeDevice.TapeIsPlaying)
|
||||||
|
|
|
@ -24,15 +24,11 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads a byte of data from a specified port address
|
/// Reads a byte of data from a specified port address
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public abstract byte ReadPort(ushort port);
|
public abstract byte ReadPort(ushort port);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Writes a byte of data to a specified port address
|
/// Writes a byte of data to a specified port address
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="value"></param>
|
|
||||||
public abstract void WritePort(ushort port, byte value);
|
public abstract void WritePort(ushort port, byte value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,7 +137,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// Cycles the ULA clock
|
/// Cycles the ULA clock
|
||||||
/// Handles interrupt generation
|
/// Handles interrupt generation
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="currentCycle"></param>
|
|
||||||
public virtual void CycleClock(long totalCycles)
|
public virtual void CycleClock(long totalCycles)
|
||||||
{
|
{
|
||||||
// render the screen
|
// render the screen
|
||||||
|
@ -306,7 +305,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor
|
/// Constructor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="contPattern"></param>
|
|
||||||
public RenderTable(ULA ula, MachineType machineType)
|
public RenderTable(ULA ula, MachineType machineType)
|
||||||
{
|
{
|
||||||
_ula = ula;
|
_ula = ula;
|
||||||
|
@ -318,7 +316,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes the renderer
|
/// Initializes the renderer
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="machineType"></param>
|
|
||||||
private void InitRenderer(MachineType machineType)
|
private void InitRenderer(MachineType machineType)
|
||||||
{
|
{
|
||||||
for (var t = 0; t < _ula.FrameCycleLength; t++)
|
for (var t = 0; t < _ula.FrameCycleLength; t++)
|
||||||
|
@ -549,7 +546,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Renders to the screen buffer based on the current cycle
|
/// Renders to the screen buffer based on the current cycle
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="toCycle"></param>
|
|
||||||
public void RenderScreen(int toCycle)
|
public void RenderScreen(int toCycle)
|
||||||
{
|
{
|
||||||
// check boundaries
|
// check boundaries
|
||||||
|
@ -690,8 +686,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns floating bus value (if available)
|
/// Returns floating bus value (if available)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="tstate"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public void ReadFloatingBus(int tstate, ref int result, ushort port)
|
public void ReadFloatingBus(int tstate, ref int result, ushort port)
|
||||||
{
|
{
|
||||||
tstate += FloatingBusOffset;
|
tstate += FloatingBusOffset;
|
||||||
|
@ -773,7 +767,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the contention value for the current t-state
|
/// Returns the contention value for the current t-state
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
public int GetContentionValue()
|
public int GetContentionValue()
|
||||||
{
|
{
|
||||||
return GetContentionValue((int)_machine.CurrentFrameCycle);
|
return GetContentionValue((int)_machine.CurrentFrameCycle);
|
||||||
|
@ -782,7 +775,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the contention value for the supplied t-state
|
/// Returns the contention value for the supplied t-state
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
public int GetContentionValue(int tstate)
|
public int GetContentionValue(int tstate)
|
||||||
{
|
{
|
||||||
if (tstate >= FrameCycleLength)
|
if (tstate >= FrameCycleLength)
|
||||||
|
@ -797,7 +789,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the contention value for the supplied t-state
|
/// Returns the contention value for the supplied t-state
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
public int GetPortContentionValue(int tstate)
|
public int GetPortContentionValue(int tstate)
|
||||||
{
|
{
|
||||||
if (tstate >= FrameCycleLength)
|
if (tstate >= FrameCycleLength)
|
||||||
|
|
|
@ -41,8 +41,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// Simulates reading from the bus (no contention)
|
/// Simulates reading from the bus (no contention)
|
||||||
/// Paging should be handled here
|
/// Paging should be handled here
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public override byte ReadBus(ushort addr)
|
public override byte ReadBus(ushort addr)
|
||||||
{
|
{
|
||||||
int divisor = addr / 0x4000;
|
int divisor = addr / 0x4000;
|
||||||
|
@ -111,8 +109,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// Simulates writing to the bus (no contention)
|
/// Simulates writing to the bus (no contention)
|
||||||
/// Paging should be handled here
|
/// Paging should be handled here
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <param name="value"></param>
|
|
||||||
public override void WriteBus(ushort addr, byte value)
|
public override void WriteBus(ushort addr, byte value)
|
||||||
{
|
{
|
||||||
int divisor = addr / 0x4000;
|
int divisor = addr / 0x4000;
|
||||||
|
@ -181,8 +177,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// Reads a byte of data from a specified memory address
|
/// Reads a byte of data from a specified memory address
|
||||||
/// (with memory contention if appropriate)
|
/// (with memory contention if appropriate)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public override byte ReadMemory(ushort addr)
|
public override byte ReadMemory(ushort addr)
|
||||||
{
|
{
|
||||||
var data = ReadBus(addr);
|
var data = ReadBus(addr);
|
||||||
|
@ -192,8 +186,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the ROM/RAM enum that relates to this particular memory read operation
|
/// Returns the ROM/RAM enum that relates to this particular memory read operation
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public override ZXSpectrum.CDLResult ReadCDL(ushort addr)
|
public override ZXSpectrum.CDLResult ReadCDL(ushort addr)
|
||||||
{
|
{
|
||||||
var result = new ZXSpectrum.CDLResult();
|
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
|
/// Writes a byte of data to a specified memory address
|
||||||
/// (with memory contention if appropriate)
|
/// (with memory contention if appropriate)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <param name="value"></param>
|
|
||||||
public override void WriteMemory(ushort addr, byte value)
|
public override void WriteMemory(ushort addr, byte value)
|
||||||
{
|
{
|
||||||
WriteBus(addr, value);
|
WriteBus(addr, value);
|
||||||
|
@ -272,7 +262,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks whether supplied address is in a potentially contended bank
|
/// Checks whether supplied address is in a potentially contended bank
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
public override bool IsContended(ushort addr)
|
public override bool IsContended(ushort addr)
|
||||||
{
|
{
|
||||||
var a = addr & 0xc000;
|
var a = addr & 0xc000;
|
||||||
|
@ -302,7 +291,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns TRUE if there is a contended bank paged in
|
/// Returns TRUE if there is a contended bank paged in
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
public override bool ContendedBankPaged()
|
public override bool ContendedBankPaged()
|
||||||
{
|
{
|
||||||
switch (RAMPaged)
|
switch (RAMPaged)
|
||||||
|
@ -322,8 +310,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// (No memory contention)
|
/// (No memory contention)
|
||||||
/// Will read RAM5 (screen0) by default, unless RAM7 (screen1) is selected as output
|
/// Will read RAM5 (screen0) by default, unless RAM7 (screen1) is selected as output
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="addr"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public override byte FetchScreenMemory(ushort addr)
|
public override byte FetchScreenMemory(ushort addr)
|
||||||
{
|
{
|
||||||
byte value = new byte();
|
byte value = new byte();
|
||||||
|
@ -347,8 +333,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets up the ROM
|
/// Sets up the ROM
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="buffer"></param>
|
|
||||||
/// <param name="startAddress"></param>
|
|
||||||
public override void InitROM(RomData romData)
|
public override void InitROM(RomData romData)
|
||||||
{
|
{
|
||||||
RomData = romData;
|
RomData = romData;
|
||||||
|
|
|
@ -11,8 +11,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads a byte of data from a specified port address
|
/// Reads a byte of data from a specified port address
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public override byte ReadPort(ushort port)
|
public override byte ReadPort(ushort port)
|
||||||
{
|
{
|
||||||
bool deviceAddressed = true;
|
bool deviceAddressed = true;
|
||||||
|
@ -79,8 +77,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Writes a byte of data to a specified port address
|
/// Writes a byte of data to a specified port address
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="port"></param>
|
|
||||||
/// <param name="value"></param>
|
|
||||||
public override void WritePort(ushort port, byte value)
|
public override void WritePort(ushort port, byte value)
|
||||||
{
|
{
|
||||||
// get a BitArray of the port
|
// get a BitArray of the port
|
||||||
|
|
|
@ -14,8 +14,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Main constructor
|
/// Main constructor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="spectrum"></param>
|
|
||||||
/// <param name="cpu"></param>
|
|
||||||
public ZX128(ZXSpectrum spectrum, Z80A cpu, ZXSpectrum.BorderType borderType, List<byte[]> files, List<JoystickType> joysticks)
|
public ZX128(ZXSpectrum spectrum, Z80A cpu, ZXSpectrum.BorderType borderType, List<byte[]> files, List<JoystickType> joysticks)
|
||||||
{
|
{
|
||||||
Spectrum = spectrum;
|
Spectrum = spectrum;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue