Is there a tutorial or course to learn programming in 6502 for beginners?

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
arcangeldemerida
Posts: 21
Joined: Wed Jun 22, 2022 7:00 am

Is there a tutorial or course to learn programming in 6502 for beginners?

Post by arcangeldemerida »

I am looking for a course or tutorial to learn how to program in 6502 assembler.
Is there one that works for beginners?
Garth
Posts: 246
Joined: Wed Nov 30, 2016 4:45 pm
Location: Southern California
Contact:

Re: Is there a tutorial or course to learn programming in 6502 for beginners?

Post by Garth »

This page has a lot of good links to resources to start learning 6502 assembly language.
http://WilsonMinesCo.com/ lots of 6502 resources
arcangeldemerida
Posts: 21
Joined: Wed Jun 22, 2022 7:00 am

Re: Is there a tutorial or course to learn programming in 6502 for beginners?

Post by arcangeldemerida »

Garth wrote: Wed Jun 22, 2022 9:34 am This page has a lot of good links to resources to start learning 6502 assembly language.
Ok, so I've also heard about the Nerdy Nights NES game programming tutorial series.

I don't know if they work too. What's your opinion about it?
unregistered
Posts: 1318
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: Is there a tutorial or course to learn programming in 6502 for beginners?

Post by unregistered »

Hi, um… personally, I took an assembly course at UT in Austin, but a college CS class is not easily accessible.

A simple, pretty much, assembler to use for a NES game is asm6. It is run from Windows’ Command Prompt. It’s written excellently and its README.txt file is somewhat easy to understand. ‘somewhat’ bc it takes a while to learn exactly what all of the asm6 assembler directives do.

I also recommend you make a .bat file to run from the Command Prompt instead of typing out a certain line of text each time you want to assemble your game. You can read the beginning of my lengthy thread, here in this forum, to read what excellent people taught me as I began. :)

I have used asm6 and a printout of MOS Technologies’ 6502 Programming Manual’s Appendixes. MOS Technology created the 6502 chip; their Appendixes are easy for me to glance at to view instructions, an instruction’s byte/cycle use (a cycle is like a tick of a clock; an adc #03 takes 2 bytes of space and 2 cycles to complete; an adc absolute takes 3 bytes of space and 4 cycles to complete), and all the different addressing modes of each instruction (just listed adc’s immediate and then absolute mode).

The different addressing modes of each instruction are crucial to understand and it is important to use them appropriately. There are websites which include all of this information too… it’s just nice for me to be able to glance at a stapled batch of papers.

If you do print out the MOS Technology 6502 Programming Manual’s Appendixes, you’ll benefit by being able to write whatever you want on the pages. :)


The Nerdy Nights Tutorials seem to use a NESASM assembler. Though, asm6 also seems to be tons better after reading through NESASM threads as years have gone by.


EDIT: Sry, that document is called MOS Technology Programming Manual.

HTML format of its Appendices

PDF format of the entire manual
^just scroll down to the Appendices
Last edited by unregistered on Mon Jun 27, 2022 2:20 pm, edited 2 times in total.
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Is there a tutorial or course to learn programming in 6502 for beginners?

Post by Pokun »

I learned 6502 from Nerdy Nights so I can vouch for it. The original tutorial is long gone but it has been preserved in several places, here is one of them, it even preserves some of the forum posts which also has some good information (the tutorial was originally posted on the Nintendo Age forums which is now gone).
There should be some other tutorials as well nowadays, but I don't know how good they are or where to find them. Nerdy Nights does teach a few "bad" things (inherited from the older GBAGuy's tutorial) but it's still a very good tutorial.

Nerdy Nights uses nesasm as the assembler, and I think it's perfectly fine for beginners and advanced users alike, although I personally prefer to use asm6 (I still use nesasm for PC-Engine, it's called "pceas" but it's really the same assembler). Some people have made asm6 versions of the Nerdy Nights lessons and posted them somewhere here on the Nesdev forums. There are also ca65 versions somewhere around here. Ca65 is more powerful than the other two assemblers, but I think it's a bit unnecessarily complicated to set up for a beginner, so I would start with nesasm or asm6 if I were you and choose to try another assembler at a later date when you are more comfortable in 6502.

64tass is another assembler worth mentioning. It's a bit more complicated to set up than asm6 and nesasm, but not any more complicated than ca65, and it's probably about as powerful as ca65. 64tass was created for the Commodore community, but it can be used as a generic 6502 assembler. Like ca65 it also supports 65816 (the CPU in SNES) and is better at it than ca65 is, I use for SNES development myself.
User avatar
qbradq
Posts: 972
Joined: Wed Oct 15, 2008 11:50 am

Re: Is there a tutorial or course to learn programming in 6502 for beginners?

Post by qbradq »

I started on Nerdy Nights as well. I'd say it's a good place to start.
Post Reply