How can I create an NES cartridge? Is there any tutorial? I need to put a game that runs in an emulator and put it on a cartridge. How to do that? Is this possible from scratch? Or at least could I use an existing cartridge and overwrite the content there?
You need to ensure your game will run properly on the NES hardware. With many 8 and 16 bit consoles, there are limited times you can access the hardware registers. Accessing registers outside the allowed time often results in the program not displaying any output. One emulator to consider is no$nes, another is fceux. The no$nes will warn you if you violate many of the rules. The fceux emulator is probably more accurate but will fail silently if you violate the rules.
The next, or possibly first, thing is to determine which mapper mode you will support. This basically determines how rom or ram are mapped into the CPU and PPU (graphics chip) space, the number of memory banks available, and how the scrolling tilemap will be repeated. When you're ready for the technical details, check out the Comprehensive NES Mapper Document. It's quite technical, but is required knowledge in developing a NES cartridge.
The final step is getting it on the cartridge. There are a few options, one is the INL-ROM NES board, which can be purchased with a flash rom for easier testing. Once your game is running, you can buy the same board and program and solder your own EPROMS into the board.
If you're really interested in NES development, visit the NesDev forums.
I developed a game, called Frog Feast, that ran on the SNES, Genesis, Atari Jaguar, and Neo Geo. A friend created physical versions from old game boards.
Many (especially older) cartridge-based consoles have homebrew development subcultures that have built CompactFlash-based cartridges that you can purchase, load up with your home-brew ROM, and insert into a (usually modded) system.
You could, of course, also build such a cartridge entirely yourself if you had the requisite engineering knowledge and equipment. But buying one is probably much easier.