Nes ppu - ppu_open_bus_decay - Cleaner, and possibly a little faster

This commit is contained in:
adelikat 2017-06-28 11:11:20 -05:00
parent e150bca642
commit bc8ac1c1a4
1 changed files with 5 additions and 5 deletions

View File

@ -712,7 +712,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public void ppu_open_bus_decay(byte action) public void ppu_open_bus_decay(byte action)
{ {
// if there is no action, decrement the timer // if there is no action, decrement the timer
if (action==0) if (action == 0)
{ {
for (int i = 0; i < 8; i++) for (int i = 0; i < 8; i++)
{ {
@ -730,9 +730,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
} }
// reset the timer for all bits (reg 2004 / 2007 (non-palette) // reset the timer for all bits (reg 2004 / 2007 (non-palette)
if (action==1) else if (action == 1)
{ {
for (int i=0; i<8; i++) for (int i = 0; i < 8; i++)
{ {
ppu_open_bus_decay_timer[i] = 1786840; ppu_open_bus_decay_timer[i] = 1786840;
} }
@ -740,7 +740,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
} }
// reset the timer for high 3 bits (reg 2002) // reset the timer for high 3 bits (reg 2002)
if (action == 2) else if (action == 2)
{ {
ppu_open_bus_decay_timer[7] = 1786840; ppu_open_bus_decay_timer[7] = 1786840;
ppu_open_bus_decay_timer[6] = 1786840; ppu_open_bus_decay_timer[6] = 1786840;
@ -748,7 +748,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
} }
// reset the timer for all low 6 bits (reg 2007 (palette)) // reset the timer for all low 6 bits (reg 2007 (palette))
if (action == 3) else if (action == 3)
{ {
for (int i = 0; i < 6; i++) for (int i = 0; i < 6; i++)
{ {