• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Game Modifications › Cheats, Hacks, & Game Patches v
« Previous 1 2 3 4 5 ... 15 Next »

AR Coding With Admentus
View New Posts | View Today's Posts

Pages (9): « Previous 1 2 3 4 5 ... 9 Next »
Jump to page 
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
AR Coding With Admentus
08-13-2019, 12:11 AM (This post was last modified: 08-14-2019, 07:40 PM by Admentus.)
#11
Admentus Offline
Nothing but perfection for gaming
*******
Posts: 1,825
Threads: 23
Joined: May 2015
This is a major breakthrough. This kinda requires it's own post. I did post it previously, but it was a bit too experimental. Now it should be finished.

Code:
$Majora's Mask -> Transform With L + D-Pad (AR Code) (PZLE01)
D2E68E26 00000000
D0E69857 00000004
8AE68E26 0000FF08
54E697DC 20000000
14E697DC 28000000
02002FCC 00000002
00000000 40000000
12E68E26 0000FF08
02002FCC 00000000
D2002FCC 00000002
88CBC13D 00000032
8A1410C2 00000048
90CBC0D0 00000004
02002FCC 00000001
00CBC0D0 00000004
00E69104 00000020
00000000 40000000
90E697DC 00000008
88CBC13D 00000032
8A1410C2 00000041
50CBC0D0 00000003
02002FCC 00000001
00E69104 00000020
00000000 40000000
90E697DC 00000008
88CBC143 00000033
8A1410C2 00000042
90CBC0D0 00000001
02002FCC 00000001
00CBC0D0 00000001
00E69104 00000020
00000000 40000000
88CBC149 00000034
8A1410C2 00000044
90CBC0D0 00000002
02002FCC 00000001
00CBC0D0 00000002
00E69104 00000020
00000000 40000000
02002FCF 00000000
08E4FB85 0000001F
02002FCF 00000001
08E4FB85 00000044
02002FCF 00000001
08E4FB85 0000005F
02002FCF 00000001
08E4FB85 00000036
02002FCF 00000001
08E4FB85 0000000B
02002FCF 00000001
8A002FCF 00000001
90E697DC 00000008
88CBC14F 00000035
8AE4FAF4 00002008
50CBC0D0 00000000
02002FCC 00000001
00E69104 00000024
00000000 40000000
08E69105 00000020
00E69104 00000005
08E69105 00000024
00E69104 00000005

The transformation effect is instant and skips the mask cutscene. If that bothers you, there's not much to do about it... For now. On the bright side, it is now faster than ever swapping transformation forms. And you don't need a C button to occupy a mask slot with. So that's really great too.

The code works quite simple. Press L (Z-target button) and one of the D-Pad Buttons.

L + D-Pad Up = Hylian Form (requires Deku Mask in inventory)
L + D-Pad Left = Deku Form (requires Deku Mask in inventory)
L + D-Pad Right = Goron Form (requires Goron Mask in inventory)
L + D-Pad Down = Zora Form (requires Zora Mask in inventory)
L + C-Up = Fierce Deity Form (requires Fierce Deity Mask in inventory and being within a boss room)

EDIT 1:
Prevented soft-locking and other issues when trying swap forms when not supposedly in control of Link. Changed controls to L + D-Pad instead or R + D-Pad. The Control Flow of Time and Summon Statue of Elegy codes will be utilizing R + D-Pad instead of L + D-Pad. Codes will eventually be updated in the Zelda 64 4K texture pack main posts.

EDIT 2:
Oops... Typo fix... No wonder the code didn't work anymore.

EDIT 3:
A full rework. Hopefully fix soft-blocking and other issues for real when trying swap forms when not supposedly in control of Link. Also, I added the option to quick swap into Fierce Deity Link (if the mask is in your possession of course) by using L + C-Up. In addition is disabled quick swapping into Deku, Goron or Fierce Deity Form when in the water. I still have to update the code with a check to only be able to quick swap into Fierce Deity Link when the mask is allowed in that area. But that isn't a major issue. So that can wait for now.

EDIT 4:
Quick swapping into Fierce Deity Form is now only allowed when it should, aka boss rooms.

EDIT 5:
Prevented soft-locking when quick swapping during the boss portal exit cutscene.
Super Mario 64 - Super Smash Bros. 64 - Mario Kart 64 - Zelda 64 - Star Fox 64 - Patreon - Discord
Find
Reply
08-13-2019, 06:17 AM (This post was last modified: 08-13-2019, 06:18 AM by Silent Hell.)
#12
Silent Hell Offline
Accuracy Nitpicker
***
Posts: 94
Threads: 7
Joined: Mar 2018
I know that you're primarily focusing on N64 titles, but I thought I might as well ask here. For a little background on myself, I have pretty basic knowledge of AR code making for 3DS. I made a whole bunch on codes for Fire Emblem games back when I was interested, but nothing too crazy or out there. So what I wanted to do now is find out exactly when the special timed items from Pandora's Tower actually spawn. My line of logic was to simply create a time of day editor, which I am comfortable making myself, and just run back and forth, hoping to see if the items spawn. But, I was wondering how possible would it be to go a step further and find anything in memory that checks to see what time it is, and then to spawn the item. This is where I lack the expertise as I assume this has to do with opcodes and assembly, which I am completely unfamiliar with.

I basically want to find something that says:
If time >6:00am and < 9:00am
then spawn Dawn Chorus in Treetop Tower

I guess this isn't much of a request, but advice on how one begins to search for such a thing.

EDIT: For reference, this is the spreadsheet I follow for the special material spawn times: https://docs.google.com/spreadsheets/d/1FST_WIXOxitt-fUyPevdiuDi0hEigz9omMOkzmAA5Uo/pub?output=html#
Find
Reply
08-13-2019, 08:02 PM (This post was last modified: 08-13-2019, 08:02 PM by Admentus.)
#13
Admentus Offline
Nothing but perfection for gaming
*******
Posts: 1,825
Threads: 23
Joined: May 2015
(08-13-2019, 06:17 AM)Silent Hell Wrote: I know that you're primarily focusing on N64 titles, but I thought I might as well ask here. For a little background on myself, I have pretty basic knowledge of AR code making for 3DS. I made a whole bunch on codes for Fire Emblem games back when I was interested, but nothing too crazy or out there. So what I wanted to do now is find out exactly when the special timed items from Pandora's Tower actually spawn. My line of logic was to simply create a time of day editor, which I am comfortable making myself, and just run back and forth, hoping to see if the items spawn. But, I was wondering how possible would it be to go a step further and find anything in memory that checks to see what time it is, and then to spawn the item. This is where I lack the expertise as I assume this has to do with opcodes and assembly, which I am completely unfamiliar with.

I basically want to find something that says:
If time >6:00am and < 9:00am
then spawn Dawn Chorus in Treetop Tower

I guess this isn't much of a request, but advice on how one begins to search for such a thing.

EDIT: For reference, this is the spreadsheet I follow for the special material spawn times: https://docs.google.com/spreadsheets/d/1FST_WIXOxitt-fUyPevdiuDi0hEigz9omMOkzmAA5Uo/pub?output=html#

Ohh boy... Where should I start. Honestly, I am not that great of an AR coder at all. A few months ago I could barely code anything useful with AR. I mostly stick to N64 titles because they are kinda primitive. There are less variables to consider, and those variables which does exist are less complicated than within GameCube or Wii games. Back then, technology wasn't that advanced as in later generations. Ohh... And the fact that by now that games such as Super Mario 64, Ocarina of Time and Majora's Mask are pretty well documented. Your best friend for Zelda 64 coding is CloudModding.

As I was saying about less complicated variables, most of the time what I do is trying to change variables which are already there. For example changing the sword you have. Depending on which swords you have, this variable changes with consistent values. For example, no swords would be x00, while only having the Kokiri Sword would be x01, but having all swords would be x0F.

And then there are interception calls, or whatever I should name it. My last code I posted above is one such example. In order to make Link transform the RAM address 00E69104 will be set to 00000020. The tricky part about it is that I never was able to find that RAM address for myself if it wasn't for darkludx who discovered it for the Summon Elegy of Emptiness Statue code. That specific RAM address is always kept to 0 and only an incredibly tiny amount of time being set to any other value to initialize an animation and then immediately been set back to 0. Unless you somehow found it and directly modify it yourself... Then it keeps it values... And causes a frozen Link due infinitely performing that action. More or less, most of my work is actually possible because it has been documented before.

I really have no idea how to work with opcodes or assembly either. I don't actually do that. I mostly work with Project64 and Dolphin with their built-in debuggers. Dolphin's debugger can be accessed by enabling it Config -> Interface -> Show Debugging UI, but you need one of the later development builds for that. It's still available in the older builds, but requires you to make a specific shortcut for it.

