I have loked through this site and I must say there are some great people here, so I thank you in advance and I apologize for a dumb question. I want to learn to program the NES. I want to learn and program in 6502 Assembly. I know this is not easy and is not a quick process. Its just ] something I would like to learn I thought about the Nerdy Nights tutorials, unless someone knows of a moe beginner type tutorial. My question is, what are the basic tools I will need to stat? I would just like a basic list to download and start.

I want to thank you all for your help. I look forward to many nights lerning from this great site and you great people.

Suggested programming exercises:Write `memset` and `memcpy`.Write something that will clear a whole nametable to zeroes.Write something that will display a string of text at a specific location in the nametable.

i found using NESICIDE worked best for me. it has a 'hello world' program by tepples that'll give you a basic template to build off of.

in fact, my game (project blue) began it's life as the NROM hello world demo... literally none of the code from that remains, but it got me started with a program that was easy to modify and experiment with. plus there's a built-in emulator and several other helpful tools.

The NES is not a good machine to learn 6502 on, its not interactive, it doesn't have any helper functions, you will need to spend ages learning the hardware and how it works before you can print hello world. You would be better off learning at least the basics of 6502 on something more sane like a C64 and then once you understand how loops, indirect indexing, memory works etc coming back to the NES.

http://www.bombjack.org/commodore/books.htm see the MACHINE LANGUAGE and ASSEMBLY LANGUAGE section to which the "Machine Language on the Commodore 64, 128 and other Commodore Computers Revised and Expanded Edition" by Jim Butterfield is the book to learn 6502 from however I also find the "Commodore 64 Assembly Language" by Bruce Smith to also be quite good.

The NES is not a good machine to learn 6502 on, its not interactive, it doesn't have any helper functions, you will need to spend ages learning the hardware and how it works before you can print hello world. You would be better off learning at least the basics of 6502 on something more sane like a C64 and then once you understand how loops, indirect indexing, memory works etc coming back to the NES.

I too would like to jump in and disagree with the Commodore 64 suggestion, unless you actually have any interest in coding C64 games. Learning 6502 in the context of another machine won't help you much with becoming an NES developer, because you'll soon have to "unlearn" part of the stuff you learned, and being a beginner, it can be hard to tell apart what's pure 6502 and what's the machine's architecture, which might make the process unnecessarily confusing.

I do agree that learning 6502 before touching any of the NES-specific stuff is a good strategy, though. But instead of using another period machine such as the C64, which has its own idiosyncrasies, I second the suggestion of trying easy6502, which adds only the bare minimum on top of a raw 6502 so you can add a little interactivity to your programs. Michal Kowalski's 6502 Simulator does something similar, and is the tool I used to learn 6502 assembly myself, way back when.

So yeah, my advice is to either start out with a simulator that will allow you to practice 6502 programming without having to learn about (and get confused by!) hardware architectures you're not interested in, or dive straight into NES programming, as a lot of people here have done. You will probably mix up the CPU and the hardware's architecture in your head anyway, specially with no prior experience with computer architecture and low-level programming, but at least whatever you learn is stuff you can use for your end goal, even if you don't understand it 100%.

Another bit of advice: looking at your first post, I see it's full of typos and other errors, suggesting that you wrote it in a hurry. If you're serious about programming NES games, you can't do things in a hurry. You have to be very meticulous about how you express your ideas, because when you're working so close to the hardware, there isn't much room for error.

So yeah, my advice is to either start out with a simulator that will allow you to practice 6502 programming without having to learn about (and get confused by!) hardware architectures you're not interested in, or dive straight into NES programming, as a lot of people here have done. You will probably mix up the CPU and the hardware's architecture in your head anyway, specially with no prior experience with computer architecture and low-level programming, but at least whatever you learn is stuff you can use for your end goal, even if you don't understand it 100%.

I agree with just diving it. It's harder, but it's a lot easier to learn when you have a real project with a real goal in front of you. The reward of seeing sprites move around on a NES screen keeps you motivated.

I'm still on my first year learning assembly on the 6502 and I agree with what's been said about just diving in. Following a tutorial step-by-step was what got me started. Just go over it again and again until you can grasp something of what the code does and start thinking of how you can change it to do what you want to. And start with small goals!

I set up the goal that on day one I would have something compiled, even if it was just a ready-made tutorial with no code of my own. When I'd done that I started playing around with changing variables, graphic tiles and dissecting the code to grasp how they were combined to make bigger sprites (metasprites).

So in short, just dive in! Oh, and use the debugger in fceux or an equivalent in another emulator.

Even here, you have to learn the memory-mapped i/o of the virtual machine to see your code do anything. So it simplifies - but doesn't eliminate - the issue of separating pure machine code from the functionality of the system. Still, I agree it's a better platform for asm beginners than a real-life 6502 device.

Even here, you have to learn the memory-mapped i/o of the virtual machine to see your code do anything.

I did acknowledge that these simulators add some bare bones "virtual hardware" on top of the 6502 so you can add interactivity to your programs. I personally didn't use any of that when learning ASM myself though, I merely used the debug tools to watch the CPU state and the memory. I didn't write anything interactive, I merely wrote subroutines that performed various tasks (array sorting, multiplication, etc.) and the auxiliary code needed to test them.

So in short, just dive in! Oh, and use the debugger in fceux or an equivalent in another emulator.

cybersmudge, welcome. :) Yes I dove right in, skipped C64, like many have said. Also try using Mesen as your emulator because it's debug features are beyond excellent. :) One other recommendation, that tokumaru suggested to me, is try using the asm6 assembler. It was written by loopy, a forum member, and in its readme he writes:

loopy in asm6's README.TXT wrote:

Yes, it's another 6502 assembler. I built it to do NES development, but you can probably use it for just about anything. Why use this instead of one of the other zillion assemblers out there? I don't know, but choice is good, right? :) I wrote it because I thought most others were either too finicky, had weird syntax, took too much work to set up, or too bug-ridden to be useful.

Who is online

Users browsing this forum: No registered users and 3 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum