It is currently Sun Dec 17, 2017 6:32 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 47 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: Out of date tools?
PostPosted: Thu Mar 30, 2017 6:05 pm 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1870
Location: DIGDUG
When I use cc65.exe and / or ca65.exe, I get nothing in the command prompt, unless there is an error.

Nothing. Nothing seems to happen. It doesn't say a thing. But, it built me a file. I look in the folder. There it is.

That's just how these tools work.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
 Post subject: Re: Out of date tools?
PostPosted: Thu Mar 30, 2017 6:45 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5899
Location: Canada
dougeff wrote:
When I use cc65.exe and / or ca65.exe, I get nothing in the command prompt, unless there is an error.

Nothing. Nothing seems to happen. It doesn't say a thing. But, it built me a file. I look in the folder. There it is.

That's just how these tools work.

That's strange. That's definitely not how they work for me:
Attachment:
cc65_command_line_test.png
cc65_command_line_test.png [ 13.13 KiB | Viewed 868 times ]

No arguments gives me an error for both (and both cases are errorlevel 1).

What file is it supposed to build with no arguments?


Top
 Profile  
 
 Post subject: Re: Out of date tools?
PostPosted: Thu Mar 30, 2017 6:54 pm 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1870
Location: DIGDUG
I typed a line WITH several arguments. (For cc65) It compiled correctly, but no indication from the command line dialog box.

I think you missed my point. I'm trying to reassure the new guy.

Edit, fixed 1 typo

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Last edited by dougeff on Fri Mar 31, 2017 4:14 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Out of date tools?
PostPosted: Thu Mar 30, 2017 6:59 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5899
Location: Canada
Oh, yes that's what it supposed to do when everything's fine. No comment and errorlevel 0.

I think most compilers are silent when there's no error (or other requested output).

If you do want confirmation though, you can add errorlevel checking and/or a pause to your batch file. Example:
Code:
cc65\bin\ca65 bank0.s       -g -o temp\bank0.o
@IF ERRORLEVEL 1 GOTO badbuild
cc65\bin\ca65 bank1.s       -g -o temp\bank1.o
@IF ERRORLEVEL 1 GOTO badbuild
cc65\bin\ca65 bank2.s       -g -o temp\bank2.o
@IF ERRORLEVEL 1 GOTO badbuild

@echo.
@echo.
@echo Build complete and successful!
@pause
@GOTO endbuild

:badbuild
@echo.
@echo.
@echo Build error!
@pause
:endbuild


Top
 Profile  
 
 Post subject: Re: Out of date tools?
PostPosted: Thu Mar 30, 2017 7:57 pm 
Offline
Formerly ~J-@D!~
User avatar

Joined: Sun Mar 12, 2006 12:36 am
Posts: 445
Location: Rive nord de Montréal
rainwarrior wrote:
Oh, yes that's what it supposed to do when everything's fine. No comment and errorlevel 0.

I think most compilers are silent when there's no error (or other requested output).

It goes further than this: most (if not all?) UNIX tools are silent on success, except when being told to be verbose, if that's available. So for example, gcc has most of its warnings deactivated by default, and outputs nothing on success, as expected. Other small commands, like cp, mv, rm, mkdir, etc. print nothing at all on normal circumstances. Note that shell scripts don't echo lines of execution by default, so again, except when errors occur, you may see nothing on the screen upon its execution.

Contrast this with MS-DOS and Windows, where for example copy outputs " X file(s) copied", batch files echo lines by default, and the Microsoft C/C++ compiler prints a banner, unless told otherwise.


Top
 Profile  
 
 Post subject: Re: Out of date tools?
PostPosted: Thu Mar 30, 2017 8:06 pm 
Offline
User avatar

Joined: Wed Mar 29, 2017 3:11 pm
Posts: 19
I put the test asm in the same folder as the asm6 what do I do from there? I have no clue as to what to put into the cmd


Top
 Profile  
 
 Post subject: Re: Out of date tools?
PostPosted: Thu Mar 30, 2017 8:27 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10171
Location: Rio de Janeiro - Brazil
Then you're not reading the replies. I gave you all the information necessary to create a batch file for ASM6, but you insisted on just clicking the assemblers, after being told that wouldn't work.

If you're not willing to read the replies and spend any effort on learning, people will soon stop responding. I know I felt pretty disappointed to read that you kept double clicking .exe's after after my fairly detailed reply.


Top
 Profile  
 
 Post subject: Re: Out of date tools?
PostPosted: Thu Mar 30, 2017 8:37 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10171
Location: Rio de Janeiro - Brazil
The absolute minimal setup you need to create a working ROM will need asm6.exe, assemble.bat and source.asm in the same folder. The batch file should contain at lest this:
Code:
asm6 source.asm game.nes
pause

The source file should contain a valid NES program made for ASM6. Each assembler has different features and rules that make source code incompatible between them without modifications.

You can search these forums for my ASM6 templates, which have the valid structure to create NES files, but don't contain any code. This means that the assembler will generate a valid ROM file that you can open in emulators, but nothing will happen because there's no program to do anything. You have to write the program yourself.

Note that the NROM template requires an 8kb CHR file. You can make one in YYCHR or rip the CHR-ROM from an existing game.

Then you can just double-click assemble.bat.


