Metroid Prime Trilogy [R3ME01]

Started by TwilightErik, August 22, 2009, 02:51:36 AM

Previous topic - Next topic

Nintendo Maniac 64

#15
Quote from: agoaj on August 29, 2009, 08:43:12 AM
Working on switching b to a and a to b in multiplayer. You'll be able to toggle it with up/left/right on the dpad.
I can only do it for Player 1 and 2 thought because I don't have enough wiimotes for more.

I tried doing this
* 28533118 00000400
* 14533118 00000800
* CC000000 00000000
* 28533118 00000800
* 14533118 00000400
* E0000000 80008000

but that was a bust, doesn't seem to catch it fast enough. Working on inserting assembly before any other functions get their grubby mits on it.
Your effort is still GREATLY appriciated.

You don't happen to know anyone you could at least borrow a wiimote or 2 from?  If not, well, only 1st and 2nd is better than nothing (only my sis and dad really need it since I can manage to shoot with A, but other people might need it for more than 2 players...)


Just a quick thought, it's not important if this gets made into a code or not (would be neat, but not priority), but would it even be possible to choose or switch the player colors for multiplayer?  Mainly it'd be for easier player identification purposes.
WiiRd's resident straight male kuutsundere.
(that's a kuudere-tsundere hybrid; from left to right is the outer to innermost)


Romaap

agoaj, I dont think that code is going to work.
You need to set a read breakpoint on the address and find a funtion that compares it with 800 or 400, something like cmpi rx,400 and then change the 400 to 800.
At least... that's what I think is the right solution.

OneUp

Hey Romaap, I'm trying to do something like that, but it's freezing the game.
I'm trying to insert it at the breakpoint for the controller, and it might be I shouldn't use r0.
lis r0, 0x8053
lwz r1, 0x300A(r0)
li r2, 0x00000400
li r3, 0x00000800
cmpw r1,r2
bne Skip
stw r3, 0x300A(r0)
Skip:
cmpw r1,r3
bne Break
stw r2, 0x300A(r0)
Break:
stw r0,0(r31)
The last stw is what used to be there before insertion.

I'm also trying to get a moonjump to work...  I read under Black_Wolf's tutorial that it might be good to attach it to the controller address too, but I'm thinking that is a bad idea now...
lis r0, 0x8053
lwz r1, 0x300A(r0)
li r2, 0x00000400
lis r3, 0x804E
lwz r4, 0xFFFFF850(r3)
li r5, 0x0000004C
cmpw r1,r2
bne Skip
add r6, r4, r5
stw r6, 0xFFFFF850(r3)
Skip:
stw r0,0(r31)
Suggestions would be helpful...I'm gonna try some other stuff too though.

Romaap

Your code probably freezes because you using registers that are already used by the game.

OneUp

That's what I was thinking.  Thanks I'll try using different registers, but can i use any number ie r50?

agoaj

Quote from: OneUp on August 29, 2009, 08:29:41 PM
That's what I was thinking.  Thanks I'll try using different registers, but can i use any number ie r50?
There are only 32 general purpose registers. You'll be fine if you can set them back to what they were once you've done your thing. There are also the gecko registers which have a static address you should be able to put into your asm.

OneUp

#21
Does anyone have a better suggestion as to where I should load it into memory?  It either doesn't work right now, or it freezes the game.  Or, could someone explain gecko registers better?  It doesn't look like I can just add them to the code...

agoaj

From Code Type document:
grN : "Gecko Register N". It's not a real register, like r0 or r1. It's a 32-bits value, for which the Gecko has reserved a place in memory. N can range from 0x0 to 0xF. You can store/load anything in it, however be careful that other codes could overwrite your value. Don't expect it to be the same each time the code handler is executed. If you want to store a value that must not change, try to use a "real" address ouside of the code handler, or use the 46/4E code types along with a goto code type. Note that grN are stored before the gecko/code handler. That mean they should always be accessible at a static address : 0x80001804. [0x80001804]=gr0, [0x80001808]=gr1,...,[0x80001840]=grF. That way you can access them directly, when inserting an asm routine for example.

So you should be able to store some data in 0x80001804,0x80001808 etc while working your asm.

justpig1

Oneup thanks for the codes. I tried the code for MP2 it did not work.

SheeEttin

#24
Here's that MP3 save for when you need it. First file. It's almost at the end; either 100% items or close to it. Sorry if that's too far. (Also, there's a gold credit in the Phazoids two rooms away, in case you want to play with that.)
http://sharebee.com/e8b51e38

EDIT: Also, the MP2 codes (at least, didn't try MP1) make the game crash during the small Trilogy loading screen. (Although I did change the activator to B+Right... Will test the originals, too.)

opiumx

Health codes for 1 and 2 would be great, the difficulty is killing me hehe. Alot easier to play with the wiimote though.

OneUp

justpig1, did you press the button activators in-game?

If the mp2 ammo code is crashing in menu, maybe you guys could use neogamma to alt-dol load the mp2 game. (set alt-dol to disk and choose ***mp2.dol.  I can't remember exact name but ends in that.)  The button activator is there so that the game won't freeze->don't activate till in-game.

I've been trying to get health codes, but I'm ending up with floating point values, and I haven't figured out what to do with them yet...

Edit: Just checked and mp2 ammo code, loaded with wiird at health and safety, and activated in game works without freezes.

opiumx

Just to let you know, Ive been using the MP1 ammo code for 8 hours and no problems. Thanks!

SheeEttin

#28
Quote from: OneUp on September 02, 2009, 03:44:13 AMIf the mp2 ammo code is crashing in menu, maybe you guys could use neogamma to alt-dol load the mp2 game. (set alt-dol to disk and choose ***mp2.dol.  I can't remember exact name but ends in that.)  The button activator is there so that the game won't freeze->don't activate till in-game.
Tried it, but it just reported "timeout". I don't think I have the right cIOS installed. (I try to keep my Wii as pure as possible.)

Quote from: OneUp on September 02, 2009, 03:44:13 AMI've been trying to get health codes, but I'm ending up with floating point values, and I haven't figured out what to do with them yet...
A floating point value may or may not just be the HUD health. I was going to say it probably is, but I think you can have fractions of a health point. Especially weak enemies don't always change the numerical health display, so it is possible...
Can you not just poke memory to see what happens?

EDIT: Disregard that, I'm a retard. Seems the first line of the MP2 code--the activator--went missing. Fixed it, trying now...
Yep, it works. All the bombs I want, and a missile count that doesn't go down. (Any chance you could remove the restriction on the number of missiles in the air at once and/or the missile fire delay too? :D)

OneUp

That's pretty much the same thing, and probably I could-it should be just like the morph ball bomb code.