---
This repository consists of some examples on programs for the NES. You can build
them by just calling `make`. Before doing that, though, you will need a compiler
for the 6052 platform. A good option is [cc65](https://github.com/cc65/cc65),
which is available on all major platforms. Otherwise, if you want to use another
compiler, you can pass the `CC65` and `CCOPTS` variables to the Makefile. Either
way, the resulting ROMs will be placed in the `out` directory.
After that, it's recommended that you run the ROMs with an emulator with
debugging support or at least some form of memory visualization. This is because
some examples have nothing to show for other than updating some values on the
NES memory. A safe bet is to go with either
[fceux](https://fceux.com/web/home.html) or
[Mesen](https://github.com/SourMesen/Mesen2/), which provide tools like RAM
watchers or a full debugger.
The examples are distributed like this:
- `basics`: simple examples which cover basic stuff for NES development. These
examples are self-contained and supposed to be read by absolute newcomers. The
description for each example is covered by an initial comment on each file.
- `space`: example in which you can move a spaceship with subpixel movement and
shoot bullets.
- `scroll`: different scrolling tactics. Read the
[scroll/README.md](./scroll/README.md) file for more info.
Other than that, I have also written complete games. Take a look at
[jetpac.nes](https://github.com/mssola/jetpac.nes), which is simple enough so a
newcomer can read it, but complex enough so it's an actual game.
## License
Released under the [GPLv3+](http://www.gnu.org/licenses/gpl-3.0.txt), Copyright
(C) 2023-Ω Miquel Sabaté Solà.
I have taken lots of ideas from different developers and open source projects.
Most notably, I have taken lots of notes from the [Famicom Party
Book](https://famicom.party/book/),
[NESHacker](https://www.youtube.com/c/neshacker) and, of course, from the
awesome [NES Dev wiki](https://www.nesdev.org/wiki/Nesdev_Wiki).