This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

NESASM to Cartridge

NESASM to Cartridge
by on (#80152)
I'm new to nes programming and I got this crazy Idea to do one of the game we developped at work on an old NES cartridge. My question is, can NESASM be use to "burn" the game on a real cartridge or is it use only for .nes ROM files? My guess is I need a "real" 6502 assembler...

by on (#80154)
No, NESasm wll only output a binary .nes file.
You need an eprom programmer or something similar to put the binary data directly on a modified cartridge.

A convenient alternative is to use a Flash Cart such as the Power Pak, which can use most .nes ROMs and play them on real hardware. It's more convenient and easier to use, but you have to go through the menu every time you want to test and some cartridge hardware might be "emulated" improperly.

by on (#80163)
NESASM will not "burn" the ROM for you, and in fact, no assembler will. The job of an assembler is to generate a binary program, what happens to this binary program after it's generated is up to you. You can either open it in an emulator or burn it to an EPROM chip and solder it to a cartridge you can use in a real console. You can also copy it to a CF card and open it in a PowerPak, like Bregalad said.

A PowerPak or an EPROM programmer are the most common ways to load your programs on a real NES. The PowerPak is easier, since you just have to copy the .NES file to the memory card. With an EPROM programmer you have to use donor carts, remove their ROM chips, program your own and solder them in.

by on (#80167)
Sorry, has you probably noticed, I'm not a native english speaker...

I know NESASM is not used to burn things... what I realy wanted to know is if the output file (the .nes file) is understandable by a real nintendo if I use a programmer to write it an a cartridge.

I've ordered the PowerPak kit. I'll do some research for the other techniques. I saw at retrousb.com that they sells empty carts...

Tyvm for you answers!

by on (#80169)
To split the ROM into 2 files, use my program ReadNES2. Download it, and then look at the batch file of how to point it to the ROM and see the readme for more stuff. Run the batch and the file it points to will be "split" into the program and character ROM's to be put on a cartridge. It will also tell you what other features the board needs for other games that you want to put on a cart.

http://www.2shared.com/file/u7E-peSd/ReadNES2.html

Source is included, if you'd want to change anything or add anything, feel free.

by on (#80172)
Edgyr45 wrote:
Sorry, has you probably noticed, I'm not a native english speaker...

Bregalad and I aren't either! =)

Quote:
what I realy wanted to know is if the output file (the .nes file) is understandable by a real nintendo if I use a programmer to write it an a cartridge.

Yes, you can write NESASM's output to ROM chips to put in actual carts. But you have to remove the iNES header (the first 16 bytes of the file) and separate the PRG (program) and CHR (character, or tiles) parts because they must be burnt to separate chips (games that use CHR-RAM don't have a separate CHR part though).

Keep in mind that no emulator is perfect, so even if your program works in an emulator there are no guarantees it will work on a real NES until you test it. To increase your chances you should try your program in a few of the most accurate emulators and make sure it works consistently.

Quote:
I saw at retrousb.com that they sells empty carts...

Yeah, their boards and cases are great if you want to burn your own chips to make permanent carts.

by on (#80187)
Thanks! That was a very detailed explanation!


Quote:
Source is included, if you'd want to change anything or add anything, feel free.


Wow thanks! I'll have a look into this

by on (#80221)
Quote:
I've ordered the PowerPak kit.

If you're going to use the PowerPak you won't have to split the files. Just put the .nes files on the CF card and that's it.

by on (#80238)
Do you have an original NES (either the top-loader or deck-loader)? If not the PowerPak does not work on most clone systems.

by on (#80241)
Yes I have the original thing. But thanks, that's good to know. Can't wait to try it!!

by on (#80445)
Quote:
Keep in mind that no emulator is perfect, so even if your program works in an emulator there are no guarantees it will work on a real NES until you test it. To increase your chances you should try your program in a few of the most accurate emulators and make sure it works consistently.


Hey tokumaru, what are for you the most accurate emulators ? I'm using JNes and FCE for debugging. But sometimes, it works in Jnes and not in FCE and Vice versa... Which should I trust? I'm ready to get another one based on your comments, Thanks!

by on (#80446)
Nintendulator, Nestopia, FCEUX

by on (#80452)
Edgyr45 wrote:
Hey tokumaru, what are for you the most accurate emulators ?

The consensus is that Nintendulator and Nestopia are the most accurate ones. FCEUX isn't very accurate, but it's frequently used because of its debugging features. There are members from this board that are actively improving their emulators, so we should keep an aye on those too.

Quote:
I'm using JNes and FCE for debugging. But sometimes, it works in Jnes and not in FCE and Vice versa... Which should I trust?

Last I heard, JNes wasn't very accurate, but I haven't checked myself. As for which one you should trust, I believe that the best thing to do is to get the game working right in as many emulators as you can. You see, even though some emulators aren't accurate, they have the basics working. So unless you game is doing something "non-standard" such as changing PPU parameters mid-frame or other tasks that require very precise timing, it *should* be working fine in most emulators. If it isn't, it's more likely that the software is to blame, not the emulator.

But in the end, the NES has the final answer. Even if it works in all emulators, it might still not run on the NES. This is why it's important to test your code on an actual NES from time to time.