How to find pointer Sega Genesis game The Immortal

Started by ØX-Carnage, August 07, 2015, 12:26:36 AM

Previous topic - Next topic

ØX-Carnage

Hello friends okay with everyone.

I know this is a basic thing for those who are romhacker, but really could not find the hands of this game, and deo others as Samurai Shodown and Spider Man Maximum Carnage.



In the game in question is The Immortal since subtract -200, has caught the offset address and searched via hex, I have sinned from the beginning of the address block all text and found nothing.
I could not do the tracer for my emulator (Gens2.12aR2Tracer) are not saving the tracer.txt.

Could someone explain me how to find these pointers?
<center></center>

dougeff

#1
I was going to look, but I don't know genesis games. Never mind.
nesdoug.com -- blog/tutorial on programming for the NES

tryphon

Why did you subtract 200? The header is part of the Rom, contrary to what happens for Snes. Also are you sure this is really the beginning of the text?

If you still don't find the pointer table, then maybe you have to deal with relative pointers.

Tony H

With Gens Tracer, just press the "/" key to start instruction logging, and press it again to stop. It logs it to a file named "trace.log" in the same folder that Gens is in.
The Code Hut: http://codehut.gshi.org/

Game Genie codes and ROM hacking guides

ØX-Carnage

Quote from: tryphon on August 07, 2015, 03:19:31 AM
Why did you subtract 200? The header is part of the Rom, contrary to what happens for Snes. Also are you sure this is really the beginning of the text?

If you still don't find the pointer table, then maybe you have to deal with relative pointers.

Tryphon, So I was the starting address of the phrase subtracting the Header example.
7019-200 = 6E19 invert the result 196E.
So I said to subtract 200.

Quote from: Tony H on August 09, 2015, 05:36:32 PM
With Gens Tracer, just press the "/" key to start instruction logging, and press it again to stop. It logs it to a file named "trace.log" in the same folder that Gens is in.

Thank Tony H for help, but would like more help from you.
After I generated the tracer.log I tenhoque locate the instruction that writes the data in correct screen?
But I do not think this instruction, the address points me to MOVE.w D0, (A1) but in this rom address is nothing.
Was this the same process?
<center></center>

KingMike

You were probably reading a SNES doc. You don't subtract for headers on Mega Drive/Genesis (and if you're using a headered SNES ROM, you should delete that header instead of subtracting 200 :) ), and don't reverse the bytes either.
(I'd say make you're hacking a non-interleaved, aka "bin" file, but since you can read the text in the ROM, you already have it in the right format)

From what I've read it's very common for MD games to store pointers as the full 4-byte value. (pointer is the same as the ROM address, add zeros at the beginning to make it 4 bytes if needed).
"My watch says 30 chickens" Google, 2018

Zynk

When I see this topic, I thought its for Mega Man games  >:(

ØX-Carnage

Quote from: KingMike on August 20, 2015, 03:05:22 PM
You were probably reading a SNES doc. You don't subtract for headers on Mega Drive/Genesis (and if you're using a headered SNES ROM, you should delete that header instead of subtracting 200 :) ), and don't reverse the bytes either.
(I'd say make you're hacking a non-interleaved, aka "bin" file, but since you can read the text in the ROM, you already have it in the right format)

From what I've read it's very common for MD games to store pointers as the full 4-byte value. (pointer is the same as the ROM address, add zeros at the beginning to make it 4 bytes if needed).

King Mike, thank you for the information, but he knew, could be the initial offset of the sentence or reversed.
example;
00 19 70 00
or
00 70 19 00
But the problem is that I did not think this rom, or am I missing something

Quote from: Zynk Oxhyde on August 20, 2015, 11:12:15 PM
When I see this topic, I thought its for Mega Man games  >:(

I changed the title to avoid further confusion. ;)
<center></center>

Malias

#8
I did a little digging and found out why you're having trouble locating pointers.  First, the pointer is only a word long.  Second, the game stored the upper and lower byte of each pointer separately.  The lower bytes start at $1684 and the upper bytes start at $177E.  To get a pointer, you add an offset to these two addresses to get the lower and upper bytes. These are then combined to get the pointer.

For instance the pointer you're looking for is at offset 2.  The lower byte is at $1684 + 2 which is $6E.  The upper byte is at $177E + 2 which is $19.  Combine the upper byte and lower byte to get $196E (not $1970).
The great achievement is to lose one's reason for no reason, and to let my lady know that if I can do this without cause, what should I do if there were cause?
     ~Don Quixote~

ØX-Carnage

Quote from: Malias on August 23, 2015, 09:25:28 PM
I did a little digging and found out why you're having trouble locating pointers.  First, the pointer is only a word long.  Second, the game stored the upper and lower byte of each pointer separately.  The lower bytes start at $1684 and the upper bytes start at $177E.  To get a pointer, you add an offset to these two addresses to get the lower and upper bytes. These are then combined to get the pointer.

For instance the pointer you're looking for is at offset 2.  The lower byte is at $1684 + 2 which is $6E.  The upper byte is at $177E + 2 which is $19.  Combine the upper byte and lower byte to get $196E (not $1970).
Thank you very much Malias worked.
It's a bit complicated and difficult, but it's working, thank you.
I also thank the friend Unknow Master which completed with some explanations.
How you managed to find the result, this is the first rom that caught using this structure.
<center></center>

AWJ

Weird... that almost makes sense, given that The Immortal is a port of an Apple IIGS game. Splitting data into "byte planes" (e.g. storing 16-bit data as an array of all the LSBs followed by an array of all the MSBs) is a pretty common 6502 technique, but isn't really helpful on the 65816 (the CPU used in the IIGS) and is of course completely pointless on the 68000.

Lariria

It's possible the person who coded that was using old habits learned on the 6502...