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 > VSP/linecrunch scrolling with sprites
2024-10-10 19:52
mankeli

Registered: Oct 2010
Posts: 129
VSP/linecrunch scrolling with sprites

Hi. I wonder how Mayhem in Monsterland and other games utilizing techniques mentioned in the topic, can still show sprites? The sprite pointers should be visible in background.

In Skybox, I was able to have the sprite pointers just visible there since everything was pretty glitchy anyway and they still had the correct D800 colors. The Performers' demo that had almost similar greetspart probably hid them in the black areas. (I didn't look though)

But I cannot comprehend how it's possible otherwise. Does MIM use different kind of VSP scrolling?
 
... 10 posts hidden. Click here to view all posts....
 
2024-10-11 15:43
Oswald

Registered: Apr 2002
Posts: 5082
Quote: mankeli: most frames Mayhem just updates a single column of colour ram, but every time it hits 40 columns of scroll it needs to snap back and copy all of colour RAM up one character. There are some slightly unrolled loops at $2480 that do this four rows at a time, probably chasing the beam to some extent, because it's going to take over 9000 cycles to do that.

VSP in mayhem kinda pointless it doesnt do anything that needs more time than copying the whole screen by hand.
2024-10-11 16:23
ChristopherJam

Registered: Aug 2004
Posts: 1407
Yeah I'm a bit surprised the colour ram update is that slow TBH - it means they need to be able to cope with losing half their cycles to screen update on the occasional frame without glitching. Maybe they had plans for something faster, but ran out of code space for it?

(VSP still saves them a fuckton of cycles on average, and maybe they just don't sort the sprites or something on snapback frames, but still, Oswald's point stands)
2024-10-11 23:50
Fungus

Registered: Sep 2002
Posts: 679
Phobia uses VSP as well, and I don't recall it having to do the snap back thing, but then again it's been ages since we did that so I don't remember the details.

I'm not aware of any game using AGSP.
2024-10-12 07:02
oziphantom

Registered: Oct 2014
Posts: 490
the sprites are above the bottom row as the bottom row moves up and down the actual last row is not part of the "level" and hence by the time you get to said row there are not any sprites to show. So you just set the Sprite pointers to what you need them to be, and then set them back after.

But in the Mayhem in Monsterland case, they open the borders and put the HUD sprites in to it, which have specific known values.
2024-10-12 08:24
ChristopherJam

Registered: Aug 2004
Posts: 1407
Anything that scrolls horizontally continuously over multiples screens using VSP but not linecrunch has to do the snapback - by the time you've scrolled 39 characters to the left the top row of your screen contains characters 39-78 inclusive, and scrolling one more character means you're going to be displaying 0..39 again - so you need to shift the whole screen up a row.
2024-10-12 11:37
Jetboy

Registered: Jul 2006
Posts: 274
Quote: Anything that scrolls horizontally continuously over multiples screens using VSP but not linecrunch has to do the snapback - by the time you've scrolled 39 characters to the left the top row of your screen contains characters 39-78 inclusive, and scrolling one more character means you're going to be displaying 0..39 again - so you need to shift the whole screen up a row.

youu cannot scroll to the left with VSP. Just to the right.It is done by delaying vic yo fetch data. You cannot scroll more than 39 characters with pure vsp.

scrolling to the left is achieved by starting with screen already scrolled to the right, then decreasing scroll.

That means there is no situation evwr when there are
characters 40+ in the first line with pure vsp, To achieve that you need to use linecrunching.
2024-10-12 16:00
Martin Piper

Registered: Nov 2007
Posts: 703
It's actually more like triggering the (partial) bad line early to fetch more characters, not delaying to fetch less. ("by delaying vic yo fetch data")

This means that it's entirely possible to have characters 40+ in a screen appear on the first visible line, without line crunch.
2024-10-12 21:54
Jetboy

Registered: Jul 2006
Posts: 274
Only because previous line was linecrunched :)
2024-10-13 00:41
Martin Piper

Registered: Nov 2007
Posts: 703
Quote: Only because previous line was linecrunched :)

No it's not a full line. So it isn't a line crunch.

For example, this image: https://ibb.co/P1PPjwV

The border colour update indicates the time just before DMA delay trigger point. It's in the last 4 cycles of the trigger window.

In the ICU64 debug view you can see screen $400 contains 40 '0' characters, then 40 '1' characters, and so on.

The first visible line on the C64 contains 36 '0' characters, followed by 4 '1' characters. The '1' characters are characters 40+, i.e. characters 40-43.

Obviously there is no line crunch, since the first line shows '0' characters first. There are 25 rows visible, chars 0-9, then 0-9 again, then chars 0-4, for 25 rows in total.

The bottom right white reversed '@' characters come from the colours in the last part of the colour RAM, obviously, and the 7e8-7ff range, not visible ion the ICU64 debug view.

This rather simply shows that it is possible to show characters 40+ (the four '1' characters in this case) on the first line without a line crunch.
2024-10-13 20:29
Brush

Registered: Apr 2002
Posts: 22
Quote: Phobia uses VSP as well, and I don't recall it having to do the snap back thing, but then again it's been ages since we did that so I don't remember the details.

I'm not aware of any game using AGSP.


Fred's Back does.

Fred's Back
Previous - 1 | 2 - 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
cba
Case/Padua
MWR/Visdom
jmin/F4CG
Didi/Laxity
REBEL 1/HF
kbs/Pht/Lxt
t0m3000/hf^boom!^ibx
Guests online: 121
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 Unity  (9.6)
7 Uncensored  (9.6)
8 Comaland 100%  (9.6)
9 Wonderland XIV  (9.6)
10 Still Rising  (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 It's More Fun to Com..  (9.5)
8 Raising Snakes  (9.5)
9 Moving Balls  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Nostalgia  (9.3)
5 Triad  (9.3)
Top Original Suppliers
1 Derbyshire Ram  (9.7)
2 Fungus  (9.3)
3 Black Beard  (9.2)
4 Baracuda  (9.2)
5 hedning  (9.1)

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