Coding Questions and other Quandaries
#85
(01-02-2022, 04:32 PM)Hackwiz Wrote: I'm using 5.0-11380. Is there a better one you'd recommend?

No that's an ok version. How are you actually applying the cheats in Dolphin?

(01-02-2022, 04:32 PM)Hackwiz Wrote: I have a question regarding Gecko registers and pointer use.
Referencing the Pokemon code above, I want add another button activator to cycle through the different items.
Is it necessary to add it to that code, with

E0000000 00000000 or E0000000 80008000

in between, or can/should it be it's own separate code?

Also, let's say I set the pointer with the above code, will other new separate codes I add, have the ability to reference the pointer set up in the first code, using pointer referencing Gecko code types?

Thanks!!!!!!!!

To understand the Gecko Documentation better, it actually helps to say out loud what each codetype does as you are scrolling down your code reading the Gecko Codetypes. Sounds silly, but it helped me when I was a beginner.

Code:
Full Terminator
E0000000 XXXXYYYY

Clears the code execution status.
If XXXX<>0, ba = 0xXXXX0000
If YYYY<>0, po = 0xYYYY0000

"Clears the code execution status" simply means that this codetype Ends all current If-Statements (i.e. 16-bit for controller line). At the start of any GCT, the BA (base address) and PO (pointer) start as both 0x800000000. You would use 'E0000000 00000000' to end If-Statement(s) but any modifications to ba and po are kept intact. The use of 'E0000000 80008000' resets ba and po to the Code Handler's default values (0x80000000).

So in conclusion, if you use the Halfway Terminator (E0000000 00000000), codes underneath it can reference an earlier established pointer (that was established above the Halfway Terminator).

I would highly advise getting better at Assembly and getting more intuitive with it instead of 'defaulting' to using Gecko Codetypes. Most Codetypes really only exist because many beginners back in the day (2008 - 2010) didn't want to learn Assembly. Well written Assembly code(s) (C0 and/or C2) will 99% of the time be more optimized compared to the same code(s) that is 'clobbered' together with various Gecko Codetypes.
Reply


Messages In This Thread
RE: Coding Questions and other Quandaries - by Vega - 01-03-2022, 12:26 AM

Forum Jump:


Users browsing this thread: 37 Guest(s)