Beginning the long road to NES programming!

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

User avatar
Orsi
Posts: 26
Joined: Sun Mar 21, 2010 7:15 am

Beginning the long road to NES programming!

Post by Orsi »

Hi, I would like to introduce myself as the newest member to the forum :). My name is Jonathon Orsi. I am 23 and I currently live in Toronto, Canada attending University of Toronto for a major in Latin and a minor in Philosophy/English.

I've been playing games since 1990, when my grandma first bought me a Nintendo like every other kid's did at the time. My interest of games has sparked my curiosity in pretty much everything I've learned about computers now that I think about it. I started my first Geocities website because of my love for Final Fantasy 3 and Chrono Trigger and that taught me a lot of HTML the good ol' notepad way. Later on, I started playing Ultima Online which stole a year of my real-life because it was sooo addicting (for those of you who played it during its early years, you know...). From Ultima though, I became interested in trying to make my own game like any other eager kid wanting to make the 'perfect' game, and started reading up on Javascript (haha, ya I know). Nothing really came of it except some basic knowledge of how programming languages work: variables, functions, etc... Fast forward a little less than a decade, about two years now I've been casually spending my free time reading up on Java, C#, and finally, Assembly for NES. I've found my calling.

That itch to just create something, if not the 'perfect' game of my naive youth, has come back. Mostly it has been sparked by the dissatisfaction of recent games I've played. I haven't played many games in the past few years because of being involved in school, work and music too much, but nevertheless no game has really stood out that I wanted to play. I just got a PS3 a few months ago that came with Bioshock and it seemed like one long repetitive grind. The funny thing is, the first games I actually bought for the PS3 were the PSOne remakes of FF5/FF6 and FF4/Chrono Trigger. They just never get old.

Something about the old NES games have to be more than just nostalgic. Today, games seem to me all style, no content. Too much focus on graphics, sound, formulas; not enough on the gameplay or, to simply put it, fun. Sure, in GTA4 you can speed around in a car, beat some random people on the street, fly a helicopter and everything else, but those things just don't hit me the same way Battletoads did from level to level. One minute you think it's a side-scrolling beat 'em up game, next you're trapezing down a tunnel avoiding killer crows, next you're speeding across the land in a space vehicle, and next you're... well, I never did get past that part lol. Without the expectation of amazing HD graphics, you can really see how these old games were forced to vary up what you'd expect out of the gameplay, which makes them infinitely more fun to play for me.

Well to wrap it up now, I've been absolutely seduced by the prospect of writing little NES games for myself. For the past week I've been devouring any tutorial I can get my hands on to learn how to understand 6502, Assembly, the NES architecture, the PPU and iNES headers. The real motivation though is knowing that making a NES game is actually possible. When I see Pong, or Tetris, or even Super Mario Bros I think, "man, with a little time and energy, I could probably make a game that looks and plays just as good." No more over-inflated expectations about making the 'perfect' game with crazy graphics, beautiful orchestrated soundtrack, complicated plot and intricate skill systems. Sometimes the simplest games are the funnest to play.

I look forward to asking many, many questions in the future, and I hope I can make a lasting contribution to the homebrew scene :). My first idea is to write "A Newbie's Tutorial for NES Programming by a Newbie to NES Programming." It will explain aspects that I find difficult as a newbie currently and hopefully enlighten others as they take the same course I am. To end it off, I leave you with this question: What has inspired you to learn and write games for the almost two decade old Nintendo?

Jonathon Orsi
User avatar
MottZilla
Posts: 2835
Joined: Wed Dec 06, 2006 8:18 pm

Post by MottZilla »

I haven't written anything more than basic demo programs for the NES. But I have made an emulator which is very fun as well. I suppose my main gripe about NES development is while you do have the very nice FamiTracker program, it's not meant for game use. It would be nice to have a sound driver and trackers for NES that is totally free to use and truely intended/optimized for game usage.

What inspired me to learn more about the NES was pretty simple, I wanted to write an emulator and I decided the NES was the best choice since it had the most games I knew and enjoyed and was still the least complex of those choices. I'd love to make a NES game, but I'm uninterested in writing sound drivers. I'd like to understand it and do it but I just don't think that's the best use of my time right now.

But good luck with your tutorial. Be sure to let us see it as I'm sure members will have suggestions for improvements or corrections after they see it so you can make it even better.
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Post by Bregalad »

First of all welcome.
I just got a PS3 a few months ago that came with Bioshock and it seemed like one long repetitive grind. The funny thing is, the first games I actually bought for the PS3 were the PSOne remakes of FF5/FF6 and FF4/Chrono Trigger. They just never get old.
You can get these on PS3 ? I didn't know that. (I'm also a hardcore Final Fantasy & Chrono Trigger fan).


