0x100 bytes, no filler
April 20, 2017 7:18 PM   Subscribe

A Mind Is Born is a C64 demo with a driving hypnotic soundtrack. The program is 256 bytes long. How it works: A Mind Is Born
posted by scruss (37 comments total) 48 users marked this as a favorite
 
(the markup for this post was 256 bytes long.)
posted by scruss at 7:20 PM on April 20 [25 favorites]


I read most of the how it was done link, and I've been a programmer for 20 years, and I still say the answer is "black magic"
posted by RustyBrooks at 7:30 PM on April 20 [2 favorites]


dammit why did I retweet, I should have hoarded this
posted by cortex at 7:47 PM on April 20 [2 favorites]


A Tweet is 144 bytes. You could put this entire program in two Tweets. Then someone could take those two Tweets, download them into a Commodore 64, and this program would play.
posted by eye of newt at 8:00 PM on April 20 [1 favorite]


Fuck. Wow.
posted by sexyrobot at 8:11 PM on April 20 [1 favorite]


eye of newt - isn't a tweet 144 *characters*? if so, you could take the 256 bytes, treat them as 128 UTF-16 codepoints, and have 16 characters left over for "💾 UTF16 > 🖥️ C64" instructions.
posted by russm at 8:14 PM on April 20 [1 favorite]


A hypnotizing demonstration of Kolmogorov complexity.
posted by runcifex at 8:14 PM on April 20 [1 favorite]


There is a universe, where the C= ecosystem made it as far as when Gore won the presidency.

This universe gives us nothing, so we take. We take a new Amiga with a new Moto processor not tied to the ass-slab ordinary folks choose between the impenetrable idol of Abble or the cleverest snitch of Gooble.

New. Commodore. Hardware.

Amiga Lives.

I mean, really, iOS (Apple not Cisco) is ten years old by now.

The best new things happened before 2010.

And tech will be in slow motion for the next dozen years as glad-handers try to sell us IRC and "talk"at the Bash Shell as disruptive BS.

Mathowie. Calling your Slack crew out, here. They are IRC grifters. You and I both know it's true.
posted by Slap*Happy at 8:20 PM on April 20 [6 favorites]


That was way way cooler than I imagined it could be.
posted by edheil at 8:32 PM on April 20 [1 favorite]


Yer a wizard, Linus!
posted by paladin at 8:46 PM on April 20


That's pretty cool. All the techniques are pretty standard C64/6502 things: self-modifying programs, sharing bytes between data and opcodes, even LFSRs (like the timers in the Atari 2600 Stella chip). Programmers got close to the metal back in the day.

For 256 bytes the effect is amazing. Having a melody come out of a shift register setting must have taken quite an effort.
posted by netowl at 9:11 PM on April 20 [2 favorites]


I guess I missed my chance to go to bed at a reasonable hour.
posted by MtDewd at 9:11 PM on April 20


This is indeed super cool. I would really love for the music to be expanded to a longer track that goes, like, deeper and louder. I would greatly enjoy blasting that in my car.
posted by yasaman at 9:49 PM on April 20 [1 favorite]


Alas the track cannot be made any longer as 256 bytes is all the memory we have in all the machines in all the world
posted by fallingbadgers at 10:27 PM on April 20


I was struck by the Sierpinski triangles showing up from time to time in the video.
In looking at the display code, I see he's using an ASR (#$4B), which is an 'illegal' opcode. (called an ALR there)
This saves a byte as #$4B04 does the same as #$29044A :
AND #$04
LSR A

Every byte counts...
posted by MtDewd at 11:02 PM on April 20


Excellent.

Some of my favourite chiptunes come from the '64.

I am a big fan of target: renegade by Gary Biasillo.
posted by bashism at 11:42 PM on April 20 [1 favorite]


Reminds me of the old 4KB demos of the Amiga, Atari days.. but 1/16th of that
posted by Merlin The Happy Pig at 12:36 AM on April 21 [2 favorites]


I love this. Good post!
posted by Wolfdog at 2:48 AM on April 21


It's worth mentioning some of lft's other work. This guy is absurdly talented.

Most demos are made by a team: different people specializing in graphics, code and music. People often contribute in multiple areas, but it's very rare for someone to do all three. Lunatico, released last year for C64, was made by lft alone -- the result is worth a watch.

In Craft he runs an entire demo from a tiny ATmega88 microcontroller, including generating a VGA video signal in software!

He tracked down a hardware bug in the C64 which had been frustrating demo coders since the 80's.

He turned an old electric organ into a custom-designed "chipophone" -- also based on an ATmega88 -- with features like an arpeggio switch (and automatic arpeggiation when you press more keys than there are channels).

Not to mention all the other stuff linked on the side of the page!
posted by panic at 4:07 AM on April 21 [8 favorites]


That's a cool song but ow my eyes.
posted by Zarkonnen at 5:29 AM on April 21


This reminds me of https://www.pocogtfo.com/
posted by BentFranklin at 6:46 AM on April 21


A Tweet is 144 bytes. You could put this entire program in two Tweets. Then someone could take those two Tweets, download them into a Commodore 64, and this program would play.

eye of newt - isn't a tweet 144 *characters*? if so, you could take the 256 bytes, treat them as 128 UTF-16 codepoints, and have 16 characters left over for "💾 UTF16 > 🖥️ C64" instructions.

