I dont know anything about 6502 Nes programming.
1. Where do I start? What compiler and tutorials are recommended?
2. Why learn it? Its an outdated thing right? ( Other then NES is awsome =D )
Thanks,
Gerfuggery
You should find some links to 6502 documents on the main page. That is the programming language of the NES, if you do not know. How exactly to make the 6502 tell the NES to do things, there are a few document on that. NESTech, by y0shi, is really technical, but it's pretty much the reference that everyone looks at when they need to know about an aspect of the NES. I hear that NES101 is a good one (Though I have never read it), and that's a tutorial, unlike NESTech. If you come across GBAguy's tutorials, they aren't accurate at all, but they get you at least inch off the ground.
Oh, and I prefer to use WLA-DX, though most people here use CC65, for an assembler.
As to why you should program the NES, why were you wondering how to, if you didn't know why you should?
The first step will be getting comfortable with the 6502 instruction set. A great tool for this is the 6502 simulator
http://home.pacbell.net/michal_k/6502.html
Here is a link on nesdev for a great overview of the instructions, and what they do
http://nesdev.com/6502guid.txt
There are some great 6502 tutorials for the C64, which might be a bit easier to learn some basic assembly before diving into the NES. Chapter 5 of the c64 programming manual is a good start
http://project64.c64.org/hw/c64prg10.zip
After you feel you are comfortable with 6502, and can write a few basic routines to do multiplication, counters, etc. then start going over some of the NES technical docs, and the NES 101 tutorial. Come up with some simple projects for yourself like displaying a string of characters on the screen.
NES development is going to require a lot of time and dedication. It isn't like gba development where you can have some sprites moving around, with input and sound working after spending 3 or 4 hours on a tutorial. I started about 1 month ago, and I don't even have backgrounds or sprites working yet
http://www.obelisk.demon.co.uk/6502/reference.html
You should learn 6502 assembler in order to emulate a NES. I don't know much about your background, but are you sure that you want to write a NES emulator?
WedNESday wrote:
are you sure that you want to write a NES emulator?
But he never said he wanted to emulate anything... It's more like he wants to make NES programs.
I like the info posted by Cooper.
As a newbie myself, it might also be helpful to let you know what NOT to do.
You probably dont want to use nesbasic as a programming language. For that matter, you probably dont want C (as in cc65. You will want its assembler though). 6502 assembly language is what you want, and as someone indicated earlier the type of asembler is your choice (ca65 is my personal choice). You probably dont want to use nesasm. A lot of pople have posted reasons they dont like it.
Dont use the tutorial written by GBAGuy. A number of people have posted mistakes in it.
Dont use an in-accurate emulator.
* Don't use an emulator for evaluating ANY hardware functionality, and test your code regularly on the real deal.
Bananmos wrote:
* Don't use an emulator for evaluating ANY hardware functionality, and test your code regularly on the real deal.
Where "regularly" may be limited severely by access to an NES and devcart, of course...
If you aren't doing really tricky timing stuff, you can usually rely on Nintendulator.
Cooper's right; I think the C=64 Programmer's Reference Guide has the best freely available 6502 introduction out there. And yeah, you pretty much do have to test your code on real hardware to find out if it works (which is why I'm in the middle of trying to build an FDSLoadr cable...an approach that I'd recommend if you don't want to try and build a devcart.) As for NES-specific learning, the way I learned what I know, though probably not the best way for a lot of people, was just to pore over Yoshi's nestech doc, Firebug's mapper information, and Brad Taylor's sound reference until I understood it.