Jump to content
IGNORED

DMA cycle stealing table/chart


MaPa

Recommended Posts

Hi, can anyone link me to some source where can I read about ANTIC's DMA cycle stealing, when/where/how much cycles it steals in certain modes, PMG enabled/disabled, hscroll, where WSYNC occurs, how much time in DLI etc. ?

Link to comment
Share on other sites

http://www.atariage.com/forums/index.php?s...8294&hl=dma

 

A whole thread dedicated to Antic DMA.

 

DLIs are reasonably well covered in the OS/Hardware Manual.

 

You can get more time for your own DLI on >= 64K machines by copying the OS to RAM and taking over the NMI vector at $FFFC/D and handling the pre-processing yourself.

 

WSYNC is released around the right edge of a standard display - in fact with a widescreen TV/monitor or a capture card you can witness colour changes, along with other hidden attributes of Antic which you don't normally see.

Edited by Rybags
Link to comment
Share on other sites

Here: Some tests I did with connecting other IC pins to the LUM3 line of GTIA.

 

In pictures 1,2 & 3: I connected the Halt line. You actually see the 9 refresh bands on the left side.

In pictures 4,5 you see some others: If I remember correctly it was some address line. You actually see also the 9 refresh bands, as antic of course generates address signals too then

In picture 6 you see what I really did.

 

There are some characters onscreen that aren't supposed to be there. These pop up when you disturb refresh lines a little bit by physically tweaking.

 

This is how I discovered that there are 2 types of antic. One that does a 128 step refresh process, one that does 256 steps. That is because the first antics ever were only to refresh 16kbit chips (i.e. 14=2*7 address lines). Only the later antics can refresh 64kbit ramchips. So, always beware when you change your antic chip in a 64kB machine with another :)

Link to comment
Share on other sites

http://www.atariage.com/forums/index.php?s...8294&hl=dma

A whole thread dedicated to Antic DMA.

Do yo have the Antic_timings.txt linked in that thread? Url not found today...

 

 

DLIs are reasonably well covered in the OS/Hardware Manual.

Can you link me to some listing please ;)

 

 

You can get more time for your own DLI on >= 64K machines by copying the OS to RAM and taking over the NMI vector at $FFFC/D and handling the pre-processing yourself.

How much more? 1 cycle by JMPing absolute instead of indirect or 5 cycles if no jump but immideate DLI code after BIT $d40f and BPL no_dli ? Not much but better than nothing and compared to time available in DLI the 5 cycles is nice.

Link to comment
Share on other sites

I don't get it with the Halt -> Luma pic.

 

Shouldn't there be a denser pattern at the left of screen where there's character DMA + refresh, then sparse at the right where there's character DMA only.

Or am I reading it wrong, and the black areas are Halts and the red lines free cycles.

Link to comment
Share on other sites

I don't get it with the Halt -> Luma pic.

 

Shouldn't there be a denser pattern at the left of screen where there's character DMA + refresh, then sparse at the right where there's character DMA only.

Or am I reading it wrong, and the black areas are Halts and the red lines free cycles.

 

I'm thinking the same thing. !Halt is pulling LUM low, so the brighter areas are actually the free cycles. This is consistent with the refresh cycles being dark in the border, and badlines being all black.

Edited by Bryan
Link to comment
Share on other sites

I don't get it with the Halt -> Luma pic.

 

Shouldn't there be a denser pattern at the left of screen where there's character DMA + refresh, then sparse at the right where there's character DMA only.

Or am I reading it wrong, and the black areas are Halts and the red lines free cycles.

Note the "SE. 4,0,12" statement. The screen should be light gray, not black. So the black areas must be the halts, and the gray areas are free cycles.

 

Michael

Link to comment
Share on other sites

Here's the document on timings: Antic_Timings.txt

 

Re: How much more? 1 cycle by JMPing absolute instead of indirect or 5 cycles if no jump but immideate DLI code after BIT $d40f and BPL no_dli ? Not much but better than nothing and compared to time available in DLI the 5 cycles is nice.

 

 

