WiiRd forum

Wii & Gamecube Hacking => WiiRD Remote Debugger => Topic started by: hinks on February 27, 2011, 06:12:48 PM

Title: Early debugging
Post by: hinks on February 27, 2011, 06:12:48 PM
I'm trying to follow the game boot from start using USB gecko and GDN.

I did:
- start the game paused,
- set exec breakpoint on 0x800018A8

Setting the breakpoint also started the game, right? 'cause I see a lot of action on terminal output and gecko loses connection after a while. Game is also stuck on green screen.. I've tried other address with the same result.

If I just press start the games runs, and setting the breakpoint later also works - just to prove my setup is OK (I guess).

Has anyone tried something like this?
Title: Re: Early debugging
Post by: dcx2 on February 27, 2011, 06:42:40 PM
Set exec breakpoint on 800018A8 will have the game run until the first execution of whatever the code handler hooks.

I think you might want to try pressing Step instead of Set Breakpoint.  Then you can follow along from the first instruction.  I'm not sure because I never tried this myself.
Title: Re: Early debugging
Post by: megazig on February 27, 2011, 08:14:43 PM
_start sets up nintendos debugger. setting up your interrupt handler there means youre only missing os setup but get all of main. _start is the first thing run that calls init_registers, init_hardware, os setup, debugger setup, and then calls main
Title: Re: Early debugging
Post by: hinks on February 28, 2011, 02:05:51 PM
[SOLVED]

I've finally figured it out!

What needs to be done is:
- start game in paused mode,
- start GDN,
- USBgecko connects,
- game waits for USBgecko command,
- press Pause game button in GDN (mandatory!),
- now the GDN has put USBgecko in paused state (also Wii screen turns green),
- in GDN set breakpoint to 0x800018A8,
- in GDN breakpoints view, click 'Set'
- GDN should quickly stop execution and disassembly will reflect address of breakpoint

At this point the game is ready to be stepped through!

;D
Title: Re: Early debugging
Post by: FL4SHK on March 01, 2011, 11:19:03 PM
Would this work with Gecko OS Mod and Gamecube games?