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 > DYPP
2017-03-29 13:36
Rudi
Account closed

Registered: May 2010
Posts: 125
DYPP

Hi,
DYPP - Different Y Pixel Position.
I don't seem to find an explanation on this effect on C64 on codebase or anywhere. Maybe its in another thread here on csdb, then please provide an link.

I know the basics of sines, ive made sinescroll on PC, but its easier there since you can look up the framebuffer directly, via sine-tables and so on.

Im wondering how this effect is easily made on C64. I believe there are more than one way, but i guess one way is slower than the other; for example moving each column-bit (inside a char) in realtime. The other way I think is having the chars animated, similar to a twister. Though, im thinking each angle is used for lookup table. I just dont seem to get it right in my mind to start coding on this effect. I've seen several early cracktros and demos that does this very fast, but haven't had the time to reverse-engineer the binaries. If you have any tips and info i'd appreciate it, or even better; write an explanation for codebase.
Thanks
2017-03-29 13:58
chatGPZ

Registered: Dec 2001
Posts: 11088
i think you want to look for DYCP or DYSP on codebase :)
2017-03-29 15:01
TWW

Registered: Jul 2009
Posts: 541
The DYPPs I made in the past was done something like this:

Fetch charset data AND bit pattern and store with sine-index offset (1x1 charset).

lda Character
asl
asl
asl
tax
lda CharsetData,x
ldx sinus
and #%1111000
sta CharsetDisplayBuffer,x

and so on for the remainder. Off course the AND will determine how many routines you have to write.

There are some optimisations for bigger characters which was used where you only update the to and bottom of the character, not every pixel in between and resulted in looong codestreams ;-)
2017-03-29 18:57
Rudi
Account closed

Registered: May 2010
Posts: 125
groepaz: are you sure this is the same as DYPP? of course i could start with those, but i want to start with the difficult.

TWW: interesting ill try out this.

By the way, I started an irc-channel (ircnet) #c64coders. pls join, i want it to be purely coding related. and spread the word. no lamers pls!
2017-03-29 19:52
Digger

Registered: Mar 2005
Posts: 420
A neat example of a char based DYPP can be found in Obornik (coded by Brush).
2017-03-29 22:37
Rudi
Account closed

Registered: May 2010
Posts: 125
Digger: nice. yes, the sine-scroll in that demo is a good example of what i want to learn how is done.
2017-03-30 07:45
Rudi
Account closed

Registered: May 2010
Posts: 125
Ok, I forgot to turn of invite on the channel. I wanted to keep the lamers out. If you are irc user, Pls (auto)join #c64coders (ircnet) if you want hang on a pure coders channel. Thx
2017-03-30 09:56
ChristopherJam

Registered: Aug 2004
Posts: 1359
Does anyone know which production holds the area record for freeform DYPP? (ie, not relying heavily on solid 8x8s in the source)
2017-03-30 10:10
Axis/Oxyron

Registered: Apr 2007
Posts: 91
There exists an old, but pretty good DYPP based on VSP in Anal Intruder. And AFAIK the best completely dynamic DYPP is in Mekanix.
2017-03-30 12:47
chatGPZ

Registered: Dec 2001
Posts: 11088
Quote:
are you sure this is the same as DYPP?

i have no idea what "DYPP" should be exactly, and how its different from DYSP, to be honest :=)
2017-03-30 13:09
HCL

Registered: Feb 2003
Posts: 716
I'm afraid we're going off-topic here, but to me a DYSP means Different Y SideborderSprite Position, which is quite far from a DYPP.
2017-03-30 13:19
chatGPZ

Registered: Dec 2001
Posts: 11088
sideborder? that doesnt match what i remember at all, DYSP is just a sine scroller with sprites. some tutorial (its also on codebase iirc) even makes a DYSP from just 8 sprites without any multiplexing :)

(and this is, why starting a discussion with references to those totally well defined abrevations makes no sense at all ... =P)
2017-03-30 13:20
Dano

Registered: Jul 2004
Posts: 226
DYPP is just a pixelwide DYCP.

Wasn't it Different Yyielding Pixel Position?
2017-03-30 13:33
Shadow
Account closed

