Victory Road  

Go Back   Victory Road > General > Video and Computer Games
FAQ Community Today's Posts Search

Notices

 
 
Search this Thread
  #1  
Old September 13, 2011, 02:36:30 PM
Biohazard Biohazard is offline
Cyndaquil
 
Join Date: Aug 2011
Posts: 21
Default How to make PAR codes for the Sega Mega Drive / Genesis

In this tutorial I will be telling you how to make PAR codes for the Megadrive, with the added bonus of savestate editing, I suppose.

(You may want to use a ROM of Sonic 1, for the sake of this tutorial.)

Creating a PAR code:

First of all, you need a RAM address. I'll be using the ones from Sonic 1, as they are documented here:

http://datacrystal.romhacking.net/wi...dgehog:RAM_map


As you may or may not know, the format for PAR codes is XXXXXX:YYYY, with X being the RAM address and Y being the data you're applying to it. Let's take the invincibility PAR code for Sonic 1:

FFFE2D:0001

Now, as you can see, FE2D is the address and 01 is the data, or what sets the invincibility flag, if you may. (By the way, if the data has extra zeros in front of it, you can cut a byte off it. E.G. FFFE2D:01.)

FE2D is Sonic 1's invincibility flag and 01 sets it, giving you invincibility.

Let me give you another example:

Let's use the FE18 (Continues) address. Let's say we want to add an extra few continues, around four? It'd look something like this:

FFFE18:0005

You may have noticed I set it to five instead of four. In some cases, setting it as zero can make it roll back to 255 when a value is taken away. In this instance, if you were to get a game over, it would roll back to 255 because 0 = 256 when dealing with bytes alone, because FF, the maximum number for a single byte = 255.[/rambling]

Suppose it can help to know the above, but it doesn't matter for now.

Converting a RAM address to a savestate address:

You will need a hex editor for this part. A brief understanding of hexadecimal wouldn't hurt, but it isn't necessary.

Okay, let's just say you wanted to do a little savestate hacking and say, change the number of lives, what you'd do is:
  • Make a savestate
  • find a RAM address (I'll use the PAR code FFFE12:0004, which is the lives RAM address)
  • Extract the RAM address (FE12)
  • Open up a calculator that can deal with hexadecimal. (Windows Calculator has a hex option if you change the format to scientific.)
  • Add it by 2478
  • The resulting number is the offset. (The lives address is 1228A.) In your hex editor, go to that offset.
  • You should find a byte you can edit. It should be at whatever you left your life count at. (for instance, 03 = three lives.)
  • Modify it to your heart's content, save and load the savestate. You should get what you want.

Converting a savestate address to a RAM address:

More or less the reverse of what we did to convert the RAM address into a savestate address. Open up your calculator, only this time, take away 2478 from the savestate, and you should get the answer. (As you know, the lives address should be FE12.)

Happy hacking!
  #2  
Old September 17, 2011, 08:53:55 PM
GalliumGrant's Avatar
GalliumGrant GalliumGrant is offline
Volcarona
 
Join Date: Aug 2011
Posts: 690
Default

Whoa, Sonic Hacking follows me here. Bloody trippy, dude.
By the way, haven't I seen that picture in your Signature before?
Anyways, regardless if I'm using a dissasembly of Sonic 1 or not, this seems
pretty useful. Nice job nonetheless.
 

Forum Jump


All times are GMT -8.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Victory Road ©2006 - 2024, Scott Cat333Pokémon Cheney
Theme by A'bom and Cat333Pokémon