Kuribo64
Views: 20,069,183 Home | Forums | Uploader | Wiki | Object databases | IRC
Rules/FAQ | Memberlist | Calendar | Stats | Online users | Last posts | Search
04-27-24 03:10 PM
Guest:

0 users reading Adding SMG1 Objects | 1 bot

Main - Archived forums - General SMG hacking - Adding SMG1 Objects Hide post layouts | New reply

Pages: 1 2 3 4 5
Phantom Wings
Posted on 01-23-13 02:03 AM (rev. 4 of 01-23-13 02:06 AM) Link | #8901
Regarding the opening post:

It is always discouraging to me when someone decides to criticise hackers because they feel they aren't trying hard enough. Please try to understand that the work we do is entirely of our own personal interest. Some of us lead busy lives which are very demanding of our time. When we hack, we are often taking up hours even working late into the night to try to get a code or hack running. This is time we could be using to get a good nights sleep or working on other tasks related to our lives. Instead, we choose to use our time hacking.

Let me tell you what happens when one of us "tries" like you say. I read your post last weekend and wanted to make a point. So, I lost 2 good nights sleep, was very nearly late in submitting a report and ended up having to give a speech with half an empty head.

The result? This.



[image]

[image]




Let me just mention that aside from Anarchy, I have never done any hacking for Super Mario Galaxy 2. Besides what MN1 has made available, I have absolutely no idea how SMG2 works.

I will be one of the first to say that just about anything can be achieved with the right application of hacking and time. But it's that last part which we just don't have enough of. Trust me, we want to try as hard as we can to make some of these hacks work. But in many cases, it's not a matter of "too hard, I give up" as it is "too time consuming, I don't have time for this."

Stygmax
Posted on 01-23-13 02:13 AM Link | #8902
I exalt thee, Phantom Wings. You have created Ice Mario. I love you eternally.
Status: It was really, really fun, guys - thanks for the ride!

Phantom Wings
Posted on 01-23-13 02:23 AM Link | #8903
Thanks, but most of Ice Mario's code was still in SMG2. I just patched the areas that were needed for it to work.

Stygmax
Posted on 01-23-13 02:43 AM Link | #8904
Did MN1 help in any way? He was trying to get this to work for a while.
Status: It was really, really fun, guys - thanks for the ride!

NWPlayer123
Posted on 01-23-13 02:44 AM Link | #8905
PW, MN1 and I found how to edit that text intro so it doesn't give you question marks, I just need to remember which file it is xD
And yes, he said in the first post that "Besides what MN1 has made available, I have absolutely no idea how SMG2 works."
So he did use it as a resource, at the very least

____________________
"I hate playing musical chats" ~ Quote of the month

MK7tester
Posted on 01-23-13 02:46 AM Link | #8906
That is awesome Phantom Wings, when we do something, we prevail.

Phantom Wings
Posted on 01-23-13 07:23 AM Link | #8957
I've posted some additional information about power-up resources in the wiki just in case anyone's interested.

Marionumber1
Posted on 01-23-13 05:41 PM (rev. 5 of 01-23-13 11:59 PM) Link | #9018
This is awesome, PhantomWings. I'm glad that you were able to figure out how to load the assets into the level. If I might ask, how did you get the Ice Flower in? Was it based on one of my ASM hacks, or did you just place the Ice Flower in the level after loading the resources?

Also, I plan to make a Riivolution patch for Ice Mario.

Well, here it is. This patch should work, but NWPlayer123 said that the game didn't load. However, Dolphin did manage to, but unfortunately, I couldn't test Ice Mario with it. Anyone can try this patch out and tell me if it works.

https://www.dropbox.com/s/49diqe973yvkx47/SB4E01.xml

For the more technically inclined, this patch works by adding some custom code to a blank area in memory. It then replaces the end of the level initialization function with a branch to that code.

The custom code is here:

806FA568: li r20, 0x249C
806FA56C: oris r20, r20, 0x8108
806FA570: lwz r20, 0(r20)
806FA574: li r21, 1
806FA578: stb r21, 3(r20)
806FA57C: blr

I patched the level load function here:

804B1E98: b 0x806FA568

Phantom Wings
Posted on 01-24-13 12:23 AM (rev. 2 of 01-24-13 12:24 AM) Link | #9136
The Ice Flower was made similar to how you made the Red Star appear. Because all power-up items are created more or less identical, it was just a matter of changing the power-up item ID of the Fire Flower to the Ice Flower. Currently I am unsure if the original Ice Flower exists as an actual object in memory, but what I do know is that there isn't a creation function bound to the MorphItemNeoIce or MorphItemNeoFoo strings. However, there are preload functions bound to the both of those strings meaning that if the object is successfully loaded, then the IceMario/FlyingMario resources will be loaded as well.

