Getting Started(Updated:Jun. '10)

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

User avatar
Laserbeak43
Posts: 188
Joined: Fri Sep 21, 2007 4:31 pm
Contact:

Getting Started(Updated:Jun. '10)

Post by Laserbeak43 »

***Latest Update = Jun 17, 2010***
*New This Update:*
- Links to tutorials, thanks to CartCollector
- ASM6: By Loopy!!!
- Highlighter for conTEXT Editor
- A tutorial to set NESASM up with ConTEXT Editor
- NotePad++ Language Definition Files by Fib Gibbley Miau and Banshaku


Contributions Encouraged!!

OK, less talk, more walk. so here it is. the sticky!!
(will get bigger with time) Please let me know if you would like to submit something!!!

* For those of you who just stumbled upon this forum and don't know about the nesdev homepage, it's here

* Nesdev Wiki here.

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

*** Assemblers/Compilers/Editors etc. ***

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

- NESICIDE Nintendo Entertainment System Integrated Development Environment. Looks pretty good.
and according to the author, it's "Everything you need in one package... "
GET IT!!!

- ConTEXT A text editor for windows with lots of different "highlighters", including one for 6502 Assembly language.
you can get it and the highlighter here, on the downloads page.

- NESASM Highlighter for ConTEXT Can be found here
NES Assembly highlighter(for NESASM by Me (opcodes, registers etc. ripped from Banshaku and Miau's LDFs Notepad++).

- Setting Up NESASM with ConTEXT Editor This shows you how to get NESASM running with ConTEXT, so you can hit F9 and go! :D Tutorial is Here

- Notepad++ can be found here. A nice code editor with some Language definition files by Fib Gibbley Miau and Banshaku

- 6502asm.com v1.0 6502 compatible assembler and emulator in javascript, can be found here. Pretty good looking, and with example code!! :)

- 6502 Simulator Can be found here. I remember trying this out a long time ago. I'm glad i've found it again!!! I don't know if this is a new feature, but when you type an opcode, information pops up on the side panel, similar to intellisense!! nice!!!

"Integrated macro assembler, simulator and debugger for 650x microprocessor family.
Lets you write, test and run 6502/65c02 programs."

- ASM6 Loopy's Assembler!! :D Can be found here

- cc65 Can be found here
"cc65 is a complete cross development package for 65(C)02 systems, including a powerful macro assembler, a C compiler, linker, librarian and several other tools."

- WLA-DX Can be found here. i don't know much about this assembler, i'm still a NESASM n00b :) but i hear it's more accurate than NESASM. Some of its features are:

- Fast
- SNES support
- SMS/GG support
- Gameboy support
- PC-Engine support
- NO$GMB symbol file writing
- Support for object and library files
- You can patch ROM images with code
- WLA GB-Z80 disassembler included
- Numerous ways to comment code away
- ROM image and program file compiling
- Multilevel macros (actually, functions)

- Some cool but unsupported stuff to compile it can be found here


- MagicKit v2.51 Can be found here
The archive contains :

- a NES assembler : NESASM
- a PC-Engine assembler : PCEAS
- a PC-Engine basic library (video, sound, joypad, interrupts)
- some documentation (assembler, hardware, tutorials)
- the source code of the assembler
- this site also keeps an archive of ASM demos for PCE or NES on the bottom of the page!!!! NICE I didn't notice that before!!!

- DASM - DASM is a versatile macro assembler, written in C, with support for target microprocessors including 6502, 68HC11, 68705, 6803, HD6303, F8 and 6507.

- NBASIC can be found here

NBASIC is a BASIC interpreter designed to mimic the operation of 8/16bit microcomputers of the early 1980’s like the Tandy Color Computer®, Apple ][e®, Commodore 64®, Texas Instruments TI-99/4A®, and others.

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

*** Setups ***

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

- (Celius) A simple WLA-DX NROM setup so people could start coding right away.
Get It Here
Celius wrote:All you need to do is put the test code under the reset routine.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

*** Exercises/Tutorials/Examples/Reading ***

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

CartCollector wrote:This hasn't been updated in a while, but I just found some docs that I think should be included (though some are already on the main site).

- Assembly In One Step CartCollector: "(this is a great read if you're new to 6502 assembly)" Yep, I do remember this one!

- M.J. Malone's DR6502 docs, especially these ones for beginners: First lesson, Second lesson
There's an archive of all that he wrote for the DR6502, including some helpful programming examples, here

- Gravity FAQ (must read if you want to make a platformer) Ding!
- NESASM Tutorial Can be found here. "New version in the works" according to the author (bunnyboy).

- Another by bunnyboy Can be found here. Looks really cool, so get yourself and account and check it out.

- Opcodes Tutorial Can be found here.
Some cool stuff about Opcodes.

- NesHacking Can be found here Nice intro tutorial with some exercises at the end. Second one is here

- Commodore64 Programmer's Reference Guide Can be found here.
Loads of info, some might not be useful to you though. Check out chapter 5 (about page 176 of the PDF version) :)

- RomHacking.Net List of tutorials contributed by users, categorized as "Assembly".

- (electro) Shows us sound lovers how to ask the right questions!!!

- (Jeroen) makes his first ROM and contributes the *source* to the community!! Cool points for him!

- (scanty) make a simple demo that goes through all the colour s(more info to come)

- (kyuusaku) there are some building blocks that I think are EXTREMELY important to learn (actually to *know*!) in order to succeed:

- Number systems (decimal vs hexadecimal vs binary)
- Boolean gates (and, or, not, xor)
- Address space and word size
- Pointers (addresses in memory as opposed to data in memory)
- Stacks
- Roughly how an ALU works (especially the flags)
- Signed numbers ("two's complement")

- ROM Hacking tutorial - Super Mario Clouds you'll need DASM and NBASIC, along with the source code on the website

* Logic Operations

Code: Select all

;thanks blargg

1 1 0 0  A   Inputs 
1 0 1 0  B 
-------------------- 
0 0 0 0  FALSE 
0 0 0 1  NOR 
0 0 1 0  JUST B 
0 0 1 1  NOT A 
0 1 0 0  JUST A 
0 1 0 1  NOT B 
0 1 1 0  A XOR  B 
0 1 1 1  A NAND B 
1 0 0 0  A AND  B 
1 0 0 1  A XNOR B 
1 0 1 0  B 
1 0 1 1  A IMP  B 
1 1 0 0  A 
1 1 0 1  A LIMP B 
1 1 1 0  A OR   B 
1 1 1 1  TRUE
- thanks kyuusaku
kyuusaku wrote:
NOT 0 = 1
NOT 1 = 0

0 AND 0 = 0
0 AND 1 = 0
1 AND 0 = 0
1 AND 1 = 1

0 OR 0 = 0
0 OR 1 = 1
1 OR 0 = 1
1 OR 1 = 1

0 XOR 0 = 0
0 XOR 1 = 1
1 XOR 0 = 1
1 XOR 1 = 0

NAND = AND with inverted (NOT) output
NOR = OR with inverted output
XNOR = XOR with inverted output
Last edited by Laserbeak43 on Wed Jan 28, 2015 11:00 pm, edited 33 times in total.
frantik
Posts: 377
Joined: Tue Mar 03, 2009 3:56 pm

Post by frantik »

CartCollector
Posts: 122
Joined: Mon Oct 30, 2006 8:32 pm

Post by CartCollector »

This hasn't been updated in a while, but I just found some docs that I think should be included (though some are already on the main site).

Assembly In One Step (this is a great read if you're new to 6502 assembly):
http://nesdev.com/6502guid.txt

M.J. Malone's DR6502 docs, especially these ones for beginners:
http://www.textfiles.com/programming/start65.txt
http://www.textfiles.com/programming/more65.txt
There's an archive of all that he wrote for the DR6502, including some helpful programming examples, here: http://nesdev.com/dr6502-docs.zip

Gravity FAQ (must read if you want to make a platformer):
http://www.textfiles.com/programming/gravity.txt
User avatar
Petruza
Posts: 307
Joined: Mon Dec 22, 2008 10:45 pm
Location: Argentina

Post by Petruza »

It would be great to have such a sticky for emulator development.
User avatar
Laserbeak43
Posts: 188
Joined: Fri Sep 21, 2007 4:31 pm
Contact:

Post by Laserbeak43 »

wow, nice adds guys. I'll get to it asap
Noob sticky!!
Please document this part of the NESdevWiki!! XD
YOU NEED A RETROMACHINESHOP!!
User avatar
Laserbeak43
Posts: 188
Joined: Fri Sep 21, 2007 4:31 pm
Contact:

Setting Up NESASM with ConTEXT Editor

Post by Laserbeak43 »

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

*** Setting Up NESASM with ConTEXT Editor ***

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

1 - Get a copy of ConTEXT Editor and install the syntax highlighter file. Both are listed above:
Image

2 - In the menu, click Options>Environment Options:
Image

3 - Click the Execute Keys tab, click Add and then type "asm" in the dialog box that pops up and click OK.
Note: DO NOT prefix "asm" with a "." or this will not work!!!
Image
Your settings should now look like this:
Image

4 - Click F9 so that it's highlighted:
Image

5- Click the file dialog button next to the text box labeled "Execute" and navigate to your copy of NESASM.exe(you can probably just write NESASM if you've already added the executable to your path variables):
Image

6 - Once you've found your executable, make the rest of the options in this dialog look like this:
Image

7 - When you create a new project and add files to it, edit and run NESASM, everything will be saved and the output will be shown in the output window! :D
Image

now you can add other tools to the other keys, F10 etc. or set parameters for NESASM to your liking. Hope you find it useful!!!! :)
Noob sticky!!
Please document this part of the NESdevWiki!! XD
YOU NEED A RETROMACHINESHOP!!
User avatar
qbradq
Posts: 972
Joined: Wed Oct 15, 2008 11:50 am

Post by qbradq »

You should add FamiTone in a libraries section as well as FCEUDSP and thefox's source-debug enhancements to Nintendulater. These things have been a huge help durring development, but I had to find them the hard way :)
User avatar
Laserbeak43
Posts: 188
Joined: Fri Sep 21, 2007 4:31 pm
Contact:

Post by Laserbeak43 »

yeah i need to dedicate a section to music all together.
thanks :)
Noob sticky!!
Please document this part of the NESdevWiki!! XD
YOU NEED A RETROMACHINESHOP!!
yesyesyall
Posts: 28
Joined: Sat Mar 05, 2011 3:17 pm
Location: Houston, Texas

Post by yesyesyall »

qbradq wrote:thefox's source-debug enhancements to Nintendulater
link, please!
User avatar
Laserbeak43
Posts: 188
Joined: Fri Sep 21, 2007 4:31 pm
Contact:

Post by Laserbeak43 »

yesyesyall wrote:
qbradq wrote:thefox's source-debug enhancements to Nintendulater
link, please!
his site is here:
http://kkfos.aspekt.fi/
i've only heard mention of his nintedulator mod though.
Noob sticky!!
Please document this part of the NESdevWiki!! XD
YOU NEED A RETROMACHINESHOP!!
User avatar
qbradq
Posts: 972
Joined: Wed Oct 15, 2008 11:50 am

Post by qbradq »

dsv101
Posts: 36
Joined: Fri Jun 17, 2011 5:16 am
Location: United States
Contact:

NESICIDE LINK = bad?

Post by dsv101 »

The link to NESICIDE seems to not load, and when it does i get a HTTP 400 Error, anyone wanna look into that?

THanks :)
~Yeah, I Said That
User avatar
qbradq
Posts: 972
Joined: Wed Oct 15, 2008 11:50 am

Post by qbradq »

That's the right link, but the page is down. You might want to PM cpow, he is the author.
dsv101
Posts: 36
Joined: Fri Jun 17, 2011 5:16 am
Location: United States
Contact:

Post by dsv101 »

Im on it :)
~Yeah, I Said That
Fatboy
Posts: 8
Joined: Thu Dec 01, 2011 12:23 am

Post by Fatboy »

Will context work with other assemblers as well?

EDIT: Nvmd, tried setting up ConTEXT with WLA-DX and it all works perfectly :)
Last edited by Fatboy on Wed Dec 07, 2011 8:28 pm, edited 1 time in total.
Post Reply