a2600 refactor - make mapper classes internal and sealed

This commit is contained in:
adelikat 2020-03-18 21:46:51 -05:00
parent f10b51558b
commit efb34f74e1
34 changed files with 34 additions and 34 deletions

View File

@ -2,7 +2,7 @@
namespace BizHawk.Emulation.Cores.Atari.Atari2600
{
public abstract class MapperBase
internal abstract class MapperBase
{
protected MapperBase(Atari2600 core)
{

View File

@ -2,7 +2,7 @@
namespace BizHawk.Emulation.Cores.Atari.Atari2600
{
internal class Multicart2K : MapperBase
internal sealed class Multicart2K : MapperBase
{
private int _gameTotal;
private int _currentGame;

View File

@ -2,7 +2,7 @@
namespace BizHawk.Emulation.Cores.Atari.Atari2600
{
internal class Multicart4K : MapperBase
internal sealed class Multicart4K : MapperBase
{
private int _gameTotal;
private int _currentGame;

View File

@ -2,7 +2,7 @@
namespace BizHawk.Emulation.Cores.Atari.Atari2600
{
internal class Multicart8K : MapperBase
internal sealed class Multicart8K : MapperBase
{
private int _bank4K;

View File

@ -21,7 +21,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
B is the bank we will select. So, accessing 0800 will select bank 0, and 0840
will select bank 1.
*/
internal class m0840 : MapperBase
internal sealed class m0840 : MapperBase
{
private int _bank4K;

View File

@ -1,6 +1,6 @@
namespace BizHawk.Emulation.Cores.Atari.Atari2600
{
internal class m2K : MapperBase
internal sealed class m2K : MapperBase
{
public m2K(Atari2600 core) : base(core)
{

View File

@ -20,7 +20,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
enough space for 256K of RAM. When RAM is selected, 1000-13FF is the read port while
1400-17FF is the write port.
*/
internal class m3E : MapperBase
internal sealed class m3E : MapperBase
{
public m3E(Atari2600 core) : base(core)
{

View File

@ -20,7 +20,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
register, and this has been done... however do not think 512K ROMs have been made just
yet.
*/
internal class m3F : MapperBase
internal sealed class m3F : MapperBase
{
private int _lowBank2K;

View File

@ -41,7 +41,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
bytes of ROM.
*/
internal class m4A50 : MapperBase
internal sealed class m4A50 : MapperBase
{
private byte[] _ram = new byte[32768];

View File

@ -1,6 +1,6 @@
namespace BizHawk.Emulation.Cores.Atari.Atari2600
{
internal class m4K : MapperBase
internal sealed class m4K : MapperBase
{
public m4K(Atari2600 core) : base(core)
{

View File

@ -31,7 +31,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
p = ROM Power (0 = enabled, 1 = off.) Only power the ROM if you're
wanting to access the ROM for multi-loads. Otherwise set to 1.
*/
internal class mAR : MapperBase
internal sealed class mAR : MapperBase
{
#region SuperCharger Data

View File

@ -177,7 +177,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
by two 20K resistors, then it goes through a hex inverting schmitt trigger to
square it up. This then runs into bit 7 of portA.
*/
internal class mCM : MapperBase
internal sealed class mCM : MapperBase
{
// TODO: PokeMem
private byte[] _ram = new byte[2048];

View File

@ -15,7 +15,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
Example games:
Magicard
*/
internal class mCV : MapperBase
internal sealed class mCV : MapperBase
{
private byte[] _ram = new byte[1024];

View File

@ -222,7 +222,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
so. The value read at 1004-1007 is the instantanious value generated by the fetchers and
mixing hardware.
*/
internal class mDPC : MapperBase
internal sealed class mDPC : MapperBase
{
// Table for computing the input bit of the random number generator's
// shift register (it's the NOT of the EOR of four bits)

View File

@ -9,7 +9,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
display bank, 1K frequency table and the DPC chip. For complete details on
the DPC chip see David P. Crane's United States Patent Number 4,644,495.
*/
internal class mDPCPlus : MapperBase
internal sealed class mDPCPlus : MapperBase
{
// Table for computing the input bit of the random number generator's
// shift register (it's the NOT of the EOR of four bits)

View File

@ -22,7 +22,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
Example Games:
Frogger II - Threedeep! (1983) (Parker Bros)
*/
internal class mE0 : MapperBase
internal sealed class mE0 : MapperBase
{
private int _toggle1;
private int _toggle2;

View File

@ -26,7 +26,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
Accessing 1FE8 through 1FEB select which 256 byte bank shows up.
*/
internal class mE7 : MapperBase
internal sealed class mE7 : MapperBase
{
private const int RamBank1Offset = 1024;
private int _romBank1K;

View File

@ -11,7 +11,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
1FE0-1FEF. Accessing one of these will select the desired bank. 1FE0 = bank 0,
1FE1 = bank 1, etc.
*/
internal class mEF : MapperBase
internal sealed class mEF : MapperBase
{
private int _toggle;

View File

@ -7,7 +7,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
There are 16 4K banks (total of 64K ROM) with 128 bytes of RAM.
Accessing $1FE0 - $1FEF switches to each bank.
*/
internal class mEFSC : MapperBase
internal sealed class mEFSC : MapperBase
{
private int _bank4K;
private byte[] _ram = new byte[128];

View File

@ -17,7 +17,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
bank is numbered by means of one of the ROM locations, and the code simply keeps accessing
1FF0 until the bank it is looking for comes up.
*/
internal class mF0 : MapperBase
internal sealed class mF0 : MapperBase
{
private int _bank;

View File

@ -9,7 +9,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
Again, this works like F8 and F6 except now there's 8 4K banks. Selection is performed
by accessing 1FF4 through 1FFB.
*/
internal class mF4 :MapperBase
internal sealed class mF4 :MapperBase
{
private int _toggle;

View File

@ -6,7 +6,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
Cartridge class used for Atari's 16K bankswitched games with
128 bytes of RAM. There are four 4K banks.
*/
internal class mF4SC : MapperBase
internal sealed class mF4SC : MapperBase
{
private int _bank4K;
private byte[] _ram = new byte[128];

View File

@ -11,7 +11,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
select one of the 4 banks. i.e. 1FF6 selects bank 0, 1FF7 selects bank 1, etc.
*/
internal class mF6 : MapperBase
internal sealed class mF6 : MapperBase
{
private int _toggle;

View File

@ -6,7 +6,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
Cartridge class used for Atari's 16K bankswitched games with
128 bytes of RAM. There are four 4K banks.
*/
internal class mF6SC : MapperBase
internal sealed class mF6SC : MapperBase
{
private int _bank4K;
private byte[] _ram = new byte[128];

View File

@ -19,7 +19,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
so when the switch occurs, the code won't crash.
*/
internal class mF8 : MapperBase
internal sealed class mF8 : MapperBase
{
private int _bank4K;

View File

@ -6,7 +6,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
Cartridge class used for Atari's 8K bankswitched games with
128 bytes of RAM. There are two 4K banks.
*/
internal class mF8SC : MapperBase
internal sealed class mF8SC : MapperBase
{
private int _bank4K;
private byte[] _ram = new byte[128];

View File

@ -8,7 +8,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
Apparently some of Sega's games have banks that are physically flipped, so even though this game uses a common mapper, the initial bank that gets pointed to is incorrect.
*/
internal class mF8_sega : MapperBase
internal sealed class mF8_sega : MapperBase
{
private int _bank4K = 1;

View File

@ -13,7 +13,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
accessing 1FF8, 1FF9, and 1FFA. There's also 256 bytes of RAM mapped into 1000-11FF.
The write port is at 1000-10FF, and the read port is 1100-11FF.
*/
internal class mFA : MapperBase
internal sealed class mFA : MapperBase
{
private int _toggle;
private byte[] _ram = new byte[256];

View File

@ -8,7 +8,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
There are six (or seven) 4K banks and 256 bytes of RAM.
*/
internal class mFA2 : MapperBase
internal sealed class mFA2 : MapperBase
{
private int _bank4K;
private byte[] _ram = new byte[256];

View File

@ -54,7 +54,7 @@
Using emulators or similar there is a large cheat that can be used. A13 can be used
to simply select which 8K bank to be in.
*/
internal class mFE : MapperBase
internal sealed class mFE : MapperBase
{
public mFE(Atari2600 core) : base(core)
{

View File

@ -58,7 +58,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
address bus. An actual system doesn't have that luxury, unfortunately, so it must
disregard accesses to 3C-3F instead.
*/
internal class mMC : MapperBase
internal sealed class mMC : MapperBase
{
public mMC(Atari2600 core) : base(core)
{

View File

@ -6,7 +6,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
Cartridge class used for SB "SUPERbanking" 128k-256k bankswitched games.
There are either 32 or 64 4K banks.
*/
internal class mSB : MapperBase
internal sealed class mSB : MapperBase
{
private int _bank4K;

View File

@ -11,7 +11,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
Accessing 0220 will select the first bank, and accessing 0240 will select the second.
*/
internal class mUA : MapperBase
internal sealed class mUA : MapperBase
{
private int _toggle;

View File

@ -33,7 +33,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
TIA registers at 00-3F or 40-7F without incurring any overhead.
*/
internal class mX07 : MapperBase
internal sealed class mX07 : MapperBase
{
private int _romBank2K;