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


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Site › dolphin-emu.org articles v
1 2 3 Next »

Game Modification: 60 FPS Hacks and Patches
View New Posts | View Today's Posts

Pages (84): « Previous 1 ... 36 37 38 39 40 ... 84 Next »
Jump to page 
Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Game Modification: 60 FPS Hacks and Patches
10-24-2016, 11:10 AM
#371
Zerowalker Offline
Member
***
Posts: 208
Threads: 19
Joined: Jan 2016
When i see how nice formattning everyone uses when they develop stuff i am always amazed, i always write a complete mess with programming.
I also have wasted years on C#, though i can't make an application except for beginner level stuff;P

And you are telling me this is the first time you started using ASM and Gecko, not sure if i should be impressed by you, or ashamed of my own performance XD

Anyhow, i don't get how i am supposed to skip some codes if i decide to inject and replace several lines.
As only the first lines gets replaced and then branched, i assume one has to branch back + offset to the line you want.

I tried loading the memory address into a register, then use "mtlr rX" "blr rX" to no avail, it returns but at a totally different address, and i can't figure out whySad
Find
Reply
10-24-2016, 11:17 AM
#372
Meowmaritus Offline
Zelda Enthusiast
***
Posts: 111
Threads: 0
Joined: Oct 2016
(10-24-2016, 09:31 AM)theboy181 Wrote: giving back to the community is appreciated! any word on your latest YouTube upload?

It finally finished https://youtu.be/3ZvmdqaEgtM

The video file uploaded to Youtube was 5.53 GB.
Find
Reply
10-24-2016, 11:44 AM
#373
MarioKartFan Offline
Junior Member
**
Posts: 12
Threads: 2
Joined: Sep 2016
Oh my Gosh! You fixed Niko! This is really one of the most incredible enhancements I have seen. Love the "Two Hours Later" Easter egg. Cannot wait until you have this finished. You've got me seriously geeking out here. Can't remember the last time I was so excited about a fan enhancement. Probably 10+ years ago when Djipi was working on a texture pack for Ocarina of Time!
Find
Reply
10-24-2016, 11:52 AM
#374
Meowmaritus Offline
Zelda Enthusiast
***
Posts: 111
Threads: 0
Joined: Oct 2016
(10-24-2016, 11:10 AM)Zerowalker Wrote: When i see how nice formattning everyone uses when they develop stuff i am always amazed, i always write a complete mess with programming.
I also have wasted years on C#, though i can't make an application except for beginner level stuff;P

And you are telling me this is the first time you started using ASM and Gecko, not sure if i should be impressed by you, or ashamed of my own performance XD

Anyhow, i don't get how i am supposed to skip some codes if i decide to inject and replace several lines.
As only the first lines gets replaced and then branched, i assume one has to branch back + offset to the line you want.

I tried loading the memory address into a register, then use "mtlr rX" "blr rX" to no avail, it returns but at a totally different address, and i can't figure out why:(



I usually load the address into CTR instead of BLR since messing with CTR causes less issues.

Making a one-way trip directly to an exact offset from inside your Gecko-inserted code:
Spoiler: (Show Spoiler)


#Because this is a one-way trip, backing up the CTR value won't do any good; we wouldn't be able to restore the backup.

lis r19, 0x8765
ori, r19, r19, 0x4321 #Load the address to go to

mtctr r19 #Move that address to CTR

bctr #Branch straight to CTR and don't set LR or anything

#Because we are unable to make a backup, there would be problems if a vanilla game function thought the CTR had another vanilla game instruction's address in it but it instead had the address you moved to it and then it tried to branch there.
#Luckily for us, these games tend to move their values to the CTR right before branching there in order to prevent that exact problem.


Calling a function in the middle of Gecko inserted code and then returning back to the Gecko inserted code afterward:
Spoiler: (Show Spoiler)

mfctr r17 #Backup CTR
mflr r18 #Backup LR (remember that when functions return they're branching to LR. For them to go back to this function afterwards the branch instruction we use is going to have to set the LR to an address inside this function)

lis r19, 0x8765
ori, r19, r19, 0x4321 #Load the address to go to

mtctr r19 #Move that address to CTR

bctrl #Set LR to the address of the instruction below this one, then Branch to the address in CTR. Since this instruction sets the LR to the address of the instruction below this one, when the function you called does a "blr" at the end its going to branch to the address of the instruction below this one.

