Help with SNES Jurassic Park save patch

A place that you can discuss reproduction of classic titles or "licensed-for-reproduction" homebrew for personal use.

Moderators: B00daW, Moderators

Forum rules
1. NO BLATANT PIRACY. This includes reproducing homebrew less than 10 years old, with the exception of free software.
2. No advertising your reproductions, with the exception of free software.
3. Be nice. See RFC 1855 if you aren't sure what this means.
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Help with SNES Jurassic Park save patch

Post by Fisher »

Hi.
I'm trying to do a Jurassic Park repro with the SRAM patch.
I'm using an 2A5M donor board, since it has 256k of SRAM, 2x what the author claims necessary to 3 save files.
As usual, I've applied the patch, tested on SNES9x, removed the header did the swapbin and split the ROM and burned it to 2 M27C801 that verified ok on the programmer.

After assembling, it won't boot, just giving me a black screen.
I revised many times the PCB / hardware and could not find anything wrong with it.
Did someone tried this on real hardware and knows if it works?
I'm posting pictures of the PCB.
What else can I try to fix it?
Attachments
Rewire
Rewire
Front
Front
Back
Back
User avatar
Ziggy587
Posts: 174
Joined: Fri Oct 08, 2010 6:08 pm
Location: NY, USA

Re: Help with SNES Jurassic Park save patch

Post by Ziggy587 »

I just patched the ROM and tried it on my FX Pak Pro, and it seems to work as intended. I started a new save file, walked around and died (which is one of the triggers to save). Then I reloaded the game and my save file was there. I loaded the save file and I spawned around where I died, instead of the normal starting point by the main gate.

Here's the checksum for my patched ROM...

CRC32: 4768DBAC

edit: Very clean looking install, by the way. Did you check to make sure pins 24 and 31 aren't shorting?
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: Help with SNES Jurassic Park save patch

Post by Fisher »

Thanks, Ziggy587.
The CRC32 of the file before the swapbin matches.
I looked for shorts, especially on the rewiring part and control bus and they seem fine.

Strangely, when testing using Lidnariq's memory viewer the program crashes after the hot swap.
If I go to another address that is not 0x8000, like 0x7E00 before hot-swapping it works fine.
I even checked some bytes of the cart and they matched.
Maybe I have some conflict here, perhaps a "bad MAD"?

Or maybe I have badly written EPROMs, even if the check after programming was OK.
It happened once and I have even forgotten about it, but it may be biting me again...

So thanks, I'll try to remove the EPROMs and check them again, or maybe try to build something that can read the cartridge as is.
User avatar
Ziggy587
Posts: 174
Joined: Fri Oct 08, 2010 6:08 pm
Location: NY, USA

Re: Help with SNES Jurassic Park save patch

Post by Ziggy587 »

If the two EPROMs verify OK... Are you sure you installed them in the correct sockets? ROM1 /OE to MAD-1 pin 16, and ROM2 /OE to MAD-1 pin 1.
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: Help with SNES Jurassic Park save patch

Post by Fisher »

Well, 1st EPROM I programmed I marked with a small pencil trace, the second I marked with 2.
As can be seem on the pictures, the 1st is on P0 and the 2nd on P1.
I removed them and tested, they passed the test.
Strangely, putting LEDs on MAD pins 1 and 16 shows that pin 1 never gets enabled.
I'll reassemble and try a 74'139, let's see if it boots.
If it checks for SRAM on boot I'm sure it won't.
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: Help with SNES Jurassic Park save patch

Post by Fisher »

Not sure if I should be happy or worried, but now I see random garbage on screen and the LEDs seem to be alternating quickly and I didn't try the 74'139 yet.
I'll try to make a video and post here later.

Does someone knows of a document that describes the SNES boot process?
I know I've seem it before, but I can't find it.
I need to know what address(es?) are accessed first.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Help with SNES Jurassic Park save patch

Post by lidnariq »

Just the normal 65816 process - load the vector from 00FFC/D and set the PC to that address, in "emulation" mode
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: Help with SNES Jurassic Park save patch

Post by Fisher »

