News:

Retrode - Honey, fire up the emulator! My Retrode just arrived

Main Menu

Progress on N64/GBA save support?

Started by Zerker, 01/Jun/2013 12:00:40 PM

Previous topic - Next topic

MrPete1985

Do the different RAM chips have different read / write algorithms?  I thought all 3 were interchangeable on the PCBs

skaman

FlashRAM is controlled using the status register and command register.  We don't see the actual programming algorithms.  I've never disassembled an N64 ROM but I would assume that the program identifies the flash type based on the chip ID and adjusts to match.  This is what I do in the Retrode firmware.

There is a difference in how the data is addressed.  The new flash (MN63F81 and MX29L1101) can be addressed identical to the SRAM.  The old flash (MX29L1100) uses 128 byte blocks which presented a problem on the Retrode.  I had to shift the addresses for the old flash in order to read out complete blocks.

newbie2

Quote from: skaman on 23/Aug/2017 06:03:13 PM
FlashRAM is controlled using the status register and command register.  We don't see the actual programming algorithms.  I've never disassembled an N64 ROM but I would assume that the program identifies the flash type based on the chip ID and adjusts to match.  This is what I do in the Retrode firmware.

There is a difference in how the data is addressed.  The new flash (MN63F81 and MX29L1101) can be addressed identical to the SRAM.  The old flash (MX29L1100) uses 128 byte blocks which presented a problem on the Retrode.  I had to shift the addresses for the old flash in order to read out complete blocks.

Is there a list of games that use old flash, I've only seen the list of US games that support flashram. Have you already released an updated beta or are you waiting until writing is done?

skaman

#48
FlashRAM is grouped into OLD flash (MX29L1100) and NEW flash (MX29L1101 and MN63F81).  The most common flashram chip is the MX29L1100.  The least common chip is the MX29L1101.

sanni attempted to gather the FlashRAM info from users across various forums.  He posted a list and updated it as users responded.  The effort eventually died when we looked at the results and realized that Nintendo could use any flashram chip in any cart.

Here's the last list that I'm aware of.  Please don't take it as the definitive list as the sample size was small and, as I mentioned, the effort died pretty quickly.

Animal Crossing
29L1100KC-15B0 or MN63F81MPN
April 2001

Command & Conquer
29L1100KC-15B0
May 1999

Jet Force Gemini
NTSC: 29L1100KC-15B0 PAL: 29L1101KC-15B0
October 1999

Ken Griffey Jr's Slugfest
29L1100KC-15B0
May 1999

Zelda Majora's Mask
29L1100KC-15B0 or MN63F81MPN
April 2000

Megaman 64
MN63F81MPN
November 2000

NBA Courtside 2
29L1100KC-15B0
October 1999

Paper Mario
MN63F81MPN or 29L1100KC-15B0
August 2000

Pokémon Puzzle League
29L1100KC-15B0
September 2000

Pokémon Snap
29L1100KC-15B0
March 1999

Pokémon Stadium
29L1100KC-15B0
February 2000

Pokémon Stadium 2
29L1100KC-15B0 or MN63F81MPN
December 2000

Starcraft 64
29L1100KC-15B0
June 2000

Tigger's Honey Hunt
29L1100KC-15B0 or MN63F81MPN
November 2000

WWF: No Mercy
MN63F81MPN or 29L1100KC-15B0
November 2000


No new BETA yet.  I'm working on implementing the FlashRAM erase and write code.

skaman

N64 FlashRAM support is complete.  New BETA firmware is in the hands of the testers.

skaman

Received my Dezaemon 3D cart from Japan.  My experimental SRAM code for its 768Kbit SRAM isn't working.  I'll need to locate the RAM within the address space and correct the masking.

I've gotten reports from some testers that the SRAM and FlashRAM is working for them.

One tester wanted me to mention that the CONFIG setting "[sramReadonly] 1    ; write protect SRAM? 0=no, 1=yes" affects the SRAM AND FlashRAM files.  Maybe I should change the setting to "[saveReadonly]"?


