Heartbreaker: All the questions.

Go down

Heartbreaker: All the questions.

Post by LeviKornelsen on Tue 28 Aug 2018 - 14:39

In order to get a stronger handle on what is and isn't possible in construction of a mod, I've been working through the basic hex hacks in Puzzledude's all-in and in the hacking compendium (most of which are the same, of course) over the last day and a half.

While doing this, I've been building a library of my progress through them by turning the settings that seem decent into small IPS patches, and have noticed that a *lot* of these seem like components for building character classes.

So I figure, yeah, if it's right there in front of me, I'ma try that.  Then any larger mod I build (still eyeing that pieces-of-heart thing) can be set by default to "You have all the negative features; pick and apply a character class to achieve balance".  Additionally users could just apply the classes to vanilla or throw them onto their other mods, etc (and risk whatever weird side effects).

Okay.  So that's the context.  Here's the questions so far:

1. Would people get use out of my little library of mini-ISP-patches (each of which is a one-line hex edit), just as-is, here or on RomHacking?  I've seen Puzzledude's Hp adjuster hack up over there, and it seems like it's largely composed of such stuff.

...

2. I've seen (over [You must be registered and logged in to see this link.]) a number of supposed hex addresses not in the guides, the most interesting of which to me don't work either because they're badly-converted game genie type codes or are for a different version of the ROM than I'm testing on (Unheadered US).  Of interest to me were:

A) Alter the value of green/blue/red rupees; that is, how much they add to your total on pick-up.

B) Adjust basic walking speed.

Does anyone have actual hex addresses for these, advice on finding them, etc?  

...

3) For that matter, are there further listings of "Hex addresses we've found for stuff" that might be handy beyond the all-in and compendium (even if they're in scratch notes form or whatever)?  Hunting hex addresses is, from what I've read so far, hella labour-intensive stuff, so I'd really rather not jump in only to find I've duplicated already-done good work.

LeviKornelsen
Rope
Rope

Since : 2018-08-26

Back to top Go down

Re: Heartbreaker: All the questions.

Post by Puzzledude on Tue 28 Aug 2018 - 16:11

1. Would people get use out of my little library of mini-ISP-patches
Maybe for rookies only, since this is hex editing and doesn't really need an IPS patch.
My HP hack was indeed meant for newcomers.

A) Alter the value of green/blue/red rupees; that is, how much they add to your total on pick-up.
I would say sprite pal editing here.

B) Adjust basic walking speed.
This is in the compendium for sure. But do note, setting this too fast will bug the game, but you can make Link walk slower or just a little faster though.
avatar
Puzzledude



Since : 2012-06-20

Back to top Go down

Re: Heartbreaker: All the questions.

Post by LeviKornelsen on Tue 28 Aug 2018 - 16:32

Puzzledude wrote:I would say sprite pal editing here.

~Confusion~

Do you mean palette editing? For clarity, in case I'm being confusing, I mean doing something like:

Poor Earner Mini-Hack
Green rupee: Gives you 1 rupees on pickup.
Blue rupee: Gives you 3 rupees on pickup.
Red rupee: Gives you 7 rupees on pickup.

Good Earner Mini-Hack
Green rupee: Gives you 2 rupees on pickup.
Blue rupee: Gives you 7 rupees on pickup.
Red rupee: Gives you 15 rupees on pickup.

....

(To the 'for rookies', yeah, that sounds right. And now to scour the compendium again and try and find the walking speed address. Thanks!)

LeviKornelsen
Rope
Rope

Since : 2018-08-26

Back to top Go down

Re: Heartbreaker: All the questions.

Post by Conn on Tue 28 Aug 2018 - 17:35

B) Adjust basic walking speed.

Does anyone have actual hex addresses for these, advice on finding them, etc?

If you cannot find it in the compendium, here's the patch where I had to trace it:
[You must be registered and logged in to see this link.]

You find in the asm this table reference:
end:
LDA $87E227,x ;load native speed values
which translates to rom address 0x3E227

I didn't test all values taken from this table, those I traced are:
; find the adjustable table at the end of this code
; db (0) $18: - Horizontal and vertical walking speed (Default = 18)
; db (1) $10 - Diagonal walking speed (Default = 10)
; db (2) $0a - Stairs walking speed (Default = 0A)

; db (0c) $14 - walking through heavy grass speed (also shallow water) (Default = 14)
; db (0d) $0d - walking diagonally through heavy grass speed (also shallow water) (Default = 0D)
; db (10) $40 - Pegasus boots speed (Default = 40)
Means:
0x3E227+$0 = 0x3E227: 18 -> give like 20 to increase vertical/horizontal walking
0x3E227+$1 = 0x3E228: 10 -> xx (diagonal)
...
0x3e227+$c = 0x3e233: 14 -> xx (heavy grass walking speed)
...
avatar
Conn



Since : 2013-06-30

Back to top Go down

Re: Heartbreaker: All the questions.

Post by LeviKornelsen on Tue 28 Aug 2018 - 18:34

