core替换为7.7版本

This commit is contained in:
ALIENJACK\alien 2024-07-03 18:15:28 +08:00
parent 7b2b0f3d20
commit ed4af60268
212 changed files with 29835 additions and 29813 deletions

View File

@ -1,11 +1,9 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
internal abstract class Bandai : Board
{ {
internal abstract class Bandai : Board
{
private bool irq_enable; private bool irq_enable;
private int irq_counter; private int irq_counter;
@ -139,5 +137,4 @@ namespace MyNes.Core
irq_counter = stream.ReadInt32(); irq_counter = stream.ReadInt32();
eprom.LoadState(stream); eprom.LoadState(stream);
} }
}
} }

View File

@ -1,9 +1,7 @@
namespace MyNes.Core namespace MyNes.Core;
internal struct BankInfo
{ {
internal struct BankInfo
{
public bool IsRAM; public bool IsRAM;
public bool Enabled; public bool Enabled;
@ -25,5 +23,4 @@ namespace MyNes.Core
this.DATA = DATA; this.DATA = DATA;
this.IsBattery = IsBattery; this.IsBattery = IsBattery;
} }
}
} }

View File

@ -1,9 +1,9 @@
using System.Collections.Generic; using System.Collections.Generic;
namespace MyNes.Core namespace MyNes.Core;
internal class BankInfoSorter : IComparer<BankInfo>
{ {
internal class BankInfoSorter : IComparer<BankInfo>
{
public int Compare(BankInfo x, BankInfo y) public int Compare(BankInfo x, BankInfo y)
{ {
int result = 0; int result = 0;
@ -12,5 +12,4 @@ namespace MyNes.Core
int.TryParse(y.ID, out result2); int.TryParse(y.ID, out result2);
return result2 - result; return result2 - result;
} }
}
} }

View File

@ -1,9 +1,8 @@
namespace MyNes.Core namespace MyNes.Core;
internal class BlankJoypad : IJoypadConnecter
{ {
internal class BlankJoypad : IJoypadConnecter
{
public override void Update() public override void Update()
{ {
} }
}
} }

View File

@ -1,10 +1,8 @@
namespace MyNes.Core namespace MyNes.Core;
{
internal class BlankShortuctsHandler : IShortcutsHandler internal class BlankShortuctsHandler : IShortcutsHandler
{ {
public void Update() public void Update()
{ {
} }
}
} }

View File

@ -2,10 +2,10 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
internal abstract class Board
{ {
internal abstract class Board
{
protected byte[][] PRG_RAM; protected byte[][] PRG_RAM;
protected bool[] PRG_RAM_ENABLED; protected bool[] PRG_RAM_ENABLED;
@ -1113,5 +1113,4 @@ namespace MyNes.Core
} }
} }
} }
}
} }

View File

@ -1,9 +1,9 @@
using System; using System;
namespace MyNes.Core namespace MyNes.Core;
internal class BoardInfoAttribute : Attribute
{ {
internal class BoardInfoAttribute : Attribute
{
public string Name { get; private set; } public string Name { get; private set; }
public int Mapper { get; private set; } public int Mapper { get; private set; }
@ -53,5 +53,4 @@ namespace MyNes.Core
this.Enabled_ppuA12ToggleTimer = Enabled_ppuA12ToggleTimer; this.Enabled_ppuA12ToggleTimer = Enabled_ppuA12ToggleTimer;
this.PPUA12TogglesOnRaisingEdge = PPUA12TogglesOnRaisingEdge; this.PPUA12TogglesOnRaisingEdge = PPUA12TogglesOnRaisingEdge;
} }
}
} }

View File

@ -1,7 +1,7 @@
namespace MyNes.Core namespace MyNes.Core;
public class BoardInfoObject
{ {
public class BoardInfoObject
{
public string Name { get; internal set; } public string Name { get; internal set; }
public int MapperNumber { get; internal set; } public int MapperNumber { get; internal set; }
@ -11,5 +11,4 @@ namespace MyNes.Core
public string Issues { get; internal set; } public string Issues { get; internal set; }
public bool HasIssues { get; internal set; } public bool HasIssues { get; internal set; }
}
} }

View File

@ -1,7 +1,7 @@
namespace MyNes.Core namespace MyNes.Core;
internal enum CHRArea : byte
{ {
internal enum CHRArea : byte
{
Area0000, Area0000,
Area0400, Area0400,
Area0800, Area0800,
@ -10,5 +10,4 @@ namespace MyNes.Core
Area1400, Area1400,
Area1800, Area1800,
Area1C00 Area1C00
}
} }

View File

@ -1,7 +1,7 @@
namespace ComponentAce.Compression.Libs.zlib namespace ComponentAce.Compression.Libs.zlib;
internal sealed class Adler32
{ {
internal sealed class Adler32
{
private const int BASE = 65521; private const int BASE = 65521;
private const int NMAX = 5552; private const int NMAX = 5552;
@ -68,5 +68,4 @@ namespace ComponentAce.Compression.Libs.zlib
} }
return (num2 << 16) | num; return (num2 << 16) | num;
} }
}
} }

View File

@ -1,9 +1,9 @@
using System; using System;
namespace ComponentAce.Compression.Libs.zlib namespace ComponentAce.Compression.Libs.zlib;
public sealed class Deflate
{ {
public sealed class Deflate
{
internal class Config internal class Config
{ {
internal int good_length; internal int good_length;
@ -333,7 +333,15 @@ namespace ComponentAce.Compression.Libs.zlib
internal static bool smaller(short[] tree, int n, int m, byte[] depth) internal static bool smaller(short[] tree, int n, int m, byte[] depth)
{ {
return tree[n * 2] < tree[m * 2] || (tree[n * 2] == tree[m * 2] && depth[n] <= depth[m]); if (tree[n * 2] >= tree[m * 2])
{
if (tree[n * 2] == tree[m * 2])
{
return depth[n] <= depth[m];
}
return false;
}
return true;
} }
internal void scan_tree(short[] tree, int max_code) internal void scan_tree(short[] tree, int max_code)
@ -738,9 +746,17 @@ namespace ComponentAce.Compression.Libs.zlib
flush_block_only(flush == 4); flush_block_only(flush == 4);
if (strm.avail_out == 0) if (strm.avail_out == 0)
{ {
return (flush == 4) ? 2 : 0; if (flush != 4)
{
return 0;
} }
return (flush != 4) ? 1 : 3; return 2;
}
if (flush != 4)
{
return 1;
}
return 3;
} }
internal void _tr_stored_block(int buf, int stored_len, bool eof) internal void _tr_stored_block(int buf, int stored_len, bool eof)
@ -928,7 +944,11 @@ namespace ComponentAce.Compression.Libs.zlib
} }
return 0; return 0;
} }
return (flush != 4) ? 1 : 3; if (flush != 4)
{
return 1;
}
return 3;
} }
internal int deflate_slow(int flush) internal int deflate_slow(int flush)
@ -1032,7 +1052,11 @@ namespace ComponentAce.Compression.Libs.zlib
} }
return 0; return 0;
} }
return (flush != 4) ? 1 : 3; if (flush != 4)
{
return 1;
}
return 3;
} }
internal int longest_match(int cur_match) internal int longest_match(int cur_match)
@ -1167,7 +1191,11 @@ namespace ComponentAce.Compression.Libs.zlib
head = null; head = null;
prev = null; prev = null;
window = null; window = null;
return (status == 113) ? (-3) : 0; if (status != 113)
{
return 0;
}
return -3;
} }
internal int deflateParams(ZStream strm, int _level, int _strategy) internal int deflateParams(ZStream strm, int _level, int _strategy)
@ -1181,7 +1209,7 @@ namespace ComponentAce.Compression.Libs.zlib
{ {
return -2; return -2;
} }
if (config_table[level].func != config_table[_level].func && strm.total_in != 0) if (config_table[level].func != config_table[_level].func && strm.total_in != 0L)
{ {
result = strm.deflate(1); result = strm.deflate(1);
} }
@ -1309,16 +1337,16 @@ namespace ComponentAce.Compression.Libs.zlib
{ {
status = 666; status = 666;
} }
if (num4 == 0 || num4 == 2) switch (num4)
{ {
case 0:
case 2:
if (strm.avail_out == 0) if (strm.avail_out == 0)
{ {
last_flush = -1; last_flush = -1;
} }
return 0; return 0;
} case 1:
if (num4 == 1)
{
if (flush == 1) if (flush == 1)
{ {
_tr_align(); _tr_align();
@ -1340,6 +1368,7 @@ namespace ComponentAce.Compression.Libs.zlib
last_flush = -1; last_flush = -1;
return 0; return 0;
} }
break;
} }
} }
if (flush != 4) if (flush != 4)
@ -1354,7 +1383,11 @@ namespace ComponentAce.Compression.Libs.zlib
putShortMSB((int)(strm.adler & 0xFFFF)); putShortMSB((int)(strm.adler & 0xFFFF));
strm.flush_pending(); strm.flush_pending();
noheader = -1; noheader = -1;
return (pending == 0) ? 1 : 0; if (pending == 0)
{
return 1;
}
return 0;
} }
static Deflate() static Deflate()
@ -1375,5 +1408,4 @@ namespace ComponentAce.Compression.Libs.zlib
config_table[8] = new Config(32, 128, 258, 1024, 2); config_table[8] = new Config(32, 128, 258, 1024, 2);
config_table[9] = new Config(32, 258, 258, 4096, 2); config_table[9] = new Config(32, 258, 258, 4096, 2);
} }
}
} }

