Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Unexpected linecrunch
2016-09-06 08:58
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....
 
2016-09-07 17:23
lft

Registered: Jul 2007
Posts: 369
Quoting lft
However, 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.
2016-09-07 18:13
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.
2016-09-07 18:31
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.
2016-09-07 18:46
Oswald

Registered: Apr 2002
Posts: 5086
so you have all 8 lines repeated with this? as many times as you want ?
2016-09-07 19:04
Radiant

Registered: Sep 2004
Posts: 639
25 char rows, a single badline in the very beginning of the screen.
2016-09-07 19:10
lft

Registered: Jul 2007
Posts: 369
Quoting Radiant
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.


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.)
2016-09-07 19:12
Oswald

Registered: Apr 2002
Posts: 5086
okay thanks for the hints guys.
2016-09-07 20:12
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?
2016-09-08 19:41
Digger

Registered: Mar 2005
Posts: 427
...and even forcing VIC to display 26 charlines :)
2016-09-09 10:06
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
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Sokrates
DJ Gruby/TRiAD
Magnar
Scooby/G★P/Light
Guests online: 69
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Mojo  (9.6)
6 The Demo Coder  (9.6)
7 What Is The Matrix 2  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Party Elk 2  (9.6)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.6)
5 Libertongo  (9.5)
6 Rainbow Connection  (9.5)
7 Onscreen 5k  (9.5)
8 Morph  (9.5)
9 Dawnfall V1.1  (9.5)
10 It's More Fun to Com..  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Nostalgia  (9.3)
5 Triad  (9.2)
Top Organizers
1 Burglar  (9.9)
2 Sixx  (9.8)
3 hedning  (9.7)
4 Irata  (9.7)
5 Tim  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.041 sec.