You have a certain delay when the NMI actually occurs. The 6502 has to finish whatever instruction it's exectuting, so that's anywhere up to 7 (?) cycles. Then, it pushes the PC and Status onto the stack - 3 (?) cycles.

 

Then, it loads the PC from $FFFA - that's where the OS routine normally gets control. (2 cycles?)

 

The OS routine normally executes as follows:

  BIT $D40F; 4 cycles
 BPL DOVLBLANK; 2 cycles if skipped, 3 if branch taken
 JMP ($200); 5 cycles
DOVBLANK 
 CLD
 PHA
 ... etc.

 

Ignore the finish instruction, push PC etc. That's unavoidable delay which you can't avoid.

 

But, by either copying/patching the OS to RAM or doing away with the OS altogether and supplying your own code, you can get control earlier.

So, in theory, you can save between 2 and 11 cycles.

 

The quickest solution would be to just have your routine execute immediately, without checking NMIST ($D40F) to see if it's a VBI or DLI. Of course, that would either require running with VBlank NMI disabled, or alternatively you could just dynamically change the NMI vector at $FFFA/B at the completion of each interrupt.

 

How useful is this? Well, it varies. I guess if you have a busy screen with lots of NMI action, then this is worth looking at. If you have a screen kernal, or only one or two NMIs then it's probably not worth the effort.

In such cases that you're doing lots of changes in the one DLI, there's always the option of just having it occur early to give you that extra time for pre-processing.

Link to comment
Share on other sites

  • 2 weeks later...

Oops! Someone accidentally deleted the Antic_Timings.txt on my website. Even though this thread has a copy of it I put it back just in case.

 

So far nobody has ever sent me any corrections/additions to it, but I figure there are only a couple people on the planet who actually would be so interested as to research it.

 

-Bennet

Link to comment
Share on other sites

How did you get these timings? Some of us may use them for a hack that increases the bit depth in the single line modes. (E&F, mostly)

 

Bob

 

Oops! Someone accidentally deleted the Antic_Timings.txt on my website. Even though this thread has a copy of it I put it back just in case.

 

So far nobody has ever sent me any corrections/additions to it, but I figure there are only a couple people on the planet who actually would be so interested as to research it.

 

-Bennet

Link to comment
Share on other sites

Here is a chart from atari800 (unlabelled, sorry). The code is in cycle_map.c

I made this code to do the cycle exact changes. I think it is the same.

 

 

