From 63d3b88a7a8667c6eb5f75ae1c34ec5b22466f80 Mon Sep 17 00:00:00 2001 From: Steven Hugg Date: Tue, 7 Feb 2023 12:27:27 -0500 Subject: [PATCH] atari8: paddle inputs --- src/machine/atari8.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/machine/atari8.ts b/src/machine/atari8.ts index 8eaf2f7c..827fbb83 100644 --- a/src/machine/atari8.ts +++ b/src/machine/atari8.ts @@ -40,7 +40,7 @@ var ATARI8_KEYCODE_MAP = makeKeycodeMap([ ]); -export class Atari800 extends BasicScanlineMachine { +export class Atari800 extends BasicScanlineMachine implements AcceptsPaddleInput { // http://www.ataripreservation.org/websites/freddy.offenga/megazine/ISSUE5-PALNTSC.html cpuFrequency = 1789773; @@ -93,7 +93,6 @@ export class Atari800 extends BasicScanlineMachine { this.handler = newKeyboardHandler( this.inputs, ATARI8_KEYCODE_MAP, this.getKeyboardFunction(), true); } - newBus() { return { read: newAddressDecoder([ @@ -407,6 +406,10 @@ export class Atari800 extends BasicScanlineMachine { } } + setPaddleInput(controller: number, value: number): void { + this.irq_pokey.pot_inputs[controller] = 255 - value; + } + } export class Atari5200 extends Atari800 {