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

Author Topic: Kirby and the amazing mirror (GBA/VBA)  (Read 12089 times)

ChemaROMhacking

  • Jr. Member
  • **
  • Posts: 25
    • View Profile
Kirby and the amazing mirror (GBA/VBA)
« on: December 16, 2011, 03:54:43 pm »
TL;DR
-What I want: Increase the health of the bosses within the .gba ROM
-What I lack: Knowledge to find such addresses

LONG STORY:
I'm experienced with Hexadecimal, binary, hex-editors and all that basic crap
I have made my own ActionReplay, Codebreaker, GameShark, JokerCommands, whatever-you-call-them codes
But I'm new to this ROM hacking mess

I can grasp how the emulator assigns some masks such as 05-Palette, 03-IRAM, and 08-ROM that are displayed on the memory viewer
I have Googled over 2 hours and all I find are lame guides that tell you what is hexadecimal & binary, then they proceed to middle-finger the reader by teaching you how to be a mindless script-kiddie by using a specific software to edit a specific game (pokemon tends to be such cancer over google), making you waste your time for no reason.

The best guide I have stumbled with is one that says "hey, go edit any random address in the hex-editor and then see what happens until you are 60+years old"
Seriously? the only way to find an address is just by trial-and-error?

Isn't there another way to work around?

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Kirby and the amazing mirror (GBA/VBA)
« Reply #1 on: December 16, 2011, 04:37:36 pm »
Yes. And let me personally offer you a warm welcome to the romhacking community, because it is so freaking rare to have a newbie who actually knows what the hell he's talking about.

What you want is a debugging emulator. It'll take some trial and error still, but you'll actually be able to trace the game's code as it executes and set breakpoints for instructions and memory access. Try finding the health bar in VRAM and use the debugging features to find and trace the routine that updates it: you can work backwards from there and eventually find where the health value is loaded from in the ROM.
In the event of a firestorm, the salad bar will remain open.

ChemaROMhacking

  • Jr. Member
  • **
  • Posts: 25
    • View Profile
Re: Kirby and the amazing mirror (GBA/VBA)
« Reply #2 on: December 17, 2011, 01:45:11 am »
Yes. And let me personally offer you a warm welcome to the romhacking community, because it is so freaking rare to have a newbie who actually knows what the hell he's talking about.

What you want is a debugging emulator. It'll take some trial and error still, but you'll actually be able to trace the game's code as it executes and set breakpoints for instructions and memory access. Try finding the health bar in VRAM and use the debugging features to find and trace the routine that updates it: you can work backwards from there and eventually find where the health value is loaded from in the ROM.

Thank you so much
I was able to make the first (and hardest) step thanks to your hint "debugging emulator"
Ironically, the software itself didn't help me directly
but enlightened me to a rusty (yet cunning) method to find it

Now I only have 1 issue left: How do I export the data in a patch?

The tools I have so far:
VBA 1.8.0 (Link)
NO$GBA 2.6a (debug-version)
Hex Workshop 6.6 (64bit professional [Evaluation])

Thanks in advance for all the help, guides and hints you guys can provide

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Kirby and the amazing mirror (GBA/VBA)
« Reply #3 on: December 17, 2011, 02:02:47 am »
You have several options.

IPS is the most widely supported, but the romhacking community is trying very hard to deprecate it, and with good reason: it only patches files up to 16MB and has no built-in means of checking whether a patch is being applied to the correct file. If you want to use IPS anyway, though, you can use Lunar IPS.

xdelta is another common patch format; it fixes the aforementioned issues with IPS and produces smaller patch files, but it can be cumbersome to use. However, there are a number of frontends available to simply the patch creation/application process, such as this one here.

A newcomer to the field is byuu's BPS format, which offers advantages over both IPS and xdelta. You can get the BPS patch program here.

So, how'd you figure it out, if NO$GBA didn't help you "directly"?
In the event of a firestorm, the salad bar will remain open.

ChemaROMhacking

  • Jr. Member
  • **
  • Posts: 25
    • View Profile
Re: Kirby and the amazing mirror (GBA/VBA)
« Reply #4 on: December 17, 2011, 02:38:14 am »
Thanks again buddy
You sure are making this easier to me

As for your question, when I first opened NO$GBA it really scared me to death
I was like "WTF do I do with...... THIS?"
Although I had  no idea what all the displayed mess meant, the constant presence of the memory viewer gave me an idea.
I had no idea how to locate data on the VRAM.
Bu I DO know how to do it on the IRAM and WRAM with the VBA cheat searcher.
So I just made replacements on intervals with Hex workshops using the same value as the boss's Health (when it's full) and bingo, just finding one was enough to find the others.

