News:

As a consequence of the forum being updated and repaired, the chatbox has been lost.
However, you can still come say hi on our Discord server!

Main Menu

How to increase HP and PP limit beyond 1999?

Started by GoldenSunFan1989, 29, May, 2016, 10:00:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GoldenSunFan1989

In editor, HP and PP seem to be in 32767.

How can I change HP & PP limit beyond 1999, up to 32767 with hex editing without IPS patch?

Daddy Poi's Oily Gorillas

#1
You know that if you had an IPS patch, you can still see what it edits by using a program... For example, IPSelect can show you the addresses of what is edited...

http://forum.goldensunhacking.net/index.php?action=downloads;sa=view;down=40 = This one can increase it to 9999.

Opening that in IPSelect will show you this in the Hunk list:
0x0ADB2C - 0x0ADB30
0xFFFD80 - 0xFFFDD6 (Likely was free-space which was used because the above hunk didn't have enough room for the edit?)

If viewing in VBA, prefix with 08... (i.e. 080ADB2C) (In the event that code is edited... see VBA's Tools>Disassemble... (This should be one of those cases.)
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

GoldenSunFan1989

Numbers in hexes what I have to look for:
1999
9999
32767

Daddy Poi's Oily Gorillas

Usually, numbers are built up in a calculation... (Although it is possible to use ldr-relative to load a 32-bit number...)

The mov instruction can only do 0-255 (00-FF), so such a number could be shifted/added to to get a bigger number... for example.... (The unpatched version.)
For most instructions, usually the first register listed is where the result goes.

@080ADB2C, in disassembler, we see:
mov r0, 0xDA //r0=0xDA .. The mov command sets it to the constant shown.
lsl, r0, r0, 0x3 // Same as r0 = r0 << 3.... Since we know what is in r0, we can see it as r0 = 0xDA << 3 ... which equals 0x6D0.) ; << is  bit-shift to the left, and you can tell how it works if you look at it in binary... also, Windows calculator should have it as well... (May be known as Lsh.)
add r0, 0xFF // Finally, because a bitshift wasn't enough to get to the number we need, we add 0xFF... So take what was last put in r0 (0x6D0), and add 0xFF to it... You get: 0x7CF ... Which is 1999 in decimal.
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

GoldenSunFan1989


Daddy Poi's Oily Gorillas

Well, you view code in Disassemble... you edit in memory viewer.
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

Salanewt

Just to add to what Fox is saying, you need a hex editor to actually save the changes. Memory viewer is great for testing though.
Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?

Daddy Poi's Oily Gorillas

Just to add to what Lord Squirtle just said, you can still save the changes without using another hex editor. Put your cursor at 0x08000000, press the save button, and save 0x1000000 bytes. (If GS2... But 0x800000 if GS1... depending on the size of the ROM.) The file will be of .DMP, but you can still change it to .gba. Works like a charm.
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

Salanewt

Oh yeah, I forgot you can do that!

Just to make sure, but does the hardmode scaling work for HP values that high?
Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?

GoldenSunFan1989

#9
In memory Editor,

It seems like this: 1999
80ADB2C - DA 20 C0 00 FF 30 01 1C 34 23 FA 5E 33 68 00 2B
80ADB2E - C0 00 FF 30 01 1C 34 23 FA 5E 33 68 00 2B 01 DA
80ADB30 - FF 30 01 1C 34 23 FA 5E 33 68 00 2B 01 DA 00 23

Salanewt

It's a tad confusing the way you did it, but it didn't take long to figure out! :P

Quote80ADB2C - DA 20 C0 00 FF 30

Is more accurately read as the following, since THUMB instructions are typically read in 16-bit format:

Quote80ADB2C - 20DA 00C0 30FF

The first moves xDA to register 0 (r0); [218]
The second shifts it left by x03 (where x01 essentially multiplies by 2, x02 = by 4, x03 = by 8, x04 = by 16, and so forth); [218 x 8 = 1774] (Not literally multiplication, but the end result is similar)
The third adds xFF to this larger value; [1774 + 255 = 1999]


So all this means is that you have to change the second one to shift by a larger value. In this case, shifting xFE left by x07 will make it x7F00 while adding xFF will make it x7FFF. In other words, the value you want.

Quote80ADB2C - 20FE 01C0 30FF

The above should do it. Please note that this only changes player values, as enemy stats are handled elsewhere. We can help out with that too if you want.
Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?

GoldenSunFan1989


Caledor

ips patches are made with lunar ips, which uses your modded rom and the (backupped) untouched one to generate a patch by comparison between the two

GoldenSunFan1989

#13
Well, I try to modify the not-modified game and save a dump, and I exit it and the game is not modified.

I tried it but the screen got white. When I patched it, the screen was white.

Salanewt

If you just want a patch so you can save the changes (especially as a means of applying them to a different ROM or sharing them), then the easiest way would be to use patching software and an unmodified copy of the ROM you are working with; something like LunarIPS or equivalent should work. This software basically compares the two ROMs and saves the changes in a format that makes them easier to apply to another ROM.

As for how to save anything you do in a modified ROM, using a hex editor will definitely work if you're not having luck with the dump. While there are many to choose from, I've grown quite attached to Hex Editor Neo myself if you want a recommendation.
Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?

Daddy Poi's Oily Gorillas

@Patching: Ofcourse, you could also choose other patching formats... Like .ups, and .bps.... One (or both?) of those may be about xor-ing data...which means that applying a patch isn't just one-way anymore, but you can apply it again to remove the edits... - It's probable that VBA doesn't auto-patch those types, though.

@Saving memory: And your dmp file is 16 MB? If you check the dump file in a hex editor... is it matching up with what you see at 0x08000000 in memory viewer? (It should.)

P.S. = This is my 1999th post, and I decided I had to make sure it was in this topic. For obvious reasons. :P
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)