1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-10-31 23:09:49 +00:00

atari8: paddle inputs

This commit is contained in:
Steven Hugg 2023-02-07 12:27:27 -05:00
parent 9d39edf452
commit 63d3b88a7a

View File

@ -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 {