Once the Debugging UI is enabled. I proceed booting the game. The Cheat Managed is an useful tool too, which is leave somewhere on my second monitor screen. I mostly search for new RAM addresses using the Cheat Manager. Now you can either search for 8-bit, 16-bit or 32-bit values. It is going to prove useful here that you are aware how hexadecimal values work. Codes are written in hexadecimal of course.

A simple procedure of searching for a code. Let's take the swords example again. I make a new save file and I search for the 8-bit value x00 since I have no sword or shield at this moment. I do know due documentation that both the available swords and shields share the same 8-bit address. Now I continue picking up the Kokiri Sword and I search again for the value x01. And I continue to do so with the Deku Shield in my possession (which would now be x11). Now there are quite a few results to filter from. Meanwhile while I am trying collect the Kokiri Sword and Deku Shield I keep re-checking the values I should have by doing all sorts of actions such as rolling, jumping, talking, opening the pause menu, saving, rebooting the disc, changing areas, while the values that determines which swords and shields I have should remain unchanged.

Sometimes when searching for values there would still be far too many results. In which case I will be searching for 16-bit or 32-bit values instead. While the 8-bit address holds the swords and shields, the 16-bit address holds the swords, shields, tunics and boots. That's essentially the two 8-bit addresses combined that stores your swords and shields and your tunics and boots. Searching for the 16-bit address instead should be x0011 for example (no swords, no shields, only Kokiri Tunic, only Kokiri Boots). Having all equipment items should have the value at xFFFF. The more consistent it is to search for values for a RAM addresses the easier it is to filter the results.

Hopefully that made some sense.

As for the debugging UI. The Watch tab is pretty useful. You just leave a RAM address there you think you should have and keep checking it when it changes. You can also set a breakpoint to it, so that it pause emulation when it's value changes. You do need to refresh the Watch (either manually or by pausing) to see the updated RAM address values.

Each RAM address is found in the range from 80000000 - 817FFFFF (cached GameCube) or C0000000 - C17FFFFF (uncached GameCube). I am a bit sure if this is any different for the Wii. But that's mostly how it works for AR. Dolphin has some useful documentation how to write your AR codes.
https://github.com/dolphin-emu/dolphin/wiki/GameCube-Action-Replay-Code-Types-(Simple-Version)
https://github.com/dolphin-emu/dolphin/wiki/GameCube-Action-Replay-Code-Types

But... I suppose this isn't exactly that helpful. You did state you had some basic AR coding experience after all.



My guess is if you want the adjust the time is that you need to be able somehow to confirm the exact value for the time it is.

An example from Majora's Mask when using counter timers. Their format it: 00:00:00. Aka, minutes, seconds, milliseconds. If the counter would be displaying: 02:00:00 then that would mean 2 minutes, which is 120 seconds, which is 12000 milliseconds, which would be 2EE0 in hexadecimal. Ocarina of Time has a different counter timer format, which is 00:00, aka, minutes, seconds. So if the timer did display 02:00 there then that would mean 2 minutes, which is 120 seconds which is 78 in hexadecimal. Ocarina of Time keeps track of milliseconds somewhere separately.

As for your game. You should see if there is any kind of display that shows the time and if that time display somehow changes.

As for your second part when it should spawn an object. That would be incredibly tricky. It depends if there is any variable for it. What you could do is access that area when the spawn is active and search for a value for being active (such as 0x01 or 0xFF or anything higher than 0x00). And then access that area again when the spawn is not active and search for a value for being deactivated (such as 0x00 or perhaps 0xFF). In any case in both instances there would need to be a RAM address having a specific value set to two consistent values. Either that spawn is active or it isn't. If it is that easy then all you have to do is force that spawn activation value to being enabled and it should be there every time. That is of course if the spawn is being determined by a value being enabled or not.

That's the most I can do I am afraid. But feel free to discuss this further if you like.
Super Mario 64 - Super Smash Bros. 64 - Mario Kart 64 - Zelda 64 - Star Fox 64 - Patreon - Discord
Find
Reply
08-13-2019, 09:44 PM (This post was last modified: 08-14-2019, 12:07 AM by Admentus.)
#14
Admentus Offline
Nothing but perfection for gaming
*******
Posts: 1,825
Threads: 23
Joined: May 2015
Just a small useful code:

Code:
$Majora's Mask -> Inverted Stone Tower (AR Code) (PZLE01)
00E51939 00000010