nop #When the function you called above does a "blr" its going to this line.

mtctr r17 #Move our CTR backup back into the CTR
mtlr r18 #Move our LR backup back into the LR, which, again, is important because our branch instruction changed the LR.

Find
Reply
10-24-2016, 11:55 AM
#375
Zerowalker Offline
Member
***
Posts: 208
Threads: 19
Joined: Jan 2016
Nice, Thanks, learning ever more!
Find
Reply
10-24-2016, 11:59 AM
#376
Meowmaritus Offline
Zelda Enthusiast
***
Posts: 111
Threads: 0
Joined: Oct 2016
(10-24-2016, 11:44 AM)MarioKartFan Wrote: Oh my Gosh!  You fixed Niko!  This is really one of the most incredible enhancements I have seen.  Love the "Two Hours Later" Easter egg.  Cannot wait until you have this finished.  You've got me seriously geeking out here.  Can't remember the last time I was so excited about a fan enhancement.  Probably 10+ years ago when Djipi was working on a texture pack for Ocarina of Time!

Actually Niko has been that way the whole time. The problem is that his animations are double speed (I simply disabled the NPC speed lowering hack on that one part). My failed attempts were me trying different ways to get him working exactly like the vanilla game.

And the best part about AI scripts: they're loaded in a different address each time you load an area and none of them have symbol maps. For that reason, I've been trying various methods to fix those kinds of cutscenes without messing with all the AI scripts.
Find
Reply
10-24-2016, 12:11 PM
#377
Zerowalker Offline
Member
***
Posts: 208
Threads: 19
Joined: Jan 2016
I tried it and the branching worked fine, ThanksSmile!
Find
Reply
10-24-2016, 01:22 PM
#378
retroben Offline
N64 Code Hunter
****
Posts: 328
Threads: 21
Joined: Jul 2015
If there is indeed a global gravity/velocity address/value somewhere,it would be possible to fix most of it so 60fps animations could stay for all things.
I think there could also be a routine for enemy action pacing like Bokoblins and their jump slash,or maybe the code slowing down the pace needs to be a little slower if even a tiny bit for their attacks to work properly,unless you already tested this in different values with no results.

Shame there is a high probability that the global gravity might be in disc data and not placed in RAM space.

"So much later that the old narrator got tired of waiting and they had to hire a new one."
Shield TV Pro (stock/non-rooted OTA 6.3)

Acer Aspire E 15 E5-575G-59EE

CPU: i5-6200U 2.3-2.8Ghz _ GPU: Nvidia GeForce 940MX 2GB (GDDR5) VRAM
Hyundai 8GB DDR4 Dual-channel SDRAM _ 1000GB HDD
New; CPU: Intel i9 9900KF_ GPU: Nvidia RTX 2060 Super | ◕‿◕
Find
Reply
10-24-2016, 04:22 PM
#379
Zerowalker Offline
Member
***
Posts: 208
Threads: 19
Joined: Jan 2016
Question again,

Having issues with Action Replay, which usually is kinda nice as you can directly alter addresses.
Does Gecko have such a thing as well? (Like, If B Pressed (checks value on an address), if equal bla, do bla)?

Also, Is it possible with Gecko to NOP several lines at different places and write to an address direcetly (all this at once on either boot or on activation)?

Thanks;D
Find
Reply
10-24-2016, 05:04 PM
#380
Meowmaritus Offline
Zelda Enthusiast
***
Posts: 111
Threads: 0
Joined: Oct 2016
(10-24-2016, 01:22 PM)retroben Wrote: If there is indeed a global gravity/velocity address/value somewhere,it would be possible to fix most of it so 60fps animations could stay for all things.
I think there could also be a routine for enemy action pacing like Bokoblins and their jump slash,or maybe the code slowing down the pace needs to be a little slower if even a tiny bit for their attacks to work properly,unless you already tested this in different values with no results.

Shame there is a high probability that the global gravity might be in disc data and not placed in RAM space.

"So much later that the old narrator got tired of waiting and they had to hire a new one."

Even if there were a global gravity value it wouldn't help the event cutscenes being played double speed.
Find
Reply
« Next Oldest | Next Newest »
Pages (84): « Previous 1 ... 36 37 38 39 40 ... 84 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