Commodore64: Tweak Joystick 2 input.

This commit is contained in:
saxxonpike 2013-08-14 13:53:48 +00:00
parent d2a879420e
commit af9bbd9ae4
6 changed files with 8 additions and 16 deletions

View File

@ -26,13 +26,11 @@ namespace BizHawk.Emulation.Computers.Commodore64
byte Cia0_ReadPortA()
{
WriteInputPort();
return cia0InputLatchA;
}
byte Cia0_ReadPortB()
{
WriteInputPort();
return cia0InputLatchB;
}
@ -98,7 +96,10 @@ namespace BizHawk.Emulation.Computers.Commodore64
byte Pla_ReadCia0(int addr)
{
if (addr == 0xDC00 || addr == 0xDC01)
{
WriteInputPort();
inputRead = true;
}
return cia0.Read(addr);
}

View File

@ -108,6 +108,7 @@ namespace BizHawk.Emulation.Computers.Commodore64
}
}
board.inputRead = false;
board.PollInput();
for (uint count = cyclesPerFrame; count > 0; count--)
{

View File

@ -23,7 +23,6 @@ namespace BizHawk.Emulation.Computers.Commodore64.Disk
public byte Peek(int addr)
{
addr &= 0xFFFF;
if (addr >= 0x1800 && addr < 0x1C00)
return PeekVia0(addr);
else if (addr >= 0x1C00 && addr < 0x2000)
@ -36,7 +35,6 @@ namespace BizHawk.Emulation.Computers.Commodore64.Disk
public void Poke(int addr, byte val)
{
addr &= 0xFFFF;
if (addr >= 0x1800 && addr < 0x1C00)
PokeVia0(addr, val);
else if (addr >= 0x1C00 && addr < 0x2000)
@ -49,7 +47,6 @@ namespace BizHawk.Emulation.Computers.Commodore64.Disk
public byte Read(ushort addr)
{
addr &= 0xFFFF;
if (addr >= 0x1800 && addr < 0x1C00)
return ReadVia0(addr);
else if (addr >= 0x1C00 && addr < 0x2000)
@ -62,7 +59,6 @@ namespace BizHawk.Emulation.Computers.Commodore64.Disk
public void Write(ushort addr, byte val)
{
addr &= 0xFFFF;
if (addr >= 0x1800 && addr < 0x1C00)
WriteVia0(addr, val);
else if (addr >= 0x1C00 && addr < 0x2000)

View File

@ -30,17 +30,17 @@
public byte Peek(int addr)
{
return ram[addr & 0xFFFF];
return ram[addr];
}
public void Poke(int addr, byte val)
{
ram[addr & 0xFFFF] = val;
ram[addr] = val;
}
public byte Read(int addr)
{
return ram[addr & 0xFFFF];
return ram[addr];
}
public void SyncState(Serializer ser)
@ -51,7 +51,7 @@
public void Write(int addr, byte val)
{
ram[addr & 0xFFFF] = val;
ram[addr] = val;
}
}
}

View File

@ -130,7 +130,6 @@ namespace BizHawk.Emulation.Computers.Commodore64.MOS
public byte Peek(int addr)
{
addr &= 0xFFFF;
if (addr == 0x0000)
return port.Direction;
else if (addr == 0x0001)
@ -141,7 +140,6 @@ namespace BizHawk.Emulation.Computers.Commodore64.MOS
public void Poke(int addr, byte val)
{
addr &= 0xFFFF;
if (addr == 0x0000)
port.Direction = val;
else if (addr == 0x0001)

View File

@ -228,7 +228,6 @@ namespace BizHawk.Emulation.Computers.Commodore64.MOS
public byte Peek(int addr)
{
addr &= 0x0FFFF;
switch (Bank(addr, true))
{
case PLABank.BasicROM:
@ -263,7 +262,6 @@ namespace BizHawk.Emulation.Computers.Commodore64.MOS
public void Poke(int addr, byte val)
{
addr &= 0x0FFFF;
switch (Bank(addr, false))
{
case PLABank.CartridgeHi:
@ -301,7 +299,6 @@ namespace BizHawk.Emulation.Computers.Commodore64.MOS
public byte Read(int addr)
{
addr &= 0x0FFFF;
switch (Bank(addr, true))
{
case PLABank.BasicROM:
@ -336,7 +333,6 @@ namespace BizHawk.Emulation.Computers.Commodore64.MOS
public void Write(int addr, byte val)
{
addr &= 0x0FFFF;
switch (Bank(addr, false))
{
case PLABank.BasicROM: