Skip to content

Create your own games for the Nintendo Entertainment System! This "starter" game is easily extensible for your own projects. Includes references.

License

Notifications You must be signed in to change notification settings

gregkrsak/first_nes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

first_nes project - Your first NES game!

Assembly language Makefile CI

Create your own games for the Nintendo Entertainment System with this "starter" project!

If you'd like to contribute, click here so we can synchronize our expectations!

Boilerplate code is provided! Instantly get up and playing!
Image: Editing Image: Running

Quick Start

Linux:

First, assuming you have Git installed, get the cc65 binutils:

git clone https://github.com/cc65/cc65.git
cd cc65
make
sudo make avail

Next, if you don't already have an NES emulator, install Nestopia using your package manager. Instructions on how to do that aren't covered here, but the following distros should be supported:

  • Arch Linux
  • Debian
  • OpenBSD
  • Rosa Desktop Fresh
  • Slackware (Slackbuilds)
  • Ubuntu
  • Void Linux

Now grab the first_nes project:

git clone https://github.com/gregkrsak/first_nes
cd first_nes
make

Finally, start Nestopia and load the generated first_nes.nes file. You can move the Luigi-like character back and forth with the A and B controller buttons, which may be mapped to the . and , keys initially.

Mac OS:

First, get the cc65 binutils by following these instructions (alternatively, if you have brew installed, type brew install cc65).

Next, if you don't already have an NES emulator, install the Nestopia .app on your system.

Now, assuming you have Git installed, and the ability to make, grab the first_nes project using the Terminal:

git clone https://github.com/gregkrsak/first_nes
cd first_nes
make

Finally, start Nestopia and load the generated first_nes.nes file. You can move the Luigi-like character back and forth with the A and B controller buttons, which may be mapped to the . and , keys initially.

Windows:

First, make sure you have Git and Git Bash. If you don't, click this link to download the latest .EXE installer; make sure you install the Git Bash terminal.

After Git is installed, open Git Bash and type:

git clone https://github.com/gregkrsak/first_nes.git

Next download the cc65 binutils. Click this link to download the .ZIP file.

Create a folder named "cc65" and extract the .ZIP file into it.

A "bin" subfolder will be created; add it to your system path.

Next, if you don't already have an NES emulator, click this link to download the .ZIP archive of Nestopia.

To make sure Nestopia installs correctly, create a "nestopia" folder and extract the .ZIP file to it; make sure you add this "nestopia" folder to your system path.

Nestopia needs the Microsoft Direct X End User Runtime, which you can install using this link.

Now, install the Make utility using this link.

Following the installation of Make, add its "bin" subfolder to your system path.

Navigate to the "first_nes" folder using Git Bash and type make.

Finally, start Nestopia and load the generated first_nes.nes file. You can move the Luigi-like character back and forth with the A and B controller buttons, which may be mapped to the . and , keys initially.

Credits

Authors:

  • Written by Greg M. Krsak (email), 2018

Standing on the shoulders of giants:

Additional thanks to:

  • @elennick for testing the Mac OS quick start instructions (Issue #22).

  • @hxlnt for expanding the credits (PR #33).

  • Reddit user u/Rocky99433 for prompting me to fix the Windows quick start instructions (Issue #21).

  • @ericandrewlewis for correcting some bad comments (PR #53).

  • @nortti for correcting my iNES header (PR #55).

About my Development Environment

Tested with:

make
nestopia first_nes.nes
  • Editor: Sublime Text 3, 2-space tabs, tabs-to-spaces, 100-column ruler

  • Target CPU: 8-bit, Ricoh RP2A03 (6502), 1.789773 MHz (NTSC)

  • Assembler: ca65 (cc65 binutils)

Tested on:

  • Linux with Nestopia UE 1.47

  • Windows with Nestopia UE 1.48

Additional Resources

Git and GitHub:

NES programming in general:

The ca65 assembler:

Building this project:

first_nes was written by Greg M. Krsak, 2018. You may send me email using this address. If you'd like to contribute, click here so we can synchronize our expectations!