From f57f8013ddd5aedeca922f8da91133914af5f573 Mon Sep 17 00:00:00 2001 From: Christian Speckner Date: Mon, 5 Feb 2018 00:21:31 +0100 Subject: [PATCH] Improve playfield collisions during hblank. --- src/machine/stella/tia/Tia.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/machine/stella/tia/Tia.ts b/src/machine/stella/tia/Tia.ts index a2df99ce..4e44beb1 100644 --- a/src/machine/stella/tia/Tia.ts +++ b/src/machine/stella/tia/Tia.ts @@ -752,6 +752,10 @@ class Tia implements VideoOutputInterface { break; } + + if (this._extendedHblank && this._hctr > 67) { + this._playfield.tick(this._hctr - 68 + this._xDelta); + } } private _tickHframe() { @@ -789,6 +793,8 @@ class Tia implements VideoOutputInterface { // Reset the counters this._hctr = 0; + this._playfield.tick(0); + if (!this._movementInProgress) { this._linesSinceChange++; } @@ -1084,7 +1090,7 @@ namespace Tia { } export class TrapPayload { - constructor(public reason: TrapReason, public tia: Tia, public message?: string) {} + constructor(public reason: TrapReason, public tia: Tia, public message?: string) { } } }