Author Topic: Save State Hacking Tutorial  (Read 25412 times)

0 Members and 1 Guest are viewing this topic.

Offline DarkWolf

  • Hero Member
  • *****
  • Posts: 640
Save State Hacking Tutorial
« on: October 01, 2006, 06:48:10 am »
This is the first draft, so if you have any questions or concerns I can make changes.  I wrote it late Friday night, so there may be some parts that need to be refined.



Tutorial

Offline Revned

  • Hero Member
  • *****
  • Posts: 1094
RE: Save State Hacking Tutorial
« Reply #1 on: October 01, 2006, 11:39:28 am »
Thanks, it looks very helpful. I'll try it out later. One thing I want to point out, though. Many emulators compress the save state files, so you're going to have to figure out how to decompress them before starting. Also, you can use my Tile Splicer program to assemble all the tiles into one big image. You just need each tile in its own separate file, and then you'll need to edit the text file to get them to come out in the right order.

Offline Revned

  • Hero Member
  • *****
  • Posts: 1094
RE: Save State Hacking Tutorial
« Reply #2 on: October 03, 2006, 07:53:51 pm »
Okay, I've been having trouble with the palettes for Raw Candy. Now, let's say I get the palette from a screenshot. When I load it up in Raw Candy, won't things still look pretty garbled? The hex codes in the save states refer to tile numbers, not palette colors....



Other than that, I think I can do it, but I haven't found the right emulators to do the job. All the ones I've tried have been using compressed save states, which would make it very tedious to edit and re-compress. Also, the games I tried it with only had small portions of the map in the memory, from the looks of things.



Oh, and is there a way to resize the Raw Candy window down to 16 pixels wide? I can't get it that small, but it would be helpful if I could.

Offline DarkWolf

  • Hero Member
  • *****
  • Posts: 640
RE: Save State Hacking Tutorial
« Reply #3 on: October 04, 2006, 12:09:17 pm »
The point of representing the each byte with a colored pixel is so that you can see patterns in the data.  It's a lot easier to look at an image than a bunch of numbers in a hex editor.  You don't need to use a palette from the game unless you're looking to rip graphics.



I use an MSX emulator that uses compressed zip states.  I've been able to open them with a ZIP utility, so you may want to try that (I need to add this to the tutorial).



It will let me resize the window to 16, but that's as low as it will go.  I know it sucks, but I wrote this back when I was still learning how to program.  I need to re-write it, I'm thinking about trying to do it in C#.

Offline Revned

  • Hero Member
  • *****
  • Posts: 1094
RE: Save State Hacking Tutorial
« Reply #4 on: October 04, 2006, 01:18:52 pm »
Yes, I realize that they make things easier to find, but the images in your tutorial actually look like shrunk down versions of the real map. When I did it with a real palette, things like sprites showed up nicely, but the level data was still colored weird.



I have been able to open up the compressed save states so far, but it would just get pretty tedious having to re-compress it over and over if I was trying to find something with brute force.



Huh, doesn't let me make it that small. Stupid XP.

Offline DarkWolf

  • Hero Member
  • *****
  • Posts: 640
RE: Save State Hacking Tutorial
« Reply #5 on: October 04, 2006, 03:00:45 pm »
Yeah, for those images I tweeked the palette I was using show they'd show up real nice.  =D

Offline Revned

  • Hero Member
  • *****
  • Posts: 1094
RE: Save State Hacking Tutorial
« Reply #6 on: October 04, 2006, 03:03:15 pm »
Oh, I see. I spent forever trying to get that to work :P

Offline Revned

  • Hero Member
  • *****
  • Posts: 1094
RE: Save State Hacking Tutorial
« Reply #7 on: October 05, 2006, 11:59:44 am »
I give up. I've tried dozens of games, and the best I ever got was only a small fraction of the map. None of the games I tried seems to keep the entire map in memory. The only game I actually had enough data to compile a map for was, surprise, King's Bounty.

Offline Botmechtron

  • Newbie
  • *
  • Posts: 22
RE: Save State Hacking Tutorial
« Reply #8 on: October 06, 2006, 03:45:52 pm »
Well, you must have been unlucky with the games you chose. I've had no problem finding relevant data for maps. Gods (Genesis) has it's 128x64 levels clearly visible.



A good way to find the maps as they appear in the game is to try changing the Raw Candy window size to these values: 32, 64, 128, 256, 512.



One question though...

Is it possible to change the resolution for Raw Candy? It's hard to look the image because the pixels are so small.

Offline Revned

  • Hero Member
  • *****
  • Posts: 1094
RE: Save State Hacking Tutorial
« Reply #9 on: October 06, 2006, 04:33:44 pm »
I wasn't trying many Genesis games. I wonder if there's something about the other systems that's causing me problems....