Why I never had made a NES game, really

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

Moderator: Moderators

User avatar
Sumez
Posts: 919
Joined: Thu Sep 15, 2016 6:29 am
Location: Denmark (PAL)

Re: Why I never had made a NES game, really

Post by Sumez »

I started out with the wiki... I was never able to follow tutorials. I read almost everything there is to know about the PPU before I even started learning 6502 assembly language. In fact, I was just curious about the exact technicalities of the NES graphics hardware, and that's what got me into all of this stuff in the first place.

There are a lot of stupid basics you need to work out just to make something work. Even linking your compiled output into a working iNES ROM file feels like a stupid step when you just need to see results. However, it's necessary.

For me, the best approach was (after learning 6502 and perusing the PPU documentation on the Wiki) to just download's Tepples' "HELLO WORLD" template for CA65, and I just started modifying that in ways I figured would make sense. Of course that involved a ton of trial and error, but eventually I ended up with a platform engine scrolling in four different directions.

Honestly, everything in NES development can be summarized as "baby steps". Just take it one tiny step at a time. Moving am 8x8 sprite around with no backgounds or scrolling is a huge advancement the first time you do it.


This page is probably your most important reference by the way:

https://wiki.nesdev.com/w/index.php/CPU_memory_map

Everything you do in your 6502 code is moving numbers around as you mentioned. And the most important stuff is that reading from an address anywhere between $8000 to $FFFF in a standard NROM cart will let you read your program data. Reading or writing anywhere from $0000 to $07FF lets you read and store data dynamically in the NES RAM (do try to stay out of the $0100-$01FF range at first though, as it's used for the stack)
And finally addresses between $2000 and $2007 let's you communicate with the PPU, which is of course the primary method for communicating anything to the player. Don't worry about sounds for now.
slobu
Posts: 276
Joined: Tue Jul 12, 2011 10:58 am

Re: Why I never had made a NES game, really

Post by slobu »

Why doesn't the original poster look into a C compiler and a graphics library?

Zooming Secretary has source code. That's at least someplace to start.
https://shiru.untergrund.net/software.shtml
cppchriscpp
Posts: 102
Joined: Fri Dec 27, 2013 4:28 pm

Re: Why I never had made a NES game, really

Post by cppchriscpp »

I'll jump in with one of your points that hasn't been touched on yet - there actually is a sound engine that supports all famitracker features, and that's the one that famitracker itself comes with! Be warned that you do sacrifice some performance to get all of those features, but so far it has worked out alright for me.

If starting with C (which also sacrifices some performance) would help, I can point you at two options:

Shiru has neslib, which abstracts some of the details away from you. It can definitely help you get started. He even made a special version that uses the famitracker driver, so you can get the music you want. http://shiru.untergrund.net/code.shtml (You probably want neslib + famitracker player). As the poster above mentioned, he also has a couple games with source code available, which may also help.

The second option is admittedly shameless self-promotion; I've been working on a small zelda-esque game engine + guide building off of Shiru's engine (also uses the full famitracker driver) - http://forums.nesdev.com/viewtopic.php?f=2&t=17295 / https://nes-starter-kit.nes.science

The guide isn't finished yet, but it's an active project and it's at a point where it's probably safe to get started from. I try to abstract some of those details away with the engine, and explain what's necessary in the guide/comments.

I hope you're not discouraged by some of the less-than-kind-spirited responses here; the NES is quite fun to develop for once you get your head around it. Good luck!
Last edited by cppchriscpp on Fri Jan 26, 2024 10:11 pm, edited 1 time in total.
User avatar
OmegaMax
Posts: 80
Joined: Wed Sep 21, 2016 8:55 am
Location: Calgary.Alberta,Canada

Re: Why I never had made a NES game, really

Post by OmegaMax »

I don't think telling someone they need to start by learning to crawl/walk before running in a marathon is mean spirited,honesty is sometimes difficult for someone to hear.
Post Reply