Jump to content
  • Advertisement
Sign in to follow this  
GnuVince

What were SNES games programmed in?

This topic is 4796 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
Guest 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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Guest 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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
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.
Don't forget the awesome mode 7...

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).

Share this post


Link to post
Share on other sites
I believe some American games were done in C, but I would bet that the vast majority were assembly.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!