6 ms·
> "It's awesome to be credited with single-handedly bringing down a billion-dollar industry with eight kilobytes of code. But the truth is a little more complex
by kintamanimatt 11y ago
> "It's awesome to be credited with single-handedly bringing down a billion-dollar industry with eight kilobytes of code. But the truth is a little more complex."
Eight kilobytes?! How do you build anything meaningful, especially a game, with just eight kilobytes?
- krapp 11y agoAssembly?
- theandrewbailey 11y agoQuite a lot, turns out. The demoscene does miracles in 4k. http://www.pouet.net/prod.php?which=52938 http://www.pouet.net/prod.php?which=52938
- userbinator 11y agoMight be better to show some actual Atari 2600 demos: http://www.pouet.net/prodlist.php?platform%5B0%5D=Atari+VCS http://www.pouet.net/prodlist.php?platform%5B0%5D=Atari+VCS Here's one of the higher-ranked 8k demos: http://www.pouet.net/prod.php?which=32203 http://www.pouet.net/prod.php?which=32203 (YouTube: https://www.youtube.com/watch?v=WogMZn87hkk https://www.youtube.com/watch?v=WogMZn87hkk )
- gauthr 11y agoGet a copy of Racing the Beam to get some insight into how programmers were able to wring out every bit[1] of potential from the Atari 2600: https://mitpress.mit.edu/books/racing-beam https://mitpress.mit.edu/books/racing-beam [1] Yes, I see what I did there.
- quicklyfrozen 11y agoWell you also have 128 bytes of RAM to work with...
- kabdib 11y agoYou have a little more than this: - In 2600 coding you often don't need a stack, so you can use 'S' as a temp register. Very useful in the display kernel. - The 2600 has a standard parallel port chip. There are configuration registers (e.g., port direction) that can be temporarily hijacked as RAM, when you don't care about input or output (which you generally only sample once a frame). That's a whole 8 more bits of RAM, not to be sneezed at. One of my cow-orkers at Atari decided that he'd try to learn 2600 programming (he was mostly doing Atari Home Computer stuff). Over three or four months I saw him go through what I can only describe as deterioration and utter discouragement. The people who could get even an awful game out of the 2600 were pretty damned good hackers.
- nice_byte 11y ago8K is 8192 bytes. Atari runs on MOS 6502, for which each instruction takes up between 1 and 3 bytes. This gives you about 2K instructions, give or take (you probably want to make space for some data). Given how simple most atari games are, I think you could reasonably get away with 1-1.5K instructions for code if you hand-write the assembly and optimize for size.
- protomyth 11y agoActually, the Atari 2600 runs a 6507 which is a cheaper version of a 6502. Unlike the 64kbytes a 6502 can address, the 6507 is limited to 8kbytes. Worse, the cartridge design limited you to 4kbytes unless you bank switched. But that was storages, which was huge compared to the 128 bytes of RAM. Further complications happen because you need to time things with the scan lines of the display.
- deleted 11y ago[deleted]
- corysama 11y agoLike this: https://gist.github.com/tluyben/f8b19965eaab6d236f9b https://gist.github.com/tluyben/f8b19965eaab6d236f9b Btw: http://benfry.com/distellamap/ http://benfry.com/distellamap/
- a_bonobo 11y agoHave a look at .kkrieger - a beautiful 3D ego shooter from 2004 in 96 kilobytes https://en.wikipedia.org/wiki/.kkrieger https://en.wikipedia.org/wiki/.kkrieger Screenshot: https://en.wikipedia.org/wiki/.kkrieger#/media/File:Kkrieger_screenshot.jpg https://en.wikipedia.org/wiki/.kkrieger#/media/File:Kkrieger...
- softawre 11y agoWOW... Uh..is 96k the whole thing? Is this using some framework which provides something else, outside of standard OS stuff?
- spatulan 11y ago8KB of ROM, 128 bytes of RAM. It doesn't even have a screen buffer, just a half a line buffer. You have to count scan lines and keep track of what's being drawn on a cycle by cycle basis, then update the line buffer live to get what you want on screen.
- kruczek 11y agoEight kilobytes is plenty of space. How about doing something meaningful in 128 bytes (yes, bytes!): https://www.youtube.com/watch?v=cD49RXnEGNE https://www.youtube.com/watch?v=cD49RXnEGNE - it's a mouse-controlled 3d Wolfenstein-like maze. All with the code about half the size of this comment.
- bluedino 11y ago>> How do you build anything meaningful, especially a game, with just eight kilobytes? Often times you don't. Think of how many computer programmers there were back then. How many notable 2600 programmers were there? 20? 25?