[stella] Understanding the PIA

bob.montgomery at thomson.com bob.montgomery at thomson.com
Thu Apr 3 11:39:35 CDT 2008


Hi Steve,

>Can you provide a test ROM illustrating this incorrect behaviour, as
well 
>as a brief description of what the output should be?

Sure.  If you start this in the debugger, at Frame 2, scanline 1, cycle
18
there is the following code (starting at $F027):
	lda #15
	sta TIM1T
WaitForVblankEnd
	lda INTIM
	jmp WaitForVblankEnd

Stepping through with the debugger, at every LDA INTIM, the accumulator
holds:
0B
04
FB
F4
ED
etc.

It should hold:
0B
04
FD
F6
EF
etc.

Based on some other tests I just ran, it looks like, in Stella, once the

timer hits $FF it counts at *double speed* (!) until you read INTIM
again, 
and then it resumes counting at the correct speed.  Though my tests were
all with TIM1T, I don't know if that holds for TIM8T, TIM64T, or
TIM1024T.

-Bob
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: A_POLICY_VIOLATED_FILE_WAS_DETECTED_AND_REMOVED.TXT
Url: http://atari2600.org/pipermail/stella/attachments/20080403/9554f628/attachment.pl 


More information about the Stella mailing list