diff options
author | Twinaphex | 2017-02-12 16:02:47 +0100 |
---|---|---|
committer | GitHub | 2017-02-12 16:02:47 +0100 |
commit | 474a67ccdccb89d369c706347085ca4619f0cbef (patch) | |
tree | cb331b665bc5d53ad180d5500bf37e2dfbf683d8 /source/apu.c | |
parent | b6006bc542f89ad1b7086268f851f0ba880ad6cd (diff) | |
parent | fb2517282da2fdfc26e58207bbb8e0a8bca35be2 (diff) | |
download | snesemu-474a67ccdccb89d369c706347085ca4619f0cbef.tar.gz snesemu-474a67ccdccb89d369c706347085ca4619f0cbef.tar.bz2 snesemu-474a67ccdccb89d369c706347085ca4619f0cbef.zip |
Merge pull request #31 from jamsilva/master
Improvements to both accuracy and performance.
Diffstat (limited to 'source/apu.c')
-rw-r--r-- | source/apu.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/apu.c b/source/apu.c index a28469d..521d9b3 100644 --- a/source/apu.c +++ b/source/apu.c @@ -77,7 +77,6 @@ void S9xResetAPU() for (i = 0; i < 3; i++) { APU.TimerEnabled [i] = false; - APU.TimerValueWritten [i] = 0; APU.TimerTarget [i] = 0; APU.Timer [i] = 0; } @@ -388,9 +387,9 @@ void S9xSetAPUControl(uint8_t byte) if ((APU.TimerTarget [2] = IAPU.RAM [0xfc]) == 0) APU.TimerTarget [2] = 0x100; } - APU.TimerEnabled [0] = byte & 1; - APU.TimerEnabled [1] = (byte & 2) >> 1; - APU.TimerEnabled [2] = (byte & 4) >> 2; + APU.TimerEnabled [0] = (bool) (byte & 1); + APU.TimerEnabled [1] = (bool) (byte & 2); + APU.TimerEnabled [2] = (bool) (byte & 4); if (byte & 0x10) IAPU.RAM [0xF4] = IAPU.RAM [0xF5] = 0; |