Well to wrap it up now, I've been absolutely seduced by the prospect of writing little NES games for myself. For the past week I've been devouring any tutorial I can get my hands on to learn how to understand 6502, Assembly, the NES architecture, the PPU and iNES headers. The real motivation though is knowing that making a NES game is actually possible. When I see Pong, or Tetris, or even Super Mario Bros I think, "man, with a little time and energy, I could probably make a game that looks and plays just as good." No more over-inflated expectations about making the 'perfect' game with crazy graphics, beautiful orchestrated soundtrack, complicated plot and intricate skill systems. Sometimes the simplest games are the funnest to play.
Well to answer your last question this is also exactly why I'm here. I don't think NES games are supperior to anything else in the world, I just like the idea that it actually IS possible for me to makes ones completely from scratch without using anyone else's tools or libraries except for tile editors and assemblers.

In fact my favorite videogame consoles are probably the original Playsation, the Super NES and GBA (I can't chose among those 3). But I do NESdev because, like you say, it's actually possible to do it. Yes I know it's also possible to develop for the machines I mentioned (and I'd like to eventually do it), but I'd use only about 20% of their capabilities so I prefer go for the NES and use about 90% of it's capabilities (I just made the numbers up of course it don't have any meaning really).
My first idea is to write "A Newbie's Tutorial for NES Programming by a Newbie to NES Programming."
This is a great idea actually. You know we don't see things from the eyes of a newbie any longer, and forgot exactly how it feel not to understand things we understood. I think there is somewhat a lack of detailed tutorials, the wiki is good but a little too technical and doesn't give any steps into making a program from scratch.
Useless, lumbering half-wits don't scare us.
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

First of all, welcome! If you are really into it as you say, you'll probably do just fine. We are used to answering questions here, as long as the people who ask them are not lazy. We'll be expecting your questions!

About writing games for an old console... Well, in my case it wasn't nostalgia at all. I didn't have a NES as a kid (I went from the Atari 2600 to the Mega Drive). I probably didn't play NES games in more than 5 different occasions back then. Only around 1998, when I discovered emulation, I developed some interest on the NES.

By then I already had some knowledge of programming, and what I loved about the NES is how simple it was (I used Nesticle's debugging features to dissect the games), and how much the programmers were able to do with it. I was obviously impressed with the later games, that had to compete with 16-bit games or were even versions of 16-bit games. For a long time my hobby was converting graphics from SNES and MD games to the NES, and imagining how I'd make those games work around of the limitations. One day I decided to stop imagining and decided to learn how to make the damn games.

I learned a lot, but still haven't been able to finish a game. But I'm confident that it will happen soon. The most advanced thing I have to show for myself is my raycaster, which is far from a complete game, but still interesting.

I also like the Atari 2600 a lot (there might be some nostalgia there), but haven't programmed anything serious for it yet, just the typical silly demos to test my understanding of the console.
User avatar
Jeroen
Posts: 1048
Joined: Tue Jul 03, 2007 1:49 pm

Post by Jeroen »

Welcome...one note bhave your tutorial checked every step along the way :-). A good example of why would be the gbaguy tutorials (very inaccurate since they were written by a newb)
User avatar
Ypsilon
Posts: 11
Joined: Sun Mar 21, 2010 3:35 pm

Post by Ypsilon »

Welcome, I'm new to this world too. I find really interesting the thing about the "By newbies, for newbies" tutorial because when you are begining, you are the perfect one to make a tutorial. Just because you are begining, and you are getting stuck with things that may seem stupid from the outside. I mean, teaching is an art. You have to think in how your pupil is going to get your words. If you are a pupil yourself, no one better than you.

Answering your question, I felt like you. I wanted to make a videogame, but I don't like new videogames. The only new platform I have is a Nintendo DS. So I decided to check out the NES, and I found a lot of info on the internet, so here I am.

I guess I have the added dificulty that English is not my mother tongue, but well, is not a big problem. People here and in the channel are really helpful ;)
User avatar
Banshaku
Posts: 2404
Joined: Tue Jun 24, 2008 8:38 pm
Location: Japan
Contact:

Post by Banshaku »

Welcome to the forum.

As for why I started, good question. I have always been a big fan of the nes since it's always been my favorite console. I wanted to make games for it someday but never found the time.

One day, I got fed up with some project at work in flash that was really stressing me out (I really hate flash but I had no choice to learn some and work on it) and decided to start to learn some nes coding to let some steam out. I believe that tools are an important part of the programming cycle so I worked some time on a map editor which helped me to learn a few things here and there. This editor as been postponed when I started to test the data to make the MM9 proof of concept.

These days, I don't have much time to code games but hopefully, when my children are older, I will be able to put more time on it. I want to at least finish that proof of concept thing, it was getting in the right direction then work on my own game after.

As for tutorial, please don't be another gba guy ;)
Bregalad wrote:First of all welcome.
I just got a PS3 a few months ago that came with Bioshock and it seemed like one long repetitive grind. The funny thing is, the first games I actually bought for the PS3 were the PSOne remakes of FF5/FF6 and FF4/Chrono Trigger. They just never get old.
You can get these on PS3 ? I didn't know that. (I'm also a hardcore Final Fantasy & Chrono Trigger fan).
On the ps3, a lot of psone archive are available. Of course, all popular square-enix games are usually there. In Japan, their price are ridiculous (15$ for FF7 wtf). The good thing is once downloaded, you can play on the go if you have a psp. I got R-types for that reason.
Ian A
Posts: 115
Joined: Sat Feb 27, 2010 8:32 am
Location: Maine

