Developing on a Mac

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
User avatar
noattack
Posts: 147
Joined: Tue Feb 13, 2007 9:02 pm
Location: Richmond, VA
Contact:

Developing on a Mac

Post by noattack » Thu Jun 02, 2011 7:46 pm

I got started with nesdev a few years ago and made some progress with a few simple programs, but eventually stopped coding. Since then, I read threads here almost daily. The current excitement around new games, utilities and members has given me an itch to start over again.

Previously I had access to Windows, but I don't now. Is anyone here developing exclusively on a Mac? If so, could you point me toward the tools you use?

I previously used asm6 and I thought it was pretty intuitive. I'd really like to try out Nesicide (this has asm6 baked in, right?), but I can't find any kind of tutorial for getting a simple project started. For a beginner, it's a little daunting.

User avatar
cpow
NESICIDE developer
Posts: 1099
Joined: Mon Oct 13, 2008 7:55 pm
Location: Minneapolis, MN
Contact:

Re: Developing on a Mac

Post by cpow » Thu Jun 02, 2011 9:17 pm

noattack wrote:I previously used asm6 and I thought it was pretty intuitive. I'd really like to try out Nesicide (this has asm6 baked in, right?), but I can't find any kind of tutorial for getting a simple project started. For a beginner, it's a little daunting.
Yep, I'm the first to admit a tutorial would be niiiiice!

It used to have an ASM6-like assembler baked in, yes. That has since been replaced with external usage of CA65/LD65. As far as project templates to get started, I've been using tepples' Russian Roulette demo (NROM) to do most of my development testing of Nesicide. Currently I don't have support for external tools other than CA65/LD65 though so if you have your own baked tools for generating assembly or CHR-ROM data or whatever, those aren't yet callable from Nesicide. Eventually it'll be at the "export makefile, call make" state, but for right now it just uses Qt QProcess calls to execute CA65/LD65 to get the job done.

I *just* put a new Windows MSI on the website. I realize you want OSX...hyarion is the guy who does that for me. I'll see if I can rouse him...he's usually pretty responsive on FreeNode (#nesicide). 8)

With regard to tutorials though, seriously, get Russian Roulette. From there you really just need to:

0. Download and install the latest snapshot release (2.13.9 is required for debugger integration) of CC65.
1. Open Nesicide,
2. Create a new project type in a name and give it the path to where you extracted the Russian Roulette ZIP.
3. Add "nes.ini" as the Linker Config file in Project Properties, Linker tab.
4. Navigate in the project browser pane to "Project->Source Code". Click and select "Add an existing file". Select "src/main.s". Repeat for "src/pads.s" and "src/random.s".
5. Navigate in the project browser pane to "Project->Binary Files". Click and select "Add an existing file". Select "roulette.chr".
6. Navigate in the project browser pane to "Project->Graphics Banks". Click and select "Add bank". Give it a name. Navigate to it in the project browser pane and double click to open it. Where it says "<click to add or edit>", click, and type "roulette.chr". It should recognize the name and show you the graphics you just added.
7. In the toolbar hit the icon that looks like a single gear. This should cleanly and successfully build the project. Then hit the icon that looks like a blue memory card. This should load your creation into the emulator. Then hit the icon that looks like a green "play" button...and you should see the Russian Roulette text in the emulator.

If I get time maybe I'll put together a video of me doing the above steps.
:)

User avatar
Banshaku
Posts: 2396
Joined: Tue Jun 24, 2008 8:38 pm
Location: Japan
Contact:

Post by Banshaku » Fri Jun 03, 2011 4:56 am

I was not aware that you switched to ca65/ld65. I will see if I can give it a spin once I can find some time.

User avatar
cpow
NESICIDE developer
Posts: 1099
Joined: Mon Oct 13, 2008 7:55 pm
Location: Minneapolis, MN
Contact:

Post by cpow » Fri Jun 03, 2011 5:12 am

Banshaku wrote:I was not aware that you switched to ca65/ld65. I will see if I can give it a spin once I can find some time.
Yeah I suppose I really should post here about what I'm up to. It just always seems that I'm one feature or fix away from having something worth posting about. :roll:

Yes, I switched to the CC65 toolchain; Nesicide will find it if it's in your PATH. I also switched internally to the Scintilla editor (QScintilla port to Qt) and have finally integrated back most of the source-stepping, symbol tool-tip, breakpointing, and compile error tagging integration with the Scintilla editor and the rest of the UI [love those margins!]. I still have yet to figure out how to add items to the QScintilla context menu so I can add back more of the features I had with the previous Qt text editor.

