WiiRd forum

Wii & Gamecube Hacking => Wii Game hacking help => Topic started by: live2play on June 25, 2010, 03:59:14 AM

Title: Data Written Before WiiRD Started
Post by: live2play on June 25, 2010, 03:59:14 AM
I have a memory address in MEM1 that I want to set a Write BP on.  Unfortunately, it seems that the data is written to the address before WiiRD even has a chance to set a BP.  Any ideas?
Title: Re: Data Written Before WiiRD Started
Post by: James0x57 on June 25, 2010, 06:08:37 AM
Like when you first start it up? That stuff is written from outside of the game before any of the game's code runs. So there's nothing you can do.
Why would you need to do a bpw on any of that anyway..?
Title: Re: Data Written Before WiiRD Started
Post by: dcx2 on June 25, 2010, 02:19:04 PM
First, load Gecko OS.  But *do not* load the game.

Then, start WiiRDGUI.  It should automagically start loading the game, without your intervention.  WiiRDGUI will display a counter in the title menu, starting at...20?...and counting down.

The game will start paused, before the wrist strap screen has a chance to start fading in.  If it doesn't, then there's some checkbox somewhere that you need to check or uncheck.
Title: Re: Data Written Before WiiRD Started
Post by: hetoan2 on June 25, 2010, 04:35:42 PM
Quote from: live2play on June 25, 2010, 03:59:14 AM
I have a memory address in MEM1 that I want to set a Write BP on.  Unfortunately, it seems that the data is written to the address before WiiRD even has a chance to set a BP.  Any ideas?
I would actually do a read bp on the address and modify it that way. if that's what you're looking to do.
Title: Re: Data Written Before WiiRD Started
Post by: live2play on June 25, 2010, 10:34:14 PM
Quote from: dcx2 on June 25, 2010, 02:19:04 PM
First, load Gecko OS.  But *do not* load the game.

Then, start WiiRDGUI.  It should automagically start loading the game, without your intervention.  WiiRDGUI will display a counter in the title menu, starting at...20?...and counting down.

The game will start paused, before the wrist strap screen has a chance to start fading in.  If it doesn't, then there's some checkbox somewhere that you need to check or uncheck.

I believe that I set the WiiRD configuration to automatically start the game.  Do you know how I can change that setting?  I believe that it was a dialogue that only appeared the first time I ran WiiRD after installing it.
Title: Re: Data Written Before WiiRD Started
Post by: live2play on June 25, 2010, 10:37:45 PM
Quote from: hetoan2 on June 25, 2010, 04:35:42 PM
Quote from: live2play on June 25, 2010, 03:59:14 AM
I have a memory address in MEM1 that I want to set a Write BP on.  Unfortunately, it seems that the data is written to the address before WiiRD even has a chance to set a BP.  Any ideas?
I would actually do a read bp on the address and modify it that way. if that's what you're looking to do.

Thanks for the reply.  Herein lies the problem.  It seems that the data is written and then read very early on in the process.  The BP never triggers once the game has already loaded.  So, I believe that I need to try dcx2's approach.
Title: Re: Data Written Before WiiRD Started
Post by: live2play on June 25, 2010, 10:38:47 PM
Quote from: James0x57 on June 25, 2010, 06:08:37 AM
Like when you first start it up? That stuff is written from outside of the game before any of the game's code runs. So there's nothing you can do.
Why would you need to do a bpw on any of that anyway..?

The data I'm trying to read is not Wii specific.  I understand that there is base level Wii boot code that has to load.  This data is game related and written/read very early on in the game load process.
Title: Re: Data Written Before WiiRD Started
Post by: Romaap on June 25, 2010, 10:57:55 PM
Quote from: live2play on June 25, 2010, 10:34:14 PM
Quote from: dcx2 on June 25, 2010, 02:19:04 PM
First, load Gecko OS.  But *do not* load the game.

Then, start WiiRDGUI.  It should automagically start loading the game, without your intervention.  WiiRDGUI will display a counter in the title menu, starting at...20?...and counting down.

The game will start paused, before the wrist strap screen has a chance to start fading in.  If it doesn't, then there's some checkbox somewhere that you need to check or uncheck.

I believe that I set the WiiRD configuration to automatically start the game.  Do you know how I can change that setting?  I believe that it was a dialogue that only appeared the first time I ran WiiRD after installing it.
You can edit this in the About tab if I remember correctly.
Title: Re: Data Written Before WiiRD Started
Post by: live2play on June 25, 2010, 11:00:49 PM
Quote from: Romaap on June 25, 2010, 10:57:55 PM
Quote from: live2play on June 25, 2010, 10:34:14 PM
Quote from: dcx2 on June 25, 2010, 02:19:04 PM
First, load Gecko OS.  But *do not* load the game.

Then, start WiiRDGUI.  It should automagically start loading the game, without your intervention.  WiiRDGUI will display a counter in the title menu, starting at...20?...and counting down.

The game will start paused, before the wrist strap screen has a chance to start fading in.  If it doesn't, then there's some checkbox somewhere that you need to check or uncheck.

I believe that I set the WiiRD configuration to automatically start the game.  Do you know how I can change that setting?  I believe that it was a dialogue that only appeared the first time I ran WiiRD after installing it.
You can edit this in the About tab if I remember correctly.

Will check there.  Thanks!
Title: Re: Data Written Before WiiRD Started
Post by: live2play on June 26, 2010, 08:38:47 PM
I set WiiRD to not auto start the game and the game related data is still written sometime during the 20 second WiiRD "wait period".  Interesting that there's no way to determine which instruction writes the data.
Title: Re: Data Written Before WiiRD Started
Post by: dcx2 on June 26, 2010, 08:46:56 PM
Did you try a Read breakpoint without auto-start?  It might be written before the game is run, but it ought to be read after...
Title: Re: Data Written Before WiiRD Started
Post by: James0x57 on June 26, 2010, 08:47:14 PM
It's because it's separate from the PPC ASM instructions; as in, not part of the game or in the RAM.
http://wiibrew.org/wiki/Boot_process
^ that's pretty much the same story for booting a game
Title: Re: Data Written Before WiiRD Started
Post by: live2play on June 27, 2010, 12:09:15 AM
Quote from: James0x57 on June 26, 2010, 08:47:14 PM
It's because it's separate from the PPC ASM instructions; as in, not part of the game or in the RAM.
http://wiibrew.org/wiki/Boot_process
^ that's pretty much the same story for booting a game

The data that is written is very specific to the game and has to be loaded from the DVD into RAM.
Title: Re: Data Written Before WiiRD Started
Post by: live2play on June 27, 2010, 12:09:37 AM
Quote from: dcx2 on June 26, 2010, 08:46:56 PM
Did you try a Read breakpoint without auto-start?  It might be written before the game is run, but it ought to be read after...

I'll try that.  Thanks.