commodore64: change directory structure a little, rename namespaces for consistency

This commit is contained in:
saxxonpike 2012-12-06 06:25:30 +00:00
parent 31dd33ae3a
commit e1ff14e475
12 changed files with 36 additions and 33 deletions

View File

@ -82,18 +82,18 @@
<Compile Include="Computers\Commodore64\C64.Core.cs" />
<Compile Include="Computers\Commodore64\C64.cs" />
<Compile Include="Computers\Commodore64\C64.Motherboard.cs" />
<Compile Include="Computers\Commodore64\Cartridges\Mapper0000.cs" />
<Compile Include="Computers\Commodore64\Cartridge\Mapper0000.cs" />
<Compile Include="Computers\Commodore64\C64.Input.cs" />
<Compile Include="Computers\Commodore64\Cartridges\Mapper0005.cs" />
<Compile Include="Computers\Commodore64\Cartridges\Mapper000B.cs" />
<Compile Include="Computers\Commodore64\Cartridges\Mapper000F.cs" />
<Compile Include="Computers\Commodore64\Cartridges\Mapper0011.cs" />
<Compile Include="Computers\Commodore64\Cartridges\Mapper0012.cs" />
<Compile Include="Computers\Commodore64\Cartridges\Mapper0013.cs" />
<Compile Include="Computers\Commodore64\Cartridges\Mapper0020.cs" />
<Compile Include="Computers\Commodore64\Cartridge\Mapper0005.cs" />
<Compile Include="Computers\Commodore64\Cartridge\Mapper000B.cs" />
<Compile Include="Computers\Commodore64\Cartridge\Mapper000F.cs" />
<Compile Include="Computers\Commodore64\Cartridge\Mapper0011.cs" />
<Compile Include="Computers\Commodore64\Cartridge\Mapper0012.cs" />
<Compile Include="Computers\Commodore64\Cartridge\Mapper0013.cs" />
<Compile Include="Computers\Commodore64\Cartridge\Mapper0020.cs" />
<Compile Include="Computers\Commodore64\Media\PRG.cs" />
<Compile Include="Computers\Commodore64\Memory.cs" />
<Compile Include="Computers\Commodore64\Cartridges\Cartridge.cs" />
<Compile Include="Computers\Commodore64\Cartridge\Cartridge.cs" />
<Compile Include="Computers\Commodore64\MOS\CartridgePort.cs" />
<Compile Include="Computers\Commodore64\MOS\CassettePort.cs" />
<Compile Include="Computers\Commodore64\MOS\Chip2114.cs" />
@ -568,7 +568,9 @@
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Folder Include="Computers\Commodore64\Disk\" />
<Folder Include="Computers\Commodore64\Peripheral\" />
<Folder Include="Computers\Commodore64\Tape\" />
</ItemGroup>
<ItemGroup />
<ItemGroup>

View File

