(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
05-03-24 11:38 AM
0 users currently in ROM Hacking.
Acmlm's Board - I3 Archive - ROM Hacking - Question about hex editing Sega Genesis and Nintendo roms. New poll | |
Add to favorites | Next newer thread | Next older thread
User Post
BloodRevolver
Newcomer


 





Since: 11-18-05

Last post: 6674 days
Last view: 6674 days
Posted on 01-23-06 12:33 AM Link | Quote
How would I go about hex editing a Sega Genesis & Nintendo rom?

Is it like hacking a SNES rom?

Using Contra 3: Alien Wars as an example for SNES and the Game Genie code for infinite bombs 2264-D760.

First I load up the rom in ZSNES and check to see if it's a Hi or Lo rom. It is Lo.

Then I enter the Game Genie code into Game Genie Code Converter (GGConvC) to get the hex address 01802E and value DD.

Then press the 64k button (because it is a Lo rom game) to get a new hex address CO802E DD.

Open up a hex calculator subtract CO802E - C00000 = 802E then + 200 = 822E.

And finally open up the rom in Hex Workshop and search for the hex address 822E
and change whatever the default value was to DD, hit save, blah, blah, blah.

Now what I want to know is is hacking Sega Genesis / Nintendo roms similiar to this?

And how is it done?



(edited by BloodRevolver on 01-22-06 11:33 PM)
MathOnNapkins

1100

In SPC700 HELL


 





Since: 11-18-05

Last post: 6283 days
Last view: 6283 days
Posted on 01-23-06 01:02 AM Link | Quote
Um... well you've got lorom and hirom mixed up, the address scheme you described was hi-rom. As far as Genesis/ NES hacking goes, I really don't know. You'd have to look at available documentation to know for sure. And I'm 100% sure there is documentation for NES and 99% for Genesis. Roms aren't always good indicators of how the actual game is stored in memory. Try to figure out an NDS rom and you'll see what I mean. (The layout is at NDStech)


(edited by MathOnNapkins on 01-23-06 12:03 AM)
QBRADQ

Goomba


 





Since: 01-18-06
From: Eastern Oklahoma

Last post: 6634 days
Last view: 6634 days
Posted on 01-23-06 04:07 PM Link | Quote
Hi there.

If you want to get into NES / editing, grab FCEUXD SP, which is by far the most awsomesque NES debuging environment on the face of creation.

As far as NES docs, check out nesdev.parodius.com. That site's got just about every non- specific doc there is.

Finaly, if you happen to be into SMB1 haxorizing (sorry, behind censorship firewall ATM) , I can e-mail you a nice collection of docs.

Later,
QBRADQ
BloodRevolver
Newcomer


 





Since: 11-18-05

Last post: 6674 days
Last view: 6674 days
Posted on 01-23-06 07:24 PM Link | Quote
ok thanks a bunch
Tony Hedstrom
Newcomer


 





Since: 01-06-06

Last post: 6656 days
Last view: 6656 days
Posted on 01-28-06 09:33 PM Link | Quote
Hacking a Sega Genesis Game Genie code into a Genesis ROM is fairly straight forward. Just convert the GG code into hex (with one of several GG to hex conversion programs), then open the Genesis ROM with a hex editor and go directly to the address given to you by the conversion program. There is no ROM "header" added by a copier, so you don't have to worry about that.

There are a couple things you need to watch out for...

1) Make sure your ROM is in "bin" format. There are conversion programs if it's not. The best way to know for sure if a ROM is in bin format, is to open it with a hex editor and see if you can see the title of the game in plain ASCII text at the beginning of the ROM ($0000120). If you don't see the text, it's not in bin format. I've run across several ROMs that have a "bin" file extension, but are actually in "smd" format.

2) Remember that unlike NES or SNES, all Genesis assembly instructions are 2 bytes long (NES and SNES are only one byte). And all instructions start at even numbered ROM addresses. This is why Genesis Game Genie's have 32 characters to choose from when making codes, while NES and SNES Game Genie's only have 16. This is also why Genesis Game Genie codes that are converted to hex will have 2 bytes for the value part of the code (ie. aaaaaa:xxxx).

