I occasionally get asked about writing Super Nintendo games. How did anyone manage to work on projects consisting of hundreds of thousands of lines of 16-bit assembly language?
The answer is that it’s not nearly as Herculean as it sounds.
The SNES hardware manual is a couple of hundred pages. I don’t remember the exact number, so I’ll shoot high: 400 pages. Add in a verbose 65816 assembly language book and combined we’re talking 800 or 900 pages tops. That’s eight percent of the total I came up with for having a complete understanding of an OS X based computer: nearly 11,000 pages.
Sure, there are whole classes of errors that you can make in assembly language that are invisible in C. For example, here’s some old-school x86 code:
mov ax, 20 mov bx, -1 int XX
This sets up a couple of parameters and calls an interrupt. It looks right, it works, it may even ship in a commercial product, but then there’s a new MS-DOS version and it crashes. Why? Because the second parameter should be passed in the dx register, not bx. It only worked because a previous interrupt happened to return -1 in dx, so the second line above isn’t actually doing anything useful. But those kinds of errors are rare.
But all this talk of programming languages and hardware is backward. Jordan Mechner designed and built the original Prince of Persia on an Apple II. The game and the editor for laying out the levels are written in assembly code for the 8-bit 6502. He kept a journal while writing the game.
You might expect the journal to be filled with coding philosophies and 6502 tricks, but there’s little of that. Sure, he’s doing difficult tech work behind the scenes, but that’s not what he’s writing about. They’re the journals of a designer and a director, of someone living far away from home after graduating from college, with long detours into his screenwriting aspirations (and don’t let that scare you off; they’re fascinating).
He may have had second set of coding journals, but I like to think he didn’t. Even if he did, he was clearly thinking about more than the techie side of things, in the way that a novelist’s personal journal is unlikely to be filled with ramblings about grammar and sentence structure.
(If you liked this, you might enjoy The Pure Tech Side is the Dark Side.)
Categories: Blogs Programming in the 21st Century
Erlang on Twitter
» buzzamzn (アマゾンに関する情報を発信中♪): 楽天市場:Learn You Some Erlang for Great Good!-【電子ブック版】 http://t.co/Ot4LPkbgw7 #amazon #アマゾン #相互フォロー
楽天市場:Learn You Some Erlang for Great Good!-【電子ブック版】 http://t.co/Ot4LPkbgw7 #amazon #アマゾン #相互フォロー
» robertoaloi (Roberto Aloi): @mariofusco Wouldn’t it be simpler switching to #erlang? ;-)
@mariofusco Wouldn’t it be simpler switching to #erlang? ;-)
» guillaumepotier (Guillaume POTIER): @francois2metz du coup tu vas recruter une armée de full stack ? Tu ne veux pas qques spécialistes Erlang ?
@francois2metz du coup tu vas recruter une armée de full stack ? Tu ne veux pas qques spécialistes Erlang ?
» HumphreyStamper (Humphrey Stamper): Wage reduction the trim erlang only http://t.co/6qTcEyl3Sk tactician in contemplation of organism leap http://t.co/1CWvIAjBNU
Wage reduction the trim erlang only http://t.co/6qTcEyl3Sk tactician in contemplation of organism leap http://t.co/1CWvIAjBNU
Number of aggregated posts: 10661
Most recent article: June 19, 2013
» Moraru on This is Why You Spent All that Time Learning to Program: It is true that computer science was a pain in the back at time that i’ve had to learn it…
» Commercial hand dryers on Couchbase Meetup at new HQ: Buy online from here where you will get so much of variety in Commercial hand dryers for people. If you…
» Fort McMurray Homes on Motivated Reasoning and Erlang vs Python vs Node: I don’t really understand why this post is motivational? I don’t even see a post, just a title. Fort McMurray…