WiiRd forum

Wii & Gamecube Hacking => Wii Game hacking help => Topic started by: Bully@Wiiplaza on April 12, 2013, 12:38:29 AM

Title: Pointer, no terminator, another pointer?
Post by: Bully@Wiiplaza on April 12, 2013, 12:38:29 AM
Just wondering if anything could "break".

Example:

Total Invincibility [Bully@Wiiplaza]
F6000001 80008100
A88301A8 3BC00000
1400002C 60000000
F6000001 80008100
EC4300B2 C0630088
D2000020 00000002
38000001 9803000A
80030008 00000000
E0000000 80008000

First F6 code no terminator (!), second F6 code with terminator.

Do I need both or not?

In the game it functions just how it´s supposed to, searching twice and doing 2 writes.
Title: Re: Pointer, no terminator, another pointer?
Post by: biolizard89 on April 12, 2013, 01:25:50 AM
Quote from: Bully@Wiiplaza on April 12, 2013, 12:38:29 AM
Just wondering if anything could "break".

Example:

Total Invincibility [Bully@Wiiplaza]
F6000001 80008100
A88301A8 3BC00000
1400002C 60000000
F6000001 80008100
EC4300B2 C0630088
D2000020 00000002
38000001 9803000A
80030008 00000000
E0000000 80008000

First F6 code no terminator (!), second F6 code with terminator.

Do I need both or not?

In the game it functions just how it´s supposed to, searching twice and doing 2 writes.

Looks fine to me, since F6 will set the PO without reading it.  But I'm not 100% sure.
Title: Re: Pointer, no terminator, another pointer?
Post by: dcx2 on April 13, 2013, 08:18:06 PM
The only problem you will have is if the first F6 code is fails, the second F6 will never execute.  F6 codes are also if codes.
Title: Re: Pointer, no terminator, another pointer?
Post by: Bully@Wiiplaza on April 16, 2013, 09:12:30 PM
Quote from: dcx2 on April 13, 2013, 08:18:06 PM
The only problem you will have is if the first F6 code is fails, the second F6 will never execute.  F6 codes are also if codes.
I see. Is it any different to 48 pointer codes?
Title: Re: Pointer, no terminator, another pointer?
Post by: dcx2 on April 16, 2013, 09:33:04 PM
What?
Title: Re: Pointer, no terminator, another pointer?
Post by: Bully@Wiiplaza on April 16, 2013, 09:36:33 PM
Quote from: dcx2 on April 16, 2013, 09:33:04 PM
What?
An example:

48000000 81234567 # Load into pointer address
DE000000 80008180 # Range check
140006A0 40000000 # Write using pointer
48000000 81334567 # Load into another pointer address
DE000000 80008180 # Another range check
140006C0 42000000 # Another write using pointer
E0000000 80008000 # Terminator

The first pointer is set and a write is performed. The second is set (overwriting the first) and another write performed.
Just wondering if something could break there? Those kind of codes aren´t if codes, are they? ???
Title: Re: Pointer, no terminator, another pointer?
Post by: dcx2 on April 16, 2013, 09:57:00 PM
Correct, 48 code types are not if codes.  That's why they need the DE check, which is an if code.
Title: Re: Pointer, no terminator, another pointer?
Post by: Bully@Wiiplaza on April 16, 2013, 10:23:44 PM
It makes sense. :smileyface: If the 1st DE check is false, the 2nd pointer code will not have a chance to execute.
That´s the difference between setting the 1st terminator or not.

It´ll be a disadvantage at debugging the code (what caused the 2nd pointer to fail?), but not using a fully working code representing a unit.