NES: Minor code cleanup

This commit is contained in:
alyosha-tas 2017-01-25 20:35:50 -05:00 committed by GitHub
parent 647f0914ed
commit 48e3cdfcdc
2 changed files with 3 additions and 22 deletions

View File

@ -300,8 +300,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
bool hardResetSignal;
public void FrameAdvance(bool render, bool rendersound)
{
if (Tracer.Enabled)
cpu.TraceCallback = (s) => Tracer.Put(s);
else
@ -394,6 +392,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public bool IRQ_delay;
public bool special_case_delay; // very ugly but the only option
public bool do_the_reread;
public byte DB; //old data bus values from previous reads
#if VS2012
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@ -407,8 +407,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
if (cpu_step == 5) cpu_step = 0;
cpu_stepcounter = 0;
///////////////////////////
// OAM DMA start
///////////////////////////
@ -502,7 +500,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
special_case_delay = false;
}
cpu.ExecuteOne();
apu.RunOne(false);
@ -521,8 +518,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
IRQ_delay = true;
}
ppu.ppu_open_bus_decay(0);
Board.ClockCPU();
@ -846,9 +841,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
return ret;
}
//old data bus values from previous reads
public byte DB;
public void ExecFetch(ushort addr)
{
MemoryCallbacks.CallExecutes(addr);

View File

@ -1,9 +1,4 @@
//TODO - better sprite hit handling (be sure to test world runner)
//http://nesdev.parodius.com/bbs/viewtopic.php?t=626
//TODO - Reg2002_objoverflow is not working in the dummy reads test.. why are we setting it when nintendulator doesnt>
//blargg: Reading from $2007 when the VRAM address is $3fxx will fill the internal read buffer with the contents at VRAM address $3fxx, in addition to reading the palette RAM.
//blargg: Reading from $2007 when the VRAM address is $3fxx will fill the internal read buffer with the contents at VRAM address $3fxx, in addition to reading the palette RAM.
//static const byte powerUpPalette[] =
//{
@ -326,7 +321,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
vtoggle = false;
VRAMBuffer = 0;
}
//---------------------
//PPU CONTROL (write)
void write_2000(byte value)
@ -336,10 +330,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
//if we just unleashed the vblank interrupt then activate it now
//if (ppudead != 1)
NMI_PendingInstructions = 2;
//NMI_PendingInstructions = 2;
}
//reg_2000.Value = value;
//if (ppudead != 1)
reg_2000.Value = value;
@ -617,7 +608,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
return ret;
}
//--------
public byte ReadReg(int addr)
{
@ -704,7 +694,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
}
}
public void ppu_open_bus_decay(byte action)
{
// if there is no action, decrement the timer