Registered: Apr 2002
Posts: 355
I think the old definition of DYSP was Different Y Sprite Position, ie. when you had a routine that could have open sideborder and move sprites in Y.

DYCP = Different Y Character Position (ie. a since scroller where each character could move in y)
DYPP = Different Y Pixel Position (ie. a since scroller where every horizontal pixel of the character could move in y)

Ah, the good old days when every effect had to have a name! :)
2017-03-30 13:35
chatGPZ

Registered: Dec 2001
Posts: 11088
real men make snurkel scrollers anyway. in the sideborder of course :)
2017-03-30 13:44
ChristopherJam

Registered: Aug 2004
Posts: 1359
Quote: real men make snurkel scrollers anyway. in the sideborder of course :)

Had to google that one. But https://www.youtube.com/watch?v=BmtIxiQDoZk only has DOPC (different orientation per character), rather than morphing each letter to fit the path. So lame ;-)


(Amiga super snurkel scroller/FLT for future reference, if the YT ever varnishes)
2017-03-30 15:18
lft

Registered: Jul 2007
Posts: 369
Oh, the YT will vanish before the last 5.25" floppy becomes unreadable.

As for DYCP, I always thought that referred to the charbased effect where you render the letters into pairs of chars with speedcode.
2017-03-30 19:29
Compyx

Registered: Jan 2005
Posts: 631
How would we call a DYCP (ie simple sinus-based char scroller) using sprites to make it move over a bitmap or FLI?

I did a few of those, and I wouldn't call them DYSP's. Just some trickery to make them appear as proper DYCP's.

I was thinking about doing a write-up on codebase about DYCP's, should be fun getting the terminology correct :)
2017-03-31 04:56
Oswald

Registered: Apr 2002
Posts:
Quote: How would we call a DYCP (ie simple sinus-based char scroller) using sprites to make it move over a bitmap or FLI?

I did a few of those, and I wouldn't call them DYSP's. Just some trickery to make them appear as proper DYCP's.

I was thinking about doing a write-up on codebase about DYCP's, should be fun getting the terminology correct :)


DYSPFLI :) normal bitmap just DYSP.
2017-03-31 05:31
ChristopherJam

Registered: Aug 2004
Posts: 1359
Quoting Compyx
How would we call a DYCP (ie simple sinus-based char scroller) using sprites to make it move over a bitmap or FLI?


I'd still call that a DYCP; the 'character' in the acronym is in my mind a unit of distance, that tells you the granularity of the effect. There are plenty of different ways to achieve it.
2017-03-31 10:40
mankeli

Registered: Oct 2010
Posts: 110
I would do 8 copies of the charset (one for each pixel column) and then just LDA ORA ORA ORA ORA ORA ORA STA.
If you arrange chars nicely, maybe you can unroll the whole thing and do LDY LDA,y ORA,y ... dunno.
Maybe there's better way as well.
2017-03-31 11:37
Oswald

Registered: Apr 2002
Posts:
better way: speedcode per char, to skip empty pixels.
2017-03-31 12:25
Compyx

Registered: Jan 2005
Posts: 631
Even better: use VSP, that way the shape of the dypp doesn't actually change and you can optimize a lot of code (no need to clear stuff, perhaps 'join' a few pixels in a single ORA, etc).
2017-03-31 12:53
Oswald

Registered: Apr 2002
Posts:
Quote: There exists an old, but pretty good DYPP based on VSP in Anal Intruder. And AFAIK the best completely dynamic DYPP is in Mekanix.

mekanix is cheating as far as I'm concerned, lda sta code, no ORA.
2017-03-31 13:28
HCL

Registered: Feb 2003
Posts: 716
Quote: mekanix is cheating as far as I'm concerned, lda sta code, no ORA.

Mekanix is using precalculated fonts for a range of angles. It is still calculating individual sinus-values for each pixel-column, and then mapping it to best possible font.. The accuracy is ok i would say :). Also this way it can do more funny sinuses than VSP-stuff.
2017-03-31 20:32
Compyx

Registered: Jan 2005
Posts: 631
Gotta admit those DYPP's look really smooth, and using a movement you can't get with VSP-trickery.

Never had seen that demo before even, I'm lagging behind badly :)
2017-03-31 20:35
ChristopherJam

Registered: Aug 2004
Posts: 1359
Ah, so that's how they managed such a large area. It's effectively caching intermediates, so that still counts in my book; just restricted to reasonably smooth functions :)
2017-04-01 00:36
Codey

Registered: Oct 2005
Posts: 79
I believe The Larch III The Larch 3 had a mega-DYPP in it. The same effect using a 1x1 charset and 8 splits per char without pre-plotting chars would take a massive amount of raster time. Plotting the bits in pairs resulting in 4 different Y positions per char still looks pretty impressive.
2017-04-01 09:26
Dr.Science

Registered: Oct 2011
Posts: 39
We are in 2017 and you are talking about keeping lamers out? Sounds like 1989... :-)
2017-04-01 11:36
ChristopherJam

Registered: Aug 2004
Posts: 1359
Well, The Larch 3's from 1989, so I guess that fits at least..

But yeah, I think a somewhat more welcoming attitude to newbies is more important than ever.
2020-01-16 14:25
Sam

Registered: Aug 2010
Posts: 13
I'm too stupid to figure out the trick in the multi-dypp-part of "Crest Avantgarde". Would anyone care to share any thoughts on that? I did a couple of dypp-routines in 1989-1992, but I always sucked in "vic tricks", amongst a lot of other things I sucked and keep sucking in.

The DYPP in Anal Intruder uses the same trick than mekanix, based on what I read about Mekanix here, no VSP (is vsp = vertical screen position here?) involved, but a lot suckier code optimizations.

Wouldn't a VSP trick to create a dypp just generate a static "road" of text? Unless the VSP is there just to save cycles when scrolling, but the pixel-per-pixel-sine has to be created in other ways, to have the text moving/animated.
2020-01-16 15:37
Oswald

Registered: Apr 2002
Posts:
Mekanix does a true dypp when only 1 is shown, and fake char anim when 2 AFAIK.
2020-01-16 16:21
Krill

Registered: Apr 2002
Posts: 2804
If the multi-DYPP part in Crest Avantgarde uses VSP, it only does so for the scrolling (and/or the moving colour gradient).

As for the actual DYPP effect, i guess there's a lot of copying of pre-rendered animated characters going on.
Note how the sine period is rather short, so there aren't so many frames to cycle through until wrap.
Also note how parts of many different characters are identical, possibly reducing the amount of animation data so that everything just barely fits into 64 kilobytes.
2020-01-17 08:29
Sam

Registered: Aug 2010
Posts: 13
Thanks, Krill! I can sleep at night again :-) I had a memory of the wave being bigger, but looking at the effect again I realise that it was a much tighter loop than I imagined. The biggest trick, to me, here is the clever font. I should have noticed the lack of special characters right away *shame*.

BTW, my dypp in "Typical" had no special chars because each character shape was a speedcoded lda ora sta and I was too lazy to do all the chars. IIRC there was still memory left though.
2020-01-17 08:59
Krill

Registered: Apr 2002
Posts: 2804
I wonder if the char-transpose approach (swap pixel rows and columns in an 8x8 pixel grid) discussed in https://csdb.dk/forums/?roomid=11&topicid=121737#139125 may in practice really be useful for things like DYPP. =)
2020-01-17 11:03
HCL

Registered: Feb 2003
Posts: 716
Quote: Mekanix does a true dypp when only 1 is shown, and fake char anim when 2 AFAIK.

