Author Topic: How to set the correct save-game type for hacks/prototypes/new games/etc  (Read 9381 times)

0 Members and 1 Guest are viewing this topic.

Offline Kerr Avon

  • Hero Member
  • *****
  • Posts: 1487
  • Karma: +141/-3
    • View Profile
When you use the Everdrive 64, the games (or roms, as they are also known) that should save their game-save data to their cartridge instead save to the SD card inside the ED64, of course. The problem is, there are several game-save type chips in use in the various game cartridges, and the ED64 needs to know which game expects which type, or the game can't save properly.

The ED64 contains a database that tells it what save type to use with each game, but of course this only works for games that are known at the time of the database's creation, so any games released later, such as hacked games (where a game's code is altered to add new levels or whatever), unreleased games that finally emerge, prototypes of games, etc, won't be recognised, and the ED64 won't know which save type to use for that game.

To counter this, Krikzz added a feature whereby the user could add a save type setting for any new games that emerged. You add the settings by editing the text file 'save_db.txt' that is in the ED64 folder, adding the new setting to the bottom of the list.



For a list of all known settings (so that you can copy and paste them into your save_db.txt file, go to https://krikzz.com/forum/index.php?topic=6126



But if you need to add the setting for a game that's not on the thread mentioned above, such as if you have a new hack, then it's not difficult to do, you just need to know two things; the file's CRC value (which identifies the file to the Everdrive 64) and the save type that the game uses.

This guide is pretty long (I want to be thorough), but don't worry, it's really easy to find and add the right values of a game to the save_db.txt file, and when you know what you're doing, the entire process takes less than a minute.

Also, for the purposes of this guide, I'll be using the hacked rom Kirby 64 - The Crystal Shards (U) [!] Analog Controls.Z64 (which is the normal game hacked to allow the user to play using either the analog stick, or the D-Pad), which can be download from https://mega.nz/#!yU8kTYaZ!ItrmIMGJEd45yW1MW_scrnF1bRLPKhM7QJeT94GyPO8


Step One - Finding out the CRC value of the rom file.


The CRC value is a unique value that identifies each game file. To find out the CRC value, download the file N64CRC.zip from:

https://mega.nz/#!DQd2UbrB!8Wc6SYujY4LWzVqH58y0hSpXVs_jF8ehKfmzWh5TdhU

and unzip it to your C: drive, so the folder is:



C:\N64CRC\DLPORTIO.dll
C:\N64CRC\DLPORTIO.SYS
C:\N64CRC\Drag the game file over here.bat
C:\N64CRC\rn64crc.exe
C:\N64CRC\rn64crc.txt

then move your mouse cursor over the rom (game) file that you want to know the value of, left click the mouse just once and keep the left button held down (the rom file should be highlighted, and your cursor over it, and your finger holding down the left mouse button), then move the mouse cursor over to the file called:

Drag the game file over here.bat

in the folder C:\N64CRC\

so that the file called

Drag the game file over here.bat

also becomes highlighted, then release the left mouse button. If you've done it right, then you will see a DOS window open, telling you the CRC value of the rom file. For convenience, the CRC value is also saved to a text file, called:

_value.txt

if that text file doesn't exist, then it will be created. If it already exists, then the CRC value will be added to the bottom of the text file.

The CRC value is given in the format:

CRC's        : $635A2BFF, $8B022326 [OK]

and it's the first value (following, but NOT including the dollar sign, so in the above case the value is 635A2BFF) that's important. You now have the CRC value.

Note: The above CRC value belongs to Super Mario 64, so if you're not sure if this is working, then drag your Super Mario 64 (U) NTSC rom over to the 'Drag the game file over here.bat' file, and you should see the above value on in the DOS window, and in the _value.txt text file.

(Not that you'd need to set the game-save type for Super Mario 64 (U), as the ED64 knows it already, but I use this example as probably everyone has the SM64 NTSC rom, so everyone can test it and see how to get the CRC value).


So download the hacked Kirby 64 (https://mega.nz/#!yU8kTYaZ!ItrmIMGJEd45yW1MW_scrnF1bRLPKhM7QJeT94GyPO8), unzip the rom, and drag it over the

C:\N64CRC\Drag the game file over here.bat

file, and you will get:

CRC's        : $0AC29131, $53A1708A [OK]

Remember, it's the first value, but leave out the dollar sign. So the CRC value for the rom "Kirby 64 - The Crystal Shards (U) [!] Analog Controls.z64" is 0AC29131






Step Two - Finding out which save-game type to use:


There are several ways to find out what save type a game needs:

1) If the rom is a mod/hack of a commercial game, then you can almost always use the same type as in the original game. Just check what the Everdrive 64 uses for the original game (i.e. if it's a Goldeneye hack, then use the Goldeneye save type for the hacked game).

To find out what the ED64 uses for the original game, highlight the original game in the ED64's game selector (so the original game needs to be on the SD card, of course), and press Z, and see what it says. Press B to go back to the game selector again.



2) Or again, if the rom is a mod/hack of a commercial game, then you can almost always use the same type as in the original game. Have a look for the game save type by using this guide:


http://n64.icequake.net/mirror/www.elitendo.com/n64/usa_boot_save_list.html

Note that the guide is only for the NTSC (American) version of each game, but usually the NTSC version of a game uses the same game-save type of the PAL and JAP games. Plus most modded games are modded versions of the NTSC version of the original game anyway.




3) If all else fails, then try all of the save types, one after the other, and see which one works.

Note: Goldeneye X is a mod of Perfect Dark, not Goldeneye (it's Perfect Dark, altered to contain the weapons, levels, gameplay, etc of Goldeneye). So Goldeneye X needs the Perfect Dark game-save type set, or it won't save. However, up until at least the current version (Goldeneye X - NTSC v5e - With Clouds) the Everdrive 64 uses the correct save-type as a default guess, so you don't need to add a setting for Goldeneye X.



Since Kirby 64 - The Crystal Shards (U) [!] Analog Controls.z64 is a hack of Kirby 64 - The Crystal Shards (U), then we just can use the save-game type from the original game (Kirby 64 - The Crystal Shards (U)), which is, according to the Everdrive 64, EEPROM 16k.

The save_db.txt file requires a number to be given when defining the save-game type for a particular game. The numbers are listed in the save_db.txt itself, and are:

0 :    OFF        (i.e. no save-game)
1 :    EEPROM 4k
2:     EEPROM 16k:
3 :    SRAM
4 :    SRAM 768
5 :    FLASHRAM

and since we know that we want EEPROM 16k, then we can see that the number we want to use is 2 (for EEPROM 16k).





Step Three - Adding the correct save-game type to the save_db.txt file:



Right, you now know the CRC value, and the save-game type (or you aren't sure of the save-game type, so are going to try them all, one by one). So, insert your SD card into your PC or Mac, go into it's ED64 folder, and open the save_db.txt file in a text editor (such as Windows' Notepad), and add the CRC and save type as the last line of the save_db.txt file.

You do this in the format:

0x [CRC value] = [save-game type]

but with no spaces.

We know that Kirby 64 - The Crystal Shards (U) [!] Analog Controls.z64's CRC is 0AC29131, and the save-game type is 2, so we add the line

0x 0AC29131 = 2

only without the spaces, so it's

0x0AC29131=2

to the end of the save_db.txt text file. You also might want to add a comment to this line, to remind you of what it's for, so if you like, then add at least one space after the 2 (so as not to confuse the Everdrive 64, then open bracket, whatever you want to write, and close bracket).

So that the line is:

0x0AC29131=2 (Kirby 64 - The Crystal Shards (U) [!] Analog Controls.z64 hack)

or

0x0AC29131=2 (Kirby 64 altered to use D-Pad and Analogue Stick controls)

It doesn't matter what you put in the brackets, the ED64 will ignore it, it's just to help you remember what each value is for.

So when you've added

0x0AC29131=2

to the save_db.txt file (with or without a comment in brackets, that's up to you), then close the text file (make sure it saves to the SD card), then when you play the Kirby 64 - The Crystal Shards (U) [!] Analog Controls.z64 rom, then it should save as normal.





Note: Sometimes the save-game type of a certain game might be listed differently between the website save game list (at http://n64.icequake.net/mirror/www.elitendo.com/n64/usa_boot_save_list.html) and the ED64. If so, try the ED64's version first. This happened with Kirby 64 (U), which the website lists as having a 4k EEPROM, but the ED64 needs a 16k EEPROM to save/load with the game.



If you do create a fix for a rom, then please post it here or in the thread https://krikzz.com/forum/index.php?topic=6126 , so that other people can copy and use your fix.
« Last Edit: January 25, 2017, 11:18 PM by Kerr Avon »

Offline kmksoulja

  • Sr. Member
  • ****
  • Posts: 261
  • Karma: +12/-0
    • View Profile
how do i get the full animal forest translation to save? the only way it plays is when i have the save type set to the wrong type but will not save. otherwise it crashes.

Offline Kerr Avon

  • Hero Member
  • *****
  • Posts: 1487
  • Karma: +141/-3
    • View Profile
Sorry, I didn't see this reply. Have you managed to fix the problem? If not, then do other versions of that game's translations work?

If you like, if you send me a pm (a message via this forum) with a URL to download the game rom (as I don't know which one you're using) then I'll try to work it out, but no promises, of course, as I'm not familiar with the N64's technical details.

Offline Larry

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
While I'm having a save problem with F-Zero X Expansion Kit on the X7 I thought I should update this thread to say the X7 OS has an extra save type - I don't know what the implications of it are though.


OFF              : 0
EEPROM 4k  : 1
EEPROM 16k: 2
SRAM           : 3
SRAM 768    : 4
FLASHRAM   : 5
SRAM 128K  : 6


Offline Kerr Avon

  • Hero Member
  • *****
  • Posts: 1487
  • Karma: +141/-3
    • View Profile
Thanks for pointing this out. I wonder what game(s) require this save type. As far as I know, every N64 game was covered by the original save types, so maybe this is to not to support any current games, but for some up and coming new feature for the Everdrive 64?

Offline nuu

  • Hero Member
  • *****
  • Posts: 1365
  • Karma: +65/-2
    • View Profile
Although it looks like SRAM 128K is smaller than SRAM 768 used by Dezaemon, I think it's really 128 kilobyte (same size as the FLASH save type) while the Dezaemon type is only 768 kilobit (96 kilobyte). A matter of inconsistent notation.

I think I remember seeing the SRAM 128kB save type for N64 being mentioned somewhere before, but I can't find any mention of it now using google. Maybe it's just for homebrew and hacking use though.

Offline Kerr Avon

  • Hero Member
  • *****
  • Posts: 1487
  • Karma: +141/-3
    • View Profile
Although it looks like SRAM 128K is smaller than SRAM 768 used by Dezaemon, I think it's really 128 kilobyte (same size as the FLASH save type) while the Dezaemon type is only 768 kilobit (96 kilobyte). A matter of inconsistent notation.

I think I remember seeing the SRAM 128kB save type for N64 being mentioned somewhere before, but I can't find any mention of it now using google. Maybe it's just for homebrew and hacking use though.

Isn't Dezaemon a game maker, albeit a very limited one? I'd have thought then that it's save game files would be pretty big, relatively speaking, to store the individualised data of the player made game. I've never played it, so I've no idea about the game or the size of it's save data, I just remember reading about the game a while back.

Offline nuu

  • Hero Member
  • *****
  • Posts: 1365
  • Karma: +65/-2
    • View Profile
Yes Dezaemon is a series of shoot-'em-up maker software. It's made for normal people so it is of course much more limited than professional developer tools. Perhaps you have heard of Summer Carnival '92: Recca? It's a highly-regarded caravan shooter basically made using Dezaemon for Famicom, and then released in very limited quantities at an event.


Here are all the ED64 save types:
Code: [Select]
OFF                  : 0
EEPROM 4kb (512B)    : 1
EEPROM 16kb (2kB)    : 2
SRAM 256kb (32kB)    : 3
SRAM 768kb (96kB)    : 4
FLASH 1Mb (128kB)    : 5
SRAM 1Mb (128kB)     : 6

Controller Pak 256kb (32kB) (SRAM+battery)

"b" = bit
"B" = byte (8 bits)
"k" = kilo (1024 units)
"M" = mega (1048576 units)

As you can see, SRAM 768 is still bigger than the normal 32kByte SRAM which all other known SRAM games use like Ocarina of Time. The reason why Dezaemon uses such an odd size as 96kB is because it uses three 32kB SRAM chips.

The question is if any game uses 128kByte SRAM chips or not.
« Last Edit: June 22, 2020, 12:40 PM by nuu »