Tried the 74'139 with the same result. :-(
lidnariq wrote: Sun Oct 30, 2022 6:13 pm load the vector from 00FFC/D
So the 1st ROM staying active probably means there's some bad data that makes it crash.
Any chances of a failed swapbin?
Did it happen to anyone?

I'll do a CRC check on the files I programmed vs non-swapped files, I think this may be it.
User avatar
Ziggy587
Posts: 174
Joined: Fri Oct 08, 2010 6:08 pm
Location: NY, USA

Re: Help with SNES Jurassic Park save patch

Post by Ziggy587 »

Maybe try and reprogram the EPROMs without using SwapBin? Just in case it's messing something up there.

Or if you have a 74LS139 or 74LS00 on hand, try wiring the EPROMs up with that and remove the MAD-1 and SRAM. That way it'll point to a ROM problem or something else.
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: Help with SNES Jurassic Park save patch

Post by Fisher »

Ziggy587 wrote: Mon Oct 31, 2022 5:26 am Or if you have a 74LS139 or 74LS00 on hand, try wiring the EPROMs up with that and remove the MAD-1 and SRAM. That way it'll point to a ROM problem or something else.
Did that yesterday before going to sleep with the same results.

I did a "quick and dirty" test just now:
- Asked my wife to zip and send me all files in the folder I was working on;
- Unzipped them on a local folder;
- Used split to split the original ROM into 2 files; and
- CRC32'ed all files on the folder.

The result:
Captura de tela em 2022-10-31 10-48-35.png
AFAIK swapping data on the file should generate a different CRC32, if so, looks like I've found the failure!
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: Help with SNES Jurassic Park save patch

Post by Fisher »

Oh yeah.
That was it!
Somehow the PC I was using was not generating the swapped files correctly.
I generated in other PC, erased and reprogrammed the EPROMs and voilà!
20221031_200521.jpg
After all I just ran an antivirus on that PC.
It found some viruses and after the removal it didn't boot anymore.
So, backup, format and reinstall!

Thanks guys!
User avatar
Ziggy587
Posts: 174
Joined: Fri Oct 08, 2010 6:08 pm
Location: NY, USA

Re: Help with SNES Jurassic Park save patch

Post by Ziggy587 »

Damn those viruses that mess up cart hacking!

Glad you got it working. :D
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: Help with SNES Jurassic Park save patch

Post by Fisher »

Ziggy587 wrote: Mon Oct 31, 2022 6:34 pm Damn those viruses that mess up cart hacking!
Yeah, but looks like it was trying to steal some sensitive data from me and got triggered by SNES Tool, who knows why...
Guess I've found a bug on a virus! :lol:
Ziggy587 wrote: Mon Oct 31, 2022 6:34 pm Glad you got it working. :D
I was very glad, but discovered just a few moments ago that it isn't saving.
I'll look for it tomorrow, probably it's some bad soldering or other stupid mistake of mine. :|
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: Help with SNES Jurassic Park save patch

Post by Fisher »

Well, I think I was vague when I said it isn't saving...

I tested playing with the 1st file.
After the game over it showed the small percentage I did get.
The 3rd file was showing 100%, so I tried it.
The game started and I was stuck and soon died and got a game over again.
After powering the console off for a dozen seconds I powered it up again and all files were showing as new.

I looked for broken/shorted traces on the SRAM pins and control bus, all seems fine.
The SRAM is getting 3.2V with the cartridge out of the console, so I think it's OK.
I tried to change the SRAM chip and disconnect and pull its A14 pin down with the same result.
Not sure what to do now, the MAD pins seem fine too, does someone have any suggestions?

Thanks in advance.
User avatar
Memblers
Site Admin
Posts: 4044
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Re: Help with SNES Jurassic Park save patch

Post by Memblers »

At this point I would look into the code, setting a breakpoint on reads to BRAM, to try and get a feel for how (or even if) the data is being validated. It should be fairly intensive. It's really easy to get things wrong when handling non-volatile RAM. Unless it's known that the developer tested it on a repro cart, I'd be prepared for it to not work reliably. If they only tested it on emulators or flash carts, all the RAM was initialized (probably to all zeros) before the game even saw it, which is definitely not going to be the case with a normal cart.
Post Reply