Right now I'm locating each boss with VBA's memory viewer, since all the bosses are stored in succession (lucky me)
so far I have identified 6 out of 15?
I don't remember exactly how many bosses are on this game

Now back with the patch issue
which one is easier to make?
Considering size is not a problem since this is gonna be very small patch (only tweaking bosses health)
« Last Edit: December 17, 2011, 02:50:08 am by ChemaROMhacking »

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Kirby and the amazing mirror (GBA/VBA)
« Reply #5 on: December 17, 2011, 03:01:13 am »
Ahaha. Score. Yes, a cheat searcher is another valuable tool - I forgot that VBA had one.

Anyways. Really, for all the options I've outlined, it's a simple "follow the prompts and you're done" routine. The problem is how much rigmarole you want to put your users through: as far as I know, IPS is the only format that has GUI implementations on all platforms, so if you use xdelta or BPS, odds are that Mac or Linux users might have a little trouble getting an appropriate patcher to work.
In the event of a firestorm, the salad bar will remain open.

ChemaROMhacking

  • Jr. Member
  • **
  • Posts: 25
    • View Profile
Re: Kirby and the amazing mirror (GBA/VBA)
« Reply #6 on: December 18, 2011, 01:02:18 am »
Here are the final results

*Format*
Boss's Name
-
Health's Address
-
Life-Bar Address (just for aesthetic purposes)


NOTES:
-There is a messed up formula to make the Health and Life-Bar addresses to match, I only know that the greater the Health value is, the lower the Bar value should be.
-The addresses are on 8bit format

kracko (the cloud-eye-thing dude)
-
351598
351599
-
3514c0
3514c1
-----------
Tower
-
3515A0
3515A1
-
3514c8
3514c9
-----------
Shark
-
3515B0
3515B1
-
3514D8
3514D9
-----------

Wizard
-
3515B8
3515B9
-
3514e0
3514e1
-----------
Mole
-
3515C0
3515C1
-
3514e8
3514e9
-----------
Knight's Body
-
3515c8
3515c9
-
3514F0
3514F1
-----------
Knight's head
-
3515D0
3515D1
-
3514f8
3514f9
-----------
Master Hand (Only the one that spawns with Crazy)
-
3515A8
3515A9
-
3514D0
3514D1
-----------
Crazy Hand (Only the one that spawns with Master)
-
3515D8
3515D9
-
351500
351501
-----------
Dark Meta-Knight
-
3515E0
3515E1
-
351508
351509
-----------
Fire Eye [1]
-
3515F0
3515F1
-
351518
351519
-----------
Fire Eye [2]
-
3515F8
3515F9
-
351520
351521
-----------
??? (meta knight)
-
351600
351601
-
351528
351529
-----------
Dark Mind [1]
-
351608
351609
-
351628
351629
-----------
Dark Mind [2]
-
351610
351611
-
351630
351631
-----------
Dark Mind [3]
-
351618
351619
-
351638
351639
-----------
Dark mind [4]
-
351620
351621
-
351640
351641

With this anyone should be able to make a custom patch, editor or whatever (limited to boss's health tweaking, that is)
Keep in mind this was done with the NA-ROM
Enjoy

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Kirby and the amazing mirror (GBA/VBA)
« Reply #7 on: December 18, 2011, 01:08:20 am »
You know, you could always use this information to create a kind of "editor" tool for the ROM.
In the event of a firestorm, the salad bar will remain open.

Karatorian

  • Sr. Member
  • ****
  • Posts: 381
  • "Gotta get get ... 6502"
    • View Profile
    • Studio Karatorian
Re: Kirby and the amazing mirror (GBA/VBA)
« Reply #8 on: January 06, 2012, 06:48:00 pm »
if you use xdelta or BPS, odds are that Mac or Linux users might have a little trouble getting an appropriate patcher to work.
All of byuu's screenshots of his BPS util appear to have been taken on a mac and the page specifically says there are non-windows ports of the graphical version. It also says the command line version ought to run on any platform you can compile C++ for. Also, most of us Linux users don't need a GUI anyhow, and xdelta was written for un*x and then ported.
Current ProjectsFinal Fantasy EngineSMB Special for NESStudio Karatorian
@loop: lda (src),y — sta (dst),y — iny — bne @loop — inc src+1 — inc dst+1 — dex — bne @loop