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

how to create our own multicart ?

how to create our own multicart ?
by on (#212171)
Hello guys,

I need somes help to guide me how to create my own multicart, I have couples of questions and I didn't find anything on google.

I have basic knowledge of asm on x86. I would like to put my favorites top 100 games on the same catdridge with my own selection menu.

1. my first step would be to create multicart rom and once it is finished I would like to copy it onto a catdridge. It is a good approach ?
2. Do I need a special catdridge or if I can take any of my old nes catdridge and overwrite it ?
3. Where can I buy a device to write my rom onto a catdridge, there is a usb device compatible with windows 7/10 somewhere ?

4. how do I create a menu selection ? I would like to create something fancy with a background. I saw a multicart on youtube 150 in 1 with a nice background and each select have a preview of the game in a little square.

Does someone have a link to a multicart menu selection source code that I can play with to customize it instead of create one from scratch ?

5. how do I calculate the limit of the games I would like to put into the same rom ? I read about mappers but I am a bit confused, does someone have a good tutorial for that ?

thanks :)
Re: how to create our own multicart ?
by on (#212173)
Hi and welcome!

Obligatory disclaimer first:
1) print "Forum rules say 'no blatant piracy'."
2) goto 1


But if you're really into it and actually DO have 100 nes games to make a private copy of on your own home coded cartridge, you have a long journey ahead of you. There's no shortcut or out of the box solution if you want to make your own nes compatible interface + multiloader.

You need to:
-read up on mappers and their hardware limits
-read up on the architecture specific to the NES
-code a lot of little programs for the sake of learning each building block, such as:
--controller input
--feeding the ppu
--segments and object linking
-learn how to do pixel art for the "thumbnails"

writing to a cartridge is the easy part once you know all this. Which can't be explained in one single thread. It's a process that may take you maybe a year if you're determined. Reproduction discussions have a specific subforum (this one is for game/demo/tool development) - you might find some leads there.