MDPPPPDD....................R...R...R...R...R...R...R...R...R...................
..................................
MDPPPPDD....................RI.IFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFI
FIFIFIFIFIFIFRF...................
MDPPPPDD.............I.IFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFI
FIFIFIFIFIFIFIFIFIFIFRF...........
MDPPPPDD..............I.IFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIF
IFIFIFIFIFIFIFIFIFIFIFRF..........
MDPPPPDD...............I.IFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFI
FIFIFIFIFIFIFIFIFIFIFIFRF.........
MDPPPPDD................I.IFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIF
IFIFIFIFIFIFIFIFIFIFIFIFRF........
MDPPPPDD.................I.IFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFI
FIFIFIFIFIFIFIFIFIFIFIFIFRF.......
MDPPPPDD..................I.IFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIF
IFIFIFIFIFIFIFIFIFIFIFIFIFRF......
MDPPPPDD...................IRIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFI
FIFIFIFIFIFIFIFIFIFIFIFIFIFRF.....
MDPPPPDD....................IRIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIF
IFIFIFIFIFIFIFIFIFIFIFIFIFIFR.....
MDPPPPDD.....I.IFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFI
FIFIFIFIFIFIFIFIFIFIFIFIFIFIFR....
MDPPPPDD......I.IFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIF
IFIFIFIFIFIFIFIFIFIFIFIFIFIFIR....
MDPPPPDD.......I.IFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFI
FIFIFIFIFIFIFIFIFIFIFIFIFIFIFR....
MDPPPPDD........I.IFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIF
IFIFIFIFIFIFIFIFIFIFIFIFIFIFIR....
MDPPPPDD.........I.IFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFI
FIFIFIFIFIFIFIFIFIFIFIFIFIFIFR....
MDPPPPDD..........I.IFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIF
IFIFIFIFIFIFIFIFIFIFIFIFIFIFIR....
MDPPPPDD...........I.IFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFI
FIFIFIFIFIFIFIFIFIFIFIFIFIFIFR....
MDPPPPDD............I.IFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIFIF
IFIFIFIFIFIFIFIFIFIFIFIFIFIFIR....
MDPPPPDD....................R...FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.F.F.F.F.F.F.F.F.
F.F.F.F.F.F.F.F...................
MDPPPPDD................F.F.FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.F.F.F.F.F.F.F.F.
F.F.F.F.F.F.F.F.F.F.F.F...........
MDPPPPDD.................F.FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.F.F.F.F.F.F.F.F.F
.F.F.F.F.F.F.F.F.F.F.F.F..........
MDPPPPDD..................F.FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.F.F.F.F.F.F.F.F.
F.F.F.F.F.F.F.F.F.F.F.F.F.........
MDPPPPDD...................FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.F.F.F.F.F.F.F.F.F
.F.F.F.F.F.F.F.F.F.F.F.F.F........
MDPPPPDD....................FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.F.F.F.F.F.F.F.F.
F.F.F.F.F.F.F.F.F.F.F.F.F.F.......
MDPPPPDD....................RF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.F.F.F.F.F.F.F.F.F
.F.F.F.F.F.F.F.F.F.F.F.F.F.F......
MDPPPPDD....................R.F.FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.F.F.F.F.F.F.F.F.
F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.....
MDPPPPDD....................R..FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.F.F.F.F.F.F.F.F.F
.F.F.F.F.F.F.F.F.F.F.F.F.F.F......
MDPPPPDD........F.F.F.F.F.F.FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.F.F.F.F.F.F.F.F.
F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.....
MDPPPPDD.........F.F.F.F.F.FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.F.F.F.F.F.F.F.F.F
.F.F.F.F.F.F.F.F.F.F.F.F.F.F......
MDPPPPDD..........F.F.F.F.F.FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.F.F.F.F.F.F.F.F.
F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.....
MDPPPPDD...........F.F.F.F.FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.F.F.F.F.F.F.F.F.F
.F.F.F.F.F.F.F.F.F.F.F.F.F.F......
MDPPPPDD............F.F.F.F.FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.F.F.F.F.F.F.F.F.
F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.....
MDPPPPDD.............F.F.F.FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.F.F.F.F.F.F.F.F.F
.F.F.F.F.F.F.F.F.F.F.F.F.F.F......
MDPPPPDD..............F.F.F.FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.F.F.F.F.F.F.F.F.
F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.....
MDPPPPDD...............F.F.FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.FRF.F.F.F.F.F.F.F.F.F
.F.F.F.F.F.F.F.F.F.F.F.F.F.F......
MDPPPPDD....................RI..FIR.FIR.FIR.FIR.FIR.FIR.FIR.FIR.FI..FI..FI..FI..
FI..FI..FI..F.....................
MDPPPPDD.............I..FI..FIR.FIR.FIR.FIR.FIR.FIR.FIR.FIR.FIR.FI..FI..FI..FI..
FI..FI..FI..FI..FI..F.............
MDPPPPDD..............I..FI.RFI.RFI.RFI.RFI.RFI.RFI.RFI.RFI.RFI..FI..FI..FI..FI.
.FI..FI..FI..FI..FI..F............
MDPPPPDD...............I..FIR.FIR.FIR.FIR.FIR.FIR.FIR.FIR.FIR.FI..FI..FI..FI..FI
..FI..FI..FI..FI..FI..F...........
MDPPPPDD................I..FIR.FIR.FIR.FIR.FIR.FIR.FIR.FIR.FIR.FI..FI..FI..FI..F
I..FI..FI..FI..FI..FI..F..........
MDPPPPDD.................I..FIR.FIR.FIR.FIR.FIR.FIR.FIR.FIR.FIR.FI..FI..FI..FI..
FI..FI..FI..FI..FI..FI..F.........
MDPPPPDD..................I.RFI.RFI.RFI.RFI.RFI.RFI.RFI.RFI.RFI..FI..FI..FI..FI.
.FI..FI..FI..FI..FI..FI..F........
MDPPPPDD...................IR.FIR.FIR.FIR.FIR.FIR.FIR.FIR.FIR.FI..FI..FI..FI..FI
..FI..FI..FI..FI..FI..FI..F.......
MDPPPPDD....................IR.FIR.FIR.FIR.FIR.FIR.FIR.FIR.FIR.FI..FI..FI..FI..F
I..FI..FI..FI..FI..FI..FI..F......
MDPPPPDD.....I..FI..FI..FI..FIR.FIR.FIR.FIR.FIR.FIR.FIR.FIR.FIR.FI..FI..FI..FI..
FI..FI..FI..FI..FI..FI..FI..F.....
MDPPPPDD......I..FI..FI..FI.RFI.RFI.RFI.RFI.RFI.RFI.RFI.RFI.RFI..FI..FI..FI..FI.
.FI..FI..FI..FI..FI..FI..FI.......
MDPPPPDD.......I..FI..FI..FIR.FIR.FIR.FIR.FIR.FIR.FIR.FIR.FIR.FI..FI..FI..FI..FI
..FI..FI..FI..FI..FI..FI..FI......
MDPPPPDD........I..FI..FI..FIR.FIR.FIR.FIR.FIR.FIR.FIR.FIR.FIR.FI..FI..FI..FI..F
I..FI..FI..FI..FI..FI..FI..FI.....
MDPPPPDD.........I..FI..FI..FIR.FIR.FIR.FIR.FIR.FIR.FIR.FIR.FIR.FI..FI..FI..FI..
FI..FI..FI..FI..FI..FI..FI..F.....
MDPPPPDD..........I..FI..FI.RFI.RFI.RFI.RFI.RFI.RFI.RFI.RFI.RFI..FI..FI..FI..FI.
.FI..FI..FI..FI..FI..FI..FI.......
MDPPPPDD...........I..FI..FIR.FIR.FIR.FIR.FIR.FIR.FIR.FIR.FIR.FI..FI..FI..FI..FI
..FI..FI..FI..FI..FI..FI..FI......
MDPPPPDD............I..FI..FIR.FIR.FIR.FIR.FIR.FIR.FIR.FIR.FIR.FI..FI..FI..FI..F
I..FI..FI..FI..FI..FI..FI..FI.....
MDPPPPDD....................R...FR..FR..FR..FR..FR..FR..FR..FR..F...F...F...F...
F...F...F...F.....................
MDPPPPDD................F...FR..FR..FR..FR..FR..FR..FR..FR..FR..F...F...F...F...
F...F...F...F...F...F.............
MDPPPPDD.................F..RF..RF..RF..RF..RF..RF..RF..RF..RF...F...F...F...F..
.F...F...F...F...F...F............
MDPPPPDD..................F.R.F.R.F.R.F.R.F.R.F.R.F.R.F.R.F.R.F...F...F...F...F.
..F...F...F...F...F...F...........
MDPPPPDD...................FR..FR..FR..FR..FR..FR..FR..FR..FR..F...F...F...F...F
...F...F...F...F...F...F..........
MDPPPPDD....................FR..FR..FR..FR..FR..FR..FR..FR..FR..F...F...F...F...
F...F...F...F...F...F...F.........
MDPPPPDD....................RF..RF..RF..RF..RF..RF..RF..RF..RF...F...F...F...F..
.F...F...F...F...F...F...F........
MDPPPPDD....................R.F.R.F.R.F.R.F.R.F.R.F.R.F.R.F.R.F...F...F...F...F.
..F...F...F...F...F...F...F.......
MDPPPPDD....................R..FR..FR..FR..FR..FR..FR..FR..FR..F...F...F...F...F
...F...F...F...F...F...F...F......
MDPPPPDD........F...F...F...FR..FR..FR..FR..FR..FR..FR..FR..FR..F...F...F...F...
F...F...F...F...F...F...F...F.....
MDPPPPDD.........F...F...F..RF..RF..RF..RF..RF..RF..RF..RF..RF...F...F...F...F..
.F...F...F...F...F...F...F........
MDPPPPDD..........F...F...F.R.F.R.F.R.F.R.F.R.F.R.F.R.F.R.F.R.F...F...F...F...F.
..F...F...F...F...F...F...F.......
MDPPPPDD...........F...F...FR..FR..FR..FR..FR..FR..FR..FR..FR..F...F...F...F...F
...F...F...F...F...F...F...F......
MDPPPPDD............F...F...FR..FR..FR..FR..FR..FR..FR..FR..FR..F...F...F...F...
F...F...F...F...F...F...F...F.....
MDPPPPDD.............F...F..RF..RF..RF..RF..RF..RF..RF..RF..RF...F...F...F...F..
.F...F...F...F...F...F...F........
MDPPPPDD..............F...F.R.F.R.F.R.F.R.F.R.F.R.F.R.F.R.F.R.F...F...F...F...F.
..F...F...F...F...F...F...F.......
MDPPPPDD...............F...FR..FR..FR..FR..FR..FR..FR..FR..FR..F...F...F...F...F
...F...F...F...F...F...F...F......
MDPPPPDD....................R..SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.S.S.S.S.S.S.S.S.S
.S.S.S.S.S.S.S....................
MDPPPPDD...............S.S.SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.S.S.S.S.S.S.S.S.S
.S.S.S.S.S.S.S.S.S.S.S............
MDPPPPDD................S.S.SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.S.S.S.S.S.S.S.S.
S.S.S.S.S.S.S.S.S.S.S.S...........
MDPPPPDD.................S.SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.S.S.S.S.S.S.S.S.S
.S.S.S.S.S.S.S.S.S.S.S.S..........
MDPPPPDD..................S.SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.S.S.S.S.S.S.S.S.
S.S.S.S.S.S.S.S.S.S.S.S.S.........
MDPPPPDD...................SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.S.S.S.S.S.S.S.S.S
.S.S.S.S.S.S.S.S.S.S.S.S.S........
MDPPPPDD....................SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.S.S.S.S.S.S.S.S.
S.S.S.S.S.S.S.S.S.S.S.S.S.S.......
MDPPPPDD....................RS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.S.S.S.S.S.S.S.S.S
.S.S.S.S.S.S.S.S.S.S.S.S.S.S......
MDPPPPDD....................R.S.SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.S.S.S.S.S.S.S.S.
S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.....
MDPPPPDD.......S.S.S.S.S.S.SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.S.S.S.S.S.S.S.S.S
.S.S.S.S.S.S.S.S.S.S.S.S.S.S......
MDPPPPDD........S.S.S.S.S.S.SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.S.S.S.S.S.S.S.S.
S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.....
MDPPPPDD.........S.S.S.S.S.SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.S.S.S.S.S.S.S.S.S
.S.S.S.S.S.S.S.S.S.S.S.S.S.S......
MDPPPPDD..........S.S.S.S.S.SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.S.S.S.S.S.S.S.S.
S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.....
MDPPPPDD...........S.S.S.S.SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.S.S.S.S.S.S.S.S.S
.S.S.S.S.S.S.S.S.S.S.S.S.S.S......
MDPPPPDD............S.S.S.S.SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.S.S.S.S.S.S.S.S.
S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.....
MDPPPPDD.............S.S.S.SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.S.S.S.S.S.S.S.S.S
.S.S.S.S.S.S.S.S.S.S.S.S.S.S......
MDPPPPDD..............S.S.S.SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.SRS.S.S.S.S.S.S.S.S.
S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.....
MDPPPPDD....................R..SR..SR..SR..SR..SR..SR..SR..SR..S...S...S...S...S
...S...S...S......................
MDPPPPDD...............S...SR..SR..SR..SR..SR..SR..SR..SR..SR..S...S...S...S...S
...S...S...S...S...S..............
MDPPPPDD................S...SR..SR..SR..SR..SR..SR..SR..SR..SR..S...S...S...S...
S...S...S...S...S...S.............
MDPPPPDD.................S..RS..RS..RS..RS..RS..RS..RS..RS..RS...S...S...S...S..
.S...S...S...S...S...S............
MDPPPPDD..................S.R.S.R.S.R.S.R.S.R.S.R.S.R.S.R.S.R.S...S...S...S...S.
..S...S...S...S...S...S...........
MDPPPPDD...................SR..SR..SR..SR..SR..SR..SR..SR..SR..S...S...S...S...S
...S...S...S...S...S...S..........
MDPPPPDD....................SR..SR..SR..SR..SR..SR..SR..SR..SR..S...S...S...S...
S...S...S...S...S...S...S.........
MDPPPPDD....................RS..RS..RS..RS..RS..RS..RS..RS..RS...S...S...S...S..
.S...S...S...S...S...S...S........
MDPPPPDD....................R.S.R.S.R.S.R.S.R.S.R.S.R.S.R.S.R.S...S...S...S...S.
..S...S...S...S...S...S...S.......
MDPPPPDD.......S...S...S...SR..SR..SR..SR..SR..SR..SR..SR..SR..S...S...S...S...S
...S...S...S...S...S...S...S......
MDPPPPDD........S...S...S...SR..SR..SR..SR..SR..SR..SR..SR..SR..S...S...S...S...
S...S...S...S...S...S...S...S.....
MDPPPPDD.........S...S...S..RS..RS..RS..RS..RS..RS..RS..RS..RS...S...S...S...S..
.S...S...S...S...S...S...S........
MDPPPPDD..........S...S...S.R.S.R.S.R.S.R.S.R.S.R.S.R.S.R.S.R.S...S...S...S...S.
..S...S...S...S...S...S...S.......
MDPPPPDD...........S...S...SR..SR..SR..SR..SR..SR..SR..SR..SR..S...S...S...S...S
...S...S...S...S...S...S...S......
MDPPPPDD............S...S...SR..SR..SR..SR..SR..SR..SR..SR..SR..S...S...S...S...
S...S...S...S...S...S...S...S.....
MDPPPPDD.............S...S..RS..RS..RS..RS..RS..RS..RS..RS..RS...S...S...S...S..
.S...S...S...S...S...S...S........
MDPPPPDD..............S...S.R.S.R.S.R.S.R.S.R.S.R.S.R.S.R.S.R.S...S...S...S...S.
..S...S...S...S...S...S...S.......
MDPPPPDD....................R..SR...R..SR...R..SR...R..SR...R..S.......S.......S
.......S..........................
MDPPPPDD...............S....R..SR...R..SR...R..SR...R..SR...R..S.......S.......S
.......S.......S..................
MDPPPPDD................S...R...SR..R...SR..R...SR..R...SR..R...S.......S.......
S.......S.......S.................
MDPPPPDD.................S..R...RS..R...RS..R...RS..R...RS..R....S.......S......
.S.......S.......S................
MDPPPPDD..................S.R...R.S.R...R.S.R...R.S.R...R.S.R.....S.......S.....
..S.......S.......S...............
MDPPPPDD...................SR...R..SR...R..SR...R..SR...R..SR......S.......S....
...S.......S.......S..............
MDPPPPDD....................SR..R...SR..R...SR..R...SR..R...SR......S.......S...
....S.......S.......S.............
MDPPPPDD....................RS..R...RS..R...RS..R...RS..R...RS.......S.......S..
.....S.......S.......S............
MDPPPPDD....................R.S.R...R.S.R...R.S.R...R.S.R...R.S.......S.......S.
......S.......S.......S...........
MDPPPPDD.......S.......S....R..SR...R..SR...R..SR...R..SR...R..S.......S.......S
.......S.......S.......S..........
MDPPPPDD........S.......S...R...SR..R...SR..R...SR..R...SR..R...S.......S.......
S.......S.......S.......S.........
MDPPPPDD.........S.......S..R...RS..R...RS..R...RS..R...RS..R....S.......S......
.S.......S.......S.......S........
MDPPPPDD..........S.......S.R...R.S.R...R.S.R...R.S.R...R.S.R.....S.......S.....
..S.......S.......S.......S.......
MDPPPPDD...........S.......SR...R..SR...R..SR...R..SR...R..SR......S.......S....
...S.......S.......S.......S......
MDPPPPDD............S.......SR..R...SR..R...SR..R...SR..R...SR......S.......S...
....S.......S.......S.......S.....
MDPPPPDD.............S......RS..R...RS..R...RS..R...RS..R...RS.......S.......S..
.....S.......S.......S............
MDPPPPDD..............S.....R.S.R...R.S.R...R.S.R...R.S.R...R.S.......S.......S.
......S.......S.......S...........
Link to comment
Share on other sites

