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-09 11:21
Oswald

Registered: Apr 2002
Posts: 5086
"64k ram system" doesnt gets pushed down, stays vertically in its place is this normal ?
2016-09-09 13:30
HCL

Registered: Feb 2003
Posts: 727
http://codebase64.org/doku.php?id=base:repeating_char-lines

..and as a plus, you don't necessarily need a badline at the top of the screen.. You can reuse the last charline from previous frame. Crest made a demo about that.. Which one was it?!? hmm..

<edit>Ah.. here it is :) Just an Illusion </edit>
2016-09-09 16:23
Frantic

Registered: Mar 2003
Posts: 1647
Hehe.. that was a nice one (from that codebase article):

        ldx #0 ; Make raster unstable again :)
        inc *-1
        inx
	bne *-1
2016-09-09 19:21
Oswald

Registered: Apr 2002
Posts: 5086
HCL, nice ! Timing seems to be the same as in my routine. Guess you cooked it up in 5 minutes, I needed an hour of "I have no idea what I'm doing" :)
2016-09-09 20:49
Digger

Registered: Mar 2005
Posts: 427
So, doing it Crossbow's way, it would be possible to use charset for chars 0-4 (that would be otherwise used for 40 screen chars for that line). Once VIC reads it, it can be filled again with charset data.

Trying to think of what would be the practical use for that other than memory saving... Could do a huge 256x25 chars side mover that takes virtually no rastertime... Or hires 64x25 char with ECM... Any other ideas?
2016-09-10 05:25
Oswald

Registered: Apr 2002
Posts: 5086
digger, Jackasser did horizontal twisters with this, so to change column's twist phase you only update the char pointer on top. He says tho he only used 7 line high rows doubling method.
2016-09-10 05:46
ChristopherJam

Registered: Aug 2004
Posts: 1408
Quoting Digger
So, doing it Crossbow's way, it would be possible to use charset for chars 0-4 (that would be otherwise used for 40 screen chars for that line). Once VIC reads it, it can be filled again with charset data.


Eh, if you use char indices 5-44 then definitions 0 to 4 are never used anyway :)

Quote:
Trying to think of what would be the practical use for that other than memory saving... Could do a huge 256x25 chars side mover that takes virtually no rastertime... Or hires 64x25 char with ECM... Any other ideas?


It's also handy if you just don't have enough CPU cycles free to DMA the indices; Reutastic spends the first 3/4 of each raster updating the sprite colours for the free-colour graphic on the right; the colour attributes for the stretch effect on the left are only fetched once at the start of the screen (the stretch itself is just REU blatting, mind).
2016-09-10 07:10
JackAsser

Registered: Jun 2002
Posts: 2014
Quote: digger, Jackasser did horizontal twisters with this, so to change column's twist phase you only update the char pointer on top. He says tho he only used 7 line high rows doubling method.

That was my bro and he used 8 lines. I used similar tricks in my rotozoomer (Andropolis) but 7 lines because I wanted a bad line but still be on 00-39 offsets. During the 7 lines I calculate the new chars and since I know the offset always is 00-39 the inner-loop becomes much faster (Krill's idea, my implementation). That's also why the effect isn't full width, I only had time for lik 35 chars or so. As I side effect I can scroll the whole screen sideways almost for free.
2016-09-10 07:49
Oswald

Registered: Apr 2002
Posts: 5086
Jackie, you lost me big time.

"I wanted a bad line but still be on 00-39 offsets"

why do you need a bad line if it just reloads the very same offsets ?

"During the 7 lines I calculate the new chars "

7 lines is not enough to redraw 35 complete chars, but if you calc new char pointers, how if its a fixed 00-39 ?! :)
2016-09-10 08:07
JackAsser

Registered: Jun 2002
Posts: 2014
Quote: Jackie, you lost me big time.

"I wanted a bad line but still be on 00-39 offsets"

why do you need a bad line if it just reloads the very same offsets ?

"During the 7 lines I calculate the new chars "

7 lines is not enough to redraw 35 complete chars, but if you calc new char pointers, how if its a fixed 00-39 ?! :)


You can refetch the char pointers, I.e. Badline without moving forward (if u do it on < line 7). Indeed I update char pointers but always on offset 00-39
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
Scooby/G★P/Light
GuyGavin/HF
Matt
Magic/Nah-Kolor
Picrard/Mayday
Guests online: 63
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.142 sec.