Saturday, August 28, 2010
Do you see what I see?
One of the first things most people learn to work with is graphics. There are a few tools to modify existing .nes files so you can play around with your favorite games. The Graphic Tools section of http://nesdev.parodius.com has 2 that I use.
Tile Layer Pro is great because it lets you import bitmaps that you have created in Paint or Photoshop. There are a couple of problems I have with this software. The first is the lack of saving your palette selections or graphic format. By default it's set to 1 bit graphics and took me forever to figure out why they looked so wrong. I also save and load my palette from a binary file, which I can't figure out how to load and/or save with Tile Layer Pro. I also don't like to edit only 1 sprite at a time (8x8 pixels). I really only use this app for importing bitmaps anymore. That's the only thing the next app can't do.
YY-Chr is my favorite graphics program. You can zoom in to a single sprite, or zoom out to the whole screen of characters. I created my palette by hand and this program allows me to load that file and make changes, and then save it back. There are some basic drawing tools like line, circle, rectangle, and fill that just make editing and creating new graphics so easy. I don't really understand all of the options available, but that's fine with me. I don't feel like I need those things I don't get just yet.
Both of these programs load everything from Gameboy, NES, SNES, and Genesis ROMS, so there are most likely some features that I will never use when just working with the NES. With these at your disposal, you can play around and replace Mario with Link or anything else you may want to try.
Monday, August 23, 2010
Compile this...

You can write source code all day, but without a compiler or assembler, all you have is a text file. NESASM is what the Nerdy Nights guide uses, and so do I. I've been told by the community that ASM6 is better, but I haven't had any problems yet with NESASM and I don't know enough yet to switch to a new compiler. There are some very nice features that I would be lost without when using NESASM. You can tell the compiler to add binary files to your completed .nes file. This is handy for changing your palette or switching out sprites. Just change it in the file and recompile it. I know I'll be using it for sound effects and music when I get to that point.
First steps

I started out with a guide that I recommend to anyone wanting to program for the NES. Nerdy Nights is a series of forum posts that has info about the NES hardware, the 6502 assembly language, and sample code for making a very simple pong-like game. I have studied this guide and taken notes to help remember everything. There is so much to take in, so I suggest doing the same or something similar to help remember it all.
I only have one word of caution for new developers, there is one guide that I started out with and regret it. GBAGuy's NES ASM Tutorial was pretty alluring as it gave info in small chunks at a time. The problem is that some things that need explanation are not explained and the code is not tested. I got quite far into it before I noticed the notes at the end of each lesson asking for email from people to let him know if the code worked at all. If you take the time to write the code, you should take the time to make sure it compiles.
I like to have some general reference info around just for situations where I have questions about what exactly this or that does. The 6502 processor is very well documented and one site I like to go to is 6502 Reference. There are features and instructions that the NES does not have, but it's not a bad idea to keep this info around.
A long, long time ago...

My first computer was a Commodore VIC 20. The next computer made was the Commodore 64, which I didn't get until around 2001. The only thing I had with that computer was a tape drive to load and save programs to and two cartridges that were Space Invaders and Jupiter Lander. Needless to say, I ran out of things to do. Learning BASIC on my own was difficult, but I eventually got the hang of it.
I told you that story so I could tell you this, Programming old hardware in assembly is nothing like programming C, PHP, or Java in a Windows environment. You have to know everything about the hardware and it's capabilities before you can understand how to program for it. If you want to show something on the screen, you place it directly in video RAM. Itching to make some music? You first have to create a sound engine to play the notes you want. It's all very low level and can be intimidating. I never really knew what low level programming was until I started this.
Sunday, August 22, 2010
Where do we go from here?
When first looking into making games for the NES, it's a good idea to start off small. Don't expect to create the lost Zelda game with everything you've ever wished for that wasn't in the first two games. Most programmers know that a majority of your time is spent making tech demos or proof of concept programs just to learn how to use the hardware.
A good starting point would be scouring the web for any info on the system. Luckily, others have done this already. One site (quite old as of this writing) that has a lot of info is http://nesdev.parodius.com. There are links to forums and wikis there that have info you will need. There are links to programs you will need as well. Assemblers, sprite editors, and music creators are just some of what I've found there so far. I'll go into more detail about that at another time.
I don't really like forums very much. Many times I see a topic I'm interested in and after reading 5 pages, I'm no better off than before. Because I like to actually talk to people, I hang out in the #nesdev IRC channel on efnet. If you don't know how to use IRC, mIRC is a good place to start Googling. We all start out as newbies, so most of the time you dont have to worry about asking stupid questions.
In my next update, I'll go into more detail about the actual programs used and how to really get started. I'll also type it at my computer instead of on my iPhone so it will be easier to write and look info up at the same time.
- Posted using BlogPress from my iPhone
Update: My iPhone app doesn't have an option of adding tags to posts. I have added tags from my PC.
Saturday, August 21, 2010
Looking Into The Past

Each generation grows up with different things they remember fondly. My daughter will most likely not know much about typing on a keyboard. With touch screens making their way into everything from phones to portable computers (iPad), many kids will probably ask "what's a mouse for?"
I grew up with a Nintendo. That's what we called it. It's actually the Nintendo Entertainment System, or NES for short. There have been many video game consoles before and much more after, but there was only one Nintendo. This magic box kept me entertained and aggravated for years. I spent so much time just trying to get to the next level of, whatever. People didn't make these games, they were gods.
Twenty years later, I find a community of developers like myself. We all want to go past the magic and create games for this magic box from our childhood. Learning how to program assembly for the 6502 (the processor used in the NES) is not that difficult if you've done other programming. It is fun to dive way down into the low level of programming, but it can get complicated.
I'm going to work on a few games for the NES and post my progress and findings on this blog. This is partially for my own records and bragging, and partially to help lead others in the right direction. If you have any questions, feel free to leave them in the comments section.
Subscribe to:
Posts (Atom)