How to Program an NES game in C

Sorry for this interruption…


To program a game for the 2018 nesdev competition. (ends Jan 2019) There are currently zero entries on the main thread page.

Every complete entry (probably) will be put on a real cartridge and played by hundreds of people. Every complete entry will recieve a copy of this multicart. Top entries will win cash prizes.

I want you to make a game this year. I want to play that game. You can do it! Really. If I can do it, you can do it, because I’m a complete idiot, and I’ve made 5 games.

…back to our regularly scheduled tutorial.

Thanks for visiting. Come back again, because I will make updates from time to time. All files updated, 02/09/2017. See Update link for details.

Vigilante Ninja 2 – my NES game is complete!


1. Getting Started

2. How cc65 works

3. Our first program

4. What’s a V-blank

5. A little color

6. Sprites

7. Input

8. Sprite Collisions

9. Drawing a full background

10. Background Collisions

11. Scrolling

12. Basic Platformer

13. Sprite 0 Trick / Debugging

14. Intro to Sound

15. Adding music

16. Adding Sound Effects

17. Planning a Game

18. Game Coding

19. Game Coding 2

20. Game Coding 3

21. Credits and Thanks

22. More

Contact, My Stuff

23. Using DMC Sounds

24. MMC3, Bank-switching, IRQs

25. Importing a MIDI to Famitracker

26. ASM Basics

27. ASM part 2

28. ASM part 3

29. ASM part 4

30. ASM part 5

Update (Oct 2016)

Update (Feb 2017)

I’ve decided to add some examples, using the neslib code.

My neslib Notes

Simple neslib Examples

NES Screen Tool BMP Import

Import Full Background as RLE

Update Aug 2017 / CFG files

Sprites, Again

Sprite Collision, and Controllers

Sprite BG Collision, Pong

Add Music with Famitracker

All Ways Scrolling (not finished)


A List of NES Hombrew Games

famitone3.2 / annotatecc65

Jammin Honey

PPU writes during rendering (asm6)



11 thoughts on “How to Program an NES game in C

    1. If you click on “Neslib Example Code” and download the link, there is a version that works with the newest cc65 (as of Nov 2017). It’s been slightly edited by me.

      Also, you can go to Mojon Twin’s website, and download the source code to one of their recent games, they always use a version of neslib…


    1. I’m going to allow it, but there is a high likelihood that I will make major changes to my website, which may not be in the Russian translation that I’m not involved with.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s