If you could find the v_table of either of those objects, then patching them into the game would be trivial. As it currently stands, you could probably get away with copying the v_table of one of the other power-ups, adjusting the 27th method of it and then binding a custom creation function to either of those strings. I'll try to put more details up on the Wiki.

Marionumber1
Posted on 01-24-13 12:25 AM Link | #9138
I was actually trying to make the Fire Flower load Ice Mario, but unfortunately, my patch isn't working. Do you know what's wrong?

Stygmax
Posted on 01-24-13 12:27 AM Link | #9140
How would you be able to test? Does the Ice Flower replace another powerup?
Status: It was really, really fun, guys - thanks for the ride!

Marionumber1
Posted on 01-24-13 12:27 AM Link | #9141
Like I said, it's possible to change the power up ID that the Fire Flower has (which is 2) to the Ice Flower's (which is 3).

Stygmax
Posted on 01-24-13 12:28 AM Link | #9142
So the Fire Flower now loads Ice Mario?
Status: It was really, really fun, guys - thanks for the ride!

Marionumber1
Posted on 01-24-13 12:29 AM Link | #9143
Not necessarily, but that's how both PhantomWings and I are testing it.

Stygmax
Posted on 01-24-13 12:31 AM Link | #9144
So what EXACTLY does the XML do? Do I have to edit the ID of the Fire Flower for it to work right?

(sorry for question flood)
Status: It was really, really fun, guys - thanks for the ride!

Marionumber1
Posted on 01-24-13 12:32 AM Link | #9146
The XML is supposed to patch an area of memory so Ice Mario works, and then make the Fire Flower act like an Ice Flower, but if I use it, the game doesn't load.

Stygmax
Posted on 01-24-13 12:33 AM Link | #9147
So the XML just freezes the game. :P
Status: It was really, really fun, guys - thanks for the ride!

Phantom Wings
Posted on 01-24-13 12:38 AM Link | #9149
I listed the main parts of it in the Wiki, but there are a bunch of resources that need to be preloaded before Ice Mario will work. Before a stage is loaded, it scans the bcsv objects for it and calls any preload functions related to them. All the power-ups actually have the same preload function, but depending on the power-up that is being called, it will set a different flag in the flagset that determines which parts of Mario are loaded for that level. If the Ice Mario preload flag is not set, then Ice Mario cannot be used for that level. If you like, it is possible to manually change this flagset to always have Ice Mario loaded, but you need to make sure all of Ice Mario's files are available or the game will freeze.

Also, I think your patch is freezing because you used a normal unconditional branch instead of a link branch. Without using a link branch, the function can't return using blr.

Marionumber1
Posted on 01-24-13 12:44 AM Link | #9151
I'm actually using that custom ASM code to read the pointer that you specified in the Wiki and add 18 bytes to it to get the pointer to the flags and store it into r20. Then I write a 1 to the Ice Mario offset to enable Ice Mario always being loaded. Also, I'm purposefully using a normal branch, because I'm replacing the blr at the end of the level initialization function with it.

Additionally, what files are needed for Ice Mario? I have IceMario.arc, IceLuigi.arc, IceMarioHandL.arc, IceMarioHandR.arc, IceStep.arc, IceStepNoSlip.arc, and PowerUpIce.arc.

Phantom Wings
Posted on 01-24-13 01:01 AM Link | #9153
The only ones I needed to patch to have a minimally working Ice Mario were PowerUpIce.arc, IceMario.arc, IceMarioHandL.arc and IceMarioHandR.arc. I couldn't find a way to load up IceStep.arc in Dolphin, so I removed the creation routines for them from the setup_IceMario function.

Right now, it looks like your code isn't adding the the 18 bytes. Have you updated it since you posted it?
Pages: 1 2 3 4 5

Main - Archived forums - General SMG hacking - Adding SMG1 Objects Hide post layouts | New reply

Page rendered in 0.029 seconds. (2048KB of memory used)
MySQL - queries: 27, rows: 233/233, time: 0.013 seconds.
[powered by Acmlm] Acmlmboard 2.064 (2018-07-20)
© 2005-2008 Acmlm, Xkeeper, blackhole89 et al.