Something I always assumed was a WSYNC write halted the Antic&CPU until the next pixel line, now it looks it does release access back to the CPU. I am look for ways of making APAC mode more useful for animations with character sets in a sense you can make a playable game with it. Many out there just say it eats up too much CPU time to be of any use. They may be looking at it from the Basic programmer point of view rather than the Assembly language programmers view. I know you have some time to do things with a short VBI routine. Also probably not be using player/missile graphics because you can display any color with the play field graphics. Anybody have a gaming ideal?

Link to comment
Share on other sites

WSync does nothing to Antic - it's the originator of the signal.

 

The 6502 usually takes a cycle to respond, so a STA WSYNC will process the first cycle of the next instruction. This behaviour is documented elsewhere.

In normal screen width, you get ~ 34 cycles to play with before the next line. Of course the problem is with the first line of characters, where you lose 1-3 DMAs for the DList, then another 80 for the cells and chset data.

 

Doesn't leave time to do much.

 

Also discussed elsewhere is having a Kernal which does normal "housekeeping" type processing for the game during it's execution. Rather than waste thousands of cycles with WSYNCs early in the display you can do processing, then issue WSYNC towards the RHS of the screen.

Of course that requires a lot of cycle-counting and planning - although with the 2600 you have to do almost exactly that, so it's not really untrodden ground.