Conn wrote:(The goods on speed)

Sweeeeet.  Yeah, I simply can't find it in the compendium, but that's the stuff.

For any fellow future rookies googling this up or following along, let me save you my last hour and give you the idiot-proof end result of a few trials using that last info:

......

Starting at 3E227, you'll see this string:

18 10 0A 18 10 08 08 04 0C 10 09 19 14 0D 10 08 40

......

To get 12% faster walking (not including stairs), replace it with this:

1B 12 0A 18 10 08 08 04 0C 10 09 19 17 0F 10 08 40

......

To get 25% faster walking (not including stairs), replace it with this:

1E 14 0A 18 10 08 08 04 0C 10 09 19 19 10 10 08 40

........

To get 50% faster walking (not including stairs), replace it with this:

24 18 0A 18 10 08 08 04 0C 10 09 19 1E 13 10 08 40

LeviKornelsen
Rope
Rope

Since : 2018-08-26

Back to top Go down

Re: Heartbreaker: All the questions.

Post by Puzzledude on Tue 28 Aug 2018 - 19:07

Well here's the walking speed from the Compendium.

Code:
Changing the default speed values for different conditions
Convert to hex and send in: various info u can change in hex
There's a table in Bank 7 ($07:E227) that has all speed values for the different conditions (Normal, stairs, slow-ICE?, slower- ICE?,when you have an object on top of your head, running with boots etc) in it. Not only can you make Link faster with that (try a value of #$70), you can also make him moonwalk using whack values.
The table is located at hex address 3E227-3E244.

3E227 - Horizontal and vertical walking speed (Default = 18)
3E228 - Diagonal walking speed (Default = 10)
3E229 - Stairs walking speed (Default = 0A)
3E22A - ????????????????????? (Default = 18)
3E22B - ????????????????????? (Default = 10)
3E22C - ????????????????????? (Default = 08) 476
3E22D - ????????????????????? (Default = 08)
3E22E - ????????????????????? (Default = 04)
3E22F - ????????????????????? (Default = 0C)
3E230 - ????????????????????? (Default = 10)
3E231 - ????????????????????? (Default = 09)
3E232 - ????????????????????? (Default = 19)
3E233 - walking through heavy grass speed (also shallow water) (Default = 14)
3E234 - walking diagonally through heavy grass speed (also shallow water) (Default = 0D)
3E235 - ????????????????????? (Default = 10)
3E236 - ????????????????????? (Default = 08)
3E237 - Pegasus boots speed (Default = 40)
3E238 - ????????????????????? (Default = 2A)
3E239 - ?????????????????????
3E23A - ?????????????????????
3E23B - ?????????????????????
3E23C - ?????????????????????
3E23D - ?????????????????????
3E23E - ?????????????????????
3E23F - ?????????????????????
3E240 - ?????????????????????
3E241 - ?????????????????????
3E242 - ?????????????????????
3E243 - ?????????????????????
3E244 - ?????????????????????

The bouncing distance changes as well if you edit the table so be careful while editing the values. Jump distances ought not to be changed. The game's not designed to allow that. You will inevitably end up in a wall or on top of something illegal.

Another problem is that if you make Link too fast, he tends to run through walls, because the collision detection does not prevent him from doing so.
The routine that controls how he moves is not too far away from that table. It's located at hex address 3E245.

In a small hack that I’ve done, I’ve deleted an LSR out of a sequence of 4 LSR A's. That had the effect of doubling his speed. Remove another one and you get craziness!
avatar
Puzzledude



Since : 2012-06-20

Back to top Go down

Re: Heartbreaker: All the questions.

Post by Puzzledude on Tue 28 Aug 2018 - 19:12

Do you mean palette editing? For clarity, in case I'm being confusing, I mean doing something like:

Poor Earner Mini-Hack
Green rupee: Gives you 1 rupees on pickup.
Blue rupee: Gives you 3 rupees on pickup.
Red rupee: Gives you 7 rupees on pickup.

Good Earner Mini-Hack
Green rupee: Gives you 2 rupees on pickup.
Blue rupee: Gives you 7 rupees on pickup.
Red rupee: Gives you 15 rupees on pickup.
For this you will nead ASM, the palette editing is only if you want the values swapped, like red rupee is 1, green is 5 and blue is 20. But new values are a whole different thing.
avatar
Puzzledude



Since : 2012-06-20

Back to top Go down

Re: Heartbreaker: All the questions.

Post by LeviKornelsen on Wed 29 Aug 2018 - 0:54

Puzzledude wrote:For this you will nead ASM, the palette editing is only if you want the values swapped, like red rupee is 1, green is 5 and blue is 20. But new values are a whole different thing.

Fair enough. I was intending to tour through one editing method at a time, but I'm now reading the compendium sections on ASM as well.

I found the section you quoted (based on the lingering page number in your quote) under an ASM title, and Conn's advice was in the form of ASM code. So collecting all the hex I can will clearly mean getting real comfortable picking hex out of those codes too, which will mean learning some of the structure of ASM... Apparently you gotta eat the whole elephant.