Stone Tower and Stone Tower Temple will be inverted upon entering Stone Tower.
Super Mario 64 - Super Smash Bros. 64 - Mario Kart 64 - Zelda 64 - Star Fox 64 - Patreon - Discord
Find
Reply
08-14-2019, 12:04 AM (This post was last modified: 08-14-2019, 12:07 AM by Admentus.)
#15
Admentus Offline
Nothing but perfection for gaming
*******
Posts: 1,825
Threads: 23
Joined: May 2015
This is pretty cool. We can basically alter any text that is shown to use. Since it would result in quite the large codes, each text alteration should be contained in it's own separate code. For this example, the dialog box for the Razor Sword will not mention anymore that it will break after 100 hits.

Code:
$Majora's Mask -> Dialog Fix Test: Breakable Razor Sword (AR Code) (PZLE01)
8CE65DDC 52617A6F
8CE65DE0 72205377
8CE65DE4 6F726411
8CE65DE8 00546865
8CE65DEC 204B6F6B
8CE65DF0 69726920
8CE65DF4 53776F72
8CE65DF8 64207265
04E65E10 00000000
04E65E14 00000000
04E65E18 00000000
04E65E1C 00000000
04E65E20 00000000
04E65E24 00000000
00E65E28 00000000
00000000 40000000

Dialog stuff that's useful to alter or check for:

