News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

General Help Thread

Started by biospark, November 04, 2016, 08:31:07 PM

Previous topic - Next topic

biospark

Considering the number of questions I've received, especially not related to MAGE, I've decided to make this thread. You can ask questions about Fusion here.

If you have a question that directly concerns MAGE, post it here: http://forum.metroidconstruction.com/index.php/topic,3969.0.html

Kiteguy666

How do I have doors lock in the Main Deck Room 3? I was thinking of Putting Arachnus in that room, but I wanted those doors locked so the player can't escape the battle.

biospark

Quote from: Kiteguy666 on November 07, 2016, 08:32:57 PM
How do I have doors lock in the Main Deck Room 3? I was thinking of Putting Arachnus in that room, but I wanted those doors locked so the player can't escape the battle.

There's a table from 3C8A5C to 3C8B87 that determines when hatches lock. Each entry is four bytes:

00 Event
01 Area
02 Room + 1
03 Doors to lock

Assuming you fight Arachnus with the same event value, just change the byte at 0x3C8A62 to 04 and that should work.

I'd like to eventually like to add an editor to MAGE for this. However, I think a better solution would be to modify Arachnus's AI to lock the doors, so that it doesn't matter which room he's in.

Kiteguy666

How do I edit Arachnus's AI Exactly?

I searched everywhere on how to do it, but I couldn't find anything

biospark

Quote from: Kiteguy666 on November 08, 2016, 02:03:37 PM
How do I edit Arachnus's AI Exactly?

I searched everywhere on how to do it, but I couldn't find anything

That would involve being familiar with ASM. You'd also need a debugging emulator to view/disassemble Arachnus's AI, and an ASM compiler to modify the code. Unfortunately it takes a while to learn how to do all that, but it's an option if you're interested.

Otherwise, the first solution I mentioned should work fine.

Kiteguy666

I have used the Visual Boy Advance Emulator to try the first option, but I can never edit anything when i use Disassemble in VBA

biospark

Quote from: Kiteguy666 on November 08, 2016, 08:57:41 PM
I have used the Visual Boy Advance Emulator to try the first option, but I can never edit anything when i use Disassemble in VBA

You have to use a hex editor to make that change. A good free one is HxD.

P.JBoy

For reference, I do have Arachnus's AI disassembled into a set of hyperlinked webpages (starting with 80246BC.html)
...

Kiteguy666

Thanks. I got the Doors to lock. Now, how do I make it so that you HAVE to beat 2 Arachnuses in order to progress?

biospark

#9
Quote from: Kiteguy666 on November 09, 2016, 04:21:47 PM
Thanks. I got the Doors to lock. Now, how do I make it so that you HAVE to beat 2 Arachnuses in order to progress?

If you want to fight two at the same time, that's not possible (well it is, but it would be really glitchy). If you want to fight two in a row, the first one would give you morph ball and the second one wouldn't, so you'd have to do some pretty serious asm hacking.

Quote from: P.JBoy on November 09, 2016, 05:04:02 AM
For reference, I do have Arachnus's AI disassembled into a set of hyperlinked webpages (starting with 80246BC.html)

That link doesn't work for me. I assume you need to use a shareable link.

interdpth

#10
@biospark  Do you know what plays the ship landing intro? I can't find it for when it docks
Well, I'm specifically needing when it shows the ship in space, zooming off to BSL. If I can get that I can rule the world.



biospark

Quote from: interdpth on November 19, 2016, 10:30:06 PM
@biospark  Do you know what plays the ship landing intro? I can't find it for when it docks
Well, I'm specifically needing when it shows the ship in space, zooming off to BSL. If I can get that I can rule the world.

I don't know. I would try following what happens after the last A press of the intro.

Also, the routine that loads the graphics is at 0x808F5C4. It's copied to WRAM first, so you could try finding the routine that copies it to VRAM. It might be part of a larger routine that handles the whole thing.

interdpth

Yeah, I had been down that route. I ended up with a lot of documentation....I think I have to do something to the main loop since IRQ handlers get changed.

Yuck

interdpth

#13
Bio maybe you can help me some more.

So I setup the conditions at least in what appears to be the main loop to setup for the intro by doing the following in my sprite action:
         GameMode = 7;
         EventController = 0;
         Sub_game_mode_1 = 0;
         currentArea = 0;
         currentRoom = 0;
         EventController = 0;
         SamusIsInvisible = 0;
         FrameEventCounter = 0;
         Sub_game_mode_B84 = 0;