I do not know how you guys got this far into this beast without, well, you guys there to help.

LeviKornelsen
Rope
Rope

Since : 2018-08-26

Back to top Go down

Re: Heartbreaker: All the questions.

Post by Conn on Wed 29 Aug 2018 - 6:24

I think asm is right now out of reach for you, here's a small lecture how you'd need to do it. Make a trace while you collect a ruppee, then look where 7ef360 (ram to manipulate the amount of rupees, the same as pro action replay cheat do it) change:

$06/D1C4 B9 E2 D0    LDA $D0E2,y[$06:D1BC]   A:00D1 X:000D Y:00DA
$06/D1C7 C2 20       REP #$20                A:0005 X:000D Y:00DA
$06/D1C9 18          CLC                     A:0005 X:000D Y:00DA
$06/D1CA 6F 60 F3 7E ADC $7EF360[$7E:F360]   A:0005

Here I collected a blue rupee, that you see in Y (DA). This sprite has a value at  06:D1BC (calculates  $D0E2+$DA). At 06/D1BC is the value 05 that gets into A: and finally to your rupee ram address ADC $7ef360.

So you need lunar address to convert lorom to pc address:
06/D1BC = 0x351BC: 05

obviously 0x351BB: 01 is 1 rupee and 0x351BD: $14=20(dec) is 20 rupees.

This is for ground pick-up, a similar code should exist when collecting out of chest.

Edit: btw, if you are unexperienced with such asm/hex, it might sometimes be also a good idea to search for this hex string 01 05 14 in the rom then. There's only one other place at 0x4ad67 matching. If e.g. out of chest aren't affected with editing 0x351bb then I'd try&error this.
avatar
Conn



Since : 2013-06-30

Back to top Go down

Re: Heartbreaker: All the questions.

Post by Puzzledude on Wed 29 Aug 2018 - 10:38

search for this hex string 01 05 14
This is smart, I never thought of that.

Here I collected a blue rupee, that you see in Y (DA). This sprite has a value at 06:D1BC (calculates $D0E2+$DA). At 06/D1BC is the value 05 that gets into A: and finally to your rupee ram address ADC $7ef360.
So you need lunar address to convert lorom to pc address:
06/D1BC = 0x351BC: 05
obviously 0x351BB: 01 is 1 rupee and 0x351BD: $14=20(dec) is 20 rupees.
This is how you do it. Nice find.
avatar
Puzzledude



Since : 2012-06-20

Back to top Go down

Re: Heartbreaker: All the questions.

Post by LeviKornelsen on Wed 29 Aug 2018 - 12:47

Conn wrote:Edit: btw, if you are unexperienced with such asm/hex, it might sometimes be also a good idea to search for this hex string 01 05 14 in the rom then. There's only one other place at 0x4ad67 matching. If e.g. out of chest aren't affected with editing 0x351bb then I'd try&error this.

*Facepalm*

I'm honestly embarrassed I didn't think of doing this.

And, yeah, hex and asm are new to me. Programming-wise, I'm out of the minecraft school of "graduated from tinkertoy editors into doing java coding", so I'm very much fumbling around collecting the basic tools and techniques here. Like, making a whole set of move speed variants was also practice in doing hex-to-decimal-and-back conversions in my head, kind of thing.

Next up for me after I get through the compendium will likely be trying to replicate what you did right there in your example for other instances.

(And hooray! Pick-up values!)

LeviKornelsen
Rope
Rope

Since : 2018-08-26

Back to top Go down

Re: Heartbreaker: All the questions.

Post by LeviKornelsen on Wed 29 Aug 2018 - 23:09

Not so much an ask for help this time as a general "Is this doc widely known?", because I tripped over it searching around and damn. Actual hex addresses are in the last eighth or so...

[You must be registered and logged in to see this link.]

LeviKornelsen
Rope
Rope

Since : 2018-08-26

Back to top Go down

Re: Heartbreaker: All the questions.

Post by Conn on Thu 30 Aug 2018 - 7:26

This here is indespensible:
[You must be registered and logged in to see this link.]
avatar
Conn



Since : 2013-06-30

Back to top Go down

Re: Heartbreaker: All the questions.

Post by LeviKornelsen on Thu 30 Aug 2018 - 16:21

As a big fan of  "Ambitious modding projects die 90% of the time, contributing nothing; avoid this fate by working in small bites"...

[You must be registered and logged in to see this link.] which will be a set of 'character classes' tinker-toyed together from my library of micro-hacks - the intent being to add some replay value.  

They're intended to be balanced in the sense of presenting interesting advantage and interesting disadvantage - but not in the sense that they're all of equal 'power'.

Currently testing them.  If anyone has thoughts on that, would love them.

LeviKornelsen
Rope
Rope

Since : 2018-08-26

Back to top Go down

Re: Heartbreaker: All the questions.

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum