| |
ChristopherJam
Registered: Aug 2004 Posts: 1408 |
Unexpected linecrunch
I'm sure in the past I've displayed full screen FLI just by writing a new value to $d011 every 23 cycles, and using some of the intervening time to update $d018 (ie, writing to $d011 on what vic artikel refers to as cycle 14).
However, if I have sprites zero to five enabled, and am only writing d011 every second line, it appears that I need to perform the first $d011 write for new char rows at least one cycle earlier, lest I get a linecrunch.
Any idea what's going on here?
(every two lines, I'm running something like this:
lda#efy0+ 71:sta $d007
lda#d18v0
ldx#$38+1
ldy#0
sta $d018
sty VM0+$3f8:iny
sty VM0+$3f9:iny
sty VM0+$3fa:iny
sty VM0+$3fb:iny
sty VM0+$3fc:iny
sty VM0+$3fd:nop
stx $d011
Also: not sure if it's relevant, but I stabilise the interrupt by forcing a DMA one and a half lines before the first such block of code is run, ie the first block is preceded by
sta $d011 ; trigger badline just before effct starts; this one's just to stabilise
nop:nop:nop:nop:nop:nop ;extra nops because there's no sprite DMA at the end of the above DMA
|
|
... 57 posts hidden. Click here to view all posts.... |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: so while the cycle counters are watching I'd like to hijack the thread :)
is it possible to repeat full char rows endlessly with one d011 write per 8 rasterlines ? about what cycle which row inside char, and what to write to d011 ? :)
Yes, I did that in the chess roto zoomer in Andropolis. Or rather every 7th actually, but I suppose every 8th works as well? |
| |
Radiant
Registered: Sep 2004 Posts: 639 |
I think it has to be every seventh. The way you do it is by triggering a badline during cycles 54-57 (IIRC) when RC=7. |
| |
Radiant
Registered: Sep 2004 Posts: 639 |
I did it just now in "The Social Demo". :-) |
| |
Radiant
Registered: Sep 2004 Posts: 639 |
Now that I think about it it does seem a little strange, as if one line would be lost... But that was the first thing I coded for the demo, don't remember the implementation details. |
| |
lft
Registered: Jul 2007 Posts: 369 |
The way you normally repeat a char row is to enable the badline condition in cycle 54-57. In order to do this every 8 lines, it follows that you have to write the same number into d011 every time. But you also have to prevent the badline condition before cycle 54, so you have to write something else to d011 in between. In conclusion, you can't do it with one write per char row.
I don't immediately see how this could be done in cycle 54-57 with one write every 7th line. It seems like RC would be 6 the second time. What am I missing?
However, I think it could be possible to repeat rows by switching off the badline condition in cycle 14. This would work with partial rows, e.g. every 7th line. Then you'd utilise the resetting of RC that happens in the first half of that cycle. Is that how you do it? |
| |
Radiant
Registered: Sep 2004 Posts: 639 |
I don't remember - it's possible I did two d011 writes for every doubled row. Will have to check my code. :-) |
| |
Radiant
Registered: Sep 2004 Posts: 639 |
You can restart the current row by triggering a badline condition before cycle 14 (IIRC) when RC > 0. It's one way of doing FPP (if you don't mind wasting 40 cycles on a badline), though I haven't found any real use for it just by thinking about it. |
| |
lft
Registered: Jul 2007 Posts: 369 |
Yes, but then you get DMA. The benefit of FPP with badlines is that you can select among 128 different lines per VIC bank, whereas if you do it without badlines you only get 8. But normally, the point of repeating a row is that you want to avoid badlines/DMA. |
| |
Oswald
Registered: Apr 2002 Posts: 5086 |
dma or no dma doesnt matter, the Q is if its possible? :) could be 2 d011 writes too... |
| |
Radiant
Registered: Sep 2004 Posts: 639 |
Quote: Yes, but then you get DMA. The benefit of FPP with badlines is that you can select among 128 different lines per VIC bank, whereas if you do it without badlines you only get 8. But normally, the point of repeating a row is that you want to avoid badlines/DMA.
I don't see how you'd get access to more possible FPP lines, given that VC doesn't change when you retrigger a line? |
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 - Next |