An Introduction to NES Programming: 8bitworkshop Online IDE

In a previous post I described how to set up the development environment for your PC to be able to use something like Visual Studio Code to create NES titles. There is also an alternative to this, an online IDE (Integrated Development Environment) called 8bitworkshop. Its something I recently discovered and works for a multitude of platforms.

For best results with this IDE make sure that you are using the latest version of your browser (Firefox, Chrome or Safari). This is a great option for anyone wanting to develop retro games on an Apple device – I’m not familar with the Apple products so most of my tutorials and posts are PC-centric.

8bitworkshop can be found here.

Once you have started the IDE, click on the Platforms menu, then choose Game Consoles then NES. you should see the following screen.

This IDE is packed with several example console programs. To the right of the menu icon, you can access a Project Selector drop-down menu which allows you to select a file to load.

You can edit these files as much as you want – all the changes are persisted in the browser local storage and they will still be there even when you close the browser tab and return. If you want to restore one of the files back to its original condition, select File-> Revert to Original from the menu.

Creating a New Project

To create a new project in the IDE, select New Project from the menu. Type in the name of your file, this is typically with a .c extension for C source files however you can write 6502 assembler by including the .dasm or .s extension.

Advantages of using this IDE

8bitworkshop comes with an inbuilt NES emulator – JSNES, this will automatically run your code on the simulated hardware. You can also use in built controller support with either a keyboard or with a controller.

The IDE runs using the cc65 compiler on the web browser, so you don’t have to run through the steps given in the previous tutorial to develop locally. Each time you make a change to the code, it is compiled in the browser automatically and the ROM image is sent to the emulator. This means you can just concentrate on the coding aspect.

The last tool is the debugger, this is an incredibly useful feature which will allow you to step through the machine code instructions, view memory and start and stop the program. These functions are controlled through the buttons at the top of the screen and are self-explanatory.

You can also publish and share your work through Github by choosing Sync -> Publish Project on GitHub. To do this you will have to sign into your Github repository first however.

Saving your files to your local storage is also easy, this can be done from the Download menu. Select Download ROM Image to download a binary ROM file of your project for use in your local emulator of choice.

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