Link to comment
Share on other sites

How did you get these timings? Some of us may use them for a hack that increases the bit depth in the single line modes. (E&F, mostly)

 

Bob

 

By taking an actual Atari, an LCD panel that displays the overscan area, the Antic patents and diagrams, some knowledge of digital chip design, and a lot lot lot lot of time reverse engineering it based on how it actually behaves. All of the surprises I discovered were very explainable (the virtual reads the Antic does for example).

 

So it's as accurate as I could possibly make it, but as I saw above if there's different memory refresh circuitry for different types of memory then those wouldn't match my table.

 

It's my little gift to the Atari world :)

 

-Bennet

Link to comment
Share on other sites

When I made my chart some years ago I just used pokey to time things. If you set the polycounter to 9 bits then RANDOM repeats every 511 cycles. This can be used as a cycle-exact timer. I just compared the two readings with a table and found the 4 possible differences mod 511 and used that together with a BASIC program that constructed a NOP ramp of a variable number of cycles.

Link to comment
Share on other sites

What is this "virtual read" ?

 

Does it affect the outside world?

 

In my document it's the 'V' values that happen after cycle 105. I called them virtual reads because Antic would have done DMA at that location and everything internal to Antic acts as though a read happened, yet no DMA happens. Since they affect DMA cycles they definitely affect the outside world since with a large enough HSCROL value you actually speed up perf because you'll get back 3 DMA cycles per scanline.

Link to comment
Share on other sites

OK. So it doesn't bother with certain DMA since those characters never get displayed anyway.

 

I guess that fact could be used to advantage in certain situations - if you wanted a wider static display but less DMA penalty then just have HSCROL set and scroll 14 CCs over.

Saving somewhere near 600 cycles per frame.

Link to comment
Share on other sites

When I made my chart some years ago I just used pokey to time things. If you set the polycounter to 9 bits then RANDOM repeats every 511 cycles. This can be used as a cycle-exact timer. I just compared the two readings with a table and found the 4 possible differences mod 511 and used that together with a BASIC program that constructed a NOP ramp of a variable number of cycles.

What did you poke 53768 with besides just setting bit 7 and did writing to 53769 affect the RANDOM count?

I just used the method of putting as many BK color changes as possible until they align line-to-line and then replacing the color changes with other instructions that I need. So for example, a blank antic line gave me 104 cpu cycles. I guess one could also use the pot counters...

Link to comment
Share on other sites

What did you poke 53768 with besides just setting bit 7 and did writing to 53769 affect the RANDOM count?

I just used the method of putting as many BK color changes as possible until they align line-to-line and then replacing the color changes with other instructions that I need. So for example, a blank antic line gave me 104 cpu cycles. I guess one could also use the pot counters...

