Changing item names in hex?

Go down

Changing item names in hex? Empty Changing item names in hex?

Post by Nocturnesthesia Fri 6 Apr 2018 - 0:00

I'm new to this and just messing around trying to learn. The Z3 banks are very helpful but I'm too much of a beginner to make proper use of it yet Cool

So, can anyone help me out with explaining how I can do this? Let's say I wanted to change "flute" to "ocarina" for example. Thanks in advance
Nocturnesthesia
Nocturnesthesia
Cucumber
Cucumber

Since : 2018-03-27

Back to top Go down

Changing item names in hex? Empty Re: Changing item names in hex?

Post by Conn Fri 6 Apr 2018 - 7:46

Here's the code map:

Changing item names in hex? Image512

To find the Letter F: go first the vertical, then the horizontal:
It is in row 5, column 5, so the byte is 55
L=5B, U=64, T=63, E=54; FLUTE=55 5B 64 63 54

Now add between each letter a 25
So flute byte string is
55 25 5B 25 64 25 63 25 54 25

Open the rom in a hex editor and find it:
Changing item names in hex? Image710

F5 24 is blank and here you have space to add further letters.

You also note that you find it 2 times, the second time is the activated flute (after releasing the bird from the statue).

Now change both to OCARINA: 5e 52 50 61 58 5D 50
String: 5e 25 52 25 50 25 61 25 58 25 5D 25 50 25, using some of the blanks (you of course don't have unlimited space, only 8 letters. Therefore Bow&Silver Arrwows and Boomerang is special):
Changing item names in hex? Image114

Changing item names in hex? Legend13
Conn
Conn

Changing item names in hex? Image212

Since : 2013-06-30

Back to top Go down

Changing item names in hex? Empty Re: Changing item names in hex?

Post by Nocturnesthesia Fri 6 Apr 2018 - 12:46

Thank you so much, you guys are the best Very Happy
Nocturnesthesia
Nocturnesthesia
Cucumber
Cucumber

Since : 2018-03-27

Back to top Go down

Changing item names in hex? Empty Re: Changing item names in hex?

Post by wizzrobemaster Sat 7 Apr 2018 - 19:54

keep in mind that when editing item names, they will keep their old names if you already obtained them on a save file. for example, if you continue your saved gave after getting the ocarina, which is renamed the flute, then no change will occur. if you get the ocarina after the hex edit is made, then the changed name will appear. also the end credits has limited text.

wizzrobemaster
Ganon
Ganon

Since : 2015-01-04

Back to top Go down

Changing item names in hex? Empty Re: Changing item names in hex?

Post by Conn Sat 7 Apr 2018 - 20:29

The ram for this gfs part is set on booting, so you're partially right. If you use a freeze savestate, you don't see the effect, but if you boot and load the slot from your srm file, it will show the new name.
Conn
Conn

Changing item names in hex? Image212

Since : 2013-06-30

Back to top Go down

Changing item names in hex? Empty Re: Changing item names in hex?

Post by Nocturnesthesia Sat 7 Apr 2018 - 21:26

Yeah I've noticed that savestates mess with gfx changes in general. Generally I don't use savestates when testing changes (unless it's just a palette, where leaving the area and coming back is usually sufficient).

Is there any tutorials out there about using Geiger to trace info in Z3 specifically? These forums are a wealth of info but I want to learn how do do shit myself eventually.

Right now I'm trying to figure out how to change the palette of items on the menu (like trying to make the cape show up as yellow, or the L1 shield brown or red) but all I've managed to do so far is add glitchy spots to my menu screen. Is this possible without having to rearrange the entire inventory? Because that's waaay beyond the scope of what I expect to accomplish right now.
Nocturnesthesia
Nocturnesthesia
Cucumber
Cucumber

Since : 2018-03-27

Back to top Go down

Changing item names in hex? Empty Re: Changing item names in hex?

Post by Conn Sat 7 Apr 2018 - 21:40

Japp, it's the 25 value that determines the palette and flip/mirror the tile.
But it's more complicated.
There are 2 screens for these 8bpp item stuff, that image above with the letters is the 2nd screen. The first screen is accessible with 24 for example (blank is from this screen), and has the item gfx itself e.g.
I can send you a picture map of this screen as well if you like.

I don't really remember how exactly it works but I think even numbers (20,22,24,26...) take tiles from the first screen while odd numbers (21,23,25...) from the second screen. The number itself determines palette and flipping.

There is no easy way to find the string unfortunately. I observe the ram if I want to find it. But if you figure out the math logic which palette/flip corresponds to which number you can create maybe the string to find it.
Conn
Conn

Changing item names in hex? Image212

Since : 2013-06-30

Back to top Go down

Changing item names in hex? Empty Re: Changing item names in hex?

Post by Nocturnesthesia Sat 7 Apr 2018 - 22:12

Sure, I'd be happy to have the picture map, hopefully I can make some use of it eventually Smile
Nocturnesthesia
Nocturnesthesia
Cucumber
Cucumber

Since : 2018-03-27

Back to top Go down

Changing item names in hex? Empty Re: Changing item names in hex?

Post by Conn Sat 7 Apr 2018 - 22:58

I remember now my technique. I indeed used Geiger. The first screen won't help you much, so I won't post it for now.

Here how you can proceed with Geiger:

For example flute, it is ram 7ef34c. Go into the menu, and make a geiger breakpoint at 7ef34c, with read.

You get this tracelog (for activated flute 7ef34c-03):
$0D/E58A AF 4C F3 7E LDA $7EF34C[$7E:F34C]   A:1354 X:134E Y:000E P:envmxdizc
$0D/E58E 29 FF 00    AND #$00FF              A:0103 X:134E Y:000E P:envmxdizc
(03 activated flute, 02 has different values)
$0D/E591 85 02       STA $02    [$00:0002]   A:0003 X:134E Y:000E P:envmxdizc
$0D/E593 A9 11 F7    LDA #$F711              A:0003 X:134E Y:000E P:envmxdizc
$0D/E596 85 04       STA $04    [$00:0004]   A:F711 X:134E Y:000E P:eNvmxdizc
$0D/E598 20 72 E3    JSR $E372  [$0D:E372]   A:F711 X:134E Y:000E P:eNvmxdizc
$0D/E372 A5 02       LDA $02    [$00:0002]   A:F711 X:134E Y:000E P:eNvmxdizc
$0D/E374 0A          ASL A                   A:0003 X:134E Y:000E P:envmxdizc
$0D/E375 0A          ASL A                   A:0006 X:134E Y:000E P:envmxdizc
$0D/E376 0A          ASL A                   A:000C X:134E Y:000E P:envmxdizc
$0D/E377 A8          TAY                     A:0018 X:134E Y:000E P:envmxdizc
$0D/E378 A6 00       LDX $00    [$00:0000]   A:0018 X:134E Y:0018 P:envmxdizc
$0D/E37A B1 04       LDA ($04),y[$0D:F729]   A:0018 X:1354 Y:0018 P:envmxdizc
(here it loads the first value, top left tile: 0D:F729 is pc 0x6F729)
$0D/E37C 9D 00 00    STA $0000,x[$0D:1354]   A:2CD4 X:1354 Y:0018 P:envmxdizc
$0D/E37F C8          INY                     A:2CD4 X:1354 Y:0018 P:envmxdizc
$0D/E380 C8          INY                     A:2CD4 X:1354 Y:0019 P:envmxdizc
$0D/E381 B1 04       LDA ($04),y[$0D:F72B]   A:2CD4 X:1354 Y:001A P:envmxdizc
(here it loads the second value, top right tile: 0D:F72B is pc 0x6F72B)
$0D/E383 9D 02 00    STA $0002,x[$0D:1356]   A:2CD5 X:1354 Y:001A P:envmxdizc
$0D/E386 C8          INY                     A:2CD5 X:1354 Y:001A P:envmxdizc
$0D/E387 C8          INY                     A:2CD5 X:1354 Y:001B P:envmxdizc
$0D/E388 B1 04       LDA ($04),y[$0D:F72D]   A:2CD5 X:1354 Y:001C P:envmxdizc
(here it loads the third value, bottom left tile: 0D:F72D is pc 0x6F72D)
$0D/E38A 9D 40 00    STA $0040,x[$0D:1394]   A:2CE4 X:1354 Y:001C P:envmxdizc
$0D/E38D C8          INY                     A:2CE4 X:1354 Y:001C P:envmxdizc
$0D/E38E C8          INY                     A:2CE4 X:1354 Y:001D P:envmxdizc
$0D/E38F B1 04       LDA ($04),y[$0D:F72F]   A:2CE4 X:1354 Y:001E P:envmxdizc
(here it loads the fourth value, bottom rigth tile: 0D:F72F is pc 0x6F72F)
$0D/E391 9D 42 00    STA $0042,x[$0D:1396]   A:2CE5 X:1354 Y:001E P:envmxdizc
$0D/E394 60          RTS                     A:2CE5 X:1354 Y:001E P:envmxdizc

So you find
0x6F729: d4 2c
0x6F72B: d5 2c
0x6F72D: e4 2c
0x6F72F: e5 2c
d4, d5, e4, e5 are the tile indexes in the first screen, you can edit the gfx e.g. after decompressing with zcompress.

The second byte is the flip/palette value, where the first 4 bits, "2", is first palette and 3 second palette. Here's the key:
Changing item names in hex? Image513
So to change the flute yellow, set the second byte to 28, green would be 3C and so on.

0x6F729: d4 28
0x6F72B: d5 28
0x6F72D: e4 28
0x6F72F: e5 28

Changing item names in hex? Legend14

I think if you give other values like 48, 68, etc, the tile gets mirrored/flipped in all variations. If you use odd numbers like 29, it takes the tile from 2nd screen where I posted the map picture above (first flute tile d4 is not part of that screen (it goes to 7 only, since after the letters there is the space of the monologues, but if it was instead d4 28 then 55 29 it would take F in yellow palette (but still occurs white since it does not take the yellow but the white color from that palette - hope you understand )
Conn
Conn

Changing item names in hex? Image212

Since : 2013-06-30

Back to top Go down

Changing item names in hex? Empty Re: Changing item names in hex?

Post by Nocturnesthesia Sun 8 Apr 2018 - 1:07

After some trial and error I managed it, again thank you for your help. I still don't fully understand what I'm doing when it comes to the Geiger logs but once I have hex addresses nearby I can usually work it out. I might compile a list/chart for easy reference as I go from here on out, it should save anyone who wants to do the same thing a lot of work in the future
Nocturnesthesia
Nocturnesthesia
Cucumber
Cucumber

Since : 2018-03-27

Back to top Go down

Changing item names in hex? Empty Re: Changing item names in hex?

Post by wizzrobemaster Sun 8 Apr 2018 - 16:43

a yellow ocarina?

wizzrobemaster
Ganon
Ganon

Since : 2015-01-04

Back to top Go down

Changing item names in hex? Empty Re: Changing item names in hex?

Post by Conn Sun 8 Apr 2018 - 17:51

I do not know how to handle your question, wizz, NE asked how to change item colors and as an example I made it yellow. You can give it any colors of the palette I posted.
I advice to read the text and not only looking at the pictures Wink
Conn
Conn

Changing item names in hex? Image212

Since : 2013-06-30

Back to top Go down

Changing item names in hex? Empty Re: Changing item names in hex?

Post by wizzrobemaster Mon 9 Apr 2018 - 7:10

No i was not asking how to change it. I was simply surprised.

wizzrobemaster
Ganon
Ganon

Since : 2015-01-04

Back to top Go down

Back to top

- Similar topics

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