diff --git a/.gitignore b/.gitignore index 3e759b7..8a5531e 100644 --- a/.gitignore +++ b/.gitignore @@ -328,3 +328,16 @@ ASALocalRun/ # MFractors (Xamarin productivity tool) working folder .mfractor/ + +tools/ +demos/ +games/ +spec/ +games.asm +report* +offsets* +*.unf +*.bin +*.dat +commit.txt +*.nes diff --git a/README.md b/README.md index eb55c91..966b5f4 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,12 @@ # Coolboy Multirom Builder + It's a toolset that allows you to create multirom images for cheap COOLBOY (and clones) Famicom cartridges. Which can be writed with my other tool: https://github.com/ClusterM/famicom-dumper-client Features: -* Combines up to 768 games into single binary which can be writed to cheap COOLBOY cartridge -* Creates menu where you can easily select game +* It can combine up to 768 games into single binary which can be writed to cheap COOLBOY cartridge +* Create menu where you can easily select game * Can alphabetically sort games in menu if you need it -* Allows to use your own image as menu header +* Allows to use your own image for menu header * On new versions of cartridges it can remember last played game and keep up to 15 game saves into flash memory * Supports many different versions of cartridges * Has built-in hardware tests @@ -13,10 +14,10 @@ Features: * Can add up to three hidden ROMs for Up+A+B, Down+A+B and Konami Code combinations How it works (for advanced users): -1. You need to create text file with list of files and/or directories with ROMs, optionally you can specify game name for menu entry. -2. Run **CoolboyCombiner.exe** with "**prepare**" command, it will automatically use best way to fit game's data in the target ROM and create "**games.asm**" and offsets files. First one contains game names and commands for cartridge's chip to start them. Second file will contain info with address of data for every game in the final ROM. -3. Compile "**menu.asm**" using **nesasm** compiler. I'm using my own modification: https://github.com/ClusterM/nesasm. It will create .nes file with games menu. -4. After it you need to combine menu and games into one file. Run **CoolboyCombiner.exe** with "**combine**" command +1. You need to create a text file with list of files and/or directories with ROMs, optionally you can specify game name for menu entry. +2. Run **CoolboyCombiner.exe** with "**prepare**" option, it will automatically use best way to fit game's data in the target ROM and create "**games.asm**" and offsets files. First one contains game names and commands for cartridge's chip to start them. Second file will contain info with address of data for every game in the final ROM. +3. Compile "**menu.asm**" using **nesasm** option. I'm using my own modification: https://github.com/ClusterM/nesasm. It will create .nes file with games menu. +4. After it you need to combine menu and games into one file. Run **CoolboyCombiner.exe** with "**combine**" option. 5. Done. It sounds a bit complicated but you can use **Make** tool or just run "**!build_rom.bat**" (for Windows users). @@ -33,7 +34,7 @@ There are many versions of COOLBOY cartridges and clones. Actually most of them You can find modifications: * **With a different CHR size**. Some cartridges has only 128KB of RAM for CHR data and some 256KB. So 128KB version can't run many cool games with CHR size >128KB. You can easily detect amount of CHR RAM after looking at games list. If it has at least one game with large CHR, cartridge has 256KB. Example games: Megaman/Rockman 5, Earthbound Zero, Kirby's Adventure * **With a different flash size**. Most cartridges has 32MBytes of flash memory but it's possible to find much more rare cartridges with less memory size. 32MBytes is maximum available size. -* **With a additional PRG RAM chip**. It's required by some games like The Legend of Zelda, Jurassic Park, etc. So if hardridge has those games, it has PRG RAM chip. Also in case when you seller shows images of cartridge's board you can check presense of chip on the back side of it. Also it's possible to solder this chip manually. +* **With a additional PRG RAM chip**. It's required by some games like The Legend of Zelda, Jurassic Park, etc. So if cartridge contains those games, it has PRG RAM chip. Also in case when you seller shows images of cartridge's board you can check presense of chip on the back side of it. Also it's possible to solder this chip manually. * **With and without battery**. Battery is used to keep data in PRG RAM chip even after console is turned off. It's used to save games progress. So if cartridge has battery, it also has PRG-RAM chip. There is no way to detect present of battery but usually seller can say it, also check product description in shop. * **With a directly writable and non-writable flash memory**. Some new cartridges can be rewrited directly without additional soldering and some not. Direct rewrite will allow you not only rewrite cartridge's flash memory using very simple way but it will also allow to keep many game saves in cartridge's memory (if PRG RAM chip exists). Originally game's progress will be erased if any other game started that uses PRG RAM even if battery present. There is no way to know which cartridge has this feature but seems like it's all cartridges produced by "MINDKIDS". So if you can look at cartridge's board, check it for "MINDKIDS" label. * **With a different register addresses**. Most cartridges has registers at $600x addresses but some cartridges has them at $500x. This toolset supports both versions, so just don't need to care about it. @@ -42,17 +43,19 @@ So it's recommended to search for MINDKIDS cartridges with battery. ### Which games are supported -COOLBOY cartridges can support games with **NROM** (mapper #0) and **MMC3** (mapper #4) mappers only. NROM is used by games without any mapper and MMC3 is most popular mapper, so games support is good but not perfect. Also most non-MMC3 games can be patched to run on MMC3 without any problem. Also make sure that PRG RAM and CHR size requirements are met. +COOLBOY supports games with **NROM** (mapper #0) and **MMC3** (mapper #4) mappers only. NROM is used by games without any mapper and MMC3 is most popular mapper, so games support is good but not perfect. Also most non-MMC3 games can be patched to run on MMC3 without any problem. Also make sure that PRG RAM and CHR size requirements are met. And one more thing with some weird buggy games. COOLBOY always uses writable CHR RAM even original game uses CHR ROM and it has not 'read-only' mode. So if game with CHR ROM writes to ROM for some weird reason, CHR data will be corrupted. It can be fixed using patches for ROMs. Example game: Cowboy Kid. +Also please note that PRG RAM is not working correctly on *original* Famicoms and AV Famicoms without additional hardware modification of cartridge. + ### Games list format It's just a text file. Lines started with semicolon are comments. Other lines has format: [| ] -So each line is a path to ROM with optional name which will be used in menu. Example: +So each line is a path to a ROM with optional name which will be used in menu. Example: roms/Adventure Island (U) [!].nes | ADVENTURE ISLAND roms/Adventure Island II (U) [!].nes | ADVENTURE ISLAND 2 diff --git a/tools_sources/CoolboyCombiner/Program.cs b/tools_sources/CoolboyCombiner/Program.cs index 17699a6..3892c7f 100644 --- a/tools_sources/CoolboyCombiner/Program.cs +++ b/tools_sources/CoolboyCombiner/Program.cs @@ -389,7 +389,7 @@ static int Main(string[] args) throw new Exception("Games list is empty"); if (usedSpace > optionMaxSize * 1024 * 1024) - throw new Exception(string.Format("ROM is too big: {0} MB", Math.Round(usedSpace / 1024.0 / 1024.0, 3))); + throw new Exception(string.Format("ROM is too big: {0} KB", usedSpace / 1024)); if (games.Count > 768) throw new Exception("Too many games: " + games.Count); if (saveId > 15)