View File

@ -1,9 +1,9 @@
using System; using System;
namespace ComponentAce.Compression.Libs.zlib namespace ComponentAce.Compression.Libs.zlib;
internal sealed class InfBlocks
{ {
internal sealed class InfBlocks
{
private const int MANY = 1440; private const int MANY = 1440;
private static readonly int[] inflate_mask = new int[17] private static readonly int[] inflate_mask = new int[17]
@ -420,9 +420,8 @@ namespace ComponentAce.Compression.Libs.zlib
write = num4; write = num4;
return inflate_flush(z, r); return inflate_flush(z, r);
} }
if (tb[0] == -1) _ = tb[0];
{ _ = -1;
}
num6 = hufts[(tb[0] + (num3 & inflate_mask[num6])) * 3 + 1]; num6 = hufts[(tb[0] + (num3 & inflate_mask[num6])) * 3 + 1];
int num7 = hufts[(tb[0] + (num3 & inflate_mask[num6])) * 3 + 2]; int num7 = hufts[(tb[0] + (num3 & inflate_mask[num6])) * 3 + 2];
if (num7 < 16) if (num7 < 16)
@ -599,7 +598,11 @@ namespace ComponentAce.Compression.Libs.zlib
internal int sync_point() internal int sync_point()
{ {
return (mode == 1) ? 1 : 0; if (mode != 1)
{
return 0;
}
return 1;
} }
internal int inflate_flush(ZStream z, int r) internal int inflate_flush(ZStream z, int r)
@ -654,5 +657,4 @@ namespace ComponentAce.Compression.Libs.zlib
read = num; read = num;
return r; return r;
} }
}
} }

View File

@ -1,9 +1,9 @@
using System; using System;
namespace ComponentAce.Compression.Libs.zlib namespace ComponentAce.Compression.Libs.zlib;
internal sealed class InfCodes
{ {
internal sealed class InfCodes
{
private static readonly int[] inflate_mask = new int[17] private static readonly int[] inflate_mask = new int[17]
{ {
0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 0, 1, 3, 7, 15, 31, 63, 127, 255, 511,
@ -54,7 +54,7 @@ namespace ComponentAce.Compression.Libs.zlib
internal int[] tree; internal int[] tree;
internal int tree_index = 0; internal int tree_index;
internal int need; internal int need;
@ -509,7 +509,6 @@ namespace ComponentAce.Compression.Libs.zlib
num8 += array[(num9 + num8) * 3 + 2]; num8 += array[(num9 + num8) * 3 + 2];
num8 += num2 & inflate_mask[num10]; num8 += num2 & inflate_mask[num10];
num10 = array[(num9 + num8) * 3]; num10 = array[(num9 + num8) * 3];
bool flag = true;
continue; continue;
} }
z.msg = "invalid distance code"; z.msg = "invalid distance code";
@ -611,7 +610,6 @@ namespace ComponentAce.Compression.Libs.zlib
num5--; num5--;
break; break;
} }
bool flag2 = true;
continue; continue;
} }
if (((uint)num10 & 0x20u) != 0) if (((uint)num10 & 0x20u) != 0)
@ -662,5 +660,4 @@ namespace ComponentAce.Compression.Libs.zlib
s.write = num4; s.write = num4;
return 0; return 0;
} }
}
} }

View File

@ -1,9 +1,9 @@
using System; using System;
namespace ComponentAce.Compression.Libs.zlib namespace ComponentAce.Compression.Libs.zlib;
internal sealed class InfTree
{ {
internal sealed class InfTree
{
private const int MANY = 1440; private const int MANY = 1440;
private const int Z_OK = 0; private const int Z_OK = 0;
@ -398,7 +398,11 @@ namespace ComponentAce.Compression.Libs.zlib
} }
} }
} }
return (num5 != 0 && num4 != 1) ? (-5) : 0; if (num5 == 0 || num4 == 1)
{
return 0;
}
return -5;
} }
internal static int inflate_trees_bits(int[] c, int[] bb, int[] tb, int[] hp, ZStream z) internal static int inflate_trees_bits(int[] c, int[] bb, int[] tb, int[] hp, ZStream z)
@ -471,5 +475,4 @@ namespace ComponentAce.Compression.Libs.zlib
td[0] = fixed_td; td[0] = fixed_td;
return 0; return 0;
} }
}
} }

View File

@ -1,7 +1,7 @@
namespace ComponentAce.Compression.Libs.zlib namespace ComponentAce.Compression.Libs.zlib;
internal sealed class Inflate
{ {
internal sealed class Inflate
{
private const int MAX_WBITS = 15; private const int MAX_WBITS = 15;
private const int PRESET_DICT = 32; private const int PRESET_DICT = 32;
@ -250,7 +250,7 @@ namespace ComponentAce.Compression.Libs.zlib
case -3: case -3:
z.istate.mode = 13; z.istate.mode = 13;
z.istate.marker = 0; z.istate.marker = 0;
goto end_IL_004b; goto end_IL_0031;
case 0: case 0:
num = f; num = f;
break; break;
@ -327,7 +327,7 @@ namespace ComponentAce.Compression.Libs.zlib
{ {
return -2; return -2;
} }
end_IL_004b: end_IL_0031:
break; break;
} }
} }
@ -405,5 +405,4 @@ namespace ComponentAce.Compression.Libs.zlib
} }
return z.istate.blocks.sync_point(); return z.istate.blocks.sync_point();
} }
}
} }

View File

@ -1,7 +1,7 @@
namespace ComponentAce.Compression.Libs.zlib namespace ComponentAce.Compression.Libs.zlib;
internal sealed class StaticTree
{ {
internal sealed class StaticTree
{
private const int MAX_BITS = 15; private const int MAX_BITS = 15;
private const int BL_CODES = 19; private const int BL_CODES = 19;
@ -122,5 +122,4 @@ namespace ComponentAce.Compression.Libs.zlib
static_d_desc = new StaticTree(static_dtree, Tree.extra_dbits, 0, 30, 15); static_d_desc = new StaticTree(static_dtree, Tree.extra_dbits, 0, 30, 15);
static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, 19, 7); static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, 19, 7);
} }
}
} }

View File

@ -1,10 +1,10 @@
using System.IO; using System.IO;
using System.Text; using System.Text;
namespace ComponentAce.Compression.Libs.zlib namespace ComponentAce.Compression.Libs.zlib;
public class SupportClass
{ {
public class SupportClass
{
public static long Identity(long literal) public static long Identity(long literal)
{ {
return literal; return literal;
@ -100,5 +100,4 @@ namespace ComponentAce.Compression.Libs.zlib
{ {
return Encoding.UTF8.GetChars(byteArray); return Encoding.UTF8.GetChars(byteArray);
} }
}
} }

View File

@ -1,9 +1,9 @@
using System; using System;
namespace ComponentAce.Compression.Libs.zlib namespace ComponentAce.Compression.Libs.zlib;
internal sealed class Tree
{ {
internal sealed class Tree
{
private const int MAX_BITS = 15; private const int MAX_BITS = 15;
private const int BL_CODES = 19; private const int BL_CODES = 19;
@ -166,7 +166,11 @@ namespace ComponentAce.Compression.Libs.zlib
internal static int d_code(int dist) internal static int d_code(int dist)
{ {
return (dist < 256) ? _dist_code[dist] : _dist_code[256 + SupportClass.URShift(dist, 7)]; if (dist >= 256)
{
return _dist_code[256 + SupportClass.URShift(dist, 7)];
}
return _dist_code[dist];
} }
internal void gen_bitlen(Deflate s) internal void gen_bitlen(Deflate s)
@ -333,5 +337,4 @@ namespace ComponentAce.Compression.Libs.zlib
while (--len > 0); while (--len > 0);
return SupportClass.URShift(num, 1); return SupportClass.URShift(num, 1);
} }
}
} }

View File

