ROM Dumping (NES)

In this article I want to explain, how to dump roms for NES using the INLretro Dumper-Programmer.

If you’re looking for the GUI for the dumper, you can download the latest version from here. Scroll to the bottom to find out more about this GUI.

Notice: If you want to dump Genesis games, please update the dumper to the newest version (see readme)

What is INLretro Dumper?

This is a device which allows you to dump cartridges for several systems (NES/Famicom, Genesis/Mega Drive, SNES/SFC, N64, GameBoy and GBA). The board itself has 6 cartridge connectors and can be connected to PC using a USB cable.

The board with following connectors (from top to bottom: famicom, genesis/mega drive, n64, NES, SNES/SFC and Gameboy/GBA).

The board is very small (11 x 11 cm), has 6 connectors for cartridges and one for USB Type B. One of the buttons is reset (the left one), I am not sure, what the right one for is.

Installation

The installation is not very complicated:
1)Download the complete project from and unpack it on your local drive
https://gitlab.com/InfiniteNesLives/INL-retro-progdump

2)Connect the device to the PC and then run InstallDriver.exe from the WindowsDriverPackage folder.

3)Start the device manager (Run -> devmgmt.msc)

Image result for run devmgmt

and check if the device INL Retro-Prog is available.

If the device is available, then everything went ok. The installation is complete!

Dumping

Next step: dumping!

But before you begin, let’s take a look, how the manual dumping is working and then I’ll show how my solution is working.

In order to dump a cartridge, disconnect the dumper from the PC if no cartridge is inserted and insert your cartridge. Connect the dumper again.
Next go to the folder host.

There is an application inlretro.exe which will run a lua script, where you can define the cartrdige type, console type, rom size etc. Example of this script is in the folder scripts.
If you want to start a script, use the following command (let’s assume, the script is called export.lua and is in the folder scripts, relative to the exe-file):

inlretro.exe -s scripts\export.lua

But first we need to create a script with needed options.

Next steps are:

1)Create a copy of the file inlretro.lua (you can find it in the folder scripts) and open it with an editor (Notepad++ is the recommended editor, since it can also highlight the code).

2)In the function main look for lines containing local curcart (local variable curcart). You need to uncomment a line beginning with «—local curcart = require » for the cartridge type you want to dump. For NES you need to know, what kind of mapper is used in the cartridge. For this, check the file http://tuxnes.sourceforge.net/nesmapper.txt.

Let’s say, you want to dump the game «Darkwing Duck». In the file you can find the line:

Darkwing Duck 128k PRG / 128k CHR V MMC1 (1)

This line says, the mapper you need is mmc1. Therefore the line you need to uncomment is —local curcart = require «scripts.nes.mmc1».

Just delete the «—» in the beginning. Please comment any other open cart script with «—«. You can also delete all other lines, if you want (in the following example I’ve deleted all other variables curcart).

--cart/mapper specific scripts

--NES mappers
local curcart = require "scripts.nes.mmc1"

Next, find the lines containing local cart_console (local variable cart_console) and uncomment the line local cart_console = «NES» because the console type is NES. You can delete all other cart_console variables.

-- =====================================================
-- USERS: set cart_console to the to point to the mapper script you would like to use here.
-- =====================================================
local cart_console = "NES" --includes Famicom

Below this section is the following code for the variable process_opts:

local process_opts = {
    test = false,
    read = true,
    erase = false,
    program = false,
    verify = false,
    dumpram = false,
    writeram = false,
    dump_filename = "output/darkwing_duck.nes",
    flash_filename = "ignore/flash.bin",
    verify_filename = "ignore/verifyout.bin",
    dumpram_filename = "ignore/ramdump.bin",
    writeram_filename = "",
}

Since we only want to dump (read = true), you don’t neet to change any line except dump_filename if you want to have another filename for your dump.

Default path is ignore/dump.bin. You can change the path (you will need to create the folder beforehand or make sure it’s automatically created, e.g. if you’re working with bat-files!). In my example, I want to have the file in the folder output.

