import { Event } from 'microevent.ts'; import VideoOutputInterface from '../../io/VideoOutputInterface'; import WaveformAudioOutputInterface from '../../io/WaveformAudioOutputInterface'; import PCMAudioOutputInterface from '../../io/PCMAudioOutputInterface'; import DigitalJoystickInterface from '../../io/DigitalJoystickInterface'; import RGBASurfaceInterface from '../../../video/surface/RGBASurfaceInterface'; import Config from '../Config'; import CpuInterface from '../../cpu/CpuInterface'; import Paddle from '../../io/Paddle'; import Bus from '../Bus'; declare class Tia implements VideoOutputInterface { private _config; constructor(_config: Config, joystick0: DigitalJoystickInterface, joystick1: DigitalJoystickInterface, paddles: Array); reset(): void; setCpu(cpu: CpuInterface): Tia; setCpuTimeProvider(provider: () => number): this; getWidth(): number; getHeight(): number; setSurfaceFactory(factory: VideoOutputInterface.SurfaceFactoryInterface): Tia; getWaveformChannel(i: number): WaveformAudioOutputInterface; getPCMChannel(): PCMAudioOutputInterface; setAudioEnabled(state: boolean): void; read(address: number): number; peek(address: number): number; write(address: number, value: number): void; getDebugState(): string; setBus(bus: Bus): this; cycle(): void; private static _delayedWrite; private static _onNewFrame; private _tickMovement; private _tickHblank; private _tickHframe; private _tickSprites; private _nextLine; private _cloneLastLine; private _getPalette; private _getClockFreq; private _renderPixel; private _updateCollision; private _clearHmoveComb; private _resxCounter; private _rsync; private _setPriority; private _flushLineCache; newFrame: Event; trap: Event; private _cpu; private _bus; private _frameManager; private _delayQueue; private _palette; private _hstate; private _hctr; private _collisionUpdateRequired; private _movementClock; private _movementInProgress; private _extendedHblank; private _xDelta; private _linesSinceChange; private _maxLinesTotal; private _colorBk; private _priority; private _collisionMask; private _player0; private _player1; private _missile0; private _missile1; private _playfield; private _ball; private _waveformAudio; private _pcmAudio; private _audio; private _input0; private _input1; private _paddles; } declare namespace Tia { const enum Registers { vsync = 0, vblank = 1, wsync = 2, rsync = 3, nusiz0 = 4, nusiz1 = 5, colup0 = 6, colup1 = 7, colupf = 8, colubk = 9, ctrlpf = 10, refp0 = 11, refp1 = 12, pf0 = 13, pf1 = 14, pf2 = 15, resp0 = 16, resp1 = 17, resm0 = 18, resm1 = 19, resbl = 20, audc0 = 21, audc1 = 22, audf0 = 23, audf1 = 24, audv0 = 25, audv1 = 26, grp0 = 27, grp1 = 28, enam0 = 29, enam1 = 30, enabl = 31, hmp0 = 32, hmp1 = 33, hmm0 = 34, hmm1 = 35, hmbl = 36, vdelp0 = 37, vdelp1 = 38, vdelbl = 39, resmp0 = 40, resmp1 = 41, hmove = 42, hmclr = 43, cxclr = 44, cxm0p = 0, cxm1p = 1, cxp0fb = 2, cxp1fb = 3, cxm0fb = 4, cxm1fb = 5, cxblpf = 6, cxppmm = 7, inpt0 = 8, inpt1 = 9, inpt2 = 10, inpt3 = 11, inpt4 = 12, inpt5 = 13, _shuffleP0 = 240, _shuffleP1 = 241, _shuffleBL = 242 } const enum TrapReason { invalidRead = 0, invalidWrite = 1 } class TrapPayload { reason: TrapReason; tia: Tia; message?: string; constructor(reason: TrapReason, tia: Tia, message?: string); } } export { Tia as default };