PaulsCode Forum

Mupen64Plus AE => General Discussion => Topic started by: Paul on December 29, 2012, 07:36:34 PM

Title: How to backup ROMs from N64 cartridges
Post by: Paul on December 29, 2012, 07:36:34 PM
There is a lot of misinformation floating around the internet about how expensive, difficult, or risky it is to backup your own N64 cartridges to ROM files that can be used with Mupen64Plus AE or other N64 emulators.  I've decided to post a step-by-step, cheap and easy method that anyone can afford and follow, with no risk to the cartridges or console.  The parts needed will only run you between $20 - $50, and with that one-time initial investment you can backup your entire library of N64 games.

I encourage everyone to use this process, as it is one of the only LEGAL ways to acquire ROMs.  Let me stress the fact that you can NOT legally download a ROM for a game that you do not own!

What you need
- Nintendo 64 console
- Game cartridge to back up
- PC with a Windows operating system (working on an alternative with winetricks - will update) (GSCC only functions under Windows 95/ 98/ ME.  Post here if you need info on setting up WINE or VirtualBox to run GSCC)
- An open DB-25 LPT printer port (or USB to LPT adapter (http://www.ebay.com/sch/i.html?_trksid=p5197.m570.l1313&_nkw=USB+to+LPT&_sacat=0&_from=R40) if your PC doesn't have one) (GSCC only works with an LPT port built into the motherboard)
- GameShark Pro device (http://www.ebay.com/sch/i.html?_odkw=gameshark+n64&_osacat=0&_from=R40&_trksid=p2045573.m570.l1313&_nkw=gameshark+pro&_sacat=0), v3.2 (correct version important! Parallel port on some v3.3's is disabled)
- LPT printer cable (http://www.ebay.com/sch/i.html?_odkw=lpt+printer+cable&_osacat=0&_from=R40&_trksid=p2045573.m570.l1313&_nkw=Parallel+port+cable+DB-25&_sacat=0) (male to female)
- Game Software Code Creator (http://www.paulscode.com/projects/n64_hacking/Game_Software_Code_Creator.zip) software
- WinROM 64 (http://www.paulscode.com/projects/n64_hacking/WinROM64.exe) software

The Backup Process

- Unpack Game Software Code Creator somewhere on your computer
- Insert the GameShark Pro into the N64 Console
- Plug the game cartridge you want to back up, into the top of the GameShark Pro
- Connect the LPT cable between your PC and the back of the GameShark Pro
- Launch Game Software Code Creator (gscc.exe in the unpacked folder)
- Navigate to "File" --> "Configuration", and choose Nintendo 64 for the system
- Power up the N64 Console
- Press "AutoDetect Settings" (if autodetect fails, enter your LPT settings manually)
- Press "Save"
- Navigate to "Ram Edit" --> "Open Window"
- Click "Dump Cartridge Rom"
- Press "Yes" after reading and agreeing to use the ROM for backup purposes ONLY
- Wait for the backup to complete (anywhere from 15 minutes to a couple hours, depending on the game)
- Process will often stall unexpectedly for no apparent reason.  If so, start over (may take several attempts)
- Launch WinROM64
- Convert the generated .rom backup to a usable .v64 ROM file.

If you get stuck in the process, post here and I'll try to help you out if I can.  If I missed a step somewhere or need to clarify something, let me know and I'll update the process.

I am working on developing a new software to replace the above outdated software (and hopefully support PCI expansion cards and USB adapters).  You can follow progress on this thread (http://www.paulscode.com/forum/index.php?topic=1773.0)
Title: Re: How to backup ROMs from N64 cartridges FR
Post by: BHTGO on January 11, 2013, 05:39:06 AM
Et en Français :

Comment récupérer les ROMs de ses cartouches N64

Il existe tout un tas de rumeurs et de désinformations sur l’Internet quant à la difficulté, les risques ou les coûts réels d’un backup des fichiers ROM utilisables avec Mupen64Plus AE -ou n’importe quel autre émulateur N64- à partir de vos propres cartouches N64 . Nous avons donc décidé de proposer un guide par étapes simples et peu coûteuses que chacun peut se permettre de suivre sans risque pour ses cartouches ou sa console. L’équipement nécessaire initial ne coûtera qu’entre 15 et 45€ et couvrira l’ensemble du backup de votre collection de jeux N64.

Nous encourageons chacun d’entre vous à utiliser ce guide puisqu’il s’agit de l’un des seuls moyens LÉGAUX d’obtenir des ROMs. Nous soulignons le fait que vous ne pouvez PAS télécharger légalement les ROMs de jeux que vous n’avez pas acquis au format cartouche !

Ce dont vous avez besoin :
-Une console Nintendo 64
-La cartouche du jeu à Backuper
-Un PC tournant sous Windows (peut également fonctionner sous Wine-nous ferons une mise à jour à ce sujet prochainement)
-Un port parallèle imprimante DB-25 (ou un adaptateur USB vers parallèle (http://www.amazon.fr/s/ref=nb_sb_noss?__mk_fr_FR=%C5M%C5Z%D5%D1&url=search-alias%3Daps&field-keywords=usb+vers+parallele&x=0&y=0) si vous n’avez pas de port sur votre ordinateur)
-Une cartouche Game Shark Pro v3.2 (http://shop.ebay.fr/i.html?_nkw=game+shark+pro+3.2&_sacat=0&LH_PrefLoc=0&cmd=Blend&LH_TitleDesc=0) (la version est importante)
-Un câble parallèle (http://www.amazon.fr/s/ref=nb_sb_noss?__mk_fr_FR=%C3%85M%C3%85Z%C3%95%C3%91&url=search-alias%3Daps&field-keywords=cable+parallele+db25+c36&rh=i%3Aaps%2Ck%3Acable+parallele+db25+c36) (mâle vers femelle)
-Le logiciel Game Software Code Creator (http://www.paulscode.com/projects/n64_hacking/Game_Software_Code_Creator.zip)
-Le logiciel WinROM 64 (http://www.paulscode.com/projects/n64_hacking/WinROM64.exe)

Les étapes du backup :
-Désarchivez Game Software Code Creator sur votre ordinateur
-Insérez la cartouche GameShark Pro dans votre N64
-Insérez la cartouche du jeu dont vous souhaitez récupérer la ROM sur la cartouche GameShark Pro
-Connectez le câble parallèle de votre PC au dos de la cartouche GameShark Pro
-Lancez Game Software Code creator (double-cliquez sur gscc.exe dans le fichier dézippé)
-Cliquez sur l'onglet "File" puis "Configuration". Dans le menu qui s'ouvre sélectionnez Nintendo 64 dans la case System (ne fermez pas la fenêtre)
-Allumez votre console N64
-Cliquez sur le bouton "Auto Detect Settings" (si la détection automatique échoue, veuillez entrer vos paramètres parallèle manuellement en choisissant le numéro de port)
-Cliquez sur "Save"
-Cliquez sur l'onglet "Ram Edit" puis "Open Window"
-Cliquez sur "Dump Cartridge Rom"
-Cliquez sur "Yes" après avoir lu et accepté de n'utiliser la ROM qu'à des fins de sauvegarde
-Attendez que l'opération de récupération de la ROM s'achève (de 15 minutes à plusieurs heures selon le jeu)
-Il se peut que le processus s'interrompe en cours de route sans raison apparente. Si tel est le cas, recommencez (cela peut nécessiter plusieurs essais)
-Lancez WinROM64
-Convertissez le fichier .rom généré en fichier .v64 ROM utilisable.

Si vous rencontrez le moindre problème n'hésitez pas à poster ici même (de préférence en anglais).
Title: Re: How to backup ROMs from N64 cartridges
Post by: Rush_Rage on December 03, 2013, 01:25:10 AM

And with these roms you can play them with Project64 right?
Title: Re: How to backup ROMs from N64 cartridges
Post by: Paul on December 03, 2013, 06:36:39 AM
Yes, Project64 should support the .v64 format.
Title: Re: How to backup ROMs from N64 cartridges
Post by: Rush_Rage on December 03, 2013, 06:28:18 PM
Thank you!
Title: Re: How to backup ROMs from N64 cartridges
Post by: Rush_Rage on December 04, 2013, 01:10:02 PM
Sorry, last question.  I don't have an open DB-25 LPT printer port.  Would this cable be enough?

http://www.ebay.com/itm/9-Pin-Male-RS232-to-USB-2-0-Cable-Adapter-Convertor-DB25-Adapter-/310743296799?pt=US_Parallel_Serial_PS_2_Cables_Adapters&hash=item4859be6b1f

Or would I still need a male/female converter.

Thanks!
Title: Re: How to backup ROMs from N64 cartridges
Post by: Paul on December 04, 2013, 01:12:51 PM
I haven't tried with a 9 to 25 converter, but might work.  Sorry I can't give you a more definitive answer  :-\.
Title: Re: How to backup ROMs from N64 cartridges
Post by: Rush_Rage on December 04, 2013, 01:21:54 PM
But in theory it should work right?  Would this be safer? http://www.ebay.com/itm/USB-2-0-A-Male-To-DB25-25-Pin-Female-Parallel-Printer-Cable-/400401949967?pt=US_Parallel_Serial_PS_2_Cables_Adapters&hash=item5d39d0e50f

And I still wouldn't need to get a converter right?
Title: Re: How to backup ROMs from N64 cartridges
Post by: Paul on December 04, 2013, 03:54:13 PM
Yes, in theory the first one should work, but it would be a gamble.  That second one would be less of a gamble, since the port on the gameshark is actually a female 25-pin printer port.
Title: Re: How to backup ROMs from N64 cartridges
Post by: Rush_Rage on December 04, 2013, 04:05:29 PM
Awesome, thank you so much!  This article has been such a blessing!  Thank you again!
Title: Re: How to backup ROMs from N64 cartridges
Post by: forestdruid45 on May 19, 2014, 08:06:57 AM
Sorry to be a few months late, but this is the only site that has recent information on ripping N64 roms. I bought a printer port pci card and cable to hookup my gameshark 3.2 to try and rip my games. The pci card comes up as LPT1 in device manager, but every time I try to open or dump a N64 rom, it says communication has timed out after a few seconds. I am running windows 7 with gscc in windows 95 or windows 98 compatibility mode, getting the same error. Any other compatibility mode and the program freezes. I guess my question is, what version of windows do you need to use the program, and will a pci printer port work. Also have a db25 to usb cable that has the same issue of timing out.
Title: Re: How to backup ROMs from N64 cartridges
Post by: Paul on August 31, 2014, 09:11:18 PM
Sorry for the even later response.  Since my main OS is Linux, I've been doing this through VirtualBox with Windows XP SP3, and the parallel port forwarded to the guest in the VM settings.  I have not tried from Windows 7, so I'll play around with it to see if it is more prone to timing out.  My setup is definitely not ideal.. timing out is still frequent.  Best thing that seems to help is to disable as much running software and services as you can on both the host and guest machine (including network, etc, not sure exactly what conflicts with the process, so I just shut down whatever I can), and run gscc.exe in Realtime priority (after launching, see the right-click menu in the Process tab of the task manager -- not sure the equivalent in Windows 7 off hand).  Once it is running, don't touch the computer (or sneeze haha!)  This software is pretty old, though, so it takes some work to try and get it working on modern machines.

If you can't get it going, you might end up having to buy a cheap old laptop on Ebay or somewhere, with a built in LPT port and running Windows XP (or 98 if possible) and using it as a dedicated ROM ripper.  --EDIT-- Looks like you can get laptops with Windows 98 for "buy it now" pricing around $35 plus shipping (I didn't do a lot of searching, so probably could find them even lower).  This could be a reasonable alternative to trying to get the old software working on newer systems.  For example (http://www.ebay.com/itm/IBM-Thinkpad-i-Series-Type-2611-Win-98-Laptop-Intel-Celeron-/251633305006?pt=Laptops_Nov05&hash=item3a968385ae).  You'd just need to be careful to make sure whatever you get has a DB-25 LPT printer port built in (might require some googling to determine this, since a lot of the listings don't show pictures of the back ports), and you'd want to be sure the computer didn't have some other problem (like battery not holding charge and power cable not included...)
Title: Re: How to backup ROMs from N64 cartridges
Post by: mitchhawks on December 26, 2014, 08:13:17 PM
Sorry if this is a bit late, but can you use an older version of Gameshark with this method (like 3.0,3.1)?
Title: Re: How to backup ROMs from N64 cartridges
Post by: Paul on December 27, 2014, 08:44:44 AM
If your Gameshark has a parallel port on the back and you can see the number LED, then it will work.  Many gamesharks prior to 3.2 did not have a parallel port (so no way to connect it to a computer).

On a similar note, many Gamesharks after 3.2 were crippled as the company was trying to save money as the N64 was losing popularity (they left out nonessential components).  The crippled ones still had the parallel port on the back (was apparently cheaper to leave it than to recast the casing which has a hole in the back).  This can make the crippled ones difficult to identify at first.  The chip that converts serial to LPT is missing, so the parallel port is nonfunctional (making them useless for backing up ROMs).  The number display is missing (that's an easy way to identify the crippled ones) and also they usually are solid black instead of sparkly like the 3.2 and earlier versions)

The above guide has some bad information in it which I'll correct.  GSCC software does not work with USB to LPT adapters. I'm working on a new program that will, but for now it is not possible to backup ROMs using one of these adapters.  I can get further with an LPT PCI card, but couldn't get it to work completely either.  I've read of a mod that will make PCI LPT cards work with GSCC, but I could not find a link to it myself.  Therefore, at this time only an LPT port built into the motherboard will work.

And other bad news is GSCC only functions properly on Windows 95/ 98/ ME.  It is broken on Windows 2000 and higher (including all modern Windows versions including XP).  I have read about a mod that will allow it to function on XP, but couldn't find a link to it myself.  I can get it to function in VirtualBox with XP sporadically by disabling everything possible on both guest and host machine, including the network (not very practical for frequent usage).

There is some good news, however.  I've gotten GSCC (and other old programs like WinRom64 and N64Util) to work in WINE and in VirtualBox.  I'll update the above guide to include this information.  Also keep an eye on my other thread (http://www.paulscode.com/forum/index.php?topic=1773.0) to follow progress on the new ROM dumping software I'm writing to replace these outdated programs.
Title: Re: How to backup ROMs from N64 cartridges
Post by: forestdruid45 on February 26, 2015, 12:07:27 PM
Yeah, after a few months of no response I gave up. Then out of curiosity I checked the website and read where you made progress but only with an old pc. I got an old dell pc with the db25 connector on the motherboard (got lucky the boss at work doesn't throw away business stuff). It has xp so had to get a windows 98 disk off ebay but once I get that installed I'll have to report back with any progress.
Title: Re: How to backup ROMs from N64 cartridges
Post by: forestdruid45 on March 03, 2015, 12:06:34 AM
I have gotten success, was able to rom dump Super Mario 64 and Mario Kart 64 (jp) with no hang ups. The pc I ended with is a Dell dimension 2400, pentium 4, 512mb ram, 80gb hdd, Windows 98se, integrated graphics and LPT port. Gameshark version 3.2 works great, about 20 minutes per game the two games I tried. Anyone else looking to rom dump there n64 collection should get an old windows 98 system as Paul has suggested. Until he makes advancement in the other programs it was the best solution for me,  thanks again for the information!  ;D
Title: Re: How to backup ROMs from N64 cartridges
Post by: Paul on April 21, 2015, 06:57:35 AM
For reference, if Win98 doesn't install easily, you can use Lubuntu.  The Windows utilities mentioned above work with Wine (but only if the computer has a built-in LPT port).
Title: Re: How to backup ROMs from N64 cartridges
Post by: Animedude5555 on July 18, 2015, 05:38:48 PM
I've got a modern PC that that has absolutely no parallel port at all. Have you figured out yet how to get a USB to LPT converter working yet? Maybe there's some hacked driver you can use for such converters, in place of the manufacturer's drivers, that causes them to much more thoroughly emulate a true parallel port?

I also noticed that you mentioned the problem with newer Game Sharks is that they have missing the serial to parallel converter. If at any point in the cartridge there is a serial signal rather than parallel, then maybe I could cut an RS-232 serial cable in half, solder the wires on the cut end to the board of the Game Shark, and plug the other end into my USB to Serial converter, and then use it on my PC that way (after reverse engineering the protocol, and writing my own custom software to communicate with the Game Shark.

There is one more problem. Game sharks are EXTREMELY prone to failure. I have had 2 Game Shark Pros in my life. They both had a 100% failure, an utterly complete failure. Not even their boot screen would load after failure. The screen was completely black, as if the firmware/bios in it had been completely wiped out. The first one failed after about 2 days. The second one failed after about 1 month. These things were so crappy, that I didn't waste my time buying a third one. I figured that if the company that makes them puts out such horrible quality products, then it's not likely that they will change their manufacturing process to make it any better. They just do stuff the quick cheap way, and I'm not going to buy anything else from them. At least that's what I thought, until I learned just now that they can be used for something far more impressive than cheating. They can be used for dumping games. If you need it for cheating, you need it every time you play the game, but if you use it for ROM dumping, then you only need it working for a short time, so that you can dump your games. If it spontaneously self destructs after this, it doesn't matter, because it was only needed to work for a limited time. However, if anybody has any idea what causes these failures, and knows a fix (like soldering on a different value of resistor somewhere to prevent damage, because the manufacturers commonly used the wrong resistor size somewhere or something), then please let me know.
Title: Re: How to backup ROMs from N64 cartridges
Post by: Paul on July 23, 2015, 10:37:19 PM
Have you figured out yet how to get a USB to LPT converter working yet?

A port of gsuploader, called gs_libusb (https://github.com/hcs64/gs_libusb) demonstrates that it is possible to communicate with the Game Shark using a USB to LPT adapter (granted, it only works with an adapter that has the MCS7705 chip).  This particular library doesn't provide a method for dumping the ROM, but it does prove that you can communicate with the Game Shark, which is the first step.  Taking the code from this and adapting it to the n64rd (https://github.com/parasyte/n64rd) project is the route I am looking into.  I haven't worked on this in a while, though.. I need to get back to it.
Title: Re: How to backup ROMs from N64 cartridges
Post by: BlinksTale on March 23, 2016, 03:31:40 AM
Hi Paul,

Just wanted to say - this is amazing stuff! I found my old v3.2 GameShark from the late 90s, and my 2003 laptop running Windows XP with a builtin DB25 port (female) and all I needed was an $8 male-to-female printer cable to connect the two, and it worked seamlessly. This is by far the cheapest games dumping setup I've paid any money for!

My notes:
* It didn't need the conversion at the end, any .bin file seems to be supported by Mupen64Plus regardless of byte arrangement.
* Windows XP dumped Blast Corps fine with no modifications. Haven't done a checksum yet, (not sure where to look on that) but game runs for the first few levels just fine.
* Only took 6min to rip this one compared to the described 15min to multiple hours. Will be ripping more in the future, hoping for similarly good times.

Great stuff though, thanks!
Title: Re: How to backup ROMs from N64 cartridges
Post by: pRletrIaVo$p on January 22, 2017, 01:45:40 AM
Hello! I found this thread today and I bought everything I need. I want to back up my own cartridges as I did with my Gamecube and Wii games. Thank you for this step-by-step guide.
However, will this work on Windows 10 Pro? :\
Title: Re: How to backup ROMs from N64 cartridges
Post by: fzurita on January 22, 2017, 10:43:27 AM
It may not work, I would be surprised if you came find a Windows 10 PC with an LPT port though.
Title: Re: How to backup ROMs from N64 cartridges
Post by: pRletrIaVo$p on January 22, 2017, 12:01:38 PM
It may not work, I would be surprised if you came find a Windows 10 PC with an LPT port though.

I do have a "Print Port Header (25-pin LPT1)". I bought a cable mounted on a plate for the rear panel of my case. The UEFI of my motherboard has a few settings concerning the parallel port. I'll need to test them...

At the moment, my Antivirus hate WinRom64, but I'll try to fix that.

I'll receive all the parts in a few weeks and report back here. ;)
Title: Re: How to backup ROMs from N64 cartridges
Post by: pRletrIaVo$p on January 25, 2017, 01:45:09 PM
So... I received my Parallel female to IDC (25-pin header)...

Windows found it and its corresponding driver... How am I suppose to configure the "Filter Resource Method"? I don't know anything about IRQ or Interrupt... I have three choices as illustrated:

(http://i68.tinypic.com/fc2zr7.png)English version: (https://techrepublic-a.akamaihd.net/hub/i/2015/06/03/00798542-0988-11e5-940f-14feb5cc3d2a/t01620020402shu01_03.gif)

What should I choose? :P
Title: Re: How to backup ROMs from N64 cartridges
Post by: Paul on January 30, 2017, 10:50:10 PM
Sorry for the late response.  On my Latitude D600 which I've mainly been using to connect with the GameShark, it has IRQ 7, base address 0378-037a.  There are some other common configurations mentioned in this Wikipedia article (https://en.wikipedia.org/wiki/Parallel_port) as well you could try.

What operating system are you running on this system?  I've not gotten gscc to function on any version of windows past XP (and even that is unstable to the point of not really being usable -- this software works best on Win98).  It also runs well in wine, if you can get your system to dual-boot both windows and linux (I'm using Lubuntu on my Latitude).  If you really don't want to dual boot though, you may be able to get this working in a VirtualBox VM running an XP client (EDIT: actually, a Lubuntu client would probably be more stable than an XP client -- I'll test this out and post an update).  I can help you set that up if you want to go that route.
Title: Re: How to backup ROMs from N64 cartridges
Post by: pRletrIaVo$p on February 06, 2017, 10:34:35 PM
Thanks for the answer!

Phew! I received the GameShark last week. I also managed to install Lubuntu over VirtualBox. I also managed to launch a stable gscc.exe in 32-bit Wine...

My problem is that I think Lubuntu can't find the LPT port... My host (Windows 10 Pro) sees it and display the port in the Device Manager window...

Is there a way to verify whether or not the LPT port is available in Lubuntu? I would appreciate a little bit of help here.

(It took me a few hours! Tonight was the first time I touched VirtualBox. Thanks god I knew a little bit about GNU/Linux environment...)

Sorry. French is my native tongue and I don't practice English often... Thanks again, Paul, for all of this!
Title: Re: How to backup ROMs from N64 cartridges
Post by: Paul on February 07, 2017, 06:12:38 AM
I posted instructions for enabling the parallel port on Linux HERE (http://www.paulscode.com/forum/index.php?topic=1773.msg13221#msg13221).  But before you can do that though, you will need to make the parallel port visible to the Virtual Box guest machine.  The options for doing that are not visible in the Virtual Box settings UI, and have to be done with VBoxManage.

I'm going to set up a similar VM myself here before I post the instructions, so that I am giving you the correct information.  I'll post the instructions here.  If you want to do some searching in the mean time, there are instructions in the Virtual Box manual, or you probably can find it with a Google search. EDIT: For reference, see this thread (https://forums.virtualbox.org/viewtopic.php?f=24&t=54187)
Title: Re: How to backup ROMs from N64 cartridges
Post by: pRletrIaVo$p on February 07, 2017, 10:25:09 AM
Thanks again, Paul. I think I managed to configure the parallel port using VBoxManage, but I'm having trouble with Lubuntu and Wine. I don't have the ppdev key you wrote about in the registery. I tried the Wine User Guide (https://www.winehq.org/docs/wineusr-guide/misc-things-to-configure), but I would now like to know for sure whether or not Lubuntu and Wine detect my LPT port and the GameShark.

I want to know if I made a mistake (teminal inputs, apt-get mishaps...) or if the problem is "old stuff"-related. :P

Right now GSCC.exe can't auto-detect at all and all I get are "timed out" whenever I try to use "RAM Edit".

Gosh... This is black magic. :P (An idiot-proof guide would be great! :P )
Title: Re: How to backup ROMs from N64 cartridges
Post by: Paul on February 07, 2017, 12:58:29 PM
I don't have the ppdev key you wrote about in the registery.
I don't think the registry for "HKCU\Software\Wine\VDM\ppdev" exists out of the box.  You just have to add it, then put in a key "378" with value "/dev/parport0".  I recall there were some permissions issues when I did this before, so I'll set up another one like this from scratch, and let you know what I find.

Gosh... This is black magic. :P (An idiot-proof guide would be great! :P )
Haha, I'll try and put together a better guide if we get this setup going.  I've not tried a setup with Lubuntu as a guest on a Windows host, so will be interesting to see whether this works.
Title: Re: How to backup ROMs from N64 cartridges
Post by: Paul on February 09, 2017, 12:57:44 AM
I had some time to set up a test platform with a Windows host and Lubuntu guest.  I set this up on Dell Latitude D505 that I hacked together from laptop parts in the garage, so probably not the best use case, but good enough.  The host in this case is Windows 7, so results may not be the same for Windows 10 (I'll do a test with Windows 10 next).  The guest is Lubuntu 12.04 (latest version that will run in Virtual Box on this dinosaur, due to VirtualBox not recognizing that the Pentium M supports PAE)

Anyway.. long story short is that the Lubuntu guest machine fails to connect to the Gameshark in this configuration.  I have tested and verified that the parallel port is accessible from the guest machine.  Also, I have installed the exact same version of Lubuntu on this same machine alongside Windows 7, and it can connect to the Gameshark fine when it is not running in VirtualBox.  If you like, I can post my notes so far.  I'll be posting the full instructions after I get this set up under Windows 10, just in case anything goes differently.

I'm thinking another alternative (one which would not require you to dual-boot windows and linux) will be to get gscc  running after booting into an Ubuntu live CD (the "Try Ubuntu" option, versus "Install Ubuntu").  I'll experiment with this idea next, and post the results.
Title: Re: How to backup ROMs from N64 cartridges
Post by: pRletrIaVo$p on February 09, 2017, 06:06:04 PM
Thanks for doing those tests! I guess I'll try to find a Retrode or something...

My Windows 10 in running with Secure Boot and is fully-encrypted. I'm too afraid to dual-boot on it... I think I did such thing once with Windows Vista and Ubuntu.

I'll see what I'll do.

Thanks again!
Title: Re: How to backup ROMs from N64 cartridges
Post by: Paul on February 09, 2017, 07:38:45 PM
Don't resort to dual booting yet!  I've figured out a way to do this from a bootable CD or USB.  I am writing up instructions now, and will post them in a while.
Title: Re: How to backup ROMs from N64 cartridges
Post by: Paul on February 10, 2017, 08:39:18 AM
Quick progress update.  I have created a bootable ISO image which has wine already configured, and has links on the desktop to GSCC and WinROM64.  This means there will be a very small number of setup steps (basically just configuring the computer-specific address and IRQ settings for /dev/parport0), then you can start using GSCC right away.  Doesn't require installing a second OS or using a VM.  It is built on Lubuntu 12.04, so it should run on even very old pre-Pentium M computers up through modern computers that have a parallel port.

I've tested on a bootable USB and it works well.  I've kept the image under 4 GB, so that it can be burned to DVD as well (since a lot of old computers are not able to boot from USB).  I haven't tested booting from DVD yet (have to make sure it will run fine on a read-only file system).  Once I finish those tests, I'll post the ISO and configuration instructions.
Title: Re: How to backup ROMs from N64 cartridges
Post by: Paul on February 11, 2017, 11:57:36 AM
Another progress update.  Since my last post I learned that a true ISO image is in a read-only format called ISO 9660.  This means the output from "dd" is only a true ISO if the source is an optical disk.  Unfortunately, the output from dd with a hard drive or USB stick as its source cannot be easily burned to an optical disk.  It can only really be dumped onto another hard drive or USB stick (by simply running another "dd" command with the source and destination flipped).

In order to get a true ISO image that can be burned to a bootable DVD, things are a bit more complicated.  I found this guide (https://ubuntuforums.org/showthread.php?t=688872) on Ask Ubuntu, and just finished stepping through it.  My resulting ISO image however crashes after the Lubuntu splash screen, so I must have done a step wrong somewhere.  I've tried booting it in different modes, and from different machines, but all are having the same problem.

I'm going to try re-running the process from the beginning once more.  It took me a couple hours to get through the process the first round (granted, I was spending some time on each step Googling to learn its purpose).  If I can't get this working today, I'll post the output I have from dd, along with instructions for dumping it onto a USB stick.  Hopefully your computer is able to boot from USB.. if not, you may have to wait a while until I can generate a true ISO.
Title: Re: How to backup ROMs from N64 cartridges
Post by: pRletrIaVo$p on February 11, 2017, 03:04:19 PM
My computer is very recent and I think it can boot from USB, yep.
Title: Re: How to backup ROMs from N64 cartridges
Post by: Paul on February 12, 2017, 05:23:58 AM
I haven't gotten the ISO working yet, so I'll go ahead and post the bootable USB thumb drive solution for now.

First, you'll need to have a USB thumb drive that is at least 4GB or larger.  This process will completely erase its contents, so be sure to backup anything you might have on it before starting.

Second, you will need Virtual Box with a Linux guest installed on it (I used Lubuntu to write the instructions below, but the process is virtually the same for Ubuntu if you have that as a guest instead).  We will be using Linux for the "dd" command used to build the thumb drive.  There are Windows programs that could do this as well, but I am more familiar with Linux.  You can always delete the guest or completely uninstall Virtual Box when you are finished if you need to save space.

Download the n64gscc.raw file.  I have set up a room on SpiderOak called N64 Utils (https://spideroak.com/browse/share/PaulLamb/n64utils) where you can find a link to download it.

Once the file has been downloaded, copy it onto your thumb drive.  We are going to use the thumb drive initially to transfer the file into the Linux guest machine in VirtualBox (alternately, you could just download the file from inside the guest machine rather than from the host).

Go to your Linux guest machine settings, and add the thumb drive, under the USB section:

(http://www.paulscode.com/images/usb.png)


Now start up the Linux guest machine.  Once it has booted, open the thumb drive folder and drag the n64gscc.raw file onto your desktop.  This will take a long time to complete, so be patient.

(http://www.paulscode.com/images/drag.png)

Next, open up a terminal.  In Lubuntu, it is under Accessories->LXTerminal:

(http://www.paulscode.com/images/terminal.png)


Install GParted by entering the following into the terminal:
Code: [Select]
sudo apt-get install gparted

When GParted finishes installing, launch it.  In Lubuntu, it should be under System Tools -> GParted:

(http://www.paulscode.com/images/gparted.png)


In GParted, find your thumb drive in the drop-down selection at the top-right corner.  It will typically be listed as /dev/sdb but make sure it is the same for you (you can use the name and/or size to identify it.  Note if the letter for your thumb drive is not /dev/sdb (for example /dev/sdc or /dev/sdg).  You will need to know this later.

Once you have selected your thumb drive, right-click on the large rectangle that indicates the partition, and choose "Unmount" (note: if Unmount is greyed out, you can skip this step):

(http://www.paulscode.com/images/unmount.png)


Next, right-click on the partition again and select "Delete":

(http://www.paulscode.com/images/delete.png)

Finally, click the green check mark to apply the changes.  It will warn you about loss of data (don't worry -- worst that could happen here is you could erase your Linux guest machine if you have the wrong drive selected, such as /dev/sda)

If your thumb drive has more than one partition (which would appear as multiple partition rectangles instead of just one), repeat the above steps to delete all of them.

Next, open up the terminal again (Accessories->LXTerminal).  Enter the following command.  NOTE: if you saw in the previous step that your thumb drive was some letter other than /dev/sdb (such as /dev/sdc or /dev/sdg), modify the command to match.
Code: [Select]
sudo dd if=~/Desktop/n64gscc.raw of=/dev/sdb
The above command will take a very long time to finish, so be patient.  When it is complete, shut down the Linux guest machine.  Your thumb drive should now be ready to use!


OPTIONAL STEPS:
"Checking the thumb drive for errors": show

From your Virtual Box Linux Guest (with thumb drive plugged in), launch GParted (System Tools -> GParted), and select your thumb drive from the dropdown on the top-right (typically /dev/sdb).  Check to see if there is a warning icon:

(http://www.paulscode.com/images/warning.png)

If there is, right-click on the first partition and select "Check".  Click on the green check mark icon to apply the changes.

"Adding space to the thumb drive for everyday use": show

If your thumb drive is larger than 4GB, there will be a lot of wasted space after running the above process.  You can make this area available for everyday use (so that your thumb drive doesn't have to be dedicated to only running the N64 utilities).

To do this, launch your Virtual Box Linux Guest (with thumb drive plugged in), run GParted (System Tools -> GParted), and select your thumb drive from the dropdown on the top-right (typically /dev/sdb).

Right-click on the empty unallocated space in the partitions rectangle, and choose "New".  For the file system, select "fat32":

(http://www.paulscode.com/images/fat32.png)

Click "Add", then click the green check mark icon to apply the changes.


BACK OUT:
"Restoring the thumb drive to its original state": show

If you want to completely remove the utilities from your thumb drive and restore it to its original (empty) state, start up your Virtual Box Linux Guest (with thumb drive plugged in).  Once it is loaded, launch GParted (System Tools -> GParted), and select your thumb drive from the dropdown on the top-right (typically /dev/sdb).  Right click on any partitions and choose "Delete".  Click the green  check mark icon to apply the changes.  The rectangle should now show only empty (unallocated) space.

Then right-click on the empty unallocated space and choose "New".  For the file system, choose "fat32":

(http://www.paulscode.com/images/fat32.png)

Click "Add", then click on the green check mark icon to apply the changes.

Title: Re: How to backup ROMs from N64 cartridges
Post by: Paul on February 12, 2017, 05:57:28 AM
Once you have successfully built your USB thumb drive, begin by restarting your computer and booting from it.  How to do this will depend on your particular system.  Typically you press some key during bootup that brings you into the bios settings, and there will be either a boot menu where you can boot from the thumb drive directly, or there will be a boot order list where you will want to move the thumb drive up to the top.

During bootup, you may see some strange graphical artifacts or the screen may go black for a while.  This is just Lubuntu adjusting to your computer's hardware.  Give it a little time, and it should eventually bring up a Lubuntu desktop.  If it never boots up, let me know.  I've only tested on three computers here, so I can't say how robust this is..

Once it boots up, you should see three icons on the desktop:

(http://www.paulscode.com/images/n64utils.png)



For the below instructions, use the password "gscc".


OPTIONAL FIRST STEP:
If you are paranoid about running this for any length of time on a computer with an open network connection, now might be a good time to change the password.  Open up a terminal (Accessories->LXTerminal) and enter:
Code: [Select]
passwd

CONFIGURE LPT:
The first thing you will want to run is "Configure LPT".  This will prompt you for a password.  Since you are running this from a USB thumb drive, you should only need to do this step once.  If you run this from a DVD later (when I get the ISO working) you'll need to do this every time you start the system.  If it is successful, you should see a message letting you know the parallel port is ready (the success message may or may not list the IRQ and base address):

(http://www.paulscode.com/images/ready.png)


LAUNCH GSCC:
Once the parallel port is configured, open the GSCC app to launch GSCC via Wine!


TROUBLESHOOTING:
If you see an error message when you open the Configure LPT app, you will need to set up the parallel port manually.

"Configuring the parallel port manually": show


To check if your LPT port is active, first run:
Code: [Select]
sudo cat /proc/ioports | grep parport

If this does not produce any output, then continue.

Run the following two commands:
Code: [Select]
sudo modprobe -r lp
sudo modprobe -r parport_pc

Then run the following command:
Code: [Select]
sudo lspci -v
Look through the output for a block that starts with "Parallel controller".  Will look something like this:
Code: [Select]
03:06.2 Parallel controller: NetMos Technology PCI 9865 Multi-I/O Controller (prog-if 03)
Subsystem: Device a000:2000
Flags: bus master, medium devsel, latency 64, IRQ 10
I/O ports at e000 [size=8]
I/O ports at d800 [size=8]
Memory at febfb000 (32-bit, non-prefetchable) [size=4K]
Memory at febfa000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [48] Power Management version 2

Note the two addresses that are on lines that start with "I/O ports at ..."  The first one is the base address of your LPT port.  Write this down somewhere for reference (will be different than in the above example).  Also write down the IRQ number (10 in the above example)

Next, run the following commands (replace e000 with the address you wrote down in the previous step):
Code: [Select]
sudo modprobe parport_pc io=0xe000
sudo modprobe lp

At this point, if you run the first command I listed earlier, you should now be getting some output:
Code: [Select]
sudo cat /proc/ioports | grep parport
To make the changes apply the next time you reboot (ONLY APPLIES WHEN BOOTING FROM THUMB DRIVE):
Code: [Select]
sudo nano /etc/modprobe.d/parport_pc.conf(This will typically be empty, since you are creating a new file).  Add the following lines to the file and save (don't forget to replace e000 with the address you wrote down earlier, and 10 with the IRQ number you wrote down):
Code: [Select]
alias parport_lowlevel parport_pc
options parport_pc io=0xe000 irq=10

Finally, edit the following file:
Code: [Select]
sudo nano /etc/modulesAdd the following lines and save (lp may already be in there, only add it if it is not):
Code: [Select]
parport_pc
lp

That's it.  Reboot your computer and make sure everything worked by checking if you still get output from the first command I listed above:
Code: [Select]
sudo cat /proc/ioports | grep parport


"Reviewing the notifications after they disappear": show

If the notification didn't stay up log enough for you to read it, or if you want to take note of it later to post here for help, you can click on the notifications icon at the bottom-right of the screen:

(http://www.paulscode.com/images/notifications.png)


"Parallel port not configured message when launching GSCC": show

If you get a message about the parallel port not being configured when you try to open the GSCC app, you may have to set up the parallel port manually.  If you have configured the parallel port manually but still see this message, launch GSCC from the terminal (Accessories->LXTerminal):
Code: [Select]
wine "C:/Program Files/N64Utils/gscc.exe"
Title: Re: How to backup ROMs from N64 cartridges
Post by: pRletrIaVo$p on February 18, 2017, 04:37:55 PM
Observations:


I'll add more info as I follow your guide. More to come.
Title: Re: How to backup ROMs from N64 cartridges
Post by: Paul on February 18, 2017, 07:30:20 PM
Oh, good catch I forgot about that step.  Mine was MSDOS.  Let me know if it works with GPT or if you have to go with MSDOS, and I'll update my instructions.
Title: Re: How to backup ROMs from N64 cartridges
Post by: Paul on February 23, 2017, 12:13:52 PM
I'm having difficulties booting from the USB key. One third of the screen is black and the other part is a greenish background. I'll try to plug my monitor with a different cable... I hope it's only a video output problem... Since my screen goes strange, I guess the USB is booting after all... I had to run Ubuntu as a virtual machine instead of Lubuntu because the video output had artifacts...

Ok, let me know if you can't get it to work.  I can make a newer version based on latest Ubuntu LTS rather than outdated Lubuntu version I used for this one.  This older version is meant to support old computers (pre- Pentium M).
Title: Re: How to backup ROMs from N64 cartridges
Post by: CoBrA2168 on March 21, 2017, 09:57:08 AM
Paul,

These last few days I've tried, and failed to get a dumping setup of my own so that I can legally play my own ROMs.

Here's what I got:

Before installing Windows XP on this machine, I tried your Lubuntu image.  I managed to get it on a USB drive (using Disk Utility and the dd command on OSX instead of using Gparted on Linux).  It boots up, I click on "Configure LPT," it says that it was successful, but GSCC can never find the port.  It always says that communication timed out.

When this was a dead end for me, I decided to try the Windows XP route.  Unfortunately that's the earliest version of Windows I own so I had to go with that.  I got the tools loaded up on this machine with a bit more success.  This time GSCC finds the correct address in the Configuration section, and even will begin to dump the game.  I can see the lines spinning on the GSPro indicating that I/O is in use.  However, after a seemingly random amount of time (usually 30 seconds or less), the spinning icon on the GS will stop, and GSCC will tell me that the communication timed out.  The only resort is to reboot the N64 and try again.  I've done this about 30 or so times, and it always fails.  It's not ever completed the dump past say, 15%.

I've tried different versions of GSCC, checking the "compatibility mode" on the executable, updating the BIOS to the latest version, changing the Parallel port BIOS settings, etc.  I'm out of options at this point and don't know where to go.  It wasn't easy for me to procure this old hardware, and if I can't get this working, I'll likely just give up on the project.  Any help would be greatly appreciated!

EDIT: I decided to check all of my connections again and do the good ol' "blow into the cartridges" trick, and what do you know...I'm dumping games now!  So far I've dumped about 6 games.  FYI, I'm dumping in the Windows XP environment.

Some games do not boot with the GameShark, since I think I need a specific "key code" to load those games.  Awesome work Paul, thanks for all of the documentation and help!
Title: Re: How to backup ROMs from N64 cartridges
Post by: Paul on March 22, 2017, 07:45:51 AM
Yeh, it seems that "fool proof" USB image isn't really very robust.  I only have two computers with LPT ports to test it on, so no doubt I haven't covered all (or probably even most) configurations that can be encountered.  I just need to finish writing my own ROM dumping application rather than relying on these ancient ones.

In my own experience, GSCC running on Windows XP tends to be much less stable than on Windows 98 or WINE, but it does work if you are persistent.  Glad to hear you were able to get it going.
Title: Re: How to backup ROMs from N64 cartridges
Post by: CoBrA2168 on March 23, 2017, 06:39:44 AM
Yeh, it seems that "fool proof" USB image isn't really very robust.  I only have two computers with LPT ports to test it on, so no doubt I haven't covered all (or probably even most) configurations that can be encountered.  I just need to finish writing my own ROM dumping application rather than relying on these ancient ones.

In my own experience, GSCC running on Windows XP tends to be much less stable than on Windows 98 or WINE, but it does work if you are persistent.  Glad to hear you were able to get it going.
Yeah, I think it's a great start and a perfect place for people to start.  I'm still unsure why it didn't work for me - maybe Lubuntu simply was not compatible with the parallel port hardware?  When querying the hardware, I did see "parport0" so I'm really not sure.

Since I had so much success with my setup (I successfully dumped my entire game library - 26 games - with absolutely zero issues after the initial problems), I figured I'd give as much detail as I can about my setup.


If anyone has any questions or runs into any issues, feel free to let me know.  Also, I have another one of these laptops available that may or may not be functioning.  If anyone here has any interest, I can check to see if it still works.  If it does, I'd gladly give it to someone as long as they're willing to pay the shipping.

However, I do have a question for Paul (or anyone else) about verifying dumps.  I did the CRC check in WinRom64 and about 8 or so of them come back with bad CRC check (with the option to fix it).  I did not fix them yet, but I verified that they still run in the emulator I'm using (OpenEMU on OS X, which uses mupenplus as the core).  Should I redump these games that have invalid CRC?

EDIT: I did another dump of one of the culprit games (Zelda OOT) and I got the same exact "bad" CRC.
Title: Re: How to backup ROMs from N64 cartridges
Post by: xperia64 on May 10, 2017, 09:32:10 PM
Recently came across an old Netmos MP9835 dual serial/parallel PCI card and I have successfully dumped an N64 ROM using this.
I tried first in Ubuntu but I could not get GSCC to pick up the port correctly. For some reason Ubuntu thought I had two parallel ports.

I ended up using this card with Windows 7. Amazingly, this chip has actively updated drivers even for Windows 10.
I just spun up a Windows 98 VM in VMware, gave it LPT1, and GSCC worked out of the box and even autodetected the settings correctly.

I will try this in a Windows XP VM later, but this appears to be another viable way to dump ROMs and use all the features of GSCC on more modern computers.