@ -1,9 +1,9 @@
using System.IO; using System.IO;
namespace ComponentAce.Compression.Libs.zlib namespace ComponentAce.Compression.Libs.zlib;
public class ZInputStream : BinaryReader
{ {
public class ZInputStream : BinaryReader
{
protected ZStream z = new ZStream(); protected ZStream z = new ZStream();
protected int bufsize = 512; protected int bufsize = 512;
@ -16,9 +16,9 @@ namespace ComponentAce.Compression.Libs.zlib
protected bool compress; protected bool compress;
internal Stream in_Renamed = null; internal Stream in_Renamed;
internal bool nomoreinput = false; internal bool nomoreinput;
public virtual int FlushMode public virtual int FlushMode
{ {
@ -130,5 +130,4 @@ namespace ComponentAce.Compression.Libs.zlib
{ {
in_Renamed.Close(); in_Renamed.Close();
} }
}
} }

View File

@ -1,10 +1,10 @@
using System; using System;
using System.IO; using System.IO;
namespace ComponentAce.Compression.Libs.zlib namespace ComponentAce.Compression.Libs.zlib;
public class ZOutputStream : Stream
{ {
public class ZOutputStream : Stream
{
protected internal ZStream z = new ZStream(); protected internal ZStream z = new ZStream();
protected internal int bufsize = 4096; protected internal int bufsize = 4096;
@ -189,5 +189,4 @@ namespace ComponentAce.Compression.Libs.zlib
{ {
return 0L; return 0L;
} }
}
} }

View File

@ -1,9 +1,9 @@
using System; using System;
namespace ComponentAce.Compression.Libs.zlib namespace ComponentAce.Compression.Libs.zlib;
public sealed class ZStream
{ {
public sealed class ZStream
{
private const int MAX_WBITS = 15; private const int MAX_WBITS = 15;
private static readonly int DEF_WBITS = 15; private static readonly int DEF_WBITS = 15;
@ -173,8 +173,10 @@ namespace ComponentAce.Compression.Libs.zlib
} }
if (pending != 0) if (pending != 0)
{ {
if (dstate.pending_buf.Length <= dstate.pending_out || next_out.Length <= next_out_index || dstate.pending_buf.Length < dstate.pending_out + pending || next_out.Length < next_out_index + pending) if (dstate.pending_buf.Length > dstate.pending_out && next_out.Length > next_out_index && dstate.pending_buf.Length >= dstate.pending_out + pending)
{ {
_ = next_out.Length;
_ = next_out_index + pending;
} }
Array.Copy(dstate.pending_buf, dstate.pending_out, next_out, next_out_index, pending); Array.Copy(dstate.pending_buf, dstate.pending_out, next_out, next_out_index, pending);
next_out_index += pending; next_out_index += pending;
@ -218,5 +220,4 @@ namespace ComponentAce.Compression.Libs.zlib
msg = null; msg = null;
_adler = null; _adler = null;
} }
}
} }

View File

@ -1,9 +1,9 @@
using System.IO; using System.IO;
namespace ComponentAce.Compression.Libs.zlib namespace ComponentAce.Compression.Libs.zlib;
public class ZStreamException : IOException
{ {
public class ZStreamException : IOException
{
public ZStreamException() public ZStreamException()
{ {
} }
@ -12,5 +12,4 @@ namespace ComponentAce.Compression.Libs.zlib
: base(s) : base(s)
{ {
} }
}
} }

View File

@ -1,7 +1,7 @@
namespace ComponentAce.Compression.Libs.zlib namespace ComponentAce.Compression.Libs.zlib;
public sealed class zlibConst
{ {
public sealed class zlibConst
{
private const string version_Renamed_Field = "1.0.2"; private const string version_Renamed_Field = "1.0.2";
public const int Z_NO_COMPRESSION = 0; public const int Z_NO_COMPRESSION = 0;
@ -50,5 +50,4 @@ namespace ComponentAce.Compression.Libs.zlib
{ {
return "1.0.2"; return "1.0.2";
} }
}
} }

View File

@ -1,9 +1,9 @@
using System.Security.Cryptography; using System.Security.Cryptography;
namespace MyNes.Core namespace MyNes.Core;
public class Crc32 : HashAlgorithm
{ {
public class Crc32 : HashAlgorithm
{
public const uint DefaultPolynomial = 3988292384u; public const uint DefaultPolynomial = 3988292384u;
public const uint DefaultSeed = uint.MaxValue; public const uint DefaultSeed = uint.MaxValue;
@ -105,5 +105,4 @@ namespace MyNes.Core
(byte)(x & 0xFFu) (byte)(x & 0xFFu)
}; };
} }
}
} }

View File

@ -1,9 +1,8 @@
namespace MyNes.Core namespace MyNes.Core;
public enum EmuRegion
{ {
public enum EmuRegion
{
NTSC, NTSC,
PALB, PALB,
DENDY DENDY
}
} }

View File

@ -1,18 +1,18 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
public class EmuSettings : ISettings
{ {
public class EmuSettings : ISettings
{
public string SnapsFolder = "Snaps"; public string SnapsFolder = "Snaps";
public string WavesFolder = "SoundRecords"; public string WavesFolder = "SoundRecords";
public string SnapsFormat = ".png"; public string SnapsFormat = ".png";
public bool SnapsReplace = false; public bool SnapsReplace;
public int RegionSetting = 0; public int RegionSetting;
public string StateFolder = "States"; public string StateFolder = "States";
@ -96,5 +96,4 @@ namespace MyNes.Core
} }
StateHandler.StateFolder = StateFolder; StateHandler.StateFolder = StateFolder;
} }
}
} }

View File

@ -1,10 +1,10 @@
using System; using System;
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
internal class Eprom
{ {
internal class Eprom
{
private enum EpromDevice private enum EpromDevice
{ {
X24C01, X24C01,
@ -25,23 +25,23 @@ namespace MyNes.Core
private byte[] data; private byte[] data;
private EpromMode mode = EpromMode.Data; private EpromMode mode;
private EpromMode nextmode = EpromMode.Data; private EpromMode nextmode;
private EpromDevice device = EpromDevice.X24C01; private EpromDevice device;
private bool psda; private bool psda;
private bool pscl; private bool pscl;
private int output = 0; private int output;
private int cbit = 0; private int cbit;
private int caddress = 0; private int caddress;
private int cdata = 0; private int cdata;
private bool isRead; private bool isRead;
@ -379,5 +379,4 @@ namespace MyNes.Core
cdata = stream.ReadInt32(); cdata = stream.ReadInt32();
isRead = stream.ReadBoolean(); isRead = stream.ReadBoolean();
} }
}
} }

View File

@ -1,9 +1,9 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
internal abstract class FFE : Board
{ {
internal abstract class FFE : Board
{
protected bool irqEnable; protected bool irqEnable;
protected int irqCounter; protected int irqCounter;
@ -52,5 +52,4 @@ namespace MyNes.Core
irqEnable = bin.ReadBoolean(); irqEnable = bin.ReadBoolean();
irqCounter = bin.ReadInt32(); irqCounter = bin.ReadInt32();
} }
}
} }

View File

@ -1,9 +1,9 @@
using System.Collections.Generic; using System.Collections.Generic;
namespace MyNes.Core namespace MyNes.Core;
public class GameGenie
{ {
public class GameGenie
{
public string[] LettersTable = new string[16] public string[] LettersTable = new string[16]
{ {
"A", "P", "Z", "L", "G", "I", "T", "Y", "E", "O", "A", "P", "Z", "L", "G", "I", "T", "Y", "E", "O",
@ -138,8 +138,7 @@ namespace MyNes.Core
int num5 = 0; int num5 = 0;
int num6 = 0; int num6 = 0;
int num7 = 0; int num7 = 0;
int num8 = 0; int num8 = (code >> 7) & 1;
num8 = (code >> 7) & 1;
num7 = (code >> 2) & 1; num7 = (code >> 2) & 1;
num6 = (code >> 1) & 1; num6 = (code >> 1) & 1;
num5 = code & 1; num5 = code & 1;
@ -149,5 +148,4 @@ namespace MyNes.Core
num = (code >> 4) & 1; num = (code >> 4) & 1;
return (byte)((num8 << 7) | (num7 << 6) | (num6 << 5) | (num5 << 4) | (num4 << 3) | (num3 << 2) | (num2 << 1) | num); return (byte)((num8 << 7) | (num7 << 6) | (num6 << 5) | (num5 << 4) | (num4 << 3) | (num3 << 2) | (num2 << 1) | num);
} }
}
} }

View File

@ -1,7 +1,7 @@
namespace MyNes.Core namespace MyNes.Core;
public struct GameGenieCode
{ {
public struct GameGenieCode
{
public string Name; public string Name;
public string Descreption; public string Descreption;
@ -15,5 +15,4 @@ namespace MyNes.Core
public bool IsCompare; public bool IsCompare;
public bool Enabled; public bool Enabled;
}
} }

View File

@ -1,4 +1,3 @@
namespace MyNes.Core namespace MyNes.Core;
{
internal delegate void GetIsPlaying(out bool playing); internal delegate void GetIsPlaying(out bool playing);
}

View File

@ -1,8 +1,7 @@
using System; using System;
namespace MyNes.Core namespace MyNes.Core;
internal class HassIssuesAttribute : Attribute
{ {
internal class HassIssuesAttribute : Attribute
{
}
} }

View File

