181 points · by panic · 3y ago · 55 comments
And they are supposed to run on a machine with 985.248 kHz clock frequency. Yes, thats kilo as in one thousand.
The machine in question has only a single core (with a single thread), but the demo cleverly uses the CPU of the floppy drive for a speed up, so you could say it features true parallelism on multiple cores.
Also arithmetic on the machine operates only on 8-bit values and of course there is no hardware multiplication. Division, you wouldn't even think about.
> Note that as far as the slope math goes, Bresenham is special since it doesn't require the division of x by y, but BRR lines do. So for short line segments, Bresenham can still "win". In fact, BRR lines also need a bit more elaborate math for the remainder. (So this method really shines if you're able to pull in the 1541 for help. See my upcoming post about drivecode)
The BRR algorithm is 5 cycles per position vs 8-10 cycles for Bresenham, which is impressive. Its step position inner loop calculation is only
cpx #imm ;compare x-register to constant
adc zp ;add with carry the value in (0-page) address to accumulator (a-register)For nearly all applications, better quality for trivial cost is preferred.
The "instability" of classic lies is almost always a benefit -- it provides a very cheap form of motion blur / time-dimension dithering anti-aliasing that hides the ugly pixel aliasing of stable lines.
BRR is only better when generating extremely complicated demos, where hyperoptimization matters more than control over the image. For most applications, drawing what the developer/user wants is more important than more complex but arbitrary effects.
Diffusion networks sre new, but denoising autoencoders work on the principle you outlined and were invented in the eighties.
The reason neural nets didn't become popular sooner is because achieving the sorts of results they produce nowadays requires a ton of computing power and a ton of data to train from.
> “Apart from unlocking a number of improvements in XOR fillers and similar effects, the method, as used in the 4k, also significantly raises the bar for realtime filled sprite vector cubes. The cube displayed in "Boo!" draws over an area of size 172x172, up from 140x140 in Protogeo 100%. This improvement to size is because line computation that previously either took 7+ cycles per pixel (or exhaustive amounts of memory) can now, thanks to the BRR ("bit reverse rendered") line method, done in just 5 cycles per pixel.”
Why not the browser?
Would be a lot of fun to try the different demos then. Would be entertaining and educational to see different things you can actually do in the frontend these days.
Also, why not directly link the demos to a C64 emulator, so at least on can try them out?
Old platforms like the C-64 are appealing to a certain kind of clever person because the constraints are fixed and a lot of the possible tricks have already been thoroughly exploited in the past. When you find a novel trick, it will be remembered by the aficionados.
Of course you can do all this natively too, but you have to enforce the constraints yourself.
They are good ways to distribute programs for customers but that’s it.
And with browsers, why not just push video? Could pre-render it in some farm.
In the end it is not just that interesting platform compared to even native things.
Ok, but then back in the era of the C64 why weren't they making cave paintings? ;)
On a computer you’re constrained by the hardware and software. It’s its own smaller world which exists outside of you and has intractable limitations. But if you dedicate enough time to understand the system and keep trying, you may achieve what was otherwise thought impossible. The process of discovery can be more enjoyable, interesting, useful, and artistic than the output itself.
If some frontend developer would make a demo without using webgl or webgpu that would actually get interesting.
To be clear, I think those demos are cool and contain interesting technology. But the pretense that the cutting edge equipment of a specific time is somehow the measure of art and what came after is "just not that interesting" is difficult to stomach. Pity that attitude is so common on HN, I would enjoy being here much more if it weren't.
https://8bitworkshop.com/v3.10.1/?platform=c64&file=hello.da...
Also has NES, Sega Master System, ZX Spectrum, etc.
The browser itself is not very a interesting target for this kind of demo, since it doesn't have much limitations and changes over time too.
EDIT: I think it’s this? https://youtu.be/FpGwT0QqJbY
What you can see is literally program execution, with the fastest changing characters often being inner loop vars.
I will be investigating further but to anyone else interested in this specific rabbit hole:
VICE, also OS agnostic: https://vice-emu.sourceforge.io/
Enjoy.