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 07:33
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?
2016-09-07 08:01
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.
2016-09-07 08:02
Radiant

Registered: Sep 2004
Posts: 639
I did it just now in "The Social Demo". :-)
2016-09-07 08:05
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.
2016-09-07 09:17
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?
2016-09-07 09:22
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. :-)
2016-09-07 09:26
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.
2016-09-07 11:58
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.
2016-09-07 13:35
Oswald

Registered: Apr 2002
Posts: 5086
dma or no dma doesnt matter, the Q is if its possible? :) could be 2 d011 writes too...
2016-09-07 13:49
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
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
CreaMD/React
Rodrigo Yeow../Hokut..
Guests online: 75
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 Webmasters
1 Slaygon  (9.6)
2 Perff  (9.6)
3 Morpheus  (9.5)
4 Sabbi  (9.5)
5 CreaMD  (9.1)

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