Hello everyone,
Im having trouble trying to assemble with x816. I have the version x112f and when ever i try to assemble the source code with "x816 st1.asm" i get
" 'x816' is not a recognized as an internal or external command, operable program or batch file"
Ive tried changing directories and ive also tried using "x112f st1.asm" instead with the same results. Can someone help me?
Thanks in Advance,
EL
Is 'x816' the name of your executable? I'm sure it is, but if it isn't, that is the problem.
I went to properties and the name is under "X112F.EXE" but i tried that too with no results.
x816 doesn't work right in WinXP. Someone figured out how to get it to work, I don't know how. I've used DOSBox when I have to use it..
Also the executable isn't x816.exe by default, looks like you tried the other name though (I think that was the right one).
How can i get it to work under the dosbox promp or can i just drag it in there? NE1 been able to get it run under XP, 98?
If you have it in the the folder C:\nesdev for example,
you would run DOSBox, then type "mount c: c:\nesdev", then type C: to go there then run the assembler as usual.
Out of frustration with getting x816 to work under Windows 2000, I just ported my projects to CA65.
Well it worked under "x112f st1.asm" in DOSBOX. Does anyone know how i can fix errors?
nineTENdo wrote:
Well it worked under "x112f st1.asm" in DOSBOX. Does anyone know how i can fix errors?
Maybe, what are the errors exactly? And what is st1.asm btw?
Also does it generate an nes .ROM file. I assembled a demo with no errors but i have nothing in my folder. Does it output somewhere else?
st1.asm is just a modified Sound Test Demo by Snowbros that im experimenting with cuting and pasting it to try and get different results.
Check the command line options to see if there's any you need (try "x112f /?"). I thought it creates a .bin file with the same name as the source. Look in the source, if at the beginning there's some stuff to set up an iNES header (text "NES", $1A, etc.) If not, then it's just a raw ROM that you'll need to copy a header onto. The lazy way is to rip the first 16 bytes off an .NES file that has the same setup (size, mapper, etc), then do a "copy /b header+romname.bin romname.nes".
If the CHR-ROM isn't included in the source also (.incbin or whatever), then you'll need to copy that onto the end, same way as adding the header. I think most x816 progs generally included the CHR-ROM though at the end (when they use CHR-ROM, anyways).
Does the NESASM read stuff like EQU and .asc? What are is pros and cons to x816
EQU should work. You might have to change it to =, which is the same thing.
.asc might be in there, with a different name. You could look in nesasm's docs. It's just for defining your font tiles, if they're not in the usual ASCII position.
x816 pros: simple to use and reliable. I used it to make my SNES NSF player, I had no trouble with the assembler that I can recall.
cons: DOS-only. Assembling my huge SNES NSF player in DOSBox seems to take forever (but more like 30 secs when I used to run it natively).
Noone hardly uses it anymore for new projects. ca65 is better if you want to share and use others people's code IMHO.
When it reports errors you have to view the listing to see where they are. It's a bit different than just having the line number reported.
Memblers wrote:
cons: DOS-only.
It runs just fine for me via command prompt on Win2k.
Though I do agree that ca65 > *
You mean cc65 right? If so the cc65-nes-2 version or the dos32.
I think cc65 is the name of the whole package, and specifically the C compiler.
ca65 is the name of the assembler.
How is it run? Do i have to compile it?
You don't need to compile it if you use Windows and use the Windows binary.
You run ca65 and ld65 from the command prompt. If you have used GCC before, then it'll be familiar.
Same thing with NESASM to run it(cc65 file.asm)? Im kinda curious what are the include files for? It has everything from 6502 to Vic-20!!!!
Memblers wrote:
The lazy way is to rip the first 16 bytes off an .NES file that has the same setup (size, mapper, etc), then do a "copy /b header+romname.bin romname.nes".
How do i do that? do i do it in x816? ive got my header from another file and my .bin.
A hex editor would probably help.
no i mean the "copy /b header+romname.bin romname.nes". but thats a good way too.
the "copy" instruction is a command line command (or whatever those are called). You input it at a command prompt and it does the work.
In a Windows environment, your best approach would probably be to create a batch file (an ordinary .txt file which has several instructions to give to the command prompt -- with the extention changed to .bat). When you execute the .bat file, the command prompt pops up and automatically runs everything in the .bat file in order. This makes assembling as simple as double-clicking a file.
If you want to assemble "demo.asm" into "demo.nes" with x816, here's an example of what your .bat file might look like when viewed in Notepad or some other hex editor:
Code:
x112f demo.asm
copy /B header.bin+DEMO.BIN demo.nes
pause
I like to end with a 'pause' command so that the window will stay open until I press a key (so I can see any assembler errors that may have happened). You can omit the pause and the command prompt will open and shut almost instantaneously -- everything will assemble fine, but you won't be able to read any of the output.
What does
Code:
.mem 8
.index 8
mean?
Is the directive that .incbins the .chr to the source directory, in the header. For Example:
Code:
bank 2
.org $0000 < is this in the header? If not Where is it?
.incbin "jumpy.chr"
What do i about compliing with the other files .nam, .spr, and .chr ?
nineTENdo wrote:
What does
Code:
.mem 8
.index 8
mean?
It tells the assembler that you're compiling for a 6502 (i.e. 8-bit registers, as opposed to the 65816 which can potentially do 16-bit registers).
nineTENdo wrote:
Is the directive that .incbins the .chr to the source directory, in the header. For Example:
Code:
bank 2
.org $0000 < is this in the header? If not Where is it?
.incbin "jumpy.chr"
If you're using x816, it does not create a header - you'll either have to create it with a hex-editor, or put a bunch of .byte/.db statements (whatever x816 uses for inline data blocks) to manually encode the iNES header. Personally, I prefer a 3rd method, which is to have a separate "makeiNES" program which produces the header from a human-readable text file and combines it with the PRG and CHR data (automatically filling in the PRG/CHR sizes in the header).
With MakeINES, What do i about compliing with the other files .nam, .spr, and .chr ?
What is PROG filename.obj?
hOW DO .CHR, .NAM, .INCBIN. get incorperated into the header in x816? Can Someone really help with setting up so i can assemble with the x816? Im still in the rut.
Thanks o wise ones,
EL
P.s. Does anyone have "makeines" i lost it and i cant seem to find the website to it.
http://www.qmtpro.com/~nes/tools/makeines10.zip
If you're using makeines, then you don't include
any CHR data in your PRG file - you just use .incbin to include any nametable data and whatnot that needs to be directly accessed by the CPU.