@ -1,10 +1,10 @@
using System.IO; using System.IO;
using System.Security.Cryptography; using System.Security.Cryptography;
namespace MyNes.Core namespace MyNes.Core;
public class HelperTools
{ {
public class HelperTools
{
public static string GetFileSize(string FilePath) public static string GetFileSize(string FilePath)
{ {
if (File.Exists(Path.GetFullPath(FilePath))) if (File.Exists(Path.GetFullPath(FilePath)))
@ -88,8 +88,7 @@ namespace MyNes.Core
{ {
if (File.Exists(FilePath)) if (File.Exists(FilePath))
{ {
FileInfo fileInfo = new FileInfo(FilePath); return new FileInfo(FilePath).Length;
return fileInfo.Length;
} }
return 0L; return 0L;
} }
@ -117,10 +116,8 @@ namespace MyNes.Core
stream.Read(buffer, 0, (int)stream.Length); stream.Read(buffer, 0, (int)stream.Length);
stream.Close(); stream.Close();
string text = ""; string text = "";
Crc32 crc = new Crc32(); byte[] array = new Crc32().ComputeHash(buffer);
byte[] array = crc.ComputeHash(buffer); foreach (byte b in array)
byte[] array2 = array;
foreach (byte b in array2)
{ {
text += b.ToString("x2").ToLower(); text += b.ToString("x2").ToLower();
} }
@ -139,10 +136,8 @@ namespace MyNes.Core
stream.Read(buffer, 0, (int)(stream.Length - bytesToSkip)); stream.Read(buffer, 0, (int)(stream.Length - bytesToSkip));
stream.Close(); stream.Close();
string text = ""; string text = "";
Crc32 crc = new Crc32(); byte[] array = new Crc32().ComputeHash(buffer);
byte[] array = crc.ComputeHash(buffer); foreach (byte b in array)
byte[] array2 = array;
foreach (byte b in array2)
{ {
text += b.ToString("x2").ToLower(); text += b.ToString("x2").ToLower();
} }
@ -157,10 +152,8 @@ namespace MyNes.Core
{ {
byte[] buffer = GetBuffer(filePath); byte[] buffer = GetBuffer(filePath);
string text = ""; string text = "";
SHA1Managed sHA1Managed = new SHA1Managed(); byte[] array = new SHA1Managed().ComputeHash(buffer);
byte[] array = sHA1Managed.ComputeHash(buffer); foreach (byte b in array)
byte[] array2 = array;
foreach (byte b in array2)
{ {
text += b.ToString("x2").ToLower(); text += b.ToString("x2").ToLower();
} }
@ -177,5 +170,4 @@ namespace MyNes.Core
stream.Close(); stream.Close();
return array; return array;
} }
}
} }

View File

@ -1,7 +1,7 @@
namespace MyNes.Core namespace MyNes.Core;
public interface IAudioProvider
{ {
public interface IAudioProvider
{
string Name { get; } string Name { get; }
string ID { get; } string ID { get; }
@ -25,5 +25,4 @@ namespace MyNes.Core
void SignalToggle(bool started); void SignalToggle(bool started);
void SetVolume(int Vol); void SetVolume(int Vol);
}
} }

View File

@ -1,7 +1,7 @@
namespace MyNes.Core namespace MyNes.Core;
public abstract class IJoypadConnecter
{ {
public abstract class IJoypadConnecter
{
protected byte DATA; protected byte DATA;
public abstract void Update(); public abstract void Update();
@ -14,5 +14,4 @@ namespace MyNes.Core
{ {
return DATA; return DATA;
} }
}
} }

View File

@ -1,10 +1,10 @@
using System.IO; using System.IO;
using System.Security.Cryptography; using System.Security.Cryptography;
namespace MyNes.Core namespace MyNes.Core;
public class INes : IRom
{ {
public class INes : IRom
{
public bool HasBattery { get; private set; } public bool HasBattery { get; private set; }
public bool IsPlaychoice10 { get; private set; } public bool IsPlaychoice10 { get; private set; }
@ -25,10 +25,8 @@ namespace MyNes.Core
byte[] buffer = new byte[fileStream.Length - 16]; byte[] buffer = new byte[fileStream.Length - 16];
fileStream.Read(buffer, 0, (int)(fileStream.Length - 16)); fileStream.Read(buffer, 0, (int)(fileStream.Length - 16));
base.SHA1 = ""; base.SHA1 = "";
SHA1Managed sHA1Managed = new SHA1Managed(); byte[] array2 = new SHA1Managed().ComputeHash(buffer);
byte[] array2 = sHA1Managed.ComputeHash(buffer); foreach (byte b in array2)
byte[] array3 = array2;
foreach (byte b in array3)
{ {
base.SHA1 += b.ToString("x2").ToLower(); base.SHA1 += b.ToString("x2").ToLower();
} }
@ -93,5 +91,4 @@ namespace MyNes.Core
fileStream.Dispose(); fileStream.Dispose();
fileStream.Close(); fileStream.Close();
} }
}
} }

View File

@ -1,7 +1,7 @@
namespace MyNes.Core namespace MyNes.Core;
public abstract class IRom
{ {
public abstract class IRom
{
public bool IsValid { get; set; } public bool IsValid { get; set; }
public int PRGCount { get; set; } public int PRGCount { get; set; }
@ -25,5 +25,4 @@ namespace MyNes.Core
public virtual void Load(string fileName, bool loadDumps) public virtual void Load(string fileName, bool loadDumps)
{ {
} }
}
} }

View File

@ -3,10 +3,10 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
namespace MyNes.Core namespace MyNes.Core;
public abstract class ISettings
{ {
public abstract class ISettings
{
protected string filePath; protected string filePath;
protected FieldInfo[] Fields; protected FieldInfo[] Fields;
@ -115,7 +115,11 @@ namespace MyNes.Core
} }
if (field.FieldType == typeof(bool)) if (field.FieldType == typeof(bool))
{ {
return ((bool)value) ? "1" : "0"; if (!(bool)value)
{
return "0";
}
return "1";
} }
if (field.FieldType == typeof(int)) if (field.FieldType == typeof(int))
{ {
@ -145,5 +149,4 @@ namespace MyNes.Core
} }
return ""; return "";
} }
}
} }

View File

@ -1,7 +1,6 @@
namespace MyNes.Core namespace MyNes.Core;
public interface IShortcutsHandler
{ {
public interface IShortcutsHandler
{
void Update(); void Update();
}
} }

View File

@ -1,7 +1,7 @@
namespace MyNes.Core namespace MyNes.Core;
public abstract class IVSUnisystemDIPConnecter
{ {
public abstract class IVSUnisystemDIPConnecter
{
public abstract void Update(); public abstract void Update();
public virtual void OnEmuShutdown() public virtual void OnEmuShutdown()
@ -21,5 +21,4 @@ namespace MyNes.Core
public virtual void Write4020(ref byte data) public virtual void Write4020(ref byte data)
{ {
} }
}
} }

View File

@ -1,7 +1,7 @@
namespace MyNes.Core namespace MyNes.Core;
public interface IVideoProvider
{ {
public interface IVideoProvider
{
string Name { get; } string Name { get; }
string ID { get; } string ID { get; }
@ -37,5 +37,4 @@ namespace MyNes.Core
void ToggleFPS(bool show_fps); void ToggleFPS(bool show_fps);
void ApplyFilter(); void ApplyFilter();
}
} }

View File

@ -1,7 +1,7 @@
namespace MyNes.Core namespace MyNes.Core;
public abstract class IZapperConnecter
{ {
public abstract class IZapperConnecter
{
protected bool Trigger; protected bool Trigger;
protected bool State; protected bool State;
@ -12,5 +12,4 @@ namespace MyNes.Core
{ {
return (byte)((Trigger ? 16u : 0u) | (State ? 8u : 0u)); return (byte)((Trigger ? 16u : 0u) | (State ? 8u : 0u));
} }
}
} }

View File

@ -1,9 +1,9 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
internal abstract class MMC2 : Board
{ {
internal abstract class MMC2 : Board
{
private byte chr_reg0A; private byte chr_reg0A;
private byte chr_reg0B; private byte chr_reg0B;
@ -112,5 +112,4 @@ namespace MyNes.Core
latch_a = stream.ReadByte(); latch_a = stream.ReadByte();
latch_b = stream.ReadByte(); latch_b = stream.ReadByte();
} }
}
} }

View File

@ -1,9 +1,9 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
internal class MMC5Pcm
{ {
internal class MMC5Pcm
{
internal byte output; internal byte output;
internal bool Outputable; internal bool Outputable;
@ -39,7 +39,7 @@ namespace MyNes.Core
internal byte Read5010() internal byte Read5010()
{ {
byte result = (byte)((irqTrip & PCMIRQenable) ? 128u : 0u); byte result = (byte)((irqTrip & PCMIRQenable) ? 128 : 0);
irqTrip = false; irqTrip = false;
NesEmu.IRQFlags &= -9; NesEmu.IRQFlags &= -9;
return result; return result;
@ -82,5 +82,4 @@ namespace MyNes.Core
PCMIRQenable = stream.ReadBoolean(); PCMIRQenable = stream.ReadBoolean();
irqTrip = stream.ReadBoolean(); irqTrip = stream.ReadBoolean();
} }
}
} }

View File

@ -1,9 +1,9 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
internal class MMC5Sqr
{ {
internal class MMC5Sqr
{
private byte[][] duty_cycle_sequences = new byte[4][] private byte[][] duty_cycle_sequences = new byte[4][]
{ {
new byte[8] { 0, 0, 0, 0, 0, 0, 0, 1 }, new byte[8] { 0, 0, 0, 0, 0, 0, 0, 1 },
@ -210,5 +210,4 @@ namespace MyNes.Core
envelope = bin.ReadByte(); envelope = bin.ReadByte();
output = bin.ReadInt32(); output = bin.ReadInt32();
} }
}
} }

View File