- Quiver and Bomb Bag stating their capacity number when using a code that changes their capacity... This would not include the texture, since that has to be part of a texture pack.
- Dialogues boxes when purchasing a Quiver or Bomb Bag upgrade stating their capacity number, for similar reasons as above.
- Razor Sword (not mentioning it anymore it can break.
- Dialogue trigger when Tatl says your shield is stolen. But that would result in yet another large code... I think the current solution is simpler, although goes through more variables.
- Dialogue for the Blacksmith reforging your sword. But that would also result in yet another large code. Similar as with the stolen shield, the current solution is simpler.
Super Mario 64 - Super Smash Bros. 64 - Mario Kart 64 - Zelda 64 - Star Fox 64 - Patreon - Discord
Find
Reply
08-14-2019, 01:47 AM (This post was last modified: 08-14-2019, 01:55 AM by Admentus.)
#16
Admentus Offline
Nothing but perfection for gaming
*******
Posts: 1,825
Threads: 23
Joined: May 2015
Code:
$Majora's Mask -> Weaker Bow Attacks (AR Code) (PZLE01)
04B8CE7C 908200B8
60E68EB7 00000008
18E68EB7 0000000C
04B8CE7C 24020001
08E68EB7 0000000C
04B8CE7C 24020002

$Majora's Mask -> Weaker Sword Attacks (AR Code) (PZLE01)
08E692F1 00000003
00E69371 00000002
08E692F1 00000006
00E69371 00000004
08E692F1 00000004
00E69371 00000003
08E692F1 00000008
00E69371 00000006

The code does what it says it does, through it might not work against all bosses... But bosses normally aren't defeated by using the bow.

Anyway:

- Hero's Bow (Normal Arrows) = 1 point of damage instead of 2 points of damage
- Fire Arrow = 1 point of damage instead of 2 points of damage
- Ice Arrow = 1 point of damage instead of 2 points of damage
- Light Arrow = 2 points of damage instead of 4 points of damage

Basically, their damage values have been halved.

I did make the Weaker Sword attacks code a while ago, but now I included the Fierce Deity Sword and Great Fairy Sword as well.

- Gilded Sword Slash = 2 point of damage instead of 3 points of damage
- Great Fairy Sword Slash = 3 point of damage instead of 4 points of damage
- Fierce Deity Sword Slash = 3 point of damage instead of 4 points of damage

- Gilded Sword Jump / Spin Attack= 4 point of damage instead of 6 points of damage
- Great Fairy Sword Jump / Spin Attack = 6 point of damage instead of 8 points of damage
- Fierce Deity Sword Jump / Spin Attack = 6 point of damage instead of 8 points of damage
Super Mario 64 - Super Smash Bros. 64 - Mario Kart 64 - Zelda 64 - Star Fox 64 - Patreon - Discord
Find
Reply
08-14-2019, 10:04 AM
#17
Silent Hell Offline
Accuracy Nitpicker
***
Posts: 94
Threads: 7
Joined: Mar 2018
Thanks! I decided to just take the easy route and to just modify the time of day. Funnily enough, not only did I find the game's day/night timer, I found an "hour of the day" value which is a 1 byte value that can be set from 0-23 that can control the hour of the day in a simple manner. This is actually all I really needed to find what I'm looking for so I've been able to see first hand the items spawn in and out when I manipulated the value. Thanks again. I completely forgot the wiki page for AR code types.
Find
Reply
08-14-2019, 07:51 PM
#18
Admentus Offline
Nothing but perfection for gaming
*******
Posts: 1,825
Threads: 23
Joined: May 2015
Code:
$Majora's Mask -> Cleansed Termina (AR Code) (PZLE01)
00CBCFBC 00000003
00CBCFC9 00000080
00CBCFDC 00000020
00CBCFDF 00000080
00CBCFE3 0000003D
00CBCFB4 00000090

Puts each region of Termina in a post-boss state.
Super Mario 64 - Super Smash Bros. 64 - Mario Kart 64 - Zelda 64 - Star Fox 64 - Patreon - Discord
Find
Reply
08-15-2019, 11:53 PM
#19
Admentus Offline
Nothing but perfection for gaming
*******
Posts: 1,825
Threads: 23
Joined: May 2015
Giant's Knife improvements...

Code:
$Ocarina of Time -> Unbreakable Giant's Knife (AR Code) (D43E01)
02BE183E 00000008
38BE18A5 00000008
80BE18A5 000000F8

$Ocarina of Time -> Have All Equipment (AR Code) (D43E01)
08BE1846 00000000
02BE183E 00000008
02BE18A4 00007777
00BE1846 00000001

Code:
$Master Quest -> Unbreakable Giant's Knife (AR Code) (D43E01)
02BE181E 00000008
38BE1885 00000008
80BE1885 000000F8

$Master Quest -> Have All Equipment (AR Code) (D43E01)
08BE1826 00000000
02BE181E 00000008
02BE1884 00007777
00BE1826 00000001

Code:
$Ocarina of Time -> Unbreakable Giant's Knife (AR Code) (PZLE01)
02BR02BE 00000008
38BE0325 00000008
80BE0325 000000F8

$Ocarina of Time -> Have All Equipment (AR Code) (PZLE01)
08BE02C6 00000000
02BE02BE 00000008
02BE0324 00007777
00BE02C6 00000001

The Giant's Sword can only be used 8 times before it breaks. Now you can permanently prevent it from breaking, as long you keep the code enabled.

Ohh and... The Have All Equipment Code has been updated so that the Giant's Knife doesn't start broken. That would be dumb. But... The code already gives you immediate access to the Biggoron Sword. So... It's only useful if you decide to unlock all the equipment and then use the Switch Giant's Knife & Biggoron Sword With X On Icon in order to get the Giant's Knife back.
Super Mario 64 - Super Smash Bros. 64 - Mario Kart 64 - Zelda 64 - Star Fox 64 - Patreon - Discord
Find
Reply
08-23-2019, 12:54 AM
#20
Admentus Offline
Nothing but perfection for gaming
*******
Posts: 1,825
Threads: 23
Joined: May 2015
Just a simple fix to existing codes. Something that slightly bothered me. The levitation code will now only work when in Control of Link and when in-game. This might prevent some unwanted behavior. Especially during cutscenes.

Code:
$Ocarina of Time -> Hold D-Pad Right to Levitate (AR Code) (D43E01)
D0CA231E 0000FF08
C8CA0655 00000000
0A132F38 00000002
02CA22d0 000040CB

Code:
$Master Quest -> Hold D-Pad Right to Levitate (AR Code) (D43E01)
D0CA22DE 0000FF08
C8CA0615 00000000
0A132F38 00000002
02CA2290 000040CB

Code:
$Ocarina of Time -> Hold D-Pad Right to Levitate (AR Code) (PZLE01)
D0CA0D9E 0000FF08
C8C9F0D5 00000000
0A134C58 00000002
02CA0D50 000040CB

Code:
$Majora's Mask -> Hold D-Pad Right to Levitate (AR Code) (PZLE01)
D0E68E26 0000FF08
C8E669FD 00000000
0A1410C2 00000002
02E68DD8 000040CB
Super Mario 64 - Super Smash Bros. 64 - Mario Kart 64 - Zelda 64 - Star Fox 64 - Patreon - Discord
Find
Reply
« Next Oldest | Next Newest »
Pages (9): « Previous 1 2 3 4 5 ... 9 Next »
Jump to page 


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode