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 > Blog: All Border Double DYPP
2022-03-15 13:38
Raistlin

Registered: Mar 2007
Posts: 568
Blog: All Border Double DYPP

So.. a few people had asked me about how I created certain effects.. I love blogging about code (I do this for my game-dev work, for example, and have done on-and-off for 10 years)... so...

https://c64demo.com/?p=19

The website needs a LOT of work, I know .. but for now it gives me a sandbed to upload these texts to.

Please let me know if you spot any mistakes, if you think I've overlooked explaining anything important, if you think I'm stupid and missed some obvious optimisation, etc...

Cheers!
 
... 51 posts hidden. Click here to view all posts....
 
2022-03-15 18:47
Quiss

Registered: Nov 2016
Posts: 39
That was a good read! I hadn't realized this effect was so memory-constrained.

Your ASM tooling is interesting. (I wonder what a more generic, register-aware version of such a "code interleaver" would look like.)

OT: How do you like Wordpress? I still haven't found a good blogging solution. It seems the more heavy C64 bloggers (Pagetable, LFT) have just rolled their own thing.
2022-03-15 20:40
Oswald

Registered: Apr 2002
Posts: 5022
interesting I didnt know about this sprite interleave thingie, only "half" sprites, which wastes much more memory.
2022-03-15 20:42
Wile Coyote

Registered: Mar 2004
Posts: 642
Interesting read. Admittedly a large % went over my head.

'This is 624px tall – so, packing 9 lines per 256 byte block, that’s 17,920 bytes of memory.. and then the same again for the 2nd frame of our DYPP, coming to 35,840 bytes. BAD. Basically, we can’t fit it.'

'But herein lies the next trick .. we now look for how many of our 27-byte rows are identical. Our C++ code handles this for us too of course.'

That part made much sense.
2022-03-15 21:01
Raistlin

Registered: Mar 2007
Posts: 568
@Oswald: what is the “half sprite” technique? I never heard of this one.:
2022-03-16 10:28
Oswald

Registered: Apr 2002
Posts: 5022
Quote: @Oswald: what is the “half sprite” technique? I never heard of this one.:

lets say you have 2 sprites, lets split each in half,

sprite1:

a
b

sprite2:

c
d


A and C representing top part of the sprites, B and C the bottom.


lets make a 3rd sprite shape that looks like:

c
b


this works as an inbetween sprite shape when changing sprite pointers. so I can change to "cb" 3rd sprite shape in the bottom half of "ab" sprite, and anywhere at the top half of "cd" sprite I can change to its final "cd" shape without any visible bugs. Usagi Yojimbo is said to be using this for plexing.
2022-03-16 10:52
Raistlin

Registered: Mar 2007
Posts: 568
Ahh, yeah, I guess that’s the same as the 20px interleave method I wrote about for Codebase64 - but needing less tight timing than 20px .. 20px interleave could also be 19px, 18px, whatever … it just comes down to how much overlap you like - the more overlap, the less precise and fast you need to be to update the sprite indices.
2022-03-16 11:44
Krill

Registered: Apr 2002
Posts: 2850
First known instance to use sprite interleaving is Maniac Mansion, i believe, with a logical sprite height of 20 lines.

Not quite sure, but i think they need to switch sprite pointers in exact raster lines (no double patterns), but do that every 20 (not 21) lines.
The logical sprites can only be positioned on every other line, though. Sprite-Y mod 2 = 0, Badline-Y mod 2 = 1 (or vice versa), neatly avoiding the badlines when switching.
2022-03-16 11:51
Oswald

Registered: Apr 2002
Posts: 5022
I'm confused about this interleave thing tho. Here is how I think about it: Simply change sprite pointers every 20 lines, and arrange sprite gfx so, that it looks fine on the screen, right ?

whats the difference when we do this every 16 lines ? and what is a logical sprite's position here ?! :D
2022-03-16 13:24
Krill

Registered: Apr 2002
Posts: 2850
Quoting Oswald
Simply change sprite pointers every 20 lines, and arrange sprite gfx so, that it looks fine on the screen, right ?
Yes, and make sure that badlines never appear in the lines where you change sprite pointers.

Quoting Oswald
whats the difference when we do this every 16 lines ?
More interrupts with no additional advantage.

Quoting Oswald
and what is a logical sprite's position here ?! :D
The raster line in which changed sprite pointers become effective.
2022-03-16 19:28
Oswald

Registered: Apr 2002
Posts: 5022
thanks ! :-)
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
6R6/shape/[n0]
š˜š—”š—š/FairLight
Exile/Anubis
hedning/Gā˜…P
iceout/Avatar/HF
Drees
Credo
Krill/Plush
j0x
Guests online: 151
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Memento Mori  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Wafer Demo  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Nostalgia  (9.3)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top NTSC-Fixers
1 Pudwerx  (10)
2 Booze  (9.7)
3 Stormbringer  (9.7)
4 Fungus  (9.6)
5 Grim Reaper  (9.3)

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