512 Bytes Ought To Be Enough For Dinosaurs

It’s said that slow internet is worse than no internet at all, which is mainly a matter of continuously crushing all hope and sanity vs. finding peace in accepting a fate out of your control. Plus, you can easily pass the time of being catapulted back to the prehistoric ages by navigating a jumpy little creature from that same age through a field of cacti — at least if you’re using Chrome or Chromium. But neither a browser nor actually an operating system are really necessary for that, as [franeklubi] shows with a boot sector implementation of the same game.

Sure, the graphics aren’t quite on par, but compared to the original’s 3000+ lines of JavaScript, [franeklubi] managed to implement it in a few hundred lines of assembly, and was of course constrained by the 512 bytes of the boot sector itself (well, 510 plus the signature). This constraint causes a few limitations, like a slight lack of randomness in the obstacle arrangements, and a constant running speed, but it also makes it the perfect playground and starting point to delve into the world of nifty knacks and hacks, trying to squeeze every last byte.

If you want to give it a try for yourself, all you need is NASM and QEMU — and while you’re at it, why not have some Tetris along the way? We could also see this nicely combined with the real-world jumping version from a few weeks back, and turn it into a standalone arcade game. Bounce Crouch Revolution anyone?

CD Image Via Twitter: A Handcrafted Game Disc

Humans can turn anything into a competition. Someone always wants to be faster or drive a ball farther. Technical pursuits are no different, which is why a lot of people overclock or play regular expression golf. [Alok Menghrajani] sets himself some odd challenges. A few years ago, he hand-built a bootable floppy image that had a simple game onboard and managed to fit it in a Twitter message. Twitter has increased their number of characters, so — you guessed it — this time he’s back with a CDROM image.

His tweet is a command line that starts with perl. The text is base64-encoded binary and if you run the Tweet from a shell — which is an odd thing to do with a Tweet, we grant you, you’ll be rewarded with a file called cd.iso. You could burn that to a CDROM, but it is more likely you’ll just mount in a virtual machine and boot that. [Alok] says it does work in QEMU, VirtualBox, and — yes — even a real CD.

Continue reading “CD Image Via Twitter: A Handcrafted Game Disc”

Linux: Assembly Required

Sometimes you might need to use assembly sometime to reach your project objectives. Previously I’ve focused more on embedding assembly within gcc or another compiler. But just like some people want to hunt with a bow, or make bread by hand, or do many other things that are no longer absolutely necessary, some people like writing in assembly language.

In the old days of DOS, it was fairly easy to write in assembly language. Good thing, because on the restricted resources available on those machines it might have been the only way to get things to fit. These days, under Windows or Linux or even on a Raspberry Pi, it is hard to get oriented on how to get an assembly language off the ground.

Continue reading “Linux: Assembly Required”