Earlier quoted context omitted.
Zelda 1 was 128 kB, for those wondering, and that's without any compression. Double that for the sequel.
> without any compression Perhaps not compression as we see it today. But one could argue that tile based graphics and code based music is a form of compression. Old games used a myriad of cool tricks to get around their limitations.
This game is a single 13 KiB file that runs on Windows, Linux and in the Browser
71–80 of 93 posts
Re: This game is a single 13 KiB file that runs on Windows, Linux and in the Browser
#72On a related note -- when I see the minuscule filesize of the original Zelda game on emulators, I marvel at how little text/code/information could produce how much wonder, how far-reaching impact, and how many hours of enchantment for me. https://en.wikipedia.org/wiki/The_Legend_of_Zelda_(video_gam...
Zelda 1 was 128 kB, for those wondering, and that's without any compression. Double that for the sequel.
Re: This game is a single 13 KiB file that runs on Windows, Linux and in the Browser
#73Earlier quoted context omitted.
Zelda 1 was 128 kB, for those wondering, and that's without any compression. Double that for the sequel.
> without any compression Perhaps not compression as we see it today. But one could argue that tile based graphics and code based music is a form of compression. Old games used a myriad of cool tricks to get around their limitations.
Re: This game is a single 13 KiB file that runs on Windows, Linux and in the Browser
#74Earlier quoted context omitted.
Zelda 1 was 128 kB, for those wondering, and that's without any compression. Double that for the sequel.
Zelda 1 has TONS of built-in compression, and it's own decompression routines.
Re: This game is a single 13 KiB file that runs on Windows, Linux and in the Browser
#75Earlier quoted context omitted.
Indeed, magic. How about the Commodore 64, there was a game (Eindeloos, Radarsoft, 1985) within 64kb that has a huge map. Someone recently (after 40 years!) extracted the map (500 screens) and the png alone is 800kb. See the story an zoom in and try finding the little heart in the map! https://adayinthelifeof.nl/2025/03/07/endless.html
Elite on the BBC Micro - which had 32kB of RAM, a huge chunk of which was required for the screen - managed to have eight galaxies with 256 distinct planets each. Everything about them was procedurally generated, even the names, which required some clever code to ensure none of them used rude words.
People assume 10KB, with the BBC Micro¹² version's version using a mix of modes 4 & 5 (320×256×1bbp and 160×256×2bbp respectively), but as well as the split screen trickery they tweaked the graphics hardware in more detail than that to create custom modes. There were only 248 scanlines and either 256 or 128 pixels per line, so the display took 7.75KB. As well as leaving more memory for the rest of the code, this reduced the amount being drawn, so helped keep the draw speed acceptable.
This left about 24KB⁴ for the rest of the code and its working data. Still a very impressive feat!
> - managed to have eight galaxies with 256 distinct planets each.
IIRC it was originally going to be larger than that, they toned it down a bit but not due to technical limitations (the galaxy generator code would not have needed to be any larger).
--------
[1] The Electron lacked support that allowed the split screen to work (one of the chips removed meant the required timing signal wasn't available), so it was all monochrome though still with the custom resolution and taking 7.75KB.
[2] The version enhanced for the Master series use a mix of mode 1 and mode 2 to enable more colours, 2bbp for the view of space and 4bbp³ for the dashboard. This still used the custom resolution, so took 15.5KB rather than 20KB. This was achieved by using the shadow RAM bank to host the screen display (some programs instead used this feature to implement double-buffering for smoother screen drawing), allowing the screen to take twice as much space while also freeing up memory to hold things that would have been loaded from disc when needed⁵ in the Micro version.
[3] Actually effectively 3bbp as the BBC hardware did 8 colours and flashing variants instead of 16 colours (which most other systems used to provide two shades of 8 colours, using the 4th bit as an intensity flag).
[4] less a few chunks here & there needed by code in system ROMs when doing things like reading extra data from the floppy
[5] There were two chunks of code, one for in-flight and one for while docked, that were swapped in as you entered or left a space station. On the Micro these were pulled from disk each time, on the Master they could both be in RAM. If playing from cassette you had a cut-down version of the game that didn't need this split.
Re: This game is a single 13 KiB file that runs on Windows, Linux and in the Browser
#76Not cross-platform, but I'm reminded of the kkrieger game for Windows which was a 96k FPS game that looked visually impressive for the time. https://web.archive.org/web/20100304155706/http://www.thepro...
Related discussions:
https://news.ycombinator.com/item?id=14409210 (2017)
Re: This game is a single 13 KiB file that runs on Windows, Linux and in the Browser
#77I extracted the linux executable and was surprised to find that both readelf and objdump choke on it despite it loading and running correctly. Some investigation reveals that the name of the dynamic linker was shoved into the "unused" fields in the PT_DYNAMIC header entry to save space: Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align INTERP 0x0000000000000088 0x0000000000010088 0x00000000000…
Choke how? Both work fine here
Re: This game is a single 13 KiB file that runs on Windows, Linux and in the Browser
#78 $ ./snake.com
./snake.com: line 20: /tmp/a: cannot execute binary fileRe: This game is a single 13 KiB file that runs on Windows, Linux and in the Browser
#79Earlier quoted context omitted.
Zelda 1 was 128 kB, for those wondering, and that's without any compression. Double that for the sequel.
Zelda 1 has TONS of built-in compression, and it's own decompression routines.
Re: This game is a single 13 KiB file that runs on Windows, Linux and in the Browser
#80I extracted the linux executable and was surprised to find that both readelf and objdump choke on it despite it loading and running correctly. Some investigation reveals that the name of the dynamic linker was shoved into the "unused" fields in the PT_DYNAMIC header entry to save space: Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align INTERP 0x0000000000000088 0x0000000000010088 0x00000000000…
"A Whirlwind Tutorial on Creating Really Teensy ELF Executables for Linux"
tutorial has some good answers for you.
https://www.muppetlabs.com/~breadbox/software/tiny/teensy.ht...
In short: Compilers don't help l, but with a good macro assembler it is quite convenient. Maybe the author used custom tooling but the assembler route is the easiest if you only need this once or a couple of times.
To the second question, reverse engineering software like IDA Pro or Binary Ninja are not only made for strange and broken binaries but often used for binaries with deliberate anti-reversing measures. They are as good as it gets when it comes to not choking on unusual binaries.
EDIT: Forgot to mention Ghidra.