Bit 7 only, to use poly 9.

STIMER does not affect the polycounters. Pokey reset (SKSTAT bits 0,1 = 0) does reset the polycounters, but I didn't use that.

 

When the fast pot scan is enabled, I found the results of reading the pot registers were not in numerical order.

Link to comment
Share on other sites

Not in numerical order?

 

I found (as the docs state) that in fast scan, the pot registers count up by 1 per cycle. Can be used as a kind of cheap timer although a connected paddle could cause interference.

 

Back OT - what happens in Mode 3 (text with descenders). The behaviour for characters with bit-setting x11xx xxxx should be totally different.

Does Antic do reads every line and only use some of them? Does it skip characters when it doesn't need the data? Or does it just read for the first 8 scanlines and buffer the data for characters it needs to?

Link to comment
Share on other sites

When I tested the fast pot scan on my 800xl I got strange results. Sometimes the numbers were out of order.

 

For antic 3, actually the mode is much the same as antic 2, and in the emulator the same code is used. Antic has a delta counter that counts the scan line. This counter is 4 bits. Mode 3 depends on bits 3, 2 1, but not 0. If these bits are 0, as in the first two scan lines, and mode 3 is used, then the display is blank if it is a descender char. But the font data is still fetched. If bit 3 is 1 and bits 2 and 1 are 0, then the display is blank if it is not a descender char. But in this case mode 3 is not required, even mode 2 has this property, except that mode 2 does not usually have more than 8 lines. If you play with VSCROL you can force it to more than 8 lines and see this effect.

 

Font data is never buffered, Antic has only got a single buffer for character index data. Even in modes 5 or 7, the font data is fetched again on the repeated scan lines, but the index data is only fetched on the first line.

Edited by perry_m
Link to comment
Share on other sites

I haven't extensively played with Pot scan - only noted that they can be handy "cycle counters".

Maybe POKEY staggers the actual count startups? Considering there's 8 to cater for it might be a possibility.

 

Interesting about the double-fetch, I always considered Gr. 2 to be a big DMA miser, but seems to be right after a quick couple of tests.

Opens some interesting possibilities - for one you could easily construct a 16 pixel high character by toggling between 2 chsets each scaline.

Of course though, that comes with the usual huge CPU penalty, and you could do it just as easily using 2 x Gr. 1 lines.

 

Possibly a more useful alternative could be for G2F type pictures - use Mode 5 instead of 4, and toggle chsets. Means a bit more workload per scanline, but would halve the number of badlines you have to put up with.

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...