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: 680
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-20 20:43
chatGPZ

Registered: Dec 2001
Posts: 11386
Hence i said "almost". Sure there are cases like this. But very often this is not the case.
2022-03-20 21:04
Oswald

Registered: Apr 2002
Posts: 5094
Quote: The fact is, and I can tell you this with some certainty, C64 code generators won’t work on 90% of my parts because there are several layers of optimisations that simply couldn’t be done in 6510 in a decent timeframe.

It might sound like an excuse - I guarantee that it’s not. The best that I can imagine could be done is to tokenise some sections - but that’s certainly not going to reduce things enough to save a disk side. And without that, what’s the point? Who cares if a trackmo is 2.5 disk sides instead of 3?


I'm pretty sure interleaving timed raster code and a BOB plotter is quite straightforward, all you need is introduce a variable which keeps track of nr of cycles. then when treshhold is reached pad with nop's and write out the raster code, then goto 10.
2022-03-20 21:45
Raistlin

Registered: Mar 2007
Posts: 680
Quote: I'm pretty sure interleaving timed raster code and a BOB plotter is quite straightforward, all you need is introduce a variable which keeps track of nr of cycles. then when treshhold is reached pad with nop's and write out the raster code, then goto 10.

It’s not that simple, no.. there are many optimisations that wouldn’t be easy to implement in a native codegen.. eg.:-

- maintaining whether each dest byte has already been written to (overlaps)
- whether ORA can be used for adjacent chars to save cycles
- whether the raster code is trashing A, X or Y and whether you currently need these for BOB plotting
- my codegen allows, under certain circumstances, for the BOB-plotter to leave a single cycle unused - but this needs to be cleverly wasted in the D016 code
- etc

By all means you could probably code -a- DXYCP or all border double DYPP using native codegen - but I doubt they would be as optimal. Prove me wrong or stop arguing, I say - the challenge is there.
2022-03-20 21:48
Burglar

Registered: Dec 2004
Posts: 1101
Quoting Krill
Of course it is, but this isn't mutually exclusive with having run-time code generators. :)
oh definitely, if I look from my own perspective, I write codegens for code, tables and even gfx often, but I only do it when it's straightforward.

I kinda understand Raistlin's point: the options are "spend a lot more time" or "just add another d64 in no time at all". both choices are valid :)
2022-03-20 22:10
Bitbreaker

Registered: Oct 2002
Posts: 508
There's situations where writing a codegen is a pain in the arse for sure. I for myself just wanted to point out to not generalize things, there is very often a good point to use a codegen. This also allows to be lazy on the ugly parts :-)
2022-03-20 22:39
Sparta

Registered: Feb 2017
Posts: 49
I really hate to get involved in such a useless debate so I will limit my involvement to this single comment here.

Really, I just wanted to thank you all for appreciating Raistlin's effects (and thus, our demos) and the effort he is putting in his blog. This is clearly shown by the fact that the only argument against them here is using more disk sides than what you'd prefer. Thank you again!

Re: loaders. Bitbreaker, your loader is truly fantastic! As is Krill's loader and Spindle, of course. I could list numerous arguments for using any of the trackmo loaders here, but really, this is personal preference (and somewhat off-topic).

I love you guys all!

Cheers,

Sparta
2022-03-20 23:43
Oswald

Registered: Apr 2002
Posts: 5094
Quote: It’s not that simple, no.. there are many optimisations that wouldn’t be easy to implement in a native codegen.. eg.:-

- maintaining whether each dest byte has already been written to (overlaps)
- whether ORA can be used for adjacent chars to save cycles
- whether the raster code is trashing A, X or Y and whether you currently need these for BOB plotting
- my codegen allows, under certain circumstances, for the BOB-plotter to leave a single cycle unused - but this needs to be cleverly wasted in the D016 code
- etc

By all means you could probably code -a- DXYCP or all border double DYPP using native codegen - but I doubt they would be as optimal. Prove me wrong or stop arguing, I say - the challenge is there.


since 6510 is turing complete, optimal codegen can be done, thats not a question. anyway at this complexity is rather pointless to make it natively you are right.
2022-03-21 10:12
Krill

Registered: Apr 2002
Posts: 2980
Quoting Oswald
anyway at this complexity is rather pointless to make it natively you are right.
You can still apply a simple filter (separate opcode and operand streams) for better crunchiness of generated code, though. =)
2022-03-21 13:00
Perplex

Registered: Feb 2009
Posts: 255
Quoting Oswald
since 6510 is turing complete, optimal codegen can be done, thats not a question.

The memory limitation for keeping track of state when generating optimal code is quite a bit lower when doing it at runtime, though.
2022-03-21 15:19
ChristopherJam

Registered: Aug 2004
Posts: 1409
Perplex, that's what swap disks are for!

runs
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
Mr. Commodore/UCF/Un..
ptoing
Guests online: 104
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 No Listen  (9.6)
3 Party Elk 2  (9.6)
4 Cubic Dream  (9.6)
5 Copper Booze  (9.6)
6 Rainbow Connection  (9.5)
7 Dawnfall V1.1  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (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.046 sec.