From e61392d3fb4fc0c0ff71080aabb6eba8be5bcb92 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Wed, 18 May 2016 21:50:28 -0400 Subject: [PATCH] Fixed incorrect duplication. --- Machines/Atari2600/Atari2600.cpp | 8 ++++---- Machines/Atari2600/Atari2600.hpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Machines/Atari2600/Atari2600.cpp b/Machines/Atari2600/Atari2600.cpp index 67c6d2c12..dab8b512f 100644 --- a/Machines/Atari2600/Atari2600.cpp +++ b/Machines/Atari2600/Atari2600.cpp @@ -167,8 +167,8 @@ uint8_t Machine::get_output_pixel() switch(repeatMask) { default: - _pixelCounter[c]+=4; - _pixelCounter[c+2]+=4; + _pixelCounter[c] += 4; + _pixelCounter[c+2] += 4; break; case 5: _pixelCounter[c] += 2; @@ -268,7 +268,7 @@ void Machine::output_pixels(unsigned int count) { for(int c = 0; c < 5; c++) { - if((_objectMotion[c]^8^_hMoveCounter) == 0xf) + if(((_objectMotion[c] >> 4)^8^_hMoveCounter) == 0xf) { _hMoveFlags &= ~(1 << c); } @@ -540,7 +540,7 @@ unsigned int Machine::perform_bus_operation(CPU6502::BusOperation operation, uin case 0x22: case 0x23: case 0x24: - _objectMotion[decodedAddress - 0x20] = (*value) >> 4; + _objectMotion[decodedAddress - 0x20] = *value; break; case 0x25: _playerGraphicsLatchEnable[0] = *value; break; diff --git a/Machines/Atari2600/Atari2600.hpp b/Machines/Atari2600/Atari2600.hpp index 96c780530..c15077fdc 100644 --- a/Machines/Atari2600/Atari2600.hpp +++ b/Machines/Atari2600/Atari2600.hpp @@ -106,7 +106,7 @@ class Machine: public CPU6502::Processor { // object counters uint8_t _objectCounter[5]; - uint8_t _pixelCounter[5]; + int _pixelCounter[5]; // joystick state uint8_t _piaDataDirection[2];