Put NotImplemented attribute on a bunch of things, and remove IMemoryDomains from a few cores that were implementing it but throwing a NotImplementedException

This commit is contained in:
adelikat 2014-11-24 01:17:05 +00:00
parent 72cf4ed5e1
commit 9c285e3e3a
16 changed files with 86 additions and 18 deletions

View File

@ -304,6 +304,7 @@ namespace BizHawk.Emulation.Cores.Atari.Lynx
Marshal.Copy(srcdata, 0, data, size); Marshal.Copy(srcdata, 0, data, size);
} }
[FeatureNotImplemented]
public void ClearSaveRam() public void ClearSaveRam()
{ {
throw new NotImplementedException(); throw new NotImplementedException();

View File

@ -26,6 +26,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
return ret; return ret;
} }
[FeatureNotImplemented]
public void SetCpuRegister(string register, int value) public void SetCpuRegister(string register, int value)
{ {
throw new NotImplementedException(); throw new NotImplementedException();

View File

@ -154,6 +154,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
throw new InvalidOperationException("SaveRamLoad() failed!"); throw new InvalidOperationException("SaveRamLoad() failed!");
} }
[FeatureNotImplemented]
public void ClearSaveRam() public void ClearSaveRam()
{ {
throw new NotImplementedException(); throw new NotImplementedException();

View File

@ -251,6 +251,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
}; };
} }
[FeatureNotImplemented]
public void SetCpuRegister(string register, int value) public void SetCpuRegister(string register, int value)
{ {
throw new NotImplementedException(); throw new NotImplementedException();

View File

@ -286,6 +286,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
{ {
return L.SaveRamModified || R.SaveRamModified; return L.SaveRamModified || R.SaveRamModified;
} }
[FeatureNotImplemented]
set set
{ {
throw new NotImplementedException(); throw new NotImplementedException();

View File

@ -452,6 +452,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
return ret; return ret;
} }
[FeatureNotImplemented]
public void SetCpuRegister(string register, int value) public void SetCpuRegister(string register, int value)
{ {
throw new NotImplementedException(); throw new NotImplementedException();

View File

@ -393,6 +393,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES
return ret; return ret;
} }
[FeatureNotImplemented]
public void SetCpuRegister(string register, int value) public void SetCpuRegister(string register, int value)
{ {
throw new NotImplementedException(); throw new NotImplementedException();

View File

@ -241,6 +241,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
}; };
} }
[FeatureNotImplemented]
public void SetCpuRegister(string register, int value) public void SetCpuRegister(string register, int value)
{ {
throw new NotImplementedException(); throw new NotImplementedException();

View File

@ -10,7 +10,7 @@ using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Nintendo.SNES9X namespace BizHawk.Emulation.Cores.Nintendo.SNES9X
{ {
[CoreAttributes("Snes9x", "FIXME", true, false, "5e0319ab3ef9611250efb18255186d0dc0d7e125", "https://github.com/snes9xgit/snes9x")] [CoreAttributes("Snes9x", "FIXME", true, false, "5e0319ab3ef9611250efb18255186d0dc0d7e125", "https://github.com/snes9xgit/snes9x")]
public class Snes9x : IEmulator, IVideoProvider, ISyncSoundProvider, IMemoryDomains public class Snes9x : IEmulator, IVideoProvider, ISyncSoundProvider
{ {
#region controller #region controller
@ -82,6 +82,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES9X
{ {
return false; return false;
} }
[FeatureNotImplemented]
set set
{ {
throw new NotImplementedException(); throw new NotImplementedException();
@ -117,15 +119,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES9X
#endregion #endregion
#region debugging
public MemoryDomainList MemoryDomains
{
get { throw new NotImplementedException(); }
}
#endregion
#region IVideoProvider #region IVideoProvider
private int[] _vbuff = new int[512 * 480]; private int[] _vbuff = new int[512 * 480];

View File

@ -554,6 +554,7 @@ namespace BizHawk.Emulation.Cores.PCEngine
}; };
} }
[FeatureNotImplemented]
public void SetCpuRegister(string register, int value) public void SetCpuRegister(string register, int value)
{ {
throw new NotImplementedException(); throw new NotImplementedException();

View File

@ -280,6 +280,7 @@ namespace BizHawk.Emulation.Cores.Sega.Genesis
}; };
} }
[FeatureNotImplemented]
public void SetCpuRegister(string register, int value) public void SetCpuRegister(string register, int value)
{ {
throw new NotImplementedException(); throw new NotImplementedException();

View File

@ -640,6 +640,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx
return ret; return ret;
} }
[FeatureNotImplemented]
public void SetCpuRegister(string register, int value) public void SetCpuRegister(string register, int value)
{ {
throw new NotImplementedException(); throw new NotImplementedException();

View File

@ -120,15 +120,19 @@ namespace BizHawk.Emulation.Cores.Sony.PSP
public int Frame public int Frame
{ {
[FeatureNotImplemented]
get { return 0; } get { return 0; }
} }
public int LagCount public int LagCount
{ {
[FeatureNotImplemented]
get get
{ {
return 0; return 0;
} }
[FeatureNotImplemented]
set set
{ {
} }
@ -136,58 +140,72 @@ namespace BizHawk.Emulation.Cores.Sony.PSP
public bool IsLagFrame public bool IsLagFrame
{ {
[FeatureNotImplemented]
get { return true; } get { return true; }
} }
[FeatureNotImplemented]
public byte[] CloneSaveRam() public byte[] CloneSaveRam()
{ {
return new byte[0]; return new byte[0];
} }
[FeatureNotImplemented]
public void StoreSaveRam(byte[] data) public void StoreSaveRam(byte[] data)
{ {
} }
[FeatureNotImplemented]
public void ClearSaveRam() public void ClearSaveRam()
{ {
} }
public bool SaveRamModified public bool SaveRamModified
{ {
[FeatureNotImplemented]
get get
{ {
return false; return false;
} }
[FeatureNotImplemented]
set set
{ {
} }
} }
[FeatureNotImplemented]
public void ResetCounters() public void ResetCounters()
{ {
} }
[FeatureNotImplemented]
public void SaveStateText(System.IO.TextWriter writer) public void SaveStateText(System.IO.TextWriter writer)
{ {
} }
[FeatureNotImplemented]
public void LoadStateText(System.IO.TextReader reader) public void LoadStateText(System.IO.TextReader reader)
{ {
} }
[FeatureNotImplemented]
public void SaveStateBinary(System.IO.BinaryWriter writer) public void SaveStateBinary(System.IO.BinaryWriter writer)
{ {
} }
[FeatureNotImplemented]
public void LoadStateBinary(System.IO.BinaryReader reader) public void LoadStateBinary(System.IO.BinaryReader reader)
{ {
} }
[FeatureNotImplemented]
public byte[] SaveStateBinary() public byte[] SaveStateBinary()
{ {
return new byte[0]; return new byte[0];
} }
[FeatureNotImplemented]
public MemoryDomainList MemoryDomains public MemoryDomainList MemoryDomains
{ {
get { throw new NotImplementedException(); } get { throw new NotImplementedException(); }

View File

@ -15,7 +15,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX
isPorted: true, isPorted: true,
isReleased: false isReleased: false
)] )]
public unsafe class Octoshock : IEmulator, IVideoProvider, ISoundProvider, IMemoryDomains public unsafe class Octoshock : IEmulator, IVideoProvider, ISoundProvider
{ {
public string SystemId { get { return "NULL"; } } public string SystemId { get { return "NULL"; } }
public static readonly ControllerDefinition NullController = new ControllerDefinition { Name = "Null Controller" }; public static readonly ControllerDefinition NullController = new ControllerDefinition { Name = "Null Controller" };
@ -65,8 +65,6 @@ namespace BizHawk.Emulation.Cores.Sony.PSX
CoreComm = comm; CoreComm = comm;
VirtualWidth = BufferWidth = 256; VirtualWidth = BufferWidth = 256;
BufferHeight = 192; BufferHeight = 192;
MemoryDomains = new MemoryDomainList(memoryDomains);
} }
void Attach() void Attach()
@ -254,23 +252,67 @@ namespace BizHawk.Emulation.Cores.Sony.PSX
frameBuffer[i] = (int)unchecked(((int*)ptr)[y * p + x] | (int)0xFF000000); frameBuffer[i] = (int)unchecked(((int*)ptr)[y * p + x] | (int)0xFF000000);
} }
} }
[FeatureNotImplemented]
public ControllerDefinition ControllerDefinition { get { return NullController; } } public ControllerDefinition ControllerDefinition { get { return NullController; } }
[FeatureNotImplemented]
public IController Controller { get; set; } public IController Controller { get; set; }
public int Frame { get; set; } public int Frame
public int LagCount { get { return 0; } set { return; } } {
public bool IsLagFrame { get { return false; } } [FeatureNotImplemented]
get;
[FeatureNotImplemented]
set;
}
public int LagCount
{
[FeatureNotImplemented]
get { return 0; }
[FeatureNotImplemented]
set { return; }
}
public bool IsLagFrame
{
[FeatureNotImplemented]
get { return false; }
}
[FeatureNotImplemented]
public byte[] CloneSaveRam() { return null; } public byte[] CloneSaveRam() { return null; }
[FeatureNotImplemented]
public void StoreSaveRam(byte[] data) { } public void StoreSaveRam(byte[] data) { }
[FeatureNotImplemented]
public void ClearSaveRam() { } public void ClearSaveRam() { }
[FeatureNotImplemented]
public bool DeterministicEmulation { get { return true; } } public bool DeterministicEmulation { get { return true; } }
[FeatureNotImplemented]
public bool SaveRamModified { get; set; } public bool SaveRamModified { get; set; }
[FeatureNotImplemented]
public void SaveStateText(TextWriter writer) { } public void SaveStateText(TextWriter writer) { }
[FeatureNotImplemented]
public void LoadStateText(TextReader reader) { } public void LoadStateText(TextReader reader) { }
[FeatureNotImplemented]
public void SaveStateBinary(BinaryWriter writer) { } public void SaveStateBinary(BinaryWriter writer) { }
[FeatureNotImplemented]
public void LoadStateBinary(BinaryReader reader) { } public void LoadStateBinary(BinaryReader reader) { }
[FeatureNotImplemented]
public byte[] SaveStateBinary() { return new byte[1]; } public byte[] SaveStateBinary() { return new byte[1]; }
[FeatureNotImplemented]
public bool BinarySaveStatesPreferred { get { return false; } } public bool BinarySaveStatesPreferred { get { return false; } }
public int[] GetVideoBuffer() { return frameBuffer; } public int[] GetVideoBuffer() { return frameBuffer; }
public int VirtualWidth { get; private set; } public int VirtualWidth { get; private set; }
@ -281,7 +323,5 @@ namespace BizHawk.Emulation.Cores.Sony.PSX
public void GetSamples(short[] samples) { } public void GetSamples(short[] samples) { }
public void DiscardSamples() { } public void DiscardSamples() { }
public int MaxVolume { get; set; } public int MaxVolume { get; set; }
private List<MemoryDomain> memoryDomains = new List<MemoryDomain>();
public MemoryDomainList MemoryDomains { get; private set; }
} }
} }

View File

@ -336,6 +336,7 @@ namespace BizHawk.Emulation.Cores.WonderSwan
return ret; return ret;
} }
[FeatureNotImplemented]
public void SetCpuRegister(string register, int value) public void SetCpuRegister(string register, int value)
{ {
throw new NotImplementedException(); throw new NotImplementedException();

View File

@ -288,6 +288,8 @@ namespace BizHawk.Emulation.Cores
public bool SaveRamModified public bool SaveRamModified
{ {
get { return true; } get { return true; }
[FeatureNotImplemented]
set { throw new NotImplementedException(); } set { throw new NotImplementedException(); }
} }
@ -305,11 +307,13 @@ namespace BizHawk.Emulation.Cores
private byte[] savebuff; private byte[] savebuff;
private byte[] savebuff2; private byte[] savebuff2;
[FeatureNotImplemented]
public void SaveStateText(System.IO.TextWriter writer) public void SaveStateText(System.IO.TextWriter writer)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
[FeatureNotImplemented]
public void LoadStateText(System.IO.TextReader reader) public void LoadStateText(System.IO.TextReader reader)
{ {
throw new NotImplementedException(); throw new NotImplementedException();