Skip to content

Commit

Permalink
Effectively fix the mystery positioning bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
DirtyHairy committed Dec 13, 2016
1 parent 12fe183 commit 839ba71
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/emucore/tia/Ball.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ void Ball::hmbl(uInt8 value)
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Ball::resbl(bool hblank)
void Ball::resbl(bool hblank, bool extendedHblank)
{
myCounter = hblank ? 159 : 157;
myCounter = hblank ? (extendedHblank ? 158 : 159) : 157;

myIsRendering = true;
myRenderCounter = Count::renderCounterOffset;
Expand Down
2 changes: 1 addition & 1 deletion src/emucore/tia/Ball.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Ball : public Serializable
void hmbl(uInt8 value);
uInt8 hmbl() const { return myHmmClocks; }

void resbl(bool hblank);
void resbl(bool hblank, bool extendedHblank);

void ctrlpf(uInt8 value);

Expand Down
4 changes: 2 additions & 2 deletions src/emucore/tia/Missile.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ void Missile::hmm(uInt8 value)
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Missile::resm(bool hblank)
void Missile::resm(bool hblank, bool extendedHblank)
{
myCounter = hblank ? 159 : 157;
myCounter = hblank ? (extendedHblank ? 158 : 159) : 157;
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Expand Down
2 changes: 1 addition & 1 deletion src/emucore/tia/Missile.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Missile : public Serializable
void hmm(uInt8 value);
uInt32 hmm() const { return myHmmClocks; }

void resm(bool hblank);
void resm(bool hblank, bool extendHblank);

void resmp(uInt8 value, const Player& player);
bool resmp() const { return bool(myResmp); }
Expand Down
4 changes: 2 additions & 2 deletions src/emucore/tia/Player.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ void Player::nusiz(uInt8 value)
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Player::resp(bool hblank)
void Player::resp(bool hblank, bool extendedHblank)
{
myCounter = hblank ? 159 : 157;
myCounter = hblank ? (extendedHblank ? 158 : 159) : 157;

if (myIsRendering && myRenderCounter < -1)
myRenderCounter = Count::renderCounterOffset;
Expand Down
2 changes: 1 addition & 1 deletion src/emucore/tia/Player.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Player : public Serializable

void nusiz(uInt8 value);

void resp(bool hblank);
void resp(bool hblank, bool extendedHblank);

void refp(uInt8 value);
bool refp() const { return myIsReflected; }
Expand Down
10 changes: 5 additions & 5 deletions src/emucore/tia/TIA.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -442,12 +442,12 @@ bool TIA::poke(uInt16 address, uInt8 value)

case RESM0:
myLinesSinceChange = 0;
myMissile0.resm(myHstate == HState::blank);
myMissile0.resm(myHstate == HState::blank, myExtendedHblank);
break;

case RESM1:
myLinesSinceChange = 0;
myMissile1.resm(myHstate == HState::blank);
myMissile1.resm(myHstate == HState::blank, myExtendedHblank);
break;

case RESMP0:
Expand Down Expand Up @@ -512,12 +512,12 @@ bool TIA::poke(uInt16 address, uInt8 value)

case RESP0:
myLinesSinceChange = 0;
myPlayer0.resp(myHstate == HState::blank);
myPlayer0.resp(myHstate == HState::blank, myExtendedHblank);
break;

case RESP1:
myLinesSinceChange = 0;
myPlayer1.resp(myHstate == HState::blank);
myPlayer1.resp(myHstate == HState::blank, myExtendedHblank);
break;

case REFP0:
Expand Down Expand Up @@ -553,7 +553,7 @@ bool TIA::poke(uInt16 address, uInt8 value)

case RESBL:
myLinesSinceChange = 0;
myBall.resbl(myHstate == HState::blank);
myBall.resbl(myHstate == HState::blank, myExtendedHblank);
break;

case VDELBL:
Expand Down

0 comments on commit 839ba71

Please sign in to comment.