@ -1,7 +1,7 @@
namespace MyNes.Core namespace MyNes.Core;
public class MNInterfaceLanguage
{ {
public class MNInterfaceLanguage
{
public static string Message_RomInfoCanBeOnlyShown = "Rom info can be shown only when emulation is on (i.e. game is loaded)"; public static string Message_RomInfoCanBeOnlyShown = "Rom info can be shown only when emulation is on (i.e. game is loaded)";
public static string Message_StateSlotSetTo = "State slot set to"; public static string Message_StateSlotSetTo = "State slot set to";
@ -125,5 +125,4 @@ namespace MyNes.Core
public static string IssueMapper245 = "Graphic glitches, maybe chr switches."; public static string IssueMapper245 = "Graphic glitches, maybe chr switches.";
public static string IssueMapper255 = "Mapper 255 is not tested, issues may occur"; public static string IssueMapper255 = "Mapper 255 is not tested, issues may occur";
}
} }

View File

@ -1,7 +1,6 @@
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("NROM", 0)]
internal class Mapper000 : Board
{ {
[BoardInfo("NROM", 0)]
internal class Mapper000 : Board
{
}
} }

View File

@ -1,18 +1,18 @@
using System; using System;
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("MMC1", 1, 4, 64)]
internal class Mapper001 : Board
{ {
[BoardInfo("MMC1", 1, 4, 64)]
internal class Mapper001 : Board
{
private int address_reg; private int address_reg;
private byte[] reg = new byte[4]; private byte[] reg = new byte[4];
private byte shift = 0; private byte shift;
private byte buffer = 0; private byte buffer;
private bool flag_p; private bool flag_p;
@ -241,5 +241,4 @@ namespace MyNes.Core
use_sram_switch = stream.ReadBoolean(); use_sram_switch = stream.ReadBoolean();
cpuCycles = stream.ReadInt32(); cpuCycles = stream.ReadInt32();
} }
}
} }

View File

@ -1,8 +1,8 @@
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("UxROM", 2)]
internal class Mapper002 : Board
{ {
[BoardInfo("UxROM", 2)]
internal class Mapper002 : Board
{
internal override void HardReset() internal override void HardReset()
{ {
base.HardReset(); base.HardReset();
@ -13,5 +13,4 @@ namespace MyNes.Core
{ {
Switch16KPRG(val, PRGArea.Area8000); Switch16KPRG(val, PRGArea.Area8000);
} }
}
} }

View File

@ -1,8 +1,8 @@
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("CNROM", 3)]
internal class Mapper003 : Board
{ {
[BoardInfo("CNROM", 3)]
internal class Mapper003 : Board
{
private byte data_temp; private byte data_temp;
internal override void WritePRG(ref ushort address, ref byte data) internal override void WritePRG(ref ushort address, ref byte data)
@ -11,5 +11,4 @@ namespace MyNes.Core
data_temp &= data; data_temp &= data;
Switch08KCHR(data_temp); Switch08KCHR(data_temp);
} }
}
} }

View File

@ -1,10 +1,10 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("MMC3", 4, true, true)]
internal class Mapper004 : Board
{ {
[BoardInfo("MMC3", 4, true, true)]
internal class Mapper004 : Board
{
private bool flag_c; private bool flag_c;
private bool flag_p; private bool flag_p;
@ -220,5 +220,4 @@ namespace MyNes.Core
irq_clear = bin.ReadBoolean(); irq_clear = bin.ReadBoolean();
mmc3_alt_behavior = bin.ReadBoolean(); mmc3_alt_behavior = bin.ReadBoolean();
} }
}
} }

View File

@ -1,13 +1,13 @@
using System; using System;
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("MMC5", 5, 8, 16)]
[WithExternalSound]
[HassIssues]
internal class Mapper005 : Board
{ {
[BoardInfo("MMC5", 5, 8, 16)]
[WithExternalSound]
[HassIssues]
internal class Mapper005 : Board
{
private int ram_protectA; private int ram_protectA;
private int ram_protectB; private int ram_protectB;
@ -82,7 +82,9 @@ namespace MyNes.Core
private MMC5Pcm snd_3; private MMC5Pcm snd_3;
private double[][][][][] mix_table; private double[] audio_pulse_table;
private double[] audio_tnd_table;
internal override string Issues => MNInterfaceLanguage.IssueMapper5; internal override string Issues => MNInterfaceLanguage.IssueMapper5;
@ -92,46 +94,29 @@ namespace MyNes.Core
snd_1 = new MMC5Sqr(); snd_1 = new MMC5Sqr();
snd_2 = new MMC5Sqr(); snd_2 = new MMC5Sqr();
snd_3 = new MMC5Pcm(); snd_3 = new MMC5Pcm();
mix_table = new double[16][][][][]; audio_pulse_table = new double[32];
for (int i = 0; i < 16; i++) for (int i = 0; i < 32; i++)
{ {
mix_table[i] = new double[16][][][]; audio_pulse_table[i] = 95.52 / (8128.0 / (double)i + 100.0);
for (int j = 0; j < 16; j++)
{
mix_table[i][j] = new double[16][][];
for (int k = 0; k < 16; k++)
{
mix_table[i][j][k] = new double[16][];
for (int l = 0; l < 16; l++)
{
mix_table[i][j][k][l] = new double[256];
for (int m = 0; m < 256; m++)
{
double num = 95.88 / (8128.0 / (double)(i + j) + 100.0);
double num2 = 159.79 / (1.0 / ((double)k / 8227.0 + (double)l / 12241.0 + (double)m / 22638.0) + 100.0);
mix_table[i][j][k][l][m] = num + num2;
}
}
}
} }
audio_tnd_table = new double[204];
for (int j = 0; j < 204; j++)
{
audio_tnd_table[j] = 163.67 / (24329.0 / (double)j + 100.0);
} }
} }
internal override void HardReset() internal override void HardReset()
{ {
base.HardReset(); base.HardReset();
string text = SHA1.ToUpper(); switch (SHA1.ToUpper())
string text2 = text;
if (!(text2 == "37267833C984F176DB4B0BC9D45DABA0FFF45304"))
{
if (text2 == "800AEFE756E85A0A78CCB4DAE68EBBA5DF24BF41")
{ {
case "37267833C984F176DB4B0BC9D45DABA0FFF45304":
useSRAMmirroring = true; useSRAMmirroring = true;
} break;
} case "800AEFE756E85A0A78CCB4DAE68EBBA5DF24BF41":
else
{
useSRAMmirroring = true; useSRAMmirroring = true;
break;
} }
Console.WriteLine("MMC5: using PRG RAM mirroring = " + useSRAMmirroring); Console.WriteLine("MMC5: using PRG RAM mirroring = " + useSRAMmirroring);
CHROffset_spr = new int[8]; CHROffset_spr = new int[8];
@ -273,8 +258,7 @@ namespace MyNes.Core
case 20758: case 20758:
{ {
int num = prg_mode; int num = prg_mode;
int num2 = num; if ((uint)(num - 2) <= 1u)
if ((uint)(num2 - 2) <= 1u)
{ {
Toggle08KPRG_RAM((value & 0x80) == 0, PRGArea.AreaC000); Toggle08KPRG_RAM((value & 0x80) == 0, PRGArea.AreaC000);
Switch08KPRG(value & 0x7F, PRGArea.AreaC000); Switch08KPRG(value & 0x7F, PRGArea.AreaC000);
@ -531,9 +515,7 @@ namespace MyNes.Core
{ {
split_doit = split_watch_tile >= split_tile; split_doit = split_watch_tile >= split_tile;
} }
if (!split_doit) _ = split_doit;
{
}
} }
if (ExRAM_mode == 1) if (ExRAM_mode == 1)
{ {
@ -571,9 +553,7 @@ namespace MyNes.Core
internal override void ReadNMT(ref ushort address, out byte data) internal override void ReadNMT(ref ushort address, out byte data)
{ {
if (split_doit) _ = split_doit;
{
}
if (ExRAM_mode == 1) if (ExRAM_mode == 1)
{ {
if ((address & 0x3FF) <= 959) if ((address & 0x3FF) <= 959)
@ -756,7 +736,7 @@ namespace MyNes.Core
internal override double APUGetSample() internal override double APUGetSample()
{ {
return mix_table[snd_1.output][snd_2.output][0][0][snd_3.output]; return audio_pulse_table[snd_1.output + snd_2.output] + audio_tnd_table[snd_3.output];
} }
internal override void APUApplyChannelsSettings() internal override void APUApplyChannelsSettings()
@ -886,5 +866,4 @@ namespace MyNes.Core
snd_2.ReadStateData(ref stream); snd_2.ReadStateData(ref stream);
snd_3.LoadState(ref stream); snd_3.LoadState(ref stream);
} }
}
} }

View File

@ -1,9 +1,9 @@
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("FFE F4xxx", 6)]
[HassIssues]
internal class Mapper006 : FFE
{ {
[BoardInfo("FFE F4xxx", 6)]
[HassIssues]
internal class Mapper006 : FFE
{
internal override string Issues => MNInterfaceLanguage.IssueMapper6; internal override string Issues => MNInterfaceLanguage.IssueMapper6;
internal override void HardReset() internal override void HardReset()
@ -17,5 +17,4 @@ namespace MyNes.Core
Switch08KCHR(data & 3); Switch08KCHR(data & 3);
Switch16KPRG((data >> 2) & 0xF, PRGArea.Area8000); Switch16KPRG((data >> 2) & 0xF, PRGArea.Area8000);
} }
}
} }

View File

@ -1,12 +1,11 @@
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("AxROM", 7)]
internal class Mapper007 : Board
{ {
[BoardInfo("AxROM", 7)]
internal class Mapper007 : Board
{
internal override void WritePRG(ref ushort addr, ref byte val) internal override void WritePRG(ref ushort addr, ref byte val)
{ {
Switch01KNMTFromMirroring(((val & 0x10) == 16) ? Mirroring.OneScB : Mirroring.OneScA); Switch01KNMTFromMirroring(((val & 0x10) == 16) ? Mirroring.OneScB : Mirroring.OneScA);
Switch32KPRG(val & 7, PRGArea.Area8000); Switch32KPRG(val & 7, PRGArea.Area8000);
} }
}
} }

View File

@ -1,9 +1,9 @@
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("FFE F3xxx", 8)]
[HassIssues]
internal class Mapper008 : FFE
{ {
[BoardInfo("FFE F3xxx", 8)]
[HassIssues]
internal class Mapper008 : FFE
{
internal override string Issues => MNInterfaceLanguage.IssueMapper8; internal override string Issues => MNInterfaceLanguage.IssueMapper8;
internal override void WritePRG(ref ushort address, ref byte data) internal override void WritePRG(ref ushort address, ref byte data)
@ -11,5 +11,4 @@ namespace MyNes.Core
Switch32KPRG((data >> 4) & 3, PRGArea.Area8000); Switch32KPRG((data >> 4) & 3, PRGArea.Area8000);
Switch08KCHR(data & 3); Switch08KCHR(data & 3);
} }
}
} }

