Read + Write + Report
Home | Start a blog | About Orble | FAQ | Sites | Writers | Advertise | My Orble | Login

Why NES Games are Insane

May 17th 2008 23:09
Into the Beast

NES games, back in the day, had rather convoluted glitches, and some other weird behaviors like slowdown and graphical flickers. Something you have to understand about an NES is that it has horrendous technical limitations, the likes of which seem almost unimaginable when compared to, say, modern PCs. So let us gloriously explore!

By the Numbers

The NES is capable of, numerically...

Running at 1.97 Mhz with 2kb of RAM, with the ability to read up to 64kb of ROM/RAM at any time.
The ability to display up to 8 sprites per scanline (so there can only be 8 total sprites on any horizontal line of the screen), 12 sprite and 13 background colors onscreen out of a palette of 64, with a separate Picture Processing Unit to render graphics without overtaxing the horribly weak CPU, and its own Video RAM of 2kb.


Compare that to a modern PC with gigabytes/gigahertz of RAM and power, and you can begin to see just how limited a platform the NES really was.

So. What Does this Actually Mean?

The limitations of the NES inspired a number of inventive fixes to the gross problems this causes to programmers. First of all, they had to program directly in processor assembly, because the system didn't have enough RAM to even handle a higher-level programming language (To those not savvy to that, I mean like C /Java kinds of languages.). Secondly, the processor is so slow that there actually need to be some workarounds to ensure it still has enough time to process everything without glitching up. Finally, the same goes for the PPU, which often depends on specific times during the display of frames.

Often, one of the side-effects of these limitations is making a lot of shortcuts - if you recall the weird warpzone code in Super Mario Brothers, it checked for the warpzone based on world number, then on the level type. By not having to look up a separate warpzone table, this saves a little bit of memory by not having to load any more data than what is already loaded (the level data). Of course, we all know what this shortcut ends up doing.


Other things that happen include pre-programmed slowdown and flickering. The NES itself, were it to have an instruction that takes longer than 1/60 of a second to do (thus the length of a frame, in time), it would normally glitch up due to trying to load the next frame with instructions left undone. So instead, a slowdown is performed, by forcing the NES to not load the next frame's worth of actions, so it can finish processing - and repeating a frame gives the effect of everything slowing down. Flickering, on the other hand, is simply a fix for the 8 sprites per scanline limitation, which simply remembers where sprites are, and decides to alternate between sprites over the limit, rendering one one frame, and the other the next, so they flicker between frames to ensure that there are still only 8 sprites per horizontal scanline, even if the player, who can't possibly see each individual frame, sees more than that due to flickering.

All of this trickery goes a lot to explain the reason why some NES games tend to unravel if the player does really odd things - because they are difficult to program clearly, and require a lot of compression and memory optimization to use. But even if this opens holes when the attempts to optimize memory use end up neglect some intended limit on the player, it is still ultimately impressive. What an NES is capable of isn't much, and yet the games were in many ways above and beyond the prior game consoles in complexity.

So perhaps this might be somewhat informative, no?
46
Vote


   
Subscribe to this blog 


Just this blog This blog and DailyOrble (recommended)

   

   


Comments
2 Comments. [ Add A Comment ]

Comment by Harry

May 19th 2008 00:13
Can you imagine actually programming an entire mario game in assembly -- man that would really be something.

Comment by jon

May 19th 2008 07:07
Hi -- I've sent you an email already but sometimes they don't get through. Would you like a domain for this blog? If so send an email to charles -at- orble.com (change the -at- into a @) and he will be able to set one up for you.

You may also need to add the email address admin -at- orblemail.com to your address book in order to receive Orble admin emails in the future.

Thanks,
Jon.

(Orble Admin)

Add A Comment

To create a fully formatted comment please click here.


CLICK HERE TO LOGIN | CLICK HERE TO REGISTER

Name or Orble Tag
Home Page (optional)
Comments
Bold Italic Underline Strikethrough Separator Left Center Right Separator Quote Insert Link Insert Email
Notify me of replies
Notify extra people about this comment
Is this a private comment?
List the Email Addresses or Orble Tags of the people you would like to be notified about this comment


One per line max of 30

List the Email Addresses or Orble Tags of the people you would like to be notified about this private comment thread. Only the people in this list will be able to see or reply to your comment.


One per line max of 30

Your Name
(for the email going out to the above list, it can be different to your Orble Tag)
Your Email Address
(optional)
(required for reply notification)
Submit
More Posts
5 Posts
5 Posts dating from May 2008
Email Subscription
Receive e-mail notifications of new posts on this blog:
0

Robert Stadelhofer's Blogs

I have no other blogs :(
Moderated by Robert Stadelhofer
Copyright © 2006 2007 2008 On Topic Media PTY LTD. All Rights Reserved. Design by Vimu.com.
On Topic Media ZPages: Sydney |  Melbourne |  Brisbane |  London |  Birmingham |  Leeds     [ Advertise ] [ Contact Us ] [ Privacy Policy ]