edit: corrected typos
Re: how to create our own multicart ?
by on (#212174)
A friend of mine rigged up an arcade cabinet to play 100 NES games. The internals was just a run of the mill computer and monitor running a special emulator.

Similarly, I can attach my laptop to my regular TV, and I recently purchased a NES controller to USB connector from retrousb. It feels and plays just like a real NES console, just running an emulator.

Those 2 options would be much easier than your plan.
Re: how to create our own multicart ?
by on (#212175)
Thanks for your help :)

I read that mappers are the chips added into somes catdridge. Is that right ?

there is a place where we can buy a catdridge with the most space ? I read kirby adventure was the one with the more space. Does exist a catdridge with more than 6mb ?
Re: how to create our own multicart ?
by on (#212178)
The Kirby's Adventure and Metal Slader Glory boards are designed to be used with one big game, not a bunch of small games.

As long as the games you add use common discrete logic mappers and total less than 64 Megabits (8 MiB), you can use Action 53 to make a multicart. Supported mappers are NROM (0), CNROM (3), UNROM (2), UNROM "Crazy Climber" variant (180), BNROM (34), and AOROM (7). But you might need to make a special request from Paul at Infinite NES Lives for a cart with such large PRG ROM.
Re: how to create our own multicart ?
by on (#212186)
Ah ok :) I tought it was just a question of how much space available on a cart.

I wonder if it would do the trick if I buy a cartridge of 150 in 1 and just replace the content ?
Re: how to create our own multicart ?
by on (#212189)
If you find a modern pirate multicart, it will most likely be under a single glob top, no components to replace there.
Re: how to create our own multicart ?
by on (#212190)
"Just replacing the contents" is the hard part.

1- Most of those N-in-1 carts actually use a so-called "mask" ROM, which you can't put new data in
2- Many of those "large number" in 1 carts don't actually contain the named number of games but something fewer. Most NES games in multicarts are the sort that are 24K in size, so if you see more than 170 (4096÷24) you can be reasonably assured many of the number are fakes. (Yes, I know compression means the threshold is a little higher, but still)

This thread (which is about repairing such a multicart, instead of making one entirely of new parts) should give you a good feeling for what would be involved.

Farid's also made several multicarts; SLROM, UNROM, TLROM
Re: how to create our own multicart ?
by on (#212217)
I just read a goof tutorial nes reproduction. It said I will have to seperate the rom into two seperate file chr and prg and if necessary double the bin file until I fill the chip. Getting eprom and a programmer device to put the bin into it.

I wonder if does exist a pcb programmable ? Instead of take of the chip and put it on each time I test a new program ??

Someone know what is the eprom with more space available ?

My research lead me to think that the “first” game on the chip is the menu and when we choose a game we just jump into the selected address where the game is ?
Re: how to create our own multicart ?
by on (#212218)
In order to reprogram a rom chip, it ought to be flashROM for the time being, not eprom. All InfiniteNESLives' PCB:s have been updated to be reprogrammable.




Quote:
It said I will have to seperate the rom into two seperate file chr and prg

Only if the game is using chr-rom.

chr-ram games store all graphics in prg-rom and transfer them to chr-ram during runtime, so they're self-contained in one single file.
Re: how to create our own multicart ?
by on (#212219)
Quote:
My research lead me to think that the “first” game on the chip is the menu :?


The default bank depends on what mapper you are using. Some mappers always have the last PRG bank fixed to the C000-ffff region. Other mappers have no fixed bank, and must explicitly jump to the first bank.

But it would be reasonable to put the menu in the first PRG bank, yes.
Re: how to create our own multicart ?
by on (#212222)
I still have trouble understand what mappers are ? a chip on the pcb ?

I think I understood well the main two chips eprom, one for program PRG and other for graphics CHR.

Does mappers are simply a chip that provide more space to put program ?
Re: how to create our own multicart ?
by on (#212224)
A mapper (sometimes specific ones are called other things, like nintendo terminology/branding ”memory management controller” - MMC - or the konami equivalent term virtual ROM controller - VRC) is any device of any kind that so to speak shifts what part of a larger ROM or RAM can be seen through the tiny rom space/address window. This is allowing the console to access larger programs/data than the machine was designed for. All mappers are part of the cartridge PCB but not all cartridges have a mapper. Furthermore, you can still never see the whole program at the exact same time if it is larger than the address window, but rather portions of it. A portion is called a bank. Banks are ”shifted” in and out of view.

The term is unfortunately used off-handedly in emulator culture where it first and foremost is a term attached to what kind of virtual PCB the ROM image is supposed to be ”socketed” into. Which can be confusing.

==
edit: corrected typos
Re: how to create our own multicart ?
by on (#212225)
I see, so its a chip that expand the console capabilities..

I wonder what is the best chips combo on a pcb for maximum capacity ?

I wonder how to calculate how much game we can put on a cart ? we always see, 35 in 1, 100 in 1, etc. 250 in 1, if each game is 16kb so a cart with 250 games have 4mb or chip space ? all chips I see are 256kb, and I am not talking about cart that have 500 games in 1 :)

that bring me to a question, if I understand right, each game must be placed one after another by group of 16kb as example. but each game are not always the same size, we just need to fill the remaining space with 0 ?

I see multicart 250 in 1 using 1 battery to save games, thats why multiples games use the same save space so we must finish a game before start another one if we dont want to loose any progress.. it is possible to implement more than one save on a cart ?
Re: how to create our own multicart ?
by on (#212234)
cecilmax wrote:
I see, so its a chip that expand the console capabilities..


Almost! A mapper can be comprised of either discrete logic components or an ASIC (application specific integrated circuit: in other words a chip). Furthermore, programmable devices can be used today to replace the original, out-of-production chips, which is why more advanced mappers can be reproduced.
Re: how to create our own multicart ?
by on (#212237)
It depends on which games you're trying to collect onto a cartridge, and what mappers they use.

Most multicarts have a mapper specialized to the task of switching among several independent games. Occasionally, a sufficiently flexible mapper designed for one game can be used to switch among a few games that don't themselves need much mapper support, such as GNROM (#66), Color Dreams (#11), BNROM, or MMC1 (#1) for NROM games. A few mappers allow combining smaller games with minimal changes to each individual game, such as BNROM or AOROM where only the bank number table needs to be patched. But if the games expect mapper support, especially if they expect different types of mapper, a multicart mapper has to emulate the game's mapper while doing the job of switching among them. Occasionally, games are patched to use a different mapper in order to make them compatible, such as the Mega Man 1-6 multicarts that change the first two games from UNROM and MMC1 respectively to MMC3.

Emulator users say "mapper" to refer to the whole circuit board (except the ROMs and CIC) because the behavior of the mapper ASIC (MMC, VRC, FME-7, etc.) dominates the description of the board's overall behavior.
Re: how to create our own multicart ?
by on (#212242)
I see, there is a list somewhere to check which game use which mapper ??

Anyway, my first step would be to create a hello world and run it with fceu ;) then I will try to launch a game with it, and after that I will try to update it into a menu to let choose which game to start between two.

While am I on a emulator, do I have to care about mappers ?
Re: how to create our own multicart ?
by on (#212243)
Quote:
I see, there is a list somewhere to check which game use which mapper ??


yes, http://bootgod.dyndns.org:7777/


Quote:
While am I on a emulator, do I have to care about mappers ?


yes, you need to tell the emulator which mapper/pcb to emulate. this is done with the information you put in the header.
for more information, read these articles:

https://wiki.nesdev.com/w/index.php/INES
https://wiki.nesdev.com/w/index.php/NES_2.0


When burning or writing ROM images to actual ROM chips, the header must be removed first. It is for emulators only.
Re: how to create our own multicart ?
by on (#212246)
Thanks you very much, I will look at this :)

I wonder what I have to do to "add" a game to my main program that would be the menu ? do I just combine the target rom bin without the header and then make a jump ?
Re: how to create our own multicart ?
by on (#212248)
This depends a bit on which assembler/compiler you're using, but for something like the cc65 suite (a 65xx dev toolchain many prefer) it will be something like this

-in the linker config file you need to create, you define segments. Here you can structure your linked objects so that you control which object goes where in new total multi-ROM.
-let's assume that for each bank, you have one linking object, and each linking object in turn holds the ROM image of a game.
-each game is an already assembled or compiled binary, so this step is done for us (just sometimes you need to hex edit them sometimes, like tepples explained, which is a whole skillset on its own)
-simply use the .incbin directive for each ROM file in its due place which will embed the game ROM binaries into your source as-is at assembly time.

If any of this is unclear, i suggest reading cc65:s online reference and experimenting a bit to find out what's what.

Though eventually, your newly acquired skills and knowledge base just *might* make you lose interest in your original project and make you want to make applications and games of your own. ^^
Re: how to create our own multicart ?
by on (#212249)
thanks a lot, I will begin with that :)

in theory, if my project work on emulator, Ill just have to get a catdridge with the same chips that being emulated to run my rom ?
Re: how to create our own multicart ?
by on (#212250)
oh and the reason i recommend cc65 is not just because it is popular, but because the .incbin directive (and linker) is extremely powerful compared to other free assemblers. You can split, patch and concatenate binaries however you want.
Re: how to create our own multicart ?
by on (#212252)
FrankenGraphics wrote:
oh and the reason i recommend cc65 is not just because it is popular, but because the .incbin directive (and linker) is extremely powerful compared to other free assemblers. You can split, patch and concatenate binaries however you want.


Ok :) I read a tutorial yesterday to create a hello world and is not complicated. I wonder if it could be easier with a C compiler ?
Re: how to create our own multicart ?
by on (#212254)
For something like a menu and loader, yeah you don't need to worry about efficiency (and yet some games have been done with C). Whether you prefer 6502 assembly or C is up to you just as long as you mind the consoles' architecture and the layout of your cartridge. cc65 suite can do both (it is so named after the cc65 C compiler, though many are just using the ca65 assembler)
Re: how to create our own multicart ?
by on (#212258)
I refer to this list a lot, even if it isn't 100% accurate.

http://tuxnes.sourceforge.net/nesmapper.txt


Also, it's not as simple as "jump to the right bank."

Let's say you combined a bunch of NROM games, and a menu. You would still need to modify each of the games "reset code" or you might never make it back to the menu.

Plus getting from zero to a working menu is a huge task with a steep learning curve.
Re: how to create our own multicart ?
by on (#212263)
Ok :) well I am used to programming, modern language I admit, but im sure I will eventually do something nice :)

do you have a tool to recommend me to use for graphics ? I would like something that we can set the palette of Nes so I can expect the same image quality with same color when it show on screen. I didn't have the chance to read about graphics for the Nes, I know I have to implement everything, if I want to write hello word on screen, I will have to create sprites with letters. What is the graphic file format to use with the compiler ?
Re: how to create our own multicart ?
by on (#212264)
One ring to rule them all:
Shiru's NES Screen Tool (aka NESST).
https://shiru.untergrund.net/

The palette definition is a little off but it doesn't matter. Personally i do hardware tests on a PAL unit which looks a bit different too. The data is 1:1 with what the PPU expects, which is all that matters except in rare corner cases. Moreover, your tv/monitor will filter the output sideways anyway.

Quote:
I will have to create sprites with letters.

You're better off using the background layer rather than the sprite layer, since you can't display any more than 8 sprites (each 8 pixels wide) on any single scanline.
Reading up on the graphics thouroughly is something you'll eventually have to do, too.

the PPU has its own format for things which isn't anything like a modern picture format. It is tile compression based (this is generally called "text mode" in computer speak) in a double sense (pixels and colours, separately), indexed colour mode, with a structure specific for the NES. Sprites are a whole other affair on its own, though it shares some few similarities with the bg layer structure.

Lastly.. if you want your thumbnails to look good (i imagine this is part of the point), let alone resemble the games they're depicting, beside practicing pixel art you'll need to scale the technique of layering sprites over and under the bg layer (requires good knowledge of the PPU plus some experience using various tools, which may range from NESST, to a programmers' notepad, use or development of scripts, and other graphics tools, like photoshop or GIMP). Not trying to discourage or anything, it's just so you'll have a good idea of what's ahead of you before you dive down the rabbit hole because all i can promise is it will take time (anything good takes time though). :wink: I don't think we've covered half of it yet. So.. just make sure the time you trade trades something you'll find worthwhile back.

Some recent forum leads on layering techniques can be found here and here.