I then move to 0x8000250 to where the executing code should be, however I'm not sure what happens but the original room doesn't unload.

So confusing >_<

Figured it out!

I had to mimic all of the settings used for the intro, so I set
GameMode = 7
EventController = 0xB //11th state of Game Mode intro
Sub_game_mode_1 = 1

And got it loading into Room 0 Area 0 and having Samus in the gunship. Woo!

interdpth

Hey @biospark  do you happen to have the return values for the function at 8011390 documented? I know it's for touching clipdata.
I know that it then calls the actual touching clip data function at 08068BC0 which activates the clipdatas function.  Then 030007A5 gets set to either 17 or 0.  Then there's a switch table to change 030007A5 further. Sa-x uses  030007A5 == 17 to tell if it needs to morph and I don't know anything about these values. If you could save me some time before I get into that'd be awesome.

biospark

I don't have any of those routines documented, sorry.

interdpth

#16
Lol, crap. I feel like I have most of the engine partially documented by now.

@biospark  Any idea if sprite acceleration is stored? Need to create a fall similar to samus' and wanted to use the same formula if so :/
but i guess I could do thisY-lastY/spritesize or something. Let me know if you have an address please.

biospark

Quote from: interdpth on December 05, 2016, 04:16:35 PM
Any idea if sprite acceleration is stored? Need to create a fall similar to samus' and wanted to use the same formula if so :/
but i guess I could do thisY-lastY/spritesize or something. Let me know if you have an address please.

Looks like sprite RAM 0x31 is used for enemies that can fall. For other enemies, it functions as a counter/timer for various things.

interdpth

Thanks fam! Any idea how to spawn a morphball bomb?

I thought calling 0808575C MorphballBomb would just do it, but I seem to be missing something. I also set

0x03000B68 ProjectileYPos to CurrentEnemyData->CurEnemy_Y_position
0x03000B6A ProjectileXPos to CurrentEnemyData->CurEnemy_X_position
0x03000B72 ProjecttileMomentum to 0 then call it

I can spawn powerbombs, but bombs are confusing me.

biospark

Quote from: interdpth on January 10, 2017, 09:24:07 PM
Thanks fam! Any idea how to spawn a morphball bomb?

If you want Samus to lay it, just set 0x300124D to 4.

If you want it at any location, call 0x80811BC InitializeProjectile with
r0 = Projectile type (0x10 in this case)
r1 = Projectile Y position
r2 = Projectile X position
r3 = Projectile part (0 in this case)

interdpth

That worked excellently. Thanks man!

spiffy

Does anyone know the exact hex address/offset for the status screen graphics in Metroid Fusion (specifically the part displaying all the item names)?

I'm in the process of doing some very minor text revisions for Metroid Fusion. All that's left to do now is to alter the status menu graphics to display "HIGH JUMP" instead of "HI-JUMP" (real earth-shattering, I know :eyeroll:).

I've already accomplished this for Zero Mission using MAGE, but I'm having trouble tracking down the exact location for the status menu graphics in Fusion.

Cpt.Glitch

You can use NLZ in a Fusion rom to find them. That's how I documented all of the ZM GFX locations. Don't know if anyone has done the same for fusion.

spiffy

Quote from: Cpt.Glitch on September 21, 2017, 07:08:52 AM
You can use NLZ in a Fusion rom to find them. That's how I documented all of the ZM GFX locations. Don't know if anyone has done the same for fusion.

Found them at 56A254 using LZ77Restructor2!

I then exported it as a .gfx file with MAGE, altered it in YY-CHR, imported it back into the rom with MAGE yet again. It gets cut off at the end, as you'll no doubt observe below (also included the .gfx file):



The 'piece' I altered has been extended by exactly one 8x8 tile, so I'm guessing I just need to change a pointer value somewhere... I think?

Well, I'm learning at least. :whoa:


Cpt.Glitch

That's likely a tile mapping issue. You'd have to find the tile map using no$gba, then use mage to alter it from there. Not sure if those are handled as sprites though. If so then it'll be OAM rather than tilemaps. Either way, I can't help too much more with that as I don't mess with fusion often.