Post by Ian A »

Hello!

The NES has always been my favorite console; As a kid, I used to draw up levels and "design games" for it. I found this site a long while ago, but it was a little too hardcore for me, at the time, so I fooled around with some atari stuff, made a little demo for the dreamcast that I never released and then promptly forgot about programming.

Then, for some reason, I ended up finding this site again. Now, especially with the wiki, programming a NES game seems pretty doable for me, so I'm diving in head first. I've even got some stuff running (on a real NES!). I'm working on some tools right now, so I can make an empty level and work on the physics and control so they are perfect.

I am a pretty crappy programmer, though, so I don't know how much I'll be able to help other people. Maybe so they don't repeat my mistakes?
User avatar
MottZilla
Posts: 2835
Joined: Wed Dec 06, 2006 8:18 pm

Post by MottZilla »

The good news is you don't have to be the best programmer in the world to complete a game. And you can always improve your ability.
User avatar
GradualGames
Posts: 1106
Joined: Sun Nov 09, 2008 9:18 pm
Location: Pennsylvania, USA
Contact:

Post by GradualGames »

Welcome to the forum! This is quite easily one of the best hobby programming forums in the world. I've participated on other forums in the past, and most of them were just riddled with bad behavior. You get the occasional bad apple here but it is very rare. Most people here are extremely knowledgeable, helpful and polite.

For me, I started with game boy, then got a super nintendo, and then finally got a NES, I think somewhere between '93 and '95, brand new from KB Toy and Hobby. I guess they still had a few after the system went out of production. I only ever got 6 games for it, but it and the Super NES were my favorite consoles.

Later on I learned a little programming in BASIC, C, and x86, then went to college, and now I somehow have a job as a programmer. Now that I don't have to do homework anymore, I got back into hobby programming. A little over a year ago it just hit me that modern games are terrible, and I started collecting NES games and playing them. Then a co worker told me about Bob Rost and the class he had taught at CMU about making NES games and I found my way here, either from there or via google I forget which.

But yeah, old games are amazing. Particularly the music, and the challenge.I love music, too, and writing music, and there's such a wealth of amazing music for the NES. Plus, it is the only console for which homebrew is possible that has such a nice music editor, famitracker, available. *edit*...that I know of....

@Motzilla: What's wrong with the famitracker driver? I'm using it in my game engine. I was able to jack in a crude sound effect system around it and it doesn't seem to be getting in the way of the rest of the game engine. Then again the requirements for my first game are rather constrained;I imagine if I went for something more extreme I may have to write my own sound engine. I'm hoping to save that for a future project, though.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

Gradualore wrote:there's such a wealth of amazing music for the NES. Plus, it is the only console for which homebrew is possible that has such a nice music editor, famitracker, available. *edit*...that I know of....
A lot of GBA games' music was composed in .mod, .s3m, .xm, or .it formats. The UI for famitracker was based on that of the original editors for these formats. Moreover, GBA can play compressed wave files, and it can play them as game background music. This means anything that can make a wav file, from Audacity to Audition, can be used to make a GBA game music track. The same is true of Wii, which can easily use Vorbis audio. Even commercial games such as Guitar Hero and Rock Band use Vorbis.
User avatar
GradualGames
Posts: 1106
Joined: Sun Nov 09, 2008 9:18 pm
Location: Pennsylvania, USA
Contact:

Post by GradualGames »

@tepples: I guess I meant "old console for which homebrew is possible." I don't know of a famitracker equivalent for the super nes, or genesis for example. I figured more modern systems could use the formats you mentioned.
User avatar
Orsi
Posts: 26
Joined: Sun Mar 21, 2010 7:15 am

Post by Orsi »

You all seem like a lively bunch here, very active forum I must say :). Has there been much collaboration through this community in means of projects or anything? It would be very inspiring for us newbies if it were easy to see what the vets have done by themselves or together. I'll attempt to post some random demos and tests of projects just to give other newbs some insights, and hopefully one day when I'm making something worthwhile it would be a nice guide for others to follow.
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

Orsi wrote:Has there been much collaboration through this community in means of projects or anything?
Not really. A while ago there was a lot of discussion about a collaborative fighting game, but nothing came out of it. I think everyone is too busy with their dream projects, which is something most people would rather work on by themselves.
I'll attempt to post some random demos and tests of projects just to give other newbs some insights, and hopefully one day when I'm making something worthwhile it would be a nice guide for others to follow.
Just be sure your programs are free from grotesque errors and that they work on a real NES. I'm sure you understand that buggy programs that don't work on the console they're supposed to do more bad than good.
User avatar
Orsi
Posts: 26
Joined: Sun Mar 21, 2010 7:15 am

Post by Orsi »

I don't have my NES where I'm at now to test anything on, so I won't know for sure if my code is right or wrong. How much difference is there between writing something that works on an NES emulator and not an actual NES? Would it only be minor coding issues here and there, or something a lot more fatal in the structure of the coding itself?
Post Reply