DYCP
Different Y Character Position
The C64 scroller where each letter bobs up and down on its own sine as it crosses the screen. Explained in print by Pasi 'Albert' Ojala in 1991, whose article is why the technique is documented at all.
DYCP — Different Y Character Position — is the C64 scroller in which every letter rides its own sine wave as the text crosses the screen:
DYCP - Different Y Character Position - is a name for a horizontal scroller, where characters go smoothly up and down during their voyage from right to left.
Why it is hard
The obvious approach fails on both sides. Sprites run out — there are eight, and “a real demo coder won’t be satisfied with that.” Plotting into a bitmap is too slow, because “you have to handle each byte seperately and the graphics bitmap must be cleared too.”
The character hack
The answer was to fake a bitmap out of the character screen:
The whole DYCP started using character graphics. You plot six character rows where the character (screen) codes increase to the right and down. This area is then used like a small bitmap screen.
Because it is still the text screen, the whole 240-character block scrolls
horizontally for free through the $D016 x-scroll register. Only the vertical
offsets have to be recomputed per frame.
The sprite variant is slower
Eight expanded sprites reach into both side borders, but “sprite-dycp is even more slower than char-dycp”. It also constrains the sine: not to 14 pixels overall, but to less than 14 pixels of difference between any three consecutive characters.
Who wrote it down
Pasi ‘Albert’ Ojala, in “The Demo Corner” in C= Hacking issue 6. Written 16 May 1991 in Finnish for a Commodore magazine, translated 2 June 1992 for the English net-magazine — a route that says something about how C64 technique travelled between scenes.
The scroll text in his own example program reads THIS IS AN EXAMPLE SCROLL FOR COMMODORE MAGAZINE BY PASI OJALA.
The record it drove
DYCP became a competition. Speedcode was invented for raster splits and “later utilized to break DYCP records” — the sine-dot counts that ran from 600 in 1989 to 1536 in 2011.
See also
- Speedcode
- Tech-tech — the same sine, applied to a logo
- Scrolling
- C= Hacking