News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Help modifying or removing hex value  (Read 3186 times)

CryinOnion

  • Jr. Member
  • **
  • Posts: 39
  • "Once upon a time, a terribly sad onion ..."
    • View Profile
Help modifying or removing hex value
« on: June 06, 2020, 12:02:06 pm »
Greetings from Barcelona,

I'm working in a Street Fighter IV (NES bootleg) hack.



This is the original title screen (with slight changes). The only references to SFIV appears here and on another screen. Apparently, chinese title means "Fighter Legend" so, I'm trying to do something like that



Usually this is a piece of cake for me. I just map the tiles like this



checking the values in the PPU viewer and then modify it as I wish. In this case I don't even need extra tiles. As I said, it should be a piece of cake, but...



The hex value I marked in green before F0 seems to be some kind of "multiplier". It literally makes the E in "STREET" double. If I change the value from 02 to 05 for example, five "E's" appear. I have tried to simply replace 02 with the value of another tile, or put value 00 and the title screen crashes. Same problem to change the copyright year. "1993" appears as "1-the value that multiplies x2-9-3"

I could simply delete "Street Fighter IV" from the screen by emptying the tiles and leave the year as it is, but it's too "sloppy" so, if someone could explain to me how I could fix it, I'd be eternally grateful.

Cyneprepou4uk

  • Sr. Member
  • ****
  • Posts: 406
  • I am the baldest romhacker
    • View Profile
Re: Help modifying or removing hex value
« Reply #1 on: June 06, 2020, 02:26:47 pm »
You can transfer that logo data to a free space and extend it. Or you can delete some text, last line for example, replacing it with spaces the same way as game compresses data, which will free up some bytes, allowing you to shift data inbetween. Or you can move that blue text 1 tile to the left, replacing 3 spaces to the right with compressions, freeing up 2 bytes in data
« Last Edit: June 06, 2020, 03:57:20 pm by Cyneprepou4uk »
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

CryinOnion

  • Jr. Member
  • **
  • Posts: 39
  • "Once upon a time, a terribly sad onion ..."
    • View Profile
Re: Help modifying or removing hex value
« Reply #2 on: June 06, 2020, 10:24:54 pm »
Sounds great...  How do I do it?XD. Sorry, I forget to mention, zero programming skills... 😅

Cyneprepou4uk

  • Sr. Member
  • ****
  • Posts: 406
  • I am the baldest romhacker
    • View Profile
Re: Help modifying or removing hex value
« Reply #3 on: June 07, 2020, 12:49:12 am »
For the last 2 methods you don't need programming, just edit logo data. For example to move first line of blue text to the left decrease byte at 13756, which counts spaces from the end of the orange line

You'll probably feel more comfortable with highlighted bytes by code/data logger
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

Vanya

  • Hero Member
  • *****
  • Posts: 1677
    • View Profile
Re: Help modifying or removing hex value
« Reply #4 on: June 07, 2020, 06:23:59 am »
What happens if you change the multiplier value into a letter value instead?

For example instead of:

ED EE EF 02 F0 81

Change it into:

ED EE EF ED F0 81

Does it still crash or write STRSET?

CryinOnion

  • Jr. Member
  • **
  • Posts: 39
  • "Once upon a time, a terribly sad onion ..."
    • View Profile
Re: Help modifying or removing hex value
« Reply #5 on: June 08, 2020, 03:08:55 pm »
If I do exactly this (Change it into ED EE EF ED F0 81) we have a total crash:



About no need to know programming to do that, sorry man, but your explanations sounds like chinese to me... :o Maybe a explanation for dummies (step by step with screenshots) will help me.

Vanya

  • Hero Member
  • *****
  • Posts: 1677
    • View Profile
Re: Help modifying or removing hex value
« Reply #6 on: June 08, 2020, 04:52:59 pm »
Wow. That was unexpected.
Are those hex values the exact same ones corresponding to the tiles in the PPU viewer?

CryinOnion

  • Jr. Member
  • **
  • Posts: 39
  • "Once upon a time, a terribly sad onion ..."
    • View Profile
Re: Help modifying or removing hex value
« Reply #7 on: June 09, 2020, 01:10:02 pm »
Yep. If you see the tile map I made a little bit above, the hex values match, except that instead of showing "ED EE EF F0 F0 81", being F0 the top of the "E" in "STREET", use the value "02" to show two top "E" parts. As I said, if I change that value to 05 for example, it shows five "E's", so it certainly works as a multiplier.

Cyneprepou4uk

  • Sr. Member
  • ****
  • Posts: 406
  • I am the baldest romhacker
    • View Profile
Re: Help modifying or removing hex value
« Reply #8 on: June 09, 2020, 03:26:16 pm »
Try changing 83 as well. I think it is a control byte for reading 3 raw bytes after it without multipliers
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

Vanya

  • Hero Member
  • *****
  • Posts: 1677
    • View Profile
Re: Help modifying or removing hex value
« Reply #9 on: June 09, 2020, 03:33:58 pm »
That's what I was thinking too. Just tried the wrong byte.
Castlevania 3 uses a similar setup for the title graphics, and mentioning the 83 sparked some familiarity in my noggin.

CryinOnion

  • Jr. Member
  • **
  • Posts: 39
  • "Once upon a time, a terribly sad onion ..."
    • View Profile
