What were SNES games programmed in?
Hello everyone,
I was reading on the SNES today (article on Digg) and it mentionned that the CPU was 3.52 MHz and there were 128 kb of RAM. Considering those very small technical specs, I naturally began wondering about programming games for that platform. What were they written in? The various documents I was able to find seem to suggest that most games were written directly in Assembly. Is that correct? Or were they mostly programmed in C, Basic or a SNES-specific higher-level language (higher meaning higher than assembly).
I would think that a language such as Forth would have been a better choice as it's higher level than assembly while still being very efficient speed-wise and even more so memory-wise. Forth also has other advantages such as being interactive, allowing inline assembly code and allowing advanced programming methods.
Thanks for the input guys,
Vincent.
3.52 MHz and 128kb RAM? That's...incredible! I can't really believe you could run something like Secret of Mana/FFs on that...guess I'm jaded from this age of 2GHz+ processors.
Quote:Original post by Anonymous Poster
3.52 MHz and 128kb RAM? That's...incredible! I can't really believe you could run something like Secret of Mana/FFs on that...guess I'm jaded from this age of 2GHz+ processors.
That's why I'm asking, I'm a Ruby programmer mostly, and this machine couldn't even run the simplest Ruby "hello world" program :) Kudos to the guys who knew how to program back then.
They were written in 65C816 assembly. I don't know if there were any C compilers for that CPU, but if they did exist they most likely weren't good enough. And yes, while the SNES had 128KB of RAM, most of the code was executed directly from the cartridge ROM, not copied to RAM like you might be familiar with on a PC.
I don't know anything about Forth, but from skimming Wikipedia it seems to be you'd end up with something that resembles a macro assembler. Anyway, I doubt anyone at Nintendo was concerned with such things in 1990.
I don't know anything about Forth, but from skimming Wikipedia it seems to be you'd end up with something that resembles a macro assembler. Anyway, I doubt anyone at Nintendo was concerned with such things in 1990.
Yup, snes games were coded in pure assembly.
The reason why snes could still do so nice graphics, despite the weak cpu, is the sweet 2D graphics chip allowing for a lot of cool effects with clever coding.
The reason why snes could still do so nice graphics, despite the weak cpu, is the sweet 2D graphics chip allowing for a lot of cool effects with clever coding.
Quote:Original post by Anonymous Poster
Yup, snes games were coded in pure assembly.
The reason why snes could still do so nice graphics, despite the weak cpu, is the sweet 2D graphics chip allowing for a lot of cool effects with clever coding.
Thank you. Well, I have to raise my hat to the people who wrote all those cool games. I must have been hell to debug!
Quote:Original post by Anonymous PosterDon't forget the awesome mode 7...
The reason why snes could still do so nice graphics, despite the weak cpu, is the sweet 2D graphics chip allowing for a lot of cool effects with clever coding.
I love oldschool programming - if you look in my journal, you can see I'm currently developing a game for the Sega Game Gear in Z80 assembly.
If you're looking to develop for the SNES, I'd highly reccomend digging out a good debugging emulator (so you can look at the sprite tables/all memory locations/whatever) and a decent assembler (WLA-DX is my weapon of choice).
I believe some American games were done in C, but I would bet that the vast majority were assembly.
C was probably a possibility, though I don't know for sure. I've done some limited Gameboy (original) homebrew using a C compiler and its specs are even more limited than the SNES... I also know that the same company that produced the SNES CPU offers a C compiler for it as well.
Also, while we tend to think of things like ASM as being instruction-level languages, theres no reason that an assembler can't impliment some higher-level constructs such as functions and loops. These systems are called high-level assemblers(also: Macro Assemblers.)
Probably most SNES games were done much as PC games were when limited capabilities were more of an issue than it is today. That is: speed critical elements were surely ASM, while some of the less critical code was written in an easier-to-maintain language such as C or high-level assembly.
If you'd like to see an excelent example of a high-level assembler, check out bripro.com, a custom HLA development tool by the creator of Grand Theftendo and other neat technical stuff.
Also, while we tend to think of things like ASM as being instruction-level languages, theres no reason that an assembler can't impliment some higher-level constructs such as functions and loops. These systems are called high-level assemblers(also: Macro Assemblers.)
Probably most SNES games were done much as PC games were when limited capabilities were more of an issue than it is today. That is: speed critical elements were surely ASM, while some of the less critical code was written in an easier-to-maintain language such as C or high-level assembly.
If you'd like to see an excelent example of a high-level assembler, check out bripro.com, a custom HLA development tool by the creator of Grand Theftendo and other neat technical stuff.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement