This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

Unix toolset for NES development

Unix toolset for NES development
by on (#85769)
Hi there. I'm sorry if I'm posting something that's already answered in a FAQ, but I couldn't easily find it.

Basically I'm really interested in learning some assembly, and in NES games, so I thought maybe I could try getting into NES development. :) I once made a simple "hello world" NES rom that loaded a palette and displayed a sprite, but that was long ago and I don't remember exactly what tools I used. It was on Windows anyway, and I've since moved to Mac OS X.

I was wondering if you could give me some suggestions for programs/utilities that I need to get to get started, like what's the "standard" assembler used? What other tools would I need? As long as it can be compiled on Unix it's fine. Also, is there a good starter tutorial for someone who knows how to program but is new to assembly?

Thanks :) It just seems there's so much stuff out there, I thought it might be good to ask.

by on (#85771)
Assembler - CA65 (part of CC65 C compiler)
Tutorial for a starter

I don't use Unix, but as far as I know, things aren't good about NES development there regarding tools for graphics and sound, so you probably would need something like Wine to run Windows tools.

by on (#85772)
I run Ubuntun 11.04 classic sometimes and the NES development part is one of the only things keeping me from using Ubuntu normally because the tools for it are a baron wasteland, while Windows has all the compilers and tools you could want.

by on (#85774)
Isn't ASM6 easy to compile?

by on (#85780)
I don't see what tools are missing on Linux, given that I do most of my NESdev on an Ubuntu laptop. It's not that hard to build and install cc65 on Ubuntu or anything else that smells like Debian:
  1. sudo apt-get install build-essential python-imaging-tk mednafen
  2. Download cc65 and follow the UNIX compilation instructions
  3. Download my NROM project template

But on Mac OS X, it appears the hardest part is downloading Xcode, especially if your home Internet connection is slow (e.g. dial-up) or capped (e.g. satellite or cellular).

by on (#85783)
There's some way you can these on unix/linux without wine:

Music:
You can write your own code, and use a MIDI Keyboard.

Graphics:
1: Create your own version, for originality, or use Tepple's programs

2: a non-.Net version of YYCHR .99 is availible with nametable support, and it it availible with source, but there are stuff to do for it to be complete:

-Translate or examine code to english, to use for comments
-Convert Code from Windows API to a unix/linux API

NES Nametables:
Have a look at 8NAME, Tepple's code is best when developing in these enviroments.

Code:
ASM6/CC65/ACME is self explanitory

Map Editor: Make it your own format via 6502 code, then a C/C++ Generator can be done.

And much others..

by on (#85784)
Regarding music, there is hope for thefox's Pornotracker, which is portable and could be ported to Unix. It also has replaying library, so it would be a complete sound solution.

by on (#85786)
Thanks for your comments, I can't wait to get started. :) I'll definitely give CC65 a try (it's even in Fink, the OSX version of the apt package system). Tepples' starting project looks like exactly what I need: the minimal boilerplate code to start trying things with.

by on (#85790)
Someone should bust out with either Puppy Linux or Salix and set up their NES dev environment and tools. Rebuild the CD and then share the ISO.

It kind of seems like recompiling and gathering all the tools each and every time is redundant. An NES Dev Live CD would be a good starting point.

by on (#85791)
Quote:
An NES Dev Live CD would be a good starting point.

I admit it sound pretty cool, though I'm afraid it would be very hard to make.

by on (#85815)
Bregalad wrote:
Quote:
An NES Dev Live CD would be a good starting point.

I admit it sound pretty cool, though I'm afraid it would be very hard to make.


Salix is based on Slackware. If you're familiar with their packaging system it should be no problem. The CD rebuild tool is Windows User simple. I should know :p Alas, I know not the fine art of NES homebrew development.

by on (#86866)
I use CA65 on OSX and, internet speeds aside (ahem), it's pretty straightforward to build using GCC (as part of Xcode).

I do have to run Parallels Desktop (though I'm sure the alternatives like Wine do just as good a job) for the graphics side of things so that I can use Shiru's excellent NESst.

by on (#88900)
Until now I had relied on PNG to CHR conversion because all my NESdev activity on Linux had involved creating original programs. But today while working on a multicart builder, I wanted to try improving CHR compression by blanking out unused tiles. So I ended up having a need for a program to view an existing ROM's CHR data.

First I tried YY-CHR on Mono. After installing System.Windows.Forms 2.0, I got it to crash with a null pointer dereference:
Code:
pino@pino-laptop:~/Desktop/yy$ sudo apt-get install libmono-winforms2.0-cil
# [snipped]
pino@pino-laptop:~/Desktop/yy$ chmod +x ./YYCHR.exe
pino@pino-laptop:~/Desktop/yy$ ./YYCHR.exe

Unhandled Exception: System.ArgumentException: A null reference or invalid value was found [GDI+ status: InvalidParameter]
  at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000] in <filename unknown>:0
  at System.Drawing.Bitmap..ctor (System.String filename, Boolean useIcm) [0x00000] in <filename unknown>:0
  at System.Drawing.Bitmap..ctor (System.String filename) [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap:.ctor (string)
  at YYCHR.MainForm..ctor () [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) YYCHR.MainForm:.ctor ()
  at YYCHR.Program.Main () [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentException: A null reference or invalid value was found [GDI+ status: InvalidParameter]
  at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000] in <filename unknown>:0
  at System.Drawing.Bitmap..ctor (System.String filename, Boolean useIcm) [0x00000] in <filename unknown>:0
  at System.Drawing.Bitmap..ctor (System.String filename) [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap:.ctor (string)
  at YYCHR.MainForm..ctor () [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) YYCHR.MainForm:.ctor ()
  at YYCHR.Program.Main () [0x00000] in <filename unknown>:0

NESst worked out of the box in Wine, but it took me a while to figure out how to load CHR data from an existing ROM, and I still don't know how to write back CHR data without writing my own reinserter (which should be trivial with dd though).

by on (#88901)
There is no 'insert into ROM' function in the NESst, because I only edit separate files and no one asked for it. If you need it, it could be added.

by on (#89054)
I'm on Linux and I use ca65 for assembly, mendafen (lately) for emu, and a demented combination of dd, make, and python for everything else.

The only real hole on un*x (that I see) is on the graphics side of things. I can't help you there, because I just hacked another mode into my already existing homebrew graphics converter program.

by on (#89094)
I independently wrote a program pgm2chr since I ♥ netpbm, but that's not useful to tepples because he already has a png2chr.

For me, fluency with makefiles has made a lot of the dev work easier.