ROM Hack How can I make save editor?

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,321
Country
United Kingdom
Figure out save data contents. You can do this in a variety of ways.
1) Step one is play the game long enough to get a save and see some things about it. Does it have multiple save boxes, does it not save something (unlikely these days but common back in the 8-16 bit era)

The classic method is similar to how people find basic cheats. Here you save the game, do one small action (buy something, sell something, use an item) and save again. Check the save and see what has changed. Repeat until you have narrowed down the location holding what you want to edit.
The harder method is to pull apart the game and run through the game's code to see how it handles the save files proper. Most do not do this for the whole save and instead when they are trying to find attack vectors (if you suspect the name value to have an exploitable overflow then you can disassemble the code and make sure), a tricky section, the internal hashes (covered shortly) or something like that.
You can go active as well (as in attach a debugger and make it so the save will be holding the exact values you want) and you can simply search a save if you think you have a unique value worth searching for.

2) Figure out any internal hashes. The 3ds has system wide hashes but there might still be some internal hashes, checksums, check values (this value is the sum of all the previous values, if it does not match then call it a corrupt save sort of thing) and such like.

3) Figure out any system wide hashes. The 3ds can variously sign and hash saves as the system level. You need to sort this for 3ds games, the DS and GBA had no such thing. Not sure what premade tools exist but http://3dbrew.org/wiki/Savegames has the technical info behind it all.


After this you get to program it. Hopefully you managed to inject some values in by hand to the data formats you figured out in 1). You get to make a program to do this for all the other nice people that want it.
 

NeoSlyde

Let us start the game
OP
Banned
Joined
Mar 6, 2015
Messages
1,899
Trophies
0
Location
Morocco
XP
2,565
Country
France
Figure out save data contents. You can do this in a variety of ways.
1) Step one is play the game long enough to get a save and see some things about it. Does it have multiple save boxes, does it not save something (unlikely these days but common back in the 8-16 bit era)

The classic method is similar to how people find basic cheats. Here you save the game, do one small action (buy something, sell something, use an item) and save again. Check the save and see what has changed. Repeat until you have narrowed down the location holding what you want to edit.
The harder method is to pull apart the game and run through the game's code to see how it handles the save files proper. Most do not do this for the whole save and instead when they are trying to find attack vectors (if you suspect the name value to have an exploitable overflow then you can disassemble the code and make sure), a tricky section, the internal hashes (covered shortly) or something like that.
You can go active as well (as in attach a debugger and make it so the save will be holding the exact values you want) and you can simply search a save if you think you have a unique value worth searching for.

2) Figure out any internal hashes. The 3ds has system wide hashes but there might still be some internal hashes, checksums, check values (this value is the sum of all the previous values, if it does not match then call it a corrupt save sort of thing) and such like.

3) Figure out any system wide hashes. The 3ds can variously sign and hash saves as the system level. You need to sort this for 3ds games, the DS and GBA had no such thing. Not sure what premade tools exist but http://3dbrew.org/wiki/Savegames has the technical info behind it all.


After this you get to program it. Hopefully you managed to inject some values in by hand to the data formats you figured out in 1). You get to make a program to do this for all the other nice people that want it.

nice i see :D

Figure out save data contents. You can do this in a variety of ways.
1) Step one is play the game long enough to get a save and see some things about it. Does it have multiple save boxes, does it not save something (unlikely these days but common back in the 8-16 bit era)

The classic method is similar to how people find basic cheats. Here you save the game, do one small action (buy something, sell something, use an item) and save again. Check the save and see what has changed. Repeat until you have narrowed down the location holding what you want to edit.
The harder method is to pull apart the game and run through the game's code to see how it handles the save files proper. Most do not do this for the whole save and instead when they are trying to find attack vectors (if you suspect the name value to have an exploitable overflow then you can disassemble the code and make sure), a tricky section, the internal hashes (covered shortly) or something like that.
You can go active as well (as in attach a debugger and make it so the save will be holding the exact values you want) and you can simply search a save if you think you have a unique value worth searching for.

2) Figure out any internal hashes. The 3ds has system wide hashes but there might still be some internal hashes, checksums, check values (this value is the sum of all the previous values, if it does not match then call it a corrupt save sort of thing) and such like.

3) Figure out any system wide hashes. The 3ds can variously sign and hash saves as the system level. You need to sort this for 3ds games, the DS and GBA had no such thing. Not sure what premade tools exist but http://3dbrew.org/wiki/Savegames has the technical info behind it all.


After this you get to program it. Hopefully you managed to inject some values in by hand to the data formats you figured out in 1). You get to make a program to do this for all the other nice people that want it.

I do comparaison with hexeditor or other?
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,321
Country
United Kingdom
A hex editor with a compare function is usually what I use for a basic compare.

I dare say if you are asking that kind of question though it will not be the easiest for you to make a save editor for a 3ds game -- the 3ds is by no means a great case study in system security but it is not as easy as things were on older systems.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Veho @ Veho: The cybertruck is a death trap.