Out of date tools?
Moderator: Moderators
Re: Out of date tools?
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.
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
- rainwarrior
- Posts: 8734
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Out of date tools?
That's strange. That's definitely not how they work for me: No arguments gives me an error for both (and both cases are errorlevel 1).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.
What file is it supposed to build with no arguments?
Re: Out of date tools?
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
I think you missed my point. I'm trying to reassure the new guy.
Edit, fixed 1 typo
Last edited by dougeff on Fri Mar 31, 2017 4:14 am, edited 1 time in total.
nesdoug.com -- blog/tutorial on programming for the NES
- rainwarrior
- Posts: 8734
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Out of date tools?
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:
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: Select all
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
- Jarhmander
- Formerly ~J-@D!~
- Posts: 569
- Joined: Sun Mar 12, 2006 12:36 am
- Location: Rive nord de Montréal
Re: Out of date tools?
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.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).
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.
((λ (x) (x x)) (λ (x) (x x)))
- AlterAnubis
- Posts: 19
- Joined: Wed Mar 29, 2017 3:11 pm
Re: Out of date tools?
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
Re: Out of date tools?
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.
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.
Re: Out of date tools?
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:
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.
Code: Select all
asm6 source.asm game.nes
pause
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.
- AlterAnubis
- Posts: 19
- Joined: Wed Mar 29, 2017 3:11 pm
Re: Out of date tools?
Sorry, I am just having a rough day, I just made the bat file and it said pass 1.. nothing to do!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: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.Code: Select all
asm6 source.asm game.nes pause
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.
getting excited about it
- AlterAnubis
- Posts: 19
- Joined: Wed Mar 29, 2017 3:11 pm
Re: Out of date tools?
I tried the more technical one and seemed to create the .lst filedougeff 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...
Then, if you looked in the folder, you will see the output file "test.nes"pass 1..
pass 2..
test.nes written (16400 bytes).
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...
That's it. Save this text file as 'compile.bat'asm6 test.asm test.nes
pause
Or, if you want to get fancy...
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.set name="test"
asm6 %name%.asm %name%.nes -l
pause
%name%.nes
Re: Out of date tools?
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.
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
- AlterAnubis
- Posts: 19
- Joined: Wed Mar 29, 2017 3:11 pm
Re: Out of date tools?
Wait the masm listing file is correct? I thought I needed a .nes not a .lst file
- FrankenGraphics
- Formerly WheelInventor
- Posts: 2064
- Joined: Thu Apr 14, 2016 2:55 am
- Location: Gothenburg, Sweden
- Contact:
Re: Out of date tools?
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.
- AlterAnubis
- Posts: 19
- Joined: Wed Mar 29, 2017 3:11 pm
Re: Out of date tools?
For the batch file I putFrankenGraphics 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.
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
- FrankenGraphics
- Formerly WheelInventor
- Posts: 2064
- Joined: Thu Apr 14, 2016 2:55 am
- Location: Gothenburg, Sweden
- Contact:
Re: Out of date tools?
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.
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.