Nope. it's exactly the same DYPP code when i show 1 and 2 scrolls. When showing 1 DYPP there is a double y-sinus, but when showing 2 DYPPs there are single y-sinuses.. simply because i don't have time to calculate TWO double y-sinuses :(. despite calculating 39 chars instead of 40 :P
2020-01-17 12:11
Sam

Registered: Aug 2010
Posts: 13
HCL, your routine is a big improvement from my trick then, I just precalculated the sinus wave + the char fits. Using regular DYCP + selected char animations, are you moving the chars up and down with just basic DYCP or is there more going on there?
2020-01-17 14:10
HCL

Registered: Feb 2003
Posts: 716
Damn it, i just checked the code (TurboAssembler code from 2005). In single-mode i calculate 160 double-sin values (all 40 chars :P). Then i sort out the lowest one for each char (lda + 3 compares per char), and save as y-offset. Next i do a similar compare to sort out char-internal y-difference, where only [-, 0, +] are taken care of -> 27 different combinations where each one has its corresponding pre-calculated font (pre-calculated during fade-in of course). Then shuffle the data.

The double dypp skips alot of the above. Seems like it just picks a sinus value for the whole char, and then picks another sinus value (should be aprox the derivative..) and use for the tilting angle.. In the end it is the same copy-code and everything else work the same, but yeah it's a cheat! So.. Sorry Oswald, you were right.. You are always right :).
2020-01-18 17:06
Oswald

Registered: Apr 2002
Posts:
Nah no, I find myself often on the wrong :) But having coded in turbo asm is cool, I did that in early 2000's hehe :)
2020-01-18 17:11
PAL

Registered: Mar 2009
Posts: 269
https://youtu.be/-9F5z8K0PXY?t=1874

NOW THIS IS A DYPP - by yours truly and pantaloon :-)
2020-01-18 19:33
Krill

Registered: Apr 2002
Posts: 2804
Quoting PAL
https://youtu.be/-9F5z8K0PXY?t=1874

NOW THIS IS A DYPP - by yours truly and pantaloon :-)
Nice, but the actual character definition is pretty 8x8-ish. =)

One could argue that it's not an instance of the DYPP effect class discussed here.
2020-01-18 20:15
PAL

Registered: Mar 2009
Posts: 269
of course one can argue in that... but it is per pixel in y movement WITH extra layer of vertical lines moving behind in opposite direction... beat that DYPP scroller please... let the argue begin :-)
2020-01-18 20:57
Sam

Registered: Aug 2010
Posts: 13
PAL, my DYPP from 1989 (Poor/Bias Crusher [fixed]) has two different color texts on top of each other, with per pixel y movement and no animated chars, there is also techtech to make it fluffier :-)

But I give it to you that yours is much nicer looking.
2020-01-18 21:05
PAL

Registered: Mar 2009
Posts: 269
your is from 1989 andtherefor the best! I am a pixel artist, if I could code I would beat you all but I simply can not code... but I can get them things to be inside limits in a way thet few can.... I take off my hat for all your splendid code... but still I think mine is the best DYPP on the c64 ever... it is super huge and free feeling.... but yeah... I know what you say.
2020-01-19 12:18
Rudi
Account closed

Registered: May 2010
Posts: 125
Quote: Nope. it's exactly the same DYPP code when i show 1 and 2 scrolls. When showing 1 DYPP there is a double y-sinus, but when showing 2 DYPPs there are single y-sinuses.. simply because i don't have time to calculate TWO double y-sinuses :(. despite calculating 39 chars instead of 40 :P

2020-01-19 12:22
Rudi
Account closed

Registered: May 2010
Posts: 125
Quote: I wonder if the char-transpose approach (swap pixel rows and columns in an 8x8 pixel grid) discussed in https://csdb.dk/forums/?roomid=11&topicid=121737#139125 may in practice really be useful for things like DYPP. =)

Actually, I had that in mind when I started that thread :)
2020-01-19 12:23
Rudi
Account closed

Registered: May 2010
Posts: 125
Crap. how do I delete faulty comments?
2020-01-19 23:35
Lubber

Registered: Jan 2002
Posts: 26
My DYPP in the last part of Screech had a fixed sinus. Although the font is hires, the sinus is always 2 bits wide, so it was possible to have less animation positions to save memory.

https://www.youtube.com/watch?v=rU07Amaad1A&t=10m
2020-01-20 15:38
Rudi
Account closed

Registered: May 2010
Posts: 125
@Lubber: Nice!
2020-01-21 08:25
Raistlin

Registered: Mar 2007
Posts: 548
here are a few different ways to do DYPPs...

