How I Programmed My Own NES Game

18,692
0
Published 2021-12-15
I created a new game for the Nintendo Entertainment System (NES) from scratch written entirely in 6502 assembly and go over the process of how I made this happen. The CPU, PPU, and Game Cartridge all play their unique role in an NES game. The .NES file is a virtual game cartridge which contains both the game code and CHAR ROM, able to run on any NES emulator.
Foreground and background sprites are explained as well as the color and sprite limits of the PPU. Sprite attributes, including the palette number, background priority, and orientation are also explained. Artwork was designed using YYCHR.

Why do sprites on the NES flicker? Because only 8 horizontal sprites are able to be displayed by the PPU. To get around this limitation the order of sprites rendered is shifted around, resulting in some sprites being displayed only half the time, creating the iconic flicker.

Controller input is handled by checking one of 8 bits in a single byte per controller.

For the Birds VI: www.romhacking.net/homebrew/152/

Mystery Gift Program remains unclaimed

NES programming resources:
wiki.nesdev.org/w/index.php
   • Episode 1 - Getting Started with NES ...  

NES by fauzan akbar,
NES Cartridge by iconfield,
Processor by Flatart,
Nes Controller by Billy Sweetman from NounProject.com

All Comments (21)
  • @brizobst
    Congrats on the release! I've only just started getting into NES homebrew myself, and I completely agree that it's difficult but really fun. I'll give your normal mode challenge a go :)
  • I always wondered why things would flicker I never payed much attention to it I thought it wad just cause it's an old game good explanation
  • @mr_indie_fan
    You should try to make a nes game in nesmaker! (an engine built for the limitations of the nes that allows you to build an nes game and even put it on a cartridge)
  • @jademarker4688
    This might be a bit late, since the video is 2 years old. But! Since the missiles,etc were only scrolling horizontally and the background tiles were only at the edge of the screen, it might work better if the missiles are on the background layer. That way, you can scroll the background as needed for them moving. So your sprites would now be just the bird and the edges of the screen, which would massively decrease the number of sprites used
  • @LeWolfYT
    cool game idea! something seems a bit non-donuty about that donut though…
  • @maxalmonte14
    I'll never get why studios thought American kids were stupid 🤦‍♂ Good job on the game bro 👌
  • I loved nes games I'm very interested in learning more and about how games are made starting with nes it probably better. Just like they made mega man 9 some years ago making it look like an old game. I guess u can always make new games using those old graphics. How about the game I wanna be the guy someone told me about that few years ago and howhard it is. Wasn't that a self made game ?
  • Just seeing how that works, and hearing about those limitations, I can't wrap my mind around how a company like sunsoft could make some of their best looking and sounding games using those kinds of restrictions and that kind of memory. It just doesn't seem remotely possible.
  • @Destros99
    I mean, literally a JELLY FILLED DONUT???
  • Where can I play the first 3? I can't find them. When I search the titles, Google gives me DIFFERENT results.
  • Is it done on a computer first writing the code? I'm reading the coding for dummies now should I read about programming next
  • Fceux, yy-chr, and most others don't work on my MacOSX, it tells me that they are outdated and not for my system. Any ideas for what I could Do?
  • @amazeyourself_
    Here are some game genie codes for this game (if you have more, feel free to reply and I'll add them!): SXGATT - Infinite Lives (will not work in boss battle) [by me]