| |
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.... |
| |
lft
Registered: Jul 2007 Posts: 369 |
Quoting lftHowever, I think it could be possible to repeat rows by switching off the badline condition in cycle 14.
Oh, silly me. Of course we can't do it that way. The explanation is left as an exercise for the reader. |
| |
Oswald
Registered: Apr 2002 Posts: 5086 |
"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."
so 8th row of char row, trigger badline in cycle 54-57, then write something else ? cycle 58, is fine for that ?
Radiant, did you manage 8 lines high chars ?
benefit of this would be soft bitmapmode, with page aligned rows. or to put in another way where the HI byte changes inside row, it happens always on the same column :)
the reason I want to repeat first row is that I also want tripple buffering and fullscreen, and having 3 screens in each bank is too expensive.
so one could reserve a charset for each row, 128 chars for each row, then 40 chars inside row for each buffer. |
| |
Radiant
Registered: Sep 2004 Posts: 639 |
Let's see now. Yes, I'm resetting d011 again on the line after the doubling, which happens on cycle 54 of each line where RC=7 (that is, each eighth line).
You'd be hard pressed to squeeze in a write cycle on cycle 58 immediately after doubling. :-) But on the next line is of course ok. I do the resetting on cycle 56 on the line after the doubling. |
| |
Oswald
Registered: Apr 2002 Posts: 5086 |
so you have all 8 lines repeated with this? as many times as you want ? |
| |
Radiant
Registered: Sep 2004 Posts: 639 |
25 char rows, a single badline in the very beginning of the screen. |
| |
lft
Registered: Jul 2007 Posts: 369 |
Quoting RadiantYou'd be hard pressed to squeeze in a write cycle on cycle 58 immediately after doubling. :-) But on the next line is of course ok.
It has to be on a different line, actually. Otherwise you'd get a spurious badline somewhere during the following row. (Because YSCROLL has to have some value, and that value is going to match the raster position at some point.) |
| |
Oswald
Registered: Apr 2002 Posts: 5086 |
okay thanks for the hints guys. |
| |
Radiant
Registered: Sep 2004 Posts: 639 |
Idea: If you do linecrunch on the very first line of the screen and then retrigger the badline on cycle 54-57, what will happen? |
| |
Digger
Registered: Mar 2005 Posts: 427 |
...and even forcing VIC to display 26 charlines :) |
| |
Oswald
Registered: Apr 2002 Posts: 5086 |
It seems to be working top 3 row is the same row.
no stable raster, so I guess cycle 54-57 is not crucial. main is plotting the first char row in an endless loop, then I added some lda (),y lda (,x) shit to make sure it doesnt need stable.
$1a->d011:
4 cycles before the raster col changes on right side
$1b->d011:
in the next rasterline about on the same place (4cycles before raster col changes)
(sta d011 sta d020)
edit: stable is needed, I had jmp * instead of jmp main :P |
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 - Next |