1) real-time... this hasn’t been done well yet AFAIK and I’m not sure that there’s much point in doing so as, yeah, it would be much slower than a precalc’ed one;

2) char-based with multiple charsets... this is the method I used in The Dive. Use a large font built out of pieces from a columnised font (eg. If you have a 7x7 char, 56x56 pixel font, try to make that font using 32 1x7 char strips). Have an offline program that essentially plots the full screen sinus into a buffer - and then for each screen line, work out all the chars that would be needed in a charset to draw that line (ie. iterate over the 32 strips and place each one). When your program finds that the new chars on a line give a charset with more than 256 chars, mark off the charset for the previous line and start the current line again with a new charset. Using this method you’ll probably find you need 5, 6 or 7 different charsets, depending on how good your font is. Using this method you can also generate some really nice fully unrolled plot code... since each char is built using 1 of 32 strips, you end up with just “LDA FontLookupData_PartXXYY, y”, “STA ScreenAddress + YLine * 40, x” or something to that effect.

3) plot-based, such as the all border DYPP in Rivalry... this uses a similar technique - but you instead look at packing each line of each font character into lookup tables... this can take a lot of memory of course. The effect in Rivalry was much harder than you might imagine as, iirc, there was ~30k of that data... and then the fully unrolled plot code interleaved into the border opening and sprite multiplex code... not to mention the bitmap memory, animation data, etc etc.

Maybe a Codebase article might be a good idea to do sometime to describe some of these things properly..?
2020-01-21 09:20
HCL

Registered: Feb 2003
Posts: 716
I think that pretty much sums up the original question of this thread. Everyone knows how a DYPP looks, but there is in fact no straight forward way of doing it on the c64. Either you use one of the mentioned techniques, with their pros and cons, or you try to be really clever and find out something new that suits your needs.
2020-01-21 11:52
Sam

Registered: Aug 2010
Posts: 13
The one-color DYPP in Typical was a sort of a real-time, it draws the advancing character line and then removes the tail in real-time. This only works with one-color filled chars that are simple enough, no script etc.
2020-01-21 20:40
zscs

Registered: Sep 2010
Posts: 45
Last time I really coded something newly, that was in 1994 so I'm sorry in advance, if I would write something stupid. :D

In 1993, I was keen of trying to copy other's stuff by my own and created a kind of realtime DYPP in Attempt one. File "2...SCROLLDYPPER" PRG<
(I don't know what demo/intro was the inspiration here)

I'm just trying to check the code, as I can see, 16x16 chars matrix is a kind of saving rastertime here and I definitely chosen the multicolor because it also doubles the rastertime, but... I also did an interlace here. I dunno why and dunno how, however, can give a cool idea to someone for something more clever (maybe). ;-)
Use joystick to control speed and axis. Press key 1 or press 2 to start interlace ON/OFF.

(I know, I know, lame code, but I was 15 years old here and this is a one-person 'demo group') :)
2020-01-21 21:30
Scan

Registered: Dec 2015
Posts: 110
Quoting zscs

In 1993, I was keen of trying to copy other's stuff by my own and created a kind of realtime DYPP in Attempt one. File "2...SCROLLDYPPER" PRG<

I think it looks really nice, but I can't stop wondering how DYPPER would be pronounced. ;)
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
hedning/G★P
ϵʟʞ/ₐтₐ
St0rmfr0nt/Quantum
Jazzcat/Onslaught
Mason/Unicess
BlackJack/Civitas
JackAsser/Booze Design
Dano/Padua
Brittle/Dentifrice^(?)
kbs/Pht/Lxt
Guests online: 326
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 No Bounds  (9.6)
6 Comaland 100%  (9.6)
7 Uncensored  (9.6)
8 The Ghost  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 Party Elk 2  (9.7)
2 Cubic Dream  (9.6)
3 Copper Booze  (9.5)
4 Rainbow Connection  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Onscreen 5k  (9.5)
7 Dawnfall V1.1  (9.5)
8 Quadrants  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Birth of a Flower  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Nostalgia  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Webmasters
1 Slaygon  (9.7)
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.096 sec.