@ -1,4 +1,5 @@
using BizHawk.Emulation.CPUs.M6502;
using BizHawk.Emulation.Computers.Commodore64.Cartridge;
using BizHawk.Emulation.Computers.Commodore64.MOS;
using System;
using System.Collections.Generic;
@ -56,7 +57,7 @@ namespace BizHawk.Emulation.Computers.Commodore64
switch (extension.ToUpper())
{
case @".CRT":
Cartridges.Cartridge cart = Cartridges.Cartridge.Load(inputFile);
Cart cart = Cart.Load(inputFile);
if (cart != null)
{
board.cartPort.Connect(cart);

View File

@ -4,17 +4,17 @@ using System.IO;
using System.Linq;
using System.Text;
namespace BizHawk.Emulation.Computers.Commodore64.Cartridges
namespace BizHawk.Emulation.Computers.Commodore64.Cartridge
{
// this is the base cartridge class
public class Cartridge
public class Cart
{
// ---------------------------------
static public Cartridge Load(byte[] crtFile)
static public Cart Load(byte[] crtFile)
{
Cartridge result = null;
Cart result = null;
MemoryStream mem = new MemoryStream(crtFile);
BinaryReader reader = new BinaryReader(mem);

View File

@ -3,9 +3,9 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BizHawk.Emulation.Computers.Commodore64.Cartridges
namespace BizHawk.Emulation.Computers.Commodore64.Cartridge
{
public class Mapper0000 : Cartridge
public class Mapper0000 : Cart
{
private byte[] romA;
private uint romAMask;

View File

@ -3,9 +3,9 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BizHawk.Emulation.Computers.Commodore64.Cartridges
namespace BizHawk.Emulation.Computers.Commodore64.Cartridge
{
public class Mapper0005 : Cartridge
public class Mapper0005 : Cart
{
private byte[][] banksA = new byte[0][]; //8000
private byte[][] banksB = new byte[0][]; //A000

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BizHawk.Emulation.Computers.Commodore64.Cartridges
namespace BizHawk.Emulation.Computers.Commodore64.Cartridge
{
// Westermann Learning mapper.
// Starts up with both banks enabled, any read to DFxx
@ -12,7 +12,7 @@ namespace BizHawk.Emulation.Computers.Commodore64.Cartridges
// the RAM underneath (BASIC variable values probably)
// and then disables once loaded.
public class Mapper000B : Cartridge
public class Mapper000B : Cart
{
private byte[] rom = new byte[0x4000];

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BizHawk.Emulation.Computers.Commodore64.Cartridges
namespace BizHawk.Emulation.Computers.Commodore64.Cartridge
{
// This is a mapper used commonly by System 3. It is
// also utilized by the short-lived C64 Game System.
@ -12,7 +12,7 @@ namespace BizHawk.Emulation.Computers.Commodore64.Cartridges
// register DE00+BankNr. For example, bank 01 is a write
// to DE01.
public class Mapper000F : Cartridge
public class Mapper000F : Cart
{
private byte[][] banks = new byte[0][]; //8000
private uint bankMask;

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BizHawk.Emulation.Computers.Commodore64.Cartridges
namespace BizHawk.Emulation.Computers.Commodore64.Cartridge
{
// This mapper comes from Dinamic. It is in fact identical
// to the System 3 mapper (000F) except that bank switching is

View File

@ -3,9 +3,9 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BizHawk.Emulation.Computers.Commodore64.Cartridges
namespace BizHawk.Emulation.Computers.Commodore64.Cartridge
{
public class Mapper0012 : Cartridge
public class Mapper0012 : Cart
{
private byte[] bankMain;
private byte[][] bankHigh;

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BizHawk.Emulation.Computers.Commodore64.Cartridges
namespace BizHawk.Emulation.Computers.Commodore64.Cartridge
{
// Mapper for a few Domark and HES Australia games.
// It seems a lot of people dumping these have remapped
@ -13,7 +13,7 @@ namespace BizHawk.Emulation.Computers.Commodore64.Cartridges
// Bank select is DE00, bit 7 enabled means to disable
// ROM in 8000-9FFF.
public class Mapper0013 : Cartridge
public class Mapper0013 : Cart
{
private byte[][] banks = new byte[0][]; //8000
private uint bankMask;

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BizHawk.Emulation.Computers.Commodore64.Cartridges
namespace BizHawk.Emulation.Computers.Commodore64.Cartridge
{
// EasyFlash cartridge
// No official games came on one of these but there
@ -19,8 +19,8 @@ namespace BizHawk.Emulation.Computers.Commodore64.Cartridges
// with Game set high and ExRom set low.
// There is also 256 bytes RAM at DF00-DFFF.
public class Mapper0020 : Cartridge
public class Mapper0020 : Cart
{
private byte[][] banksA = new byte[64][]; //8000
private byte[][] banksB = new byte[64][]; //A000

View File

@ -1,4 +1,4 @@
using BizHawk.Emulation.Computers.Commodore64.Cartridges;
using BizHawk.Emulation.Computers.Commodore64.Cartridge;
using System;
using System.Collections.Generic;
using System.Linq;
@ -8,7 +8,7 @@ namespace BizHawk.Emulation.Computers.Commodore64.MOS
{
public class CartridgePort
{
private Cartridge cart;
private Cart cart;
private bool connected;
public CartridgePort()
@ -41,7 +41,7 @@ namespace BizHawk.Emulation.Computers.Commodore64.MOS
// ------------------------------------------
public void Connect(Cartridge newCart)
public void Connect(Cart newCart)
{
cart = newCart;
connected = true;