And the last section is the local variable console_opts:

local console_opts = {
         mirror = nil, -- Only used by latest INL discrete flash boards, set to "H" or "V" to change board mirroring
         prg_rom_size_kb = 128,    -- Size of NES PRG-ROM in KByte
         chr_rom_size_kb = 128,            -- Size of NES CHR-ROM in KByte
         wram_size_kb = 0,               -- Size of NES PRG-RAM/WRAM in KByte
         rom_size_kbyte = 8 * 128,       -- Size of ROM in kilobytes, used for non-NES consoles.

Since almost all NES cartridges contain multiple rom parts, you need to specify their size manually.

Here you need to adjust following variables:
prg_rom_size_kb -> this is the size of the PRG rom
chr_rom_size_kb -> this is the size of the CHR rom

Again, let’s take a look at the line for the game Darkwing Duck:

Darkwing Duck 128k PRG / 128k CHR V MMC1 (1)

It says, 128k PRG and 128 CHR, therefore I’ve defined:
prg_rom_size_kb = 128,
chr_rom_size_kb = 128,

Other attributes don’t need to be changed.

Save your script and then run the dumper software with this command (from command line window, from the folder host):

inlretro.exe -s <path to your script><name of the script>.lua

You can also create a bat-file with text like this:

IF NOT EXIST output md output
inlretro.exe -s scripts\nes_dump.lua
pause

This bat file will create the folder output if it doesn’t exist and then will run inlretro.exe with the argument -s and the path to the script nes_dump.lua (it’s in the folder scripts). The command line window won’t be closed after execution (because of pause) so that you can see the results.

Ok, let’s dump!

This is the message you get after a successful dump:

DONE Dumping PRG & CHR ROMs

Alternative way

You can also start inlretro.exe and use another script (inlretro2.lua) as an argument. You can specify the console type (-c), the mapper (-m), PRG rom size (-x), CHR rom size (-y) and the ouput file name (-d).

This is the code for the bat-file:

IF NOT EXIST output md output
inlretro.exe -s scripts/inlretro2.lua -c NES -m mmc1 -x 128 -y 128 -d output/darkwing_duck_.nes
pause

The output will look a bit different:

But the result will be the same: your own dump of a NES game! You can test it with an emulator of your choice.

As you can see, the dumper will also add the corresponding header.

Using another application (NESHead) you can check the header information and correct it:

GUI Solution

Now, my own solution looks like this (arekuse.net/apps/inl_starter.zip):

The application allows to choose for the console type, cartridge type. For NES, there is also a database with games where you can check information like mapper name, code or memory sizes.

It will automatically hide not needed settings or scripts.

Make sure you’re using appropriate extensions for dums (e.g. ‘nes’ for NES games).

Three databases allow to see information about games.

You can also filter for games. Press ESC or clear the edit box to delete the filter:

The application and xml files need to be placed into the host folder. The games in the databases are hardcoded, but xml files can be edited, if they contain mistakes. Reading all game names from xml will be implemented (XPath is just too slow for this purpose).

This is a simple gui (written in Lazarus) where you can set all needed options and values and it will automatically create a script (scripts/export.lua) and run it.

In this application you can choose the console type, the cartridge type, define the sizes and file name.

Databases

The current version has 3 databases. Different versions of games are also included. You can search in the list, or filter, then click on the game in the list. The information will be loaded. You then can also change the version of the game. If only one version exists, the choice list will be disabled. Use the shown information to input data needed for dumping. Not all games are supported by the dumper!

NES database (based on the xml from http://bootgod.dyndns.org:7777/)

SNES database (based on this site: https://jensma.de/snes__/)

Genesis/Mega Drive database (based on this site: https://raw.githubusercontent.com/libretro/libretro-database/master/metadat/no-intro/Sega%20-%20Mega%20Drive%20-%20Genesis.dat)

8786 Всего 3 Сегодня

Добавить комментарий

Ваш e-mail не будет опубликован. Обязательные поля помечены *

Лимит времени истёк. Пожалуйста, перезагрузите CAPTCHA.