View File

@ -1,7 +1,6 @@
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("MMC2", 9)]
internal class Mapper009 : MMC2
{ {
[BoardInfo("MMC2", 9)]
internal class Mapper009 : MMC2
{
}
} }

View File

@ -1,8 +1,8 @@
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("MMC4", 10)]
internal class Mapper010 : MMC2
{ {
[BoardInfo("MMC4", 10)]
internal class Mapper010 : MMC2
{
internal override void HardReset() internal override void HardReset()
{ {
base.HardReset(); base.HardReset();
@ -21,5 +21,4 @@ namespace MyNes.Core
base.WritePRG(ref address, ref data); base.WritePRG(ref address, ref data);
} }
} }
}
} }

View File

@ -1,8 +1,8 @@
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("Color Dreams", 11)]
internal class Mapper011 : Board
{ {
[BoardInfo("Color Dreams", 11)]
internal class Mapper011 : Board
{
private byte writeData; private byte writeData;
internal override void WritePRG(ref ushort address, ref byte data) internal override void WritePRG(ref ushort address, ref byte data)
@ -12,5 +12,4 @@ namespace MyNes.Core
Switch32KPRG(writeData & 3, PRGArea.Area8000); Switch32KPRG(writeData & 3, PRGArea.Area8000);
Switch08KCHR((writeData >> 4) & 0xF); Switch08KCHR((writeData >> 4) & 0xF);
} }
}
} }

View File

@ -1,8 +1,8 @@
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("CPROM", 13, 1, 16)]
internal class Mapper013 : Board
{ {
[BoardInfo("CPROM", 13, 1, 16)]
internal class Mapper013 : Board
{
private byte writeData; private byte writeData;
internal override void HardReset() internal override void HardReset()
@ -17,5 +17,4 @@ namespace MyNes.Core
writeData &= data; writeData &= data;
Switch04KCHR(writeData & 3, CHRArea.Area1000); Switch04KCHR(writeData & 3, CHRArea.Area1000);
} }
}
} }

View File

@ -1,8 +1,8 @@
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("100-in-1 Contra Function 16", 15)]
internal class Mapper015 : Board
{ {
[BoardInfo("100-in-1 Contra Function 16", 15)]
internal class Mapper015 : Board
{
private int temp; private int temp;
internal override void WritePRG(ref ushort address, ref byte data) internal override void WritePRG(ref ushort address, ref byte data)
@ -32,5 +32,4 @@ namespace MyNes.Core
} }
Switch01KNMTFromMirroring(((data & 0x40) == 64) ? Mirroring.Horz : Mirroring.Vert); Switch01KNMTFromMirroring(((data & 0x40) == 64) ? Mirroring.Horz : Mirroring.Vert);
} }
}
} }

View File

@ -1,7 +1,6 @@
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("Bandai", 16)]
internal class Mapper016 : Bandai
{ {
[BoardInfo("Bandai", 16)]
internal class Mapper016 : Bandai
{
}
} }

View File

@ -1,8 +1,8 @@
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("FFE F8xxx", 17)]
internal class Mapper017 : FFE
{ {
[BoardInfo("FFE F8xxx", 17)]
internal class Mapper017 : FFE
{
internal override void HardReset() internal override void HardReset()
{ {
base.HardReset(); base.HardReset();
@ -60,5 +60,4 @@ namespace MyNes.Core
break; break;
} }
} }
}
} }

View File

@ -1,10 +1,10 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("Jaleco SS8806", 18)]
internal class Mapper018 : Board
{ {
[BoardInfo("Jaleco SS8806", 18)]
internal class Mapper018 : Board
{
private int[] prg_reg; private int[] prg_reg;
private int[] chr_reg; private int[] chr_reg;
@ -215,5 +215,4 @@ namespace MyNes.Core
irqEnable = stream.ReadBoolean(); irqEnable = stream.ReadBoolean();
irqMask = stream.ReadInt32(); irqMask = stream.ReadInt32();
} }
}
} }

View File

@ -1,7 +1,6 @@
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("Namcot 106", 19, 1, 256)]
internal class Mapper019 : Namcot106
{ {
[BoardInfo("Namcot 106", 19, 1, 256)]
internal class Mapper019 : Namcot106
{
}
} }

View File

@ -1,10 +1,10 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("VRC4", 21)]
internal class Mapper021 : Board
{ {
[BoardInfo("VRC4", 21)]
internal class Mapper021 : Board
{
private bool prg_mode; private bool prg_mode;
private byte prg_reg0; private byte prg_reg0;
@ -250,5 +250,4 @@ namespace MyNes.Core
irq_enable = stream.ReadBoolean(); irq_enable = stream.ReadBoolean();
irq_enable_on_ak = stream.ReadBoolean(); irq_enable_on_ak = stream.ReadBoolean();
} }
}
} }

View File

@ -1,10 +1,10 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("VRC2", 22)]
internal class Mapper022 : Board
{ {
[BoardInfo("VRC2", 22)]
internal class Mapper022 : Board
{
private int[] chr_Reg; private int[] chr_Reg;
internal override void HardReset() internal override void HardReset()
@ -134,5 +134,4 @@ namespace MyNes.Core
chr_Reg[i] = stream.ReadInt32(); chr_Reg[i] = stream.ReadInt32();
} }
} }
}
} }

View File

@ -1,10 +1,10 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("VRC2", 23)]
internal class Mapper023 : Board
{ {
[BoardInfo("VRC2", 23)]
internal class Mapper023 : Board
{
private int[] chr_Reg; private int[] chr_Reg;
private byte security; private byte security;
@ -159,5 +159,4 @@ namespace MyNes.Core
} }
security = stream.ReadByte(); security = stream.ReadByte();
} }
}
} }

View File

@ -1,11 +1,11 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("VRC6", 24)]
[WithExternalSound]
internal class Mapper024 : Board
{ {
[BoardInfo("VRC6", 24)]
[WithExternalSound]
internal class Mapper024 : Board
{
private int irq_reload; private int irq_reload;
private int irq_counter; private int irq_counter;
@ -241,5 +241,4 @@ namespace MyNes.Core
snd_2.LoadState(ref stream); snd_2.LoadState(ref stream);
snd_3.LoadState(ref stream); snd_3.LoadState(ref stream);
} }
}
} }

View File

@ -1,10 +1,10 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("VRC4", 25)]
internal class Mapper025 : Board
{ {
[BoardInfo("VRC4", 25)]
internal class Mapper025 : Board
{
private bool prg_mode; private bool prg_mode;
private byte prg_reg0; private byte prg_reg0;
@ -250,5 +250,4 @@ namespace MyNes.Core
irq_enable = stream.ReadBoolean(); irq_enable = stream.ReadBoolean();
irq_enable_on_ak = stream.ReadBoolean(); irq_enable_on_ak = stream.ReadBoolean();
} }
}
} }

View File

@ -1,11 +1,11 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("VRC6", 26)]
[WithExternalSound]
internal class Mapper026 : Board
{ {
[BoardInfo("VRC6", 26)]
[WithExternalSound]
internal class Mapper026 : Board
{
private int irq_reload; private int irq_reload;
private int irq_counter; private int irq_counter;
@ -241,5 +241,4 @@ namespace MyNes.Core
snd_2.LoadState(ref stream); snd_2.LoadState(ref stream);
snd_3.LoadState(ref stream); snd_3.LoadState(ref stream);
} }
}
} }

View File