A Tweet is 140 Unicode characters. Using Base65536, we can encode two bytes per Unicode character, for a maximum of 280 bytes per Tweet. a_mind_is_born.prg, 256 bytes long, becomes the 128-character string "㰁㰍𥧿枞朲㐵㐀瘙𥘜𦈀㐀𥘑㿠栐阎𧮐㐇哿瘔姕娕蠕阕廕䌛䟦䟦㛐嗦隩内喧瓠㳰䂐䕎ꏐ𨗼ꖠ垄𥶄聊𢸜䞥攩㛐准擠䗰㚰㚢䓉㷰床𣀃𧦵㺅𣄭𣘀𣴑𣰢𡬡𢬀耓𣀎𧻋𥊆㭉㾅䞥䌩䏐𣺩䡇㚐䢅㬩𣮪𠯷𢘒𣴈𡜍𠸏𧼐𣶨𡜉𠸃𧿐𠑌𖣪𠲎𡐂𥘡礠𢣥𤏽㰂㚕𥛊𡓸㜕𥉌𢼀𡍐𥘑𣍘𦈄𤦠儍緔㡋斠䲌𒋐𦳋𒋋ꇋ唅趠𥬅𥆑𦗐𣀫霂䰀唦夒䐓", which, despite its apparent size, fits comfortably in a Tweet, with 12 characters left over for commentary.
posted by qntm at 7:33 AM on April 21 [6 favorites]


Please tell me that's intelligible in Chinese.
posted by paper chromatographologist at 7:41 AM on April 21


I imagine it's about as intelligible in Chinese as a typical Base64 string is in English.
posted by qntm at 7:42 AM on April 21


I imagine it's about as intelligible in Chinese as a typical Base64 string is in English.

Given that Chinese is ideographic, it'd be more like one of those password encoding systems that gives you things like "PINE LARK STUN GRID LOAF UNTO"
posted by acb at 7:54 AM on April 21 [1 favorite]


It breaks Google Translate, whatever it translates into. I got more chinese characters out of it (with long strings of repeats), even though it is set to English.
posted by ArgentCorvid at 8:00 AM on April 21


The music itself is great, forget all the programming wizardry. The wizardry is even better. I love that people this creative are still working with 35 year old systems.
posted by Nelson at 8:04 AM on April 21 [1 favorite]


On a tangent: Base65535 suggests that groups could have their own, far more capacious, private sub-Twitters parasitically overlaid over Twitter, just by using a client that bzip2s their posts into tiny binary blobs and then Base65535s them and posts the encoded form. The client could even add an encryption step to add a number of separate channels.
posted by acb at 8:17 AM on April 21


groups could have their own, far more capacious, private sub-Twitters parasitically overlaid over Twitter

I don't know about "parasitically overlaid" but it is a fact that Chinese writers can fit an amazing amount of Chinese text in a single Tweet compared to, say, English text.
posted by qntm at 8:55 AM on April 21 [1 favorite]


That "parasitic overlay" you describe is exactly how the pirate scene distributes movies and TV shows. Only the host in this case is Usenet, not Twitter, and it's typically base85 encoding.
posted by Nelson at 9:01 AM on April 21 [1 favorite]


That was pretty incredible.
posted by biogeo at 9:37 AM on April 21


As a Sinophone I once attempted to learn mind-base64 but failed.
posted by runcifex at 10:36 AM on April 21


A single tweet may be about 200 bytes, but to actually display it the way Twitter likes takes somewhere between 32kb and 48 kb *if* you have some elements cached from previous tweets. Otherwise that number jumps to about 70kb. If you want to load the permalink for a tweet on twitter.com that'll hit you for about 700kb the first time you load it.
posted by TwoWordReview at 3:08 PM on April 21


Somebody really hacked the Gibson, here.
posted by lumpenprole at 3:43 PM on April 21


... sitting in the library listening to this through headphones, on a loop. Of all the music I've tried, this is the _best_ music for studying :)
posted by labberdasher at 3:37 AM on May 4


Please tell me that's intelligible in Chinese.

Interestingly enough, these characters, 𒋐𒋋, are actually cuneiform! I really never would have guessed there's a Unicode character set for cuneiform. Finally we can get web pages in ancient Sumerian.

Also, these characters, ꏐ, ꖠ, and ꇋ, are not Chinese. I had to look them up: ꏐ and ꇋ are characters in the modern writing system of the Yi people, who are an ethnic group in East Asia, while ꖠ is a character in the writing system of the Vai people of Liberia. Neat!

There may be others that I missed, too.
posted by shapes that haunt the dusk at 4:10 PM on May 4


It's funny, digging through YouTube for recent C64 and Amiga demos I'm finding that I like the C64 demos better for a couple of reasons:

1. The SID chip is a real analog synth and it sounds AMAZING. The Amiga, while operating at a higher bit and sample rate, lacks any sort of synthesis capability and can only play back samples. Not even a filter.
2. The limitation (and hardware uniformity) of the C64 force incredibly creative solutions, while the Amiga demos appear to lean heavily on standard Amiga chipset operations. Also, are they using Agnus, Fat Agnus, AGA? How much RAM?

I say this as a former Amiga fanboy. I'm just really blown away by what people are squeezing out of that old tan box!
posted by grumpybear69 at 11:41 AM on May 16


« Older How deep is my lack of artistic character? Pretty...   |   Secret Empire #0 reveals that he was simply... Newer »


This thread has been archived and is closed to new comments