From 04693b067c4fb52623e5fce1a1712f452d25ea9b Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 18 Feb 2017 21:36:48 -0500 Subject: [PATCH] Fixed failure of the optimised route to pump the pixel clock; removed optimisation entirely for now. --- Machines/Atari2600/TIA.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Machines/Atari2600/TIA.cpp b/Machines/Atari2600/TIA.cpp index b653e8833..ec2df4b24 100644 --- a/Machines/Atari2600/TIA.cpp +++ b/Machines/Atari2600/TIA.cpp @@ -636,8 +636,8 @@ void TIA::draw_player_visible(Player &player, CollisionType collision_identity, int adder = 4 >> player.size; // perform a miniature event loop on (i) triggering draws; (ii) drawing; and (iii) motion - if(is_moving_[position_identity] || player.graphic[player.graphic_index]) - { +// if(is_moving_[position_identity] || player.graphic[player.graphic_index]) +// { int next_motion_time = motion_time_[position_identity] - first_pixel_cycle + 4; while(start < end) { @@ -713,12 +713,14 @@ void TIA::draw_player_visible(Player &player, CollisionType collision_identity, player.pixel_delay = 1; } } - } - else - { - // just advance the timer all in one jump - position = (position + end - start) % 160; - } +// } +// else +// { +// // just advance the timer all in one jump +// const int length = end - start; +// position = (position + length) % 160; +// player.pixel_position = std::min(32, player.pixel_position + adder * length); +// } } void TIA::draw_player(Player &player, CollisionType collision_identity, const int position_identity, int start, int end)