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

Author Topic: Finding specific bytes in Aria of Sorrow  (Read 1912 times)

caminopreacher

  • Full Member
  • ***
  • Posts: 140
  • "What is a man?"
    • View Profile
Finding specific bytes in Aria of Sorrow
« on: March 06, 2019, 03:01:28 pm »
Hey, guys. Thought I'd check here before calling it quits on trying to locate the Starting Health byte location in Castlevania: Aria of Sorrow for GBA. The starting hp is 320, which translates into 40 01.
I really don't feel like filtering through hundreds of those bytes testing. Anyone have any suggestions? Thanks much.

FAST6191

  • Hero Member
  • *****
  • Posts: 3050
    • View Profile
Re: Finding specific bytes in Aria of Sorrow
« Reply #1 on: March 06, 2019, 06:12:37 pm »
Tracing.

If you know where it ends up in RAM then you should be able to find where it first loads that in and work backwards from there.

It is for graphics and I tend to suggest no$gba debug for most people these days rather than vba-sdl-h which that is written for but the workflows are about the same
https://www.romhacking.net/documents/361/

It might not even be that value, or indeed a value if the health is generated from stats or something. To say nothing of health need not be the same as maximum health which might be a separate concept within the game.

Indeed unless the game has a whole bunch of character classes or something to choose from I would probably not even contemplate a searching approach like that and go right for assembly, and I am normally all about not going right for assembly if there is a reasonable chance or alternative workflow.

El Forko

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Finding specific bytes in Aria of Sorrow
« Reply #2 on: March 17, 2019, 11:12:44 pm »
If you could get a version of grep on windows, here's an answer on stackoverflow that discusses how do an automated search for a string of byte values: https://stackoverflow.com/questions/4180081/binary-grep-on-linux#17168777

Although I just did a search for 0x40 0x01 (and 0x01 0x40 for good measure, since I don't know the endianness of GBA games), and didn't get any matches :(

EDIT: Derp I'm an idiot, I searched my .srm file, not the .gba file, which has tons of matches.  And I just reread your post and it sounds like you're trying to figure out which of those matches is the right one.
« Last Edit: March 18, 2019, 11:37:57 am by El Forko »

dACE

  • Sr. Member
  • ****
  • Posts: 353
    • View Profile
Re: Finding specific bytes in Aria of Sorrow
« Reply #3 on: March 22, 2019, 11:47:01 am »
One way to do it is to replace all the occurancies and check if the game still runs and the health value have changed.

If it has - then redo the replacement for HALF the rom and check. Keep this up until you have narrowed it down to a few occurancies and then check each one.

/dACE