Top
 Profile  
 
 Post subject: Re: Out of date tools?
PostPosted: Thu Mar 30, 2017 8:50 pm 
Offline
User avatar

Joined: Wed Mar 29, 2017 3:11 pm
Posts: 19
tokumaru wrote:
The absolute minimal setup you need to create a working ROM will need asm6.exe, assemble.bat and source.asm in the same folder. The batch file should contain at lest this:
Code:
asm6 source.asm game.nes
pause

The source file should contain a valid NES program made for ASM6. Each assembler has different features and rules that make source code incompatible between them without modifications.

You can search these forums for my ASM6 templates, which have the valid structure to create NES files, but don't contain any code. This means that the assembler will generate a valid ROM file that you can open in emulators, but nothing will happen because there's no program to do anything. You have to write the program yourself.

Note that the NROM template requires an 8kb CHR file. You can make one in YYCHR or rip the CHR-ROM from an existing game.

Then you can just double-click assemble.bat.


Sorry, I am just having a rough day, I just made the bat file and it said pass 1.. nothing to do!
getting excited about it :lol:


Top
 Profile  
 
 Post subject: Re: Out of date tools?
PostPosted: Thu Mar 30, 2017 8:53 pm 
Offline
User avatar

Joined: Wed Mar 29, 2017 3:11 pm
Posts: 19
dougeff wrote:
With the command box open (for asm6)...

Assuming you have asm6.exe and an assembly file called test.asm, in the same folder...

Simply typing "asm6 test.asm test.nes" would be all you do. If no errors, it would say something like...

Quote:
pass 1..
pass 2..
test.nes written (16400 bytes).


Then, if you looked in the folder, you will see the output file "test.nes"

EDIT - actual output inserted.

EDIT 2 - if I wanted to make a .bat file do exactly this, I would write a text file (with Notepad++) that said...

Quote:
asm6 test.asm test.nes
pause


That's it. Save this text file as 'compile.bat'

Or, if you want to get fancy...

Quote:
set name="test"
asm6 %name%.asm %name%.nes -l
pause
%name%.nes


This would create a listing (-l), and the screen will pause, and wait for a keypress, at which point, it will try to open 'test.nes'...assuming you have .nes files associated with an emulator.


I tried the more technical one and seemed to create the .lst file


Top
 Profile  
 
 Post subject: Re: Out of date tools?
PostPosted: Fri Mar 31, 2017 5:12 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1870
Location: DIGDUG
I guess that means you figured out .bat files.

Now, to write a source file that actually works. Feel free to read old forum posts for exactly this subject. Search also for "asm6" and "template". And read the wiki. And spend some time over at 6502.org.

Good luck.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
 Post subject: Re: Out of date tools?
PostPosted: Fri Mar 31, 2017 11:00 am 
Offline
User avatar

Joined: Wed Mar 29, 2017 3:11 pm
Posts: 19
Wait the masm listing file is correct? I thought I needed a .nes not a .lst file


Top
 Profile  
 
 Post subject: Re: Out of date tools?
PostPosted: Fri Mar 31, 2017 11:22 am 
Offline
Formerly WheelInventor

Joined: Thu Apr 14, 2016 2:55 am
Posts: 1135
Location: Gothenburg, Sweden
the .nes (or .bin which is default if you don't name the extension as .nes) is your binary program. the optional .lst is your list file for review.

_________________
http://www.frankengraphics.com - personal NES blog


Top
 Profile  
 
 Post subject: Re: Out of date tools?
PostPosted: Fri Mar 31, 2017 11:39 am 
Offline
User avatar

Joined: Wed Mar 29, 2017 3:11 pm
Posts: 19
FrankenGraphics wrote:
the .nes (or .bin which is default if you don't name the extension as .nes) is your binary program. the optional .lst is your list file for review.


For the batch file I put
set name="test"
asm6 %name%.asm %name%.nes -l
pause
%name%.nes

cc65\bin\ca65 bank0.s -g -o temp\bank0.o
@IF ERRORLEVEL 1 GOTO badbuild
cc65\bin\ca65 bank1.s -g -o temp\bank1.o
@IF ERRORLEVEL 1 GOTO badbuild
cc65\bin\ca65 bank2.s -g -o temp\bank2.o
@IF ERRORLEVEL 1 GOTO badbuild

@echo.
@echo.
@echo Build complete and successful!
@pause
@GOTO endbuild

:badbuild
@echo.
@echo.
@echo Build error!
@pause
:endbuild


that in it, I also made a Test.asm file with the tutorial that was made on the forum. I don't really know if I did anything wrong.. I mean I just copied and pasted the code :oops:


Top
 Profile  
 
 Post subject: Re: Out of date tools?
PostPosted: Fri Mar 31, 2017 12:19 pm 
Offline
Formerly WheelInventor

Joined: Thu Apr 14, 2016 2:55 am
Posts: 1135
Location: Gothenburg, Sweden
the first paragraph is for using asm6. Place it in your folder containing asm6 and your asm file. Run it from there.

the rest is for error handling specific to ca65 (and not a complete batch file for baking a program with ca65). They shouldn't be written together.

_________________
http://www.frankengraphics.com - personal NES blog


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 47 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 3 guests


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

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group