Hope that helps.

Tony H.
LocalH

Paragoomba


 





Since: 11-20-05

Last post: 6522 days
Last view: 6522 days
Posted on 01-29-06 08:21 PM Link | Quote
Also, it's possible to permanently hack PAR codes into a Genesis game as well. First of all, a PAR code is essentially the raw hex patch. The format is XXXXX XYYYY where XXXXXX is the address to modify and YYYY is the value to patch with. For the non-RAM PAR codes (those that don't start with FF), just convert them directly. RAM codes are a slight bit harder to do, but still possible. You have to record the value currently in the VBlank handler (a longword at offset $7A), change the address there to some free space (like, for example, the first even address at the end of the ROM, before any FF padding), and then write a small routine as such:

move.w #$YYYY,($XXXX)
jmp oldvbl

where XXXX is the address from the PAR code, with the leading FF removed, YYYY is of course the value to patch, and oldvbl is the value originally found in the vector at $7A. If you have multiple RAM PAR codes to implement, simply add any number of similar move.w instructions before the jmp, and you'll be golden.

Also, just to clear something up - the Genesis does have word-long instructions, and the operands come directly after, which can be of variable size, depending on whether you're using byte, word, or long operands (just in case some people see "instruction" and think the instruction word plus the operands).


(edited by LocalH on 01-29-06 07:27 PM)
Tony Hedstrom
Newcomer


 





Since: 01-06-06

Last post: 6656 days
Last view: 6656 days
Posted on 01-30-06 11:15 PM Link | Quote
LocalH: Hacking RAM addresses into the ROM sounds interesting, I'll have to give that a try.

BloodRevolver: One thing I forgot to mention before... If you hack a Game Genie code into a Genesis ROM, there's a chance that you'll get a blank black or red screen when you try to run the game. This is because the game has failed the checksum routine (because you changed the ROM). Many Genesis games have a checksum routine. Luckily, it's fairly easy to fix this problem.

If you look in the Galoob Game Genie code book (or at Game Genie code sites online), you'll see that lots of Genesis games have "Master Codes". Master codes disable/bypass checksum routines. So if the game you're hacking already has a master code, just hack it into the ROM and you're good to go. If your game doesn't have a master code, figuring out how to kill the checksum routine is relatively easy. In short, you're usually looking for a CMP (compare) with either a BNE or BEQ after it. A disassembler is a good idea here, but you only need to disassemble a very small part of the ROM to figure out how to disable/bypass the checksum.

Here are my own personal findings with checksum routines. This will tell you where to look in the ROM (ie. which part to disassemble)...

As far as I know, all EA games (Electronic Arts) use a checksum routine. All EA games have their checksum routine near the very end of the ROM (right before all the FFFF's). If you disassemble the last $100 bytes or so of actual code (ie. no FFFF's), you should be OK.

All other games that use a checksum routine will almost always have it near the very beginning of the ROM, usually somewhere around the $300 ~ $350 area. Disassembling the first $800 bytes should be good enough.

All checksum routines can be disabled by changing a single instruction (2 bytes). You'll either use a NOP (4E71) or a BRA (60xx) as a replacement instruction.

If you want more info on this, let me know and I'll post a doc that I wrote that explains it in much more detail. I even wrote about a way to find out which instruction to change (to kill the checksum routine) without having to use a disassembler (you use a hex editor instead), although the disassembler is still the best method. You can even use the debugger in Gens to figure out how to kill the checksum routine, but the other methods are easier.

Damn, I wasn't planning on writing that much.

Tony H.


(edited by Tony Hedstrom on 01-30-06 10:22 PM)
Add to favorites | Next newer thread | Next older thread
Acmlm's Board - I3 Archive - ROM Hacking - Question about hex editing Sega Genesis and Nintendo roms. |


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.016 seconds; used 381.51 kB (max 459.59 kB)