skaman

Fixed Dezaemon 3D 768Kbit SRAM.  Modified the Config file to change "[sramReadonly]" to "[saveReadonly]" since the same setting is applied to all save files including SRAM, FlashRAM, and Controller Pak.

newbie2


ssokolow

#53
Quote from: skaman on 19/Aug/2017 06:27:12 PM
If you want to use your SRAM save in the PJ64 emulator, then you'll need to save swap the file.

You can use saturnu's ED64-Saveswap program:  http://krikzz.com/forum/index.php?topic=1396.0

If have an Ocarina of Time save and want to check it without using an emulator, you can use this page:  https://bkacjios.github.io/OOT-Save-Converter/

After saveswapping the OOT .SRA, then use the first option "Import save file".  The save data will show in the bottom.  Click on the File# to see the details on each save slot.

I'm going to work on adding FlashRAM save reads.

In case any non-Windows users want an option that doesn't rely on Wine and can be incorporated into scripts, I whipped up a Python-based, GUI-less alternative to ED64-Saveswap:

https://github.com/ssokolow/saveswap

It's got a complete unit test suite and, aside from one minor usability wart I need to fix, it works with every save file I tested.

Given that some virus scanners seem prone to identifying EXE-ified AutoIt scripts (like ED64-Saveswap) as viruses, I'll probably put together a simple GUI version and py2exe it for Windows users at some point.

skaman

I'm still working on the N64 stuff.

A BETA tester brought up a couple preexisting issues with the firmware.  The Config file defaults to using ".n64" for the N64 ROM extension when it should actually be ".z64" to reflect the native big-endian format.  I'm changing the default to "z64" in the next release.  The other issue is that Paper Mario is overdumped.  I checked the N64 cart heuristics and it overlooks the 20MB and 40MB sizes.  There are only 3 titles affected - Donald Duck Goin' Quackers, Paper Mario, and Ogre Battle 64.  This will also be fixed in the next release.

While fixing the missing N64 ROM sizes, I ran into an interesting problem that I need some help with.  I picked up a copy of Donald Duck to test the 20MB size.  This cart is listed as using an EEPROM4K save.  When I tried dumping my EEPROM4K save (not with the Retrode), it refused to respond.  I opened up the cart and there is no EEPROM. 

Does anyone have a copy of Donald Duck Goin' Quackers/Quack Attack that they'd be willing to open up?  I'd like to see if their cart lacks the EEPROM.  Either it was an oversight on my cart or else the existing cart save lists are incorrect.

Thanks!

skaman

Nevermind on the Donald Duck cart. 

I found a picture of the box and it states "N64 Controller Pak Needed to Save Game Data".

The save lists need to be corrected.

Raw64life

This sounds awesome. Been waiting years for this kind of development. Thanks so much.

BadHombre

Seriously, this is really amazing work. We are all counting on you!

skaman

Thanks!

I wanted to give an update since it might look like there hasn't been much recent development.

N64 SRAM and FlashRAM save support is fully working.  Tested by multiple testers with multiple carts.

I need to finish the cart heuristics code for the missing 20/40MB cart sizes.  I modified the code and got Donald Duck Goin' Quackers (20MB) and Ogre Battle 64 (40MB) working.  The lone remaining cart is Paper Mario (40MB).  I don't have a copy of Paper Mario so a tester volunteered to run multiple tests.  Unfortunately, the code that fixed Ogre Battle doesn't work for Paper Mario and I'm not sure why.  I'm waiting on Paper Mario and Mario Story carts to arrive to find the solution but it might be a week or two.

While waiting on the test carts to arrive, I started to look into the cart EEPROM saves.  I thought I might need to modify the N64 plugin but the production plugin has the necessary connections to read the cart EEPROM.  I've got the cart EEPROM responding and outputting the save data (visible on my logic analyzer).  I need to tweak the code to get the data outputting properly to the .eep file.

Once the cart heuristics is fixed and the EEPROM save support is complete then I'll release a new firmware.

More testing to do...

RazorX2014