Re: Help modifying or removing hex value
« Reply #10 on: June 10, 2020, 01:17:29 pm »
In Spain we have a song that says the following (more or less): As Jack the Ripper said, let's go by pieces...

When I replace the value 02 with 83 on that specific line it works (1)



Just in the next line the value is repeated (2) to generate two black tiles. If I try same trick It crashes  :banghead:. Same with (3) and (4).

I also tried to change the copyright year using same system (5). No positive results.


And finally, on the character selection screen, there is the same problem. An attempt is made to replace the value 02 with 83 with no result.



And that's it. I still have a lot of work to do, so I have a couple of weeks before I get stuck if I don't fix this problem. Still, thanks (to both of you) for your interest and help.

Cyneprepou4uk

  • Sr. Member
  • ****
  • Posts: 406
  • I am the baldest romhacker
    • View Profile
Re: Help modifying or removing hex value
« Reply #11 on: June 10, 2020, 01:57:24 pm »
I never told you to replace 02 with 83. I said that you should change 83. See you after your next attempt  >:D
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

CryinOnion

  • Jr. Member
  • **
  • Posts: 39
  • "Once upon a time, a terribly sad onion ..."
    • View Profile
Re: Help modifying or removing hex value
« Reply #12 on: June 10, 2020, 02:33:26 pm »
XD change for what?

Cyneprepou4uk

  • Sr. Member
  • ****
  • Posts: 406
  • I am the baldest romhacker
    • View Profile
Re: Help modifying or removing hex value
« Reply #13 on: June 10, 2020, 03:41:09 pm »
Use your own brains
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

CryinOnion

  • Jr. Member
  • **
  • Posts: 39
  • "Once upon a time, a terribly sad onion ..."
    • View Profile
Re: Help modifying or removing hex value
« Reply #14 on: June 10, 2020, 05:41:47 pm »
Excuse me, but this is like you telling me:

-I don't speak or read Chinese, what do those symbols mean?

-"Mîao I Sing Lin Wa".

-What does that mean?

-Use your own brains.

If you think about it, that's a pretty rude way to answer.

Cyneprepou4uk

  • Sr. Member
  • ****
  • Posts: 406
  • I am the baldest romhacker
    • View Profile
Re: Help modifying or removing hex value
« Reply #15 on: June 10, 2020, 05:53:01 pm »
It's your own fault for being inattentive

83 ED EE EF 02 F0

83 = print 3 following bytes as is
02 = print 1 following byte 2 times

Figure out the rest
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

CryinOnion

  • Jr. Member
  • **
  • Posts: 39
  • "Once upon a time, a terribly sad onion ..."
    • View Profile
Re: Help modifying or removing hex value
« Reply #16 on: June 10, 2020, 08:28:29 pm »
Quote
It's your own fault for being inattentive
Respectfully, that's the worst apology I've ever heard. With this I can guess one of these options:

1) You're the opposite of humble, which is assuming anyone can make a mistake.

2) You're accustomed to people answering you rudely, in which case it wouldn't be your fault.

Anyway, without an apology I don't think it's right to accept your help.

Cyneprepou4uk

  • Sr. Member
  • ****
  • Posts: 406
  • I am the baldest romhacker
    • View Profile
Re: Help modifying or removing hex value
« Reply #17 on: June 11, 2020, 04:28:33 am »
Are you saying that you won't edit the title screen because of me?  :laugh:  Suit yourself  >:D
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

Vanya

  • Hero Member
  • *****
  • Posts: 1677
    • View Profile
Re: Help modifying or removing hex value
« Reply #18 on: June 11, 2020, 12:37:29 pm »
I don't want to get into this, but I do want to let you know that around here you are expected to experiment on your own at least.

As for your issue, swapping out an 83 for a 02 is a pretty big change that you should expect will cause problems to some degree. It's pretty clear these values mean different things.

I mentioned before that I was reminded of how Akumajou Densetsu / Castlevania III formats the title screen's data. It's organized into a tile-map.

Like Cyneprepou4uk said, 83 is telling the game to place the next 3 tiles and 02 tells it to print the next tile 2 times.

You already know you can place more E's by increasing the 02 and reducing it to 00 crashes the game.
And you know 83 writes the next 3 bytes.

So if you want to change it to read FIGHTER LEGEND, you have to take these control values into consideration and the amount of space you have to work with in the tile-map.

When I made the initial changes to the re-translated version of the Akumajou Densetsu title screen I had to draw out all the tile-map data on a sheet of grid paper and make sure I wasn't using more bytes than there was available.

You'll need to do something similar.
Fortunately, I can tell you that seeing how the data is laid out will help show you what the control bytes do.

bogaabogaa

  • Full Member
  • ***
  • Posts: 141
    • View Profile
Re: Help modifying or removing hex value
« Reply #19 on: June 13, 2020, 03:24:30 am »
I had like to point out that Cyneprepou4uk provided excellent learning material and is active helping many people here on RHDN. He is not speaking Chinese and when you don't understand something it is up do you to break it down to get further help with your trouble.
In this topic he did investigate and figure some stuff out that is needed for this task. Sure you can't be thank full if you can't use the information but your outlet is just provoking.
Here what he means with no programming skill needed to figure this out a bit.

In the first picture I removed the tiles so I have just the control byte left. This should make the explanations above easier to observe.

Second picture I play around with a control byte to see what it does.

CV ROM DiscordServer
https://discord.gg/PvFgxRg