It's even working to the point that if you've built a .nes outside of Nesicide and it has a .dbg file built along with it, you can just load the .nes into Nesicide and it'll do source-level debugging, symbol watching, etc [it assumes the debug info file is <rom-name>.dbg. (What I mean is you don't need to create a .nesproject with all your source in it if you just want to use Nesicide as a debugger). If you create a project you can change what the debug info file and other files are named.

I'm always looking for constructive (or destructive) feedback to improve the thing...

Tom
Posts: 67
Joined: Wed Apr 06, 2005 5:36 am
Location: Massachusetts

Re: Developing on a Mac

Post by Tom » Fri Jun 03, 2011 6:23 am

noattack wrote:Is anyone here developing exclusively on a Mac? If so, could you point me toward the tools you use?
I don't work exclusively on Mac, but probably the majority of my time is spent there. I use p65 for an assembler and Tile Molester for chr editor, both of which I also use on Windows. If you use Tile Molester make sure you find the latest version (v0.16), a lot places have the previous version which didn't work on Macs for some reason. I also managed to get FamiTracker running under Wine, although I don't use it often.

User avatar
noattack
Posts: 147
Joined: Tue Feb 13, 2007 9:02 pm
Location: Richmond, VA
Contact:

Post by noattack » Fri Jun 03, 2011 2:26 pm

Thanks, I didn't know Tile Molester had a Mac version.

And thanks cpow, I really appreciate your step-by-step. I'll see if I can get that up and running.

Any other suggestions?

djcouchycouch
Posts: 97
Joined: Sat May 28, 2011 10:30 am

Post by djcouchycouch » Fri Jun 03, 2011 6:18 pm

I've just started out developing so I don't have a full tool chain setup, but I am on a Mac and I'm using nesasm and nestopia. I'll be trying to stick to Mac since it's all I have at home :)

djcouchycouch
Posts: 97
Joined: Sat May 28, 2011 10:30 am

Post by djcouchycouch » Fri Jun 03, 2011 6:55 pm

Slightly off topic: which Mac NES emulators are good for debugging? Are they still being updated?

Nestopia doesn't have anything to help debugging with.

User avatar
cpow
NESICIDE developer
Posts: 1099
Joined: Mon Oct 13, 2008 7:55 pm
Location: Minneapolis, MN
Contact:

Post by cpow » Fri Jun 03, 2011 8:01 pm

shawnleblanc wrote:Slightly off topic: which Mac NES emulators are good for debugging? Are they still being updated?

Nestopia doesn't have anything to help debugging with.
The emulator in Nesicide should work good for debugging on Mac. I don't know though I don't have a Mac.

djcouchycouch
Posts: 97
Joined: Sat May 28, 2011 10:30 am

Post by djcouchycouch » Fri Jun 03, 2011 8:34 pm

I tried getting to the nesicide home page (http://www.nesicide.com/ ?) earlier but it's dead slow. My browser just keeps spinning, trying to download the page but nothing happens even if I let it alone for a while.

Tom
Posts: 67
Joined: Wed Apr 06, 2005 5:36 am
Location: Massachusetts

Post by Tom » Sat Jun 04, 2011 5:47 am

shawnleblanc wrote:Slightly off topic: which Mac NES emulators are good for debugging? Are they still being updated?
I haven't found any, and mostly use Nestopia. I think I tried getting FCEUX running under Wine once, but didn't have much success. I managed to get the linux version of FCEUX installed, but didn't realize it didn't have any of the features I was looking for. :(

mattmatteh
Posts: 345
Joined: Fri Jul 29, 2005 3:40 pm
Location: near chicago
Contact:

Post by mattmatteh » Sun Jun 05, 2011 6:24 pm

nesicide was building on osx using gentoo prefix, but i think there was a change in the pro file that broke the build. last test failed. i should have some free time opening up and can poke at it again. i would suggest trying out gentoo prefix if you are interested.

as for mac emulators... mine is still in the works, maybe someday it will be done.

matt

djcouchycouch
Posts: 97
Joined: Sat May 28, 2011 10:30 am

Post by djcouchycouch » Mon Jun 06, 2011 7:16 am

I discovered Macifom by chance this weekend. It has a basic code debugger that's helped me out a few times. Seems like it's in early development, though, as some controls don't seem to work.

I think the developer hangs around here. Or at least used to.

Post Reply