@ -1,10 +1,10 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("Irem G-101", 32)]
internal class Mapper032 : Board
{ {
[BoardInfo("Irem G-101", 32)]
internal class Mapper032 : Board
{
private bool prg_mode; private bool prg_mode;
private byte prg_reg0; private byte prg_reg0;
@ -105,5 +105,4 @@ namespace MyNes.Core
prg_mode = stream.ReadBoolean(); prg_mode = stream.ReadBoolean();
prg_reg0 = stream.ReadByte(); prg_reg0 = stream.ReadByte();
} }
}
} }

View File

@ -1,11 +1,11 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("Taito TC0190/TC0350", 33)]
[HassIssues]
internal class Mapper033 : Board
{ {
[BoardInfo("Taito TC0190/TC0350", 33)]
[HassIssues]
internal class Mapper033 : Board
{
private bool MODE; private bool MODE;
private bool irq_enabled; private bool irq_enabled;
@ -173,5 +173,4 @@ namespace MyNes.Core
irq_reload = stream.ReadByte(); irq_reload = stream.ReadByte();
irq_clear = stream.ReadBoolean(); irq_clear = stream.ReadBoolean();
} }
}
} }

View File

@ -1,8 +1,8 @@
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("BxROM/NINA-001", 34)]
internal class Mapper034 : Board
{ {
[BoardInfo("BxROM/NINA-001", 34)]
internal class Mapper034 : Board
{
private bool BxROM; private bool BxROM;
private byte writeData; private byte writeData;
@ -46,5 +46,4 @@ namespace MyNes.Core
Switch32KPRG(writeData, PRGArea.Area8000); Switch32KPRG(writeData, PRGArea.Area8000);
} }
} }
}
} }

View File

@ -1,13 +1,13 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
{
[BoardInfo("Caltron 6-in-1", 41)]
internal class Mapper041 : Board
{
private bool enableReg = false;
private int vromReg = 0; [BoardInfo("Caltron 6-in-1", 41)]
internal class Mapper041 : Board
{
private bool enableReg;
private int vromReg;
internal override void HardReset() internal override void HardReset()
{ {
@ -54,5 +54,4 @@ namespace MyNes.Core
enableReg = stream.ReadBoolean(); enableReg = stream.ReadBoolean();
vromReg = stream.ReadInt32(); vromReg = stream.ReadInt32();
} }
}
} }

View File

@ -1,15 +1,15 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("Mario Baby", 42)]
internal class Mapper042 : Board
{ {
[BoardInfo("Mario Baby", 42)] private int SRAM_PRG_Page;
internal class Mapper042 : Board
{
private int SRAM_PRG_Page = 0;
private bool irqEnable = false; private bool irqEnable;
private int irqCounter = 0; private int irqCounter;
internal override void HardReset() internal override void HardReset()
{ {
@ -90,5 +90,4 @@ namespace MyNes.Core
irqEnable = stream.ReadBoolean(); irqEnable = stream.ReadBoolean();
irqCounter = stream.ReadInt32(); irqCounter = stream.ReadInt32();
} }
}
} }

View File

@ -1,11 +1,11 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("7-in-1 MMC3 Port A001h", 44, true, true)]
[HassIssues]
internal class Mapper044 : Board
{ {
[BoardInfo("7-in-1 MMC3 Port A001h", 44, true, true)]
[HassIssues]
internal class Mapper044 : Board
{
private bool flag_c; private bool flag_c;
private bool flag_p; private bool flag_p;
@ -231,5 +231,4 @@ namespace MyNes.Core
chr_and = stream.ReadInt32(); chr_and = stream.ReadInt32();
chr_or = stream.ReadInt32(); chr_or = stream.ReadInt32();
} }
}
} }

View File

@ -1,11 +1,11 @@
using System; using System;
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("X-in-1 MMC3 Port 6000hx4", 45, true, true)]
internal class Mapper045 : Board
{ {
[BoardInfo("X-in-1 MMC3 Port 6000hx4", 45, true, true)]
internal class Mapper045 : Board
{
private bool flag_c; private bool flag_c;
private bool flag_p; private bool flag_p;
@ -290,5 +290,4 @@ namespace MyNes.Core
locked = stream.ReadBoolean(); locked = stream.ReadBoolean();
regCounter = stream.ReadInt32(); regCounter = stream.ReadInt32();
} }
}
} }

View File

@ -1,10 +1,10 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("15-in-1 Color Dreams", 46)]
internal class Mapper046 : Board
{ {
[BoardInfo("15-in-1 Color Dreams", 46)]
internal class Mapper046 : Board
{
private int prg_reg; private int prg_reg;
private int chr_reg; private int chr_reg;
@ -38,5 +38,4 @@ namespace MyNes.Core
prg_reg = stream.ReadInt32(); prg_reg = stream.ReadInt32();
chr_reg = stream.ReadInt32(); chr_reg = stream.ReadInt32();
} }
}
} }

View File

@ -1,11 +1,11 @@
using System; using System;
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("2-in-1 MMC3 Port 6000h", 47, true, true)]
internal class Mapper047 : Board
{ {
[BoardInfo("2-in-1 MMC3 Port 6000h", 47, true, true)]
internal class Mapper047 : Board
{
private bool flag_c; private bool flag_c;
private bool flag_p; private bool flag_p;
@ -254,5 +254,4 @@ namespace MyNes.Core
chr_or = stream.ReadInt32(); chr_or = stream.ReadInt32();
irq_enabled = stream.ReadBoolean(); irq_enabled = stream.ReadBoolean();
} }
}
} }

View File

@ -1,10 +1,10 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("Taito TC0190/TC0350", 48, true, true)]
internal class Mapper048 : Board
{ {
[BoardInfo("Taito TC0190/TC0350", 48, true, true)]
internal class Mapper048 : Board
{
private bool MODE; private bool MODE;
private bool irq_enabled; private bool irq_enabled;
@ -168,5 +168,4 @@ namespace MyNes.Core
irq_reload = stream.ReadByte(); irq_reload = stream.ReadByte();
irq_clear = stream.ReadBoolean(); irq_clear = stream.ReadBoolean();
} }
}
} }

View File

@ -1,11 +1,11 @@
using System; using System;
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("4-in-1 MMC3 Port 6xxxh", 49, true, true)]
internal class Mapper049 : Board
{ {
[BoardInfo("4-in-1 MMC3 Port 6xxxh", 49, true, true)]
internal class Mapper049 : Board
{
private bool flag_c; private bool flag_c;
private bool flag_p; private bool flag_p;
@ -268,5 +268,4 @@ namespace MyNes.Core
prg_32Mode = stream.ReadBoolean(); prg_32Mode = stream.ReadBoolean();
prg_32Page = stream.ReadInt32(); prg_32Page = stream.ReadInt32();
} }
}
} }

View File

@ -1,10 +1,10 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("FDS-Port - Alt. Levels", 50)]
internal class Mapper050 : Board
{ {
[BoardInfo("FDS-Port - Alt. Levels", 50)]
internal class Mapper050 : Board
{
private int prg_page; private int prg_page;
private int irq_counter; private int irq_counter;
@ -67,5 +67,4 @@ namespace MyNes.Core
irq_counter = stream.ReadInt32(); irq_counter = stream.ReadInt32();
irq_enabled = stream.ReadBoolean(); irq_enabled = stream.ReadBoolean();
} }
}
} }

View File

@ -1,11 +1,11 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("11-in-1", 51)]
internal class Mapper051 : Board
{ {
[BoardInfo("11-in-1", 51)] private int bank;
internal class Mapper051 : Board
{
private int bank = 0;
private int mode = 1; private int mode = 1;
@ -75,5 +75,4 @@ namespace MyNes.Core
mode = stream.ReadInt32(); mode = stream.ReadInt32();
offset = stream.ReadInt32(); offset = stream.ReadInt32();
} }
}
} }

View File

@ -1,11 +1,11 @@
using System; using System;
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("7-in-1 MMC3 Port 6800h with SRAM", 52, true, true)]
internal class Mapper052 : Board
{ {
[BoardInfo("7-in-1 MMC3 Port 6800h with SRAM", 52, true, true)]
internal class Mapper052 : Board
{
private bool flag_c; private bool flag_c;
private bool flag_p; private bool flag_p;
@ -269,5 +269,4 @@ namespace MyNes.Core
chr_or = stream.ReadInt32(); chr_or = stream.ReadInt32();
locked = stream.ReadBoolean(); locked = stream.ReadBoolean();
} }
}
} }

View File

@ -1,11 +1,11 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("Unknown", 53)]
[HassIssues]
internal class Mapper053 : Board
{ {
[BoardInfo("Unknown", 53)]
[HassIssues]
internal class Mapper053 : Board
{
private byte[] regs = new byte[2]; private byte[] regs = new byte[2];
private bool epromFirst; private bool epromFirst;
@ -54,5 +54,4 @@ namespace MyNes.Core
stream.Read(regs, 0, 2); stream.Read(regs, 0, 2);
epromFirst = stream.ReadBoolean(); epromFirst = stream.ReadBoolean();
} }
}
} }

View File

