Where do I start?

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
Gerfuggery
Posts: 1
Joined: Tue Nov 14, 2006 5:26 pm

Where do I start?

Post by Gerfuggery »

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
Celius
Posts: 2159
Joined: Sun Jun 05, 2005 2:04 pm
Location: Minneapolis, Minnesota, United States
Contact:

Post by Celius »

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?
User avatar
cooper
Posts: 9
Joined: Wed Oct 11, 2006 2:29 pm
Location: Paris

Post by cooper »

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 :)
WedNESday
Posts: 1231
Joined: Thu Sep 15, 2005 9:23 am
Location: Berlin, Germany
Contact:

Post by WedNESday »

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?
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

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.
albailey
Posts: 177
Joined: Thu Jul 13, 2006 3:15 pm

Post by albailey »

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.
Bananmos
Posts: 551
Joined: Wed Mar 09, 2005 9:08 am
Contact:

Post by Bananmos »

* Don't use an emulator for evaluating ANY hardware functionality, and test your code regularly on the real deal.
User avatar
Quietust
Posts: 1786
Joined: Sun Sep 19, 2004 10:59 pm
Contact:

Post by Quietust »

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...
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

If you aren't doing really tricky timing stuff, you can usually rely on Nintendulator.
User avatar
commodorejohn
Posts: 193
Joined: Mon Sep 11, 2006 6:48 pm
Location: Moose Lake, Minnesota

Post by commodorejohn »

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.
[size=0]"There is only one basic human right, the right to do as you damn well please. And with it comes the only basic human duty, the duty to take the consequences."
- P.J. O'Rourke[/size]
Post Reply