Page 1 of 7

.ASM into .NES assistance

Posted: Tue Apr 16, 2013 5:59 pm
by caramelpuffpuff
I am not good with english, so excuse me. (Sometimes, I could be a little clowny in the comment.)

I just figured out on converting .C files into .ASM files using ASM6 I just got now by dragging the .C file onto the program, ASM6. I feel like I'm getting closer on making .NES files, but I'm not sure anymore.

What do I do with the .ASM files now? I'm a little lost now. :?: I'm not sure dragging .ASM files onto ASM6 would work also.

Ignore this: I just now got time to do NES stuffs, and I need to put list in here to remind me what I need for NES making and to catch up and remember what I need to do and stuff.

-Graphics and sprite making: YY-CHR (Latest versions.)

-Background, scene, and stage making: PRG-ROM Pattern Editor (Can get it in same site as YY-CHR.)

-Music: FAMITRACKER!

***Code:

Place to write: ConTEXT

ASM: ???

___

___

Re: .ASM into .NES assistance

Posted: Tue Apr 16, 2013 6:13 pm
by 3gengames
Huh? You don't turn .c to .asm, you compile .C into a .NES file. Same with assembly. You should look up batch (or bash for Linux) and how command line programs work, and then look at the readme of the programs you use on how to use them.

Re: .ASM into .NES assistance

Posted: Tue Apr 16, 2013 6:25 pm
by caramelpuffpuff
The only file I got is "exe" and "php" so, there's no readme file.

And I don't understand some of them; I'm not good with english, so the manual on the Command Prompt barely help on me.


does it obey if I put down C:\Users\JOHN\>any letter it ask like c or chr

or something like C:\Users\JOHN\>any symbols like "-" before the letter

Re: .ASM into .NES assistance

Posted: Tue Apr 16, 2013 6:34 pm
by koitsu
I recommend you get familiar with the Windows Command Prompt (cmd.exe). Here are some resources:

http://www.bleepingcomputer.com/tutoria ... roduction/
http://pcsupport.about.com/od/termsc/p/ ... prompt.htm

The syntax you want is asm6 file.asm file.nes.

You'll need to make sure your .asm file has the necessary bits/pieces to make the 16-byte .NES header and so on.

P.S. -- You do not drag-drop files onto asm6.exe, and you especially do not drag-drop .c files onto it (asm6 is an assembler, not a compiler -- it understands 6502 assembly, not C!).

Re: .ASM into .NES assistance

Posted: Tue Apr 16, 2013 6:34 pm
by 3gengames
Look it up in your native language then. Or google translate the page.

Yeah, the .exe somewhere has a readme that will describe the command line arguments you pass to it in what order and such...I don't know how else to help, you have to go find it. We can explain here, but it would take so long it's just a burden really...we do it so often.

Re: .ASM into .NES assistance

Posted: Wed Apr 17, 2013 6:40 am
by tokumaru
caramelpuffpuff wrote:I just figured out on converting .C files into .ASM files using ASM6 I just got now by dragging the .C file onto the program, ASM6.
That's not how it works. ASM6 is not capable of handling C source code. If it is generating an ASM file for whatever reason, it's probably a garbage file and not an actual convertion of the C program to ASM.

Re: .ASM into .NES assistance

Posted: Wed Apr 17, 2013 10:12 am
by rainwarrior
It's very unclear what you are trying to accomplish.

A lot of people get started in NES programming by following this tutorial. Maybe it will help you:
http://www.nintendoage.com/pub/faq/NA/n ... s_out.html

Re: .ASM into .NES assistance

Posted: Wed Apr 17, 2013 5:03 pm
by caramelpuffpuff
rainwarrior wrote:It's very unclear what you are trying to accomplish.

A lot of people get started in NES programming by following this tutorial. Maybe it will help you:
http://www.nintendoage.com/pub/faq/NA/n ... s_out.html
I'm trying to figure out on how to convert C. file to NES. file (and maybe convert ASM. to NES. that is working instead of gray-background), whichever one is better/easier.

Re: .ASM into .NES assistance