@ -1,17 +1,17 @@
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("Pirate SMB3", 56)]
internal class Mapper056 : Board
{ {
[BoardInfo("Pirate SMB3", 56)] private int irqCounter;
internal class Mapper056 : Board
{
private int irqCounter = 0;
private int irqLatch = 0; private int irqLatch;
private bool irqEnabled = false; private bool irqEnabled;
private int irqControl = 0; private int irqControl;
private int switchControl = 0; private int switchControl;
internal override string Issues => MNInterfaceLanguage.IssueMapper56; internal override string Issues => MNInterfaceLanguage.IssueMapper56;
@ -93,5 +93,4 @@ namespace MyNes.Core
NesEmu.IRQFlags |= 8; NesEmu.IRQFlags |= 8;
} }
} }
}
} }

View File

@ -1,10 +1,10 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("6-in-1 (SuperGK)", 57)]
internal class Mapper057 : Board
{ {
[BoardInfo("6-in-1 (SuperGK)", 57)]
internal class Mapper057 : Board
{
private int chr_aaa; private int chr_aaa;
private int chr_bbb; private int chr_bbb;
@ -51,5 +51,4 @@ namespace MyNes.Core
chr_bbb = stream.ReadInt32(); chr_bbb = stream.ReadInt32();
chr_hhh = stream.ReadInt32(); chr_hhh = stream.ReadInt32();
} }
}
} }

View File

@ -1,9 +1,9 @@
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("68-in-1 (Game Star)", 58)]
[HassIssues]
internal class Mapper058 : Board
{ {
[BoardInfo("68-in-1 (Game Star)", 58)]
[HassIssues]
internal class Mapper058 : Board
{
internal override string Issues => MNInterfaceLanguage.IssueMapper58; internal override string Issues => MNInterfaceLanguage.IssueMapper58;
internal override void WritePRG(ref ushort address, ref byte data) internal override void WritePRG(ref ushort address, ref byte data)
@ -20,5 +20,4 @@ namespace MyNes.Core
} }
Switch01KNMTFromMirroring(((address & 0x80) == 128) ? Mirroring.Horz : Mirroring.Vert); Switch01KNMTFromMirroring(((address & 0x80) == 128) ? Mirroring.Horz : Mirroring.Vert);
} }
}
} }

View File

@ -1,14 +1,14 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
{
[BoardInfo("Unknown", 60)]
[HassIssues]
internal class Mapper060 : Board
{
private int latch = 0;
private byte menu = 0; [BoardInfo("Unknown", 60)]
[HassIssues]
internal class Mapper060 : Board
{
private int latch;
private byte menu;
internal override string Issues => MNInterfaceLanguage.IssueMapper60; internal override string Issues => MNInterfaceLanguage.IssueMapper60;
@ -63,5 +63,4 @@ namespace MyNes.Core
latch = stream.ReadInt32(); latch = stream.ReadInt32();
menu = stream.ReadByte(); menu = stream.ReadByte();
} }
}
} }

View File

@ -1,8 +1,8 @@
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("20-in-1", 61)]
internal class Mapper061 : Board
{ {
[BoardInfo("20-in-1", 61)]
internal class Mapper061 : Board
{
internal override void WritePRG(ref ushort address, ref byte data) internal override void WritePRG(ref ushort address, ref byte data)
{ {
if ((address & 0x10) == 0) if ((address & 0x10) == 0)
@ -16,5 +16,4 @@ namespace MyNes.Core
} }
Switch01KNMTFromMirroring(((address & 0x80) == 128) ? Mirroring.Horz : Mirroring.Vert); Switch01KNMTFromMirroring(((address & 0x80) == 128) ? Mirroring.Horz : Mirroring.Vert);
} }
}
} }

View File

@ -1,8 +1,8 @@
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("Super 700-in-1", 62)]
internal class Mapper062 : Board
{ {
[BoardInfo("Super 700-in-1", 62)]
internal class Mapper062 : Board
{
private int prg_page; private int prg_page;
internal override void WritePRG(ref ushort address, ref byte data) internal override void WritePRG(ref ushort address, ref byte data)
@ -20,5 +20,4 @@ namespace MyNes.Core
} }
Switch01KNMTFromMirroring(((address & 0x80) == 128) ? Mirroring.Horz : Mirroring.Vert); Switch01KNMTFromMirroring(((address & 0x80) == 128) ? Mirroring.Horz : Mirroring.Vert);
} }
}
} }

View File

@ -1,10 +1,10 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("Tengen RAMBO-1", 64, true, true)]
internal class Mapper064 : Board
{ {
[BoardInfo("Tengen RAMBO-1", 64, true, true)]
internal class Mapper064 : Board
{
private bool flag_c; private bool flag_c;
private bool flag_p; private bool flag_p;
@ -254,5 +254,4 @@ namespace MyNes.Core
irq_prescaler = stream.ReadInt32(); irq_prescaler = stream.ReadInt32();
irq_mode = stream.ReadBoolean(); irq_mode = stream.ReadBoolean();
} }
}
} }

View File

@ -1,8 +1,8 @@
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("Irem H-3001", 65)]
internal class Mapper065 : Board
{ {
[BoardInfo("Irem H-3001", 65)]
internal class Mapper065 : Board
{
private bool irq_enable; private bool irq_enable;
private int irq_reload; private int irq_reload;
@ -90,5 +90,4 @@ namespace MyNes.Core
} }
} }
} }
}
} }

View File

@ -1,12 +1,11 @@
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("GxROM", 66)]
internal class Mapper066 : Board
{ {
[BoardInfo("GxROM", 66)]
internal class Mapper066 : Board
{
internal override void WritePRG(ref ushort address, ref byte data) internal override void WritePRG(ref ushort address, ref byte data)
{ {
Switch32KPRG((data >> 4) & 3, PRGArea.Area8000); Switch32KPRG((data >> 4) & 3, PRGArea.Area8000);
Switch08KCHR(data & 3); Switch08KCHR(data & 3);
} }
}
} }

View File

@ -1,10 +1,10 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("Sunsoft 3", 67)]
internal class Mapper067 : Board
{ {
[BoardInfo("Sunsoft 3", 67)]
internal class Mapper067 : Board
{
private bool irq_enabled; private bool irq_enabled;
private int irq_counter; private int irq_counter;
@ -104,5 +104,4 @@ namespace MyNes.Core
irq_counter = stream.ReadInt32(); irq_counter = stream.ReadInt32();
odd = stream.ReadBoolean(); odd = stream.ReadBoolean();
} }
}
} }

View File

@ -1,10 +1,10 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("Sunsoft 4", 68)]
internal class Mapper068 : Board
{ {
[BoardInfo("Sunsoft 4", 68)]
internal class Mapper068 : Board
{
private bool flag_r; private bool flag_r;
private bool flag_m; private bool flag_m;
@ -108,5 +108,4 @@ namespace MyNes.Core
nt_reg1 = stream.ReadInt32(); nt_reg1 = stream.ReadInt32();
temp = stream.ReadInt32(); temp = stream.ReadInt32();
} }
}
} }

View File

@ -1,11 +1,11 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("FME-7/Sunsoft 5B", 69)]
[WithExternalSound]
internal class Mapper069 : Board
{ {
[BoardInfo("FME-7/Sunsoft 5B", 69)]
[WithExternalSound]
internal class Mapper069 : Board
{
private int address_A000; private int address_A000;
private int address_E000; private int address_E000;
@ -255,5 +255,4 @@ namespace MyNes.Core
snd_2.LoadState(ref stream); snd_2.LoadState(ref stream);
snd_3.LoadState(ref stream); snd_3.LoadState(ref stream);
} }
}
} }

View File

@ -1,8 +1,8 @@
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("Bandai", 70)]
internal class Mapper070 : Board
{ {
[BoardInfo("Bandai", 70)]
internal class Mapper070 : Board
{
internal override void HardReset() internal override void HardReset()
{ {
base.HardReset(); base.HardReset();
@ -14,5 +14,4 @@ namespace MyNes.Core
Switch16KPRG((data >> 4) & 0xF, PRGArea.Area8000); Switch16KPRG((data >> 4) & 0xF, PRGArea.Area8000);
Switch08KCHR(data & 0xF); Switch08KCHR(data & 0xF);
} }
}
} }

View File

@ -1,8 +1,8 @@
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("Camerica", 71)]
internal class Mapper071 : Board
{ {
[BoardInfo("Camerica", 71)]
internal class Mapper071 : Board
{
private bool fireHawk; private bool fireHawk;
internal override void HardReset() internal override void HardReset()
@ -26,5 +26,4 @@ namespace MyNes.Core
Switch16KPRG(val, PRGArea.Area8000); Switch16KPRG(val, PRGArea.Area8000);
} }
} }
}
} }

View File

@ -1,10 +1,10 @@
using System.IO; using System.IO;
namespace MyNes.Core namespace MyNes.Core;
[BoardInfo("Jaleco Early Mapper 0", 72)]
internal class Mapper072 : Board
{ {
[BoardInfo("Jaleco Early Mapper 0", 72)]
internal class Mapper072 : Board
{
private byte writeData; private byte writeData;
private int chr_reg; private int chr_reg;
@ -49,5 +49,4 @@ namespace MyNes.Core
chr_reg = stream.ReadInt32(); chr_reg = stream.ReadInt32();
prg_reg = stream.ReadInt32(); prg_reg = stream.ReadInt32();
} }
}
} }

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