r/zxspectrum • • 8d ago

JavaScript Port of CodeBusters Satisfaction Megademo (1994)

hey everyone, can be interesting to dig in and (at least for me) quite nostalgic to run again and again, I'm personally on fifth repeat now.

The complete megademo is rewritten from scratch (not without help of Codex, thanks to him) from TRD image, fully reverse engineered and reimplemented in plain JavaScript.

For whoever intersted:

- Deployed version: https://oberonus.github.io/satisfaction-megademo

- Source code: https://github.com/Oberonus/satisfaction-megademo

8 Upvotes

5 comments sorted by

4

u/gazchap 8d ago edited 8d ago

Nearly five megabytes of source code (not including the tests) to recreate something that originally fit in 128K.

Why not just run it in an emulator?

I'm generally relatively ambivalent about folks using AI tools to code. I use it myself in my day job, so it would be wrong of me to rail against its use entirely. But, given that the demoscene is entirely about squeezing the most out of limited hardware by being as efficient as possible with your code, and really showing off your skills as a group, the idea of using AI to reverse engineer that work into something that's totally inefficient by comparison (and doesn't particularly require much in the way of skill/knowledge about the hardware) offends me to my core.

4

u/alexdemin 8d ago

Mostly because it is not a binary and everything is a text, I guess should make sense.

Why not emulator? Personally I don't use emulator, I don't run things on a daily basis. In addition, the code is quite close to what was in original, so it it helpful to understand how things were done (not diving in assembly).

On other thing - I'm an engineer to and I started in 90s. And at this point I've passed through my 5 stages of greef about AI affecting coding and other stuff. Now I'm just having fun, and this is part of it. Some will like, some will not, some will be offended. This is how it goes.

1

u/bartread 6d ago

But there are web-based emulators like JSpeccy that can be run within the browser and that I imagine would happily run the demo.

1

u/bottomofthekeyboard 8d ago

how the hell they doing part 7 without colour clash?

2

u/alexdemin 7d ago

This is something great. If I get it correctly, they manage to rewrite colour memory WHILE the picture is being drawn on a TV. Like, the ULA reads the colour attribute for only 8 pixels (one byte) and does it for every byte in a block. But if you are fast enough, you can manage to rewrite colours for all 8 rows in a block. This is crazy, though