Posted: Wed Apr 17, 2013 5:12 pm
by koitsu
You cannot easily use the C programming language on the NES. It's too small/limited of a platform for most things. Stick with assembly. I said the same thing in another thread recently as well, where the person trying to use the C code is already running into issues. :P

Furthermore (as I said above), asm6 is an assembler, not a compiler; it does not understand C code, it only understands 6502 assembly.

Re: .ASM into .NES assistance

Posted: Wed Apr 17, 2013 5:21 pm
by caramelpuffpuff
koitsu wrote:You cannot easily use the C programming language on the NES. It's too small/limited of a platform for most things. Stick with assembly. I said the same thing in another thread recently as well, where the person trying to use the C code is already running into issues. :P

Furthermore (as I said above), asm6 is an assembler, not a compiler; it does not understand C code, it only understands 6502 assembly.
(Awwwwwwwwwwwwwwww.) I see. So, 6502 assembly code is perfect for it, not "C". What's the difference between compiler and assembler? Is compiler ""C" assembler" while assembler is "6502 assembler"?

Re: .ASM into .NES assistance

Posted: Wed Apr 17, 2013 5:26 pm
by koitsu

Re: .ASM into .NES assistance

Posted: Wed Apr 17, 2013 5:39 pm
by caramelpuffpuff
Oh. ASM. is 6502 code.

Re: .ASM into .NES assistance

Posted: Wed Apr 17, 2013 5:41 pm
by rainwarrior
There is a C compiler for 6502/NES and many of us here use it: http://www.cc65.org/

The words you are using still makes it hard to understand what your goal is. Please explain more about what you are trying to do. Be specific about it, not general/vague. What kind of C program do you have? Who wrote it? Where did it come from?

Compiling a C program is not a simple matter of "converting C to binary". To make your NES ROM from it you will need a specific compiler, and a specific build process. This information should be included with the C source files you have, hopefully. If you are starting from scratch, why don't you try Shiru's Tutorial?

Re: .ASM into .NES assistance

Posted: Wed Apr 17, 2013 5:50 pm
by tokumaru
caramelpuffpuff wrote:What's the difference between compiler and assembler?
Compilers make executable binaries out of code written in high-level languages (C, BASIC, Pascal, etc.), while assemblers make executable binaries out of code written in assembly language. Assembly language programs consist of direct CPU instructions, so assemblers basically convert written instructions into the binary equivalent of that text. Compilers are more complex, since high-level languages are more abstract and need a lot of processing in order to be converted to CPU instructions.

Back when the NES was still supported by Nintendo, there were no good 6502 C compilers, so all games were coded in ASM. Nowadays there are a couple of decent C compilers, but I believe it's still somewhat hard to get good code out of them. I have the impression that a person has to have a good understanding of the NES platform before being able to program it in C, wich makes it kinda hard for newbies to start out that way.

You should probably try the Nerdy Nights tutorials first, to get an idea of how things work. If you are already comfortable with C, you can then try coding something in C after you get the hang of the basics. If you don't already know C, you should probably stick to assembly all the way.

Re: .ASM into .NES assistance

Posted: Wed Apr 17, 2013 6:00 pm
by caramelpuffpuff
rainwarrior wrote:There is a C compiler for 6502/NES and many of us here use it: http://www.cc65.org/

The words you are using still makes it hard to understand what your goal is. Please explain more about what you are trying to do. Be specific about it, not general/vague. What kind of C program do you have? Who wrote it? Where did it come from?

Compiling a C program is not a simple matter of "converting C to binary". To make your NES ROM from it you will need a specific compiler, and a specific build process. This information should be included with the C source files you have, hopefully. If you are starting from scratch, why don't you try Shiru's Tutorial?
http://www.youtube.com/watch?v=pgRKkL_etOQ When I saw this, I got ConTEXT, so the C program I have is ConTEXT (My apologize, I'm still learning english.) The source for this is http://www.contexteditor.org/ I'm guessing "ConTEXT project" wrote it, seems like an independant developer. I install 6502 Assembly to ConTEXT, but now, I'm not sure which is easier; C or 6502. Long story short; I am trying to figure out on how to change C./ASM. into an NES. without any "Gray background" or "Error, can't open on Fecux" stuff, which, for now, is my goal. I got ASM6, CC65, and ConTEXT.