[atari7800] Re: Paddle controllers??

  • From: "Eric Ball" <ek-ball@xxxxxxxxxx>
  • To: <atari7800@xxxxxxxxxxxxx>
  • Date: Sat, 19 Feb 2005 18:56:31 -0500

<adam@xxxxxxxxxxxxxxxx> wrote:
> If the MARIA is constantly and randomly halting the CPU to do video DMA,
> there's no way the CPU can keep accurate time to determine the paddle
> position.

From: "Dion Torraville"
> The only way to really keep an accurate time in that case would be to
> discharge the capacitor immediately after video DMA ends, or to do it
> during the small time frame when the 7800 doesn't do DMA (the last few
> and first few scanlines iirc from maria.txt)  Of course, you'd need a
> way to know when you're in that part of the tv frame...

From the 7800 Software Guide: "DMA does not begin until 7 cpu (1.79 MHz)
cycles into each scan line."

So this should be accurate.
STA    WSYNC    ; wait for start of line
LDA    INPT0    ; read paddle    3.5 cycles
LDX    INPT1    ; read paddle    3.5 cycles

The extra half cycle for each read is for the TIA access.  Hopefully there
would be sufficient time at the end of each line to handle the testing /
line counts.

Other related posts: