Go Down

Topic: ROM-Reader for Super Nintendo / Super Famicom Game Cartridges (Read 207237 times) previous topic - next topic

RyoHazuki

Yeah, i was thinking the same, i'll try to panelize them with eagle. Thank you.

skaman

Nice  8)
With 3.0 I updated all the libraries to the latest version and made the code compatible with the newest Arduino IDE. Glad it helped.

I had this problem with one board too some time ago. However, it did work consistently when I removed the Adafruit Clock Generator module. So my guess is that there is a data, address or control line in the code that needs the pullups activated to not be influenced by outside noise/interference.
But that's just a guess ofc, I only had it on one single board, so not enough data for a valid conclusion.
Thanks sanni.  My portable GB reader doesn't have the clock module.  I reassembled my GB reader and the NP GB carts now work.  Maybe I had a finicky test cart but I remember that I tried a couple when I first encountered the problem.  It could have been a power issue since I run the reader off the LiPo battery.  Everything works now so I'm happy.

KnightofTime

#782
Apr 26, 2019, 10:16 pm Last Edit: Apr 27, 2019, 12:45 am by KnightofTime
Hi,

I finally got the cart reader that moldov reserved for me, although I'm not at the greatest start with it yet, when I attempted to copy a Super Mario RPG save to the cartridge, the cart reader told me that some bytes didn't verify (I noticed that when the cart reader is plugged into a USB slot in my gaming laptop, and also when plugged into the charger my mom uses for charging her phone (AFAIK her charger is 5V))...will I need to clean the cartridge?  Also, the cart reader is listing the cartridge as HiROM, while the ROM map of the game (when I load a rom of it in an emulator like Snes9X) lists it as LoROM.  Does the cart reader need to list the cartridge as LoROM or something?

Hopefully I'll be able to get used to the cart reader sooner or later.

Edit:  I tested the cart reader with all of my Nintendo 64 games, but it's giving me a messed up version of each game it reads, and telling me the cartridges are unknown to it.  Should I clean all the Nintendo 64 cartridges then?

Agusum

This is such an impressive project!

I would love to have one cart reader with the GB and N64 modules but I have no experience with Arduino nor soldering so I'm afraid I won't be able to do it.

Is there any place where I can buy one?

Thanks!

sanni

Just buy one of the commercially available open-source alternatives:
- For just Game Boy and Game Boy Advance: https://shop.insidegadgets.com/product/gbxcart-rw/
- For NES, SNES, MD, N64, GB and GBA: http://www.infiniteneslives.com/inlretro.php
- For writing flash roms: https://www.embeddedcomputers.net/products/FlashcatUSB_xPort/

My Arduino Cart Reader project stems from a time where you had to pay $130 for a closed-source Retrode 2 that couldn't even read most of the cartridges nor savegames. Nowadays there are much better products on the market, so unless you can solder it together for cheap yourself there is no reason to even want to buy an Arduino Cart Reader.

pyroesp

I was wondering why you still use this in your NPWriter code (writeBankClock/readBankClock):
Code: [Select]

  if ( (myAddress & 1) == 1 ) digitalWrite(a0Pin, 1); else digitalWrite(a0Pin, 0);
  if ( (myAddress & 2) == 2 ) digitalWrite(a1Pin, 1); else digitalWrite(a1Pin, 0);
  if ( (myAddress & 4) == 4 ) digitalWrite(a2Pin, 1); else digitalWrite(a2Pin, 0);
  if ( (myAddress & 8) == 8 ) digitalWrite(a3Pin, 1); else digitalWrite(a3Pin, 0);
  if ( (myAddress & 16) == 16 ) digitalWrite(a4Pin, 1); else digitalWrite(a4Pin, 0);
  if ( (myAddress & 32) == 32 ) digitalWrite(a5Pin, 1); else digitalWrite(a5Pin, 0);
  if ( (myAddress & 64) == 64 ) digitalWrite(a6Pin, 1); else digitalWrite(a6Pin, 0);
  if ( (myAddress & 128) == 128 ) digitalWrite(a7Pin, 1); else digitalWrite(a7Pin, 0);
  if ( (myAddress & 256) == 256 ) digitalWrite(a8Pin, 1); else digitalWrite(a8Pin, 0);
  if ( (myAddress & 512) == 512 ) digitalWrite(a9Pin, 1); else digitalWrite(a9Pin, 0);
  if ( (myAddress & 1024) == 1024 ) digitalWrite(a10Pin, 1); else digitalWrite(a10Pin, 0);
  if ( (myAddress & 2048) == 2048 ) digitalWrite(a11Pin, 1); else digitalWrite(a11Pin, 0);
  if ( (myAddress & 4096) == 4096 ) digitalWrite(a12Pin, 1); else digitalWrite(a12Pin, 0);
  if ( (myAddress & 8192) == 8192 ) digitalWrite(a13Pin, 1); else digitalWrite(a13Pin, 0);
  if ( (myAddress & 16384) == 16384 ) digitalWrite(a14Pin, 1); else digitalWrite(a14Pin, 0);
  if ( (myAddress & 32768) == 32768 ) digitalWrite(a15Pin, 1); else digitalWrite(a15Pin, 0);
//...



When in other places you use this instead (which is better :) ) :
Code: [Select]

  PORTF = myAddress & 0xFF;
  PORTK = (myAddress >> 8) & 0xFF;


Still waiting for my SD card adapter and then I'm all set!

Agusum

Thanks for the links sanni!

The INLretro Dumper-Programmer seems to be still in beta and have many limitations. Have you tested if it works to extract and load save files for N64 and GBA?

sanni

I tested the cart reader with all of my Nintendo 64 games, but it's giving me a messed up version of each game it reads, and telling me the cartridges are unknown to it
Make sure the N64 carts are plugged in perfectly centered, that the voltage is 3.3V and that the n64.txt was copied to the SD card. You can also try out a different SD card.

I was wondering why you still use this in your NPWriter code
I just stopped working on the NPwriter.ino code once I integrated everything into the main project. And since I don't use those two functions in the main project they never got updated.

Have you tested if it works to extract and load save files for N64 and GBA?
I have not tested it and I would assume that not everything works yet but it does seem to get frequent updates and the price seems fair too.

Newbie2

Nowadays there are much better products on the market, so unless you can solder it together for cheap yourself there is no reason to even want to buy an Arduino Cart Reader.
Yours is the only one that doesn't require a PC to use, making it much more conducive to portable use.

Would love a plastic case for it, but since you've done so many versions and mine is now two versions old I'm guessing that won't happen :)

sanni

If you tell me the exact PCB version I can upload the Sketchup file so you can build an enclosure around it and have it 3D printed.



The one currently uploaded on Github is PCB V17 and missing from the above picture.

pyroesp

Hey, I have an Nintendo Power cart and can't figure out how to add/change the game that's currently on.
I have a backup of the mapping and flash. The installed games are the menu and derby stallion 98.
I'd like to use this cart to translate the Japanese SFC games I have (FF, DQ, Chrono trigger, Zelda, ...).
Can anyone tell me how I can change or add the games onto the NP cart ?

Also, Sanni, while messing around with the NP menu of your cart reader I saw that the ROM name isn't cleared.
Instead of showing "MENUPROGRAM" it shows "MENUPROGRAM98", with the 98 from Derby Stallion 98.
Fixed it by adding a memset at the top of function getCartInfo_SNES() to clear the romName string.

sanni

The NP cart is a complicated beast. All roms need to have valid checksums or they won't launch. They also can't have an emulation/copy station header. So the first thing to do is to check your roms with a program like NSRT and if needed fix the checksum with Snes Rom Checksum Fixer.

Case 1: Single Game
The NP cart has 4MByte, the menu needs 512KByte of that. So for a 4MB like Chrono Trigger you can't have a menu, just the game. In this case just flash the translated Chrono Trigger rom and then flash the hirom64.map file. Your NP cart should now act as if it was a Chrono Trigger cartridge.

Case 2: Multiple Games
If the sum of your roms does not exceed 3.5MByte you can flash multiple roms including the menu. In this case you need to extract the menu from your NP backup, it's the first 512KB of the 4MB file. I wrote a small program that splits the NP file automatically or you can split it manually using a hex editor.
Next you'll need to download and start SF Memory Binary Maker to create the mapping and the combined menu/rom file.

I have made a small code change to the SF Memory Binary Maker that lets you manually select HiRom/LoRom since some roms get the wrong type assigned sometimes.
Code: [Select]
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SF_Memory
{
public static class Processing
{

public static ROM ParseROM(MemoryStream Data, String File = null)
{
ROM Output = new ROM();
Output.ROMFileSize = Data.Length;

DialogResult dialogResult = MessageBox.Show("Press yes for hiROM and no for loROM", "Select ROM type", MessageBoxButtons.YesNo);
if (dialogResult == DialogResult.Yes)
{
Data.Position = 0xFFD5;
}
else if (dialogResult == DialogResult.No)
{
Data.Position = 0x7FD5;
}

Output.CartridgeType = (byte)Data.ReadByte();



pyroesp

Awesome thanks!

EDIT:
Flashing the original Chrono Trigger + hirom map works great, but the translated version gets modified to ext hirom, from what I can tell in NSRT, for some reason.
Still have to try multiple games, but it's cool to see it working.

Thanks for the cart reader Sanni!

KnightofTime

#793
May 04, 2019, 10:09 pm Last Edit: May 05, 2019, 01:30 am by KnightofTime
Make sure the N64 carts are plugged in perfectly centered, that the voltage is 3.3V and that the n64.txt was copied to the SD card. You can also try out a different SD card.
Hmm, sanni, would it be best for the SD card to have no other files besides all the required files and the save files I want to copy to the various cartridges I might use the cart reader with.  Since moldov set up my cart reader to only accept micro SD cards and not full-sized SD cards, the Micro SD card I have been using is a Kingston 8GB SDHC card.

I have been using the correct voltage and I have n64.txt on the micro SD card, though I can't quite understand why the cart reader still isn't reading my Nintendo 64 cartridges correctly even after I cleaned them all earlier today (I've been putting them in the center of the Nintendo 64 slot too).  While I'm thinking of it, can other files on the SD card cause problems for the cart reader if they (1) have nothing to do with the cart reader, and (2) are not save files?

Edit: One thing I almost forgot about, when it comes to a power source, would an Apple phone charger work?  It's what my mom has, but since I'm just a little nervous it only works 100% for Apple products compatible with it, I can't help but wonder if I'd be better off purchasing a different 5V power source, like an Amazon brand from Amazon.ca or Amazon.com?

sanni

Copying everything from your SD card to your PC and then formatting the SD card with FAT32 Format and only copying the n64.txt to the root of the SD would be worth a try.

Any 5V/1A USB 2.0 phone charger from a reputable manufacturer should work. Just stay away from the $2 Chinese clones.

I just tried an original Apple Charger from an Iphone 4 or 5 and that worked flawlessly too, even for unlocking SA-1 SNES carts.

Go Up