EverDrive Forum

General => EverDrive 64 => Topic started by: Kerr Avon on January 25, 2017, 10:06 PM

Title: How to set the correct save-game type for hacks/prototypes/new games/etc
Post by: Kerr Avon on January 25, 2017, 10:06 PM
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 (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 (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 (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 (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 (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 (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.
Title: Re: How to set the correct save-game type for hacks/prototypes/new games/etc
Post by: kmksoulja on January 29, 2017, 01:43 AM
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.
Title: Re: How to set the correct save-game type for hacks/prototypes/new games/etc
Post by: Kerr Avon on September 07, 2017, 02:42 PM
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.