• 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 ... 29 30 31 32 33 ... 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-20-2016, 10:09 AM
#301
Zerowalker Offline
Member
***
Posts: 208
Threads: 19
Joined: Jan 2016
Wait, you mean it just duplicates the frames as needed?
If so, why would you wana do that, except for perhaps reduced input lag cause of increases response codewise (if the that code runs twice as fast).
Find
Reply
10-20-2016, 10:40 AM
#302
Meowmaritus Offline
Zelda Enthusiast
***
Posts: 111
Threads: 0
Joined: Oct 2016
(10-20-2016, 10:06 AM)retroben Wrote: I just had a thought since Twilight Princess has a frame skipper (dword 80502648 00000001),it may probably have an address that draws every frame when less than 60fps such as running half speed when at the normal 30fps and showing all frames.
Though this idea is from my Banjo-Kazooie/Tooie codes that cause the fps and speed to be identical to how fast the VI/s would be,like 30fps causing 30VI/s speed but actually still running at 60VI/s of refresh rate,preventing any frames from being skipped.
The Banjo codes modify 03 E0 00 08 into 03 E0 00 04 so that won't do much from how different the ASM is.

[color=#ccccff].spf06 15 tenalP[/color]

Those frameskip codes in both Wind Waker and Twilight Princess just tell it not to run the draw function every other frame. No matter what the frameskip value is, the internal update function is still called 30 times each second.

By the way, I don't get why so many people on these 60 FPS threads are so focused on the VI's of games. VI's are vertical interrupts. 1 VI involves drawing all the lines on the screen from top to bottom. Changing VIs/second in games doesn't magically control any kind of speed or the refresh rate of the screen. In fact, I've managed to both increase and decrease the VIs in Wind Waker and Twilight Princess without changing the framerate. The only thing that happens when you double the VIs/second is the screen gets twice as tall is it would normally be. It still displays at 60 Hz and it still renders at 30 frames/second. The opposite happens when halving the VIs/second: The screen shrinks to half it's height without changing anything else.

tl;dr; increasing VI's only produces duplicated pixels without adding any new frames between.
Find
Reply
10-20-2016, 10:46 AM
#303
Zerowalker Offline
Member
***
Posts: 208
Threads: 19
Joined: Jan 2016
Wait, really, it doubles the pixels?

I have tried it on Twilight but i only get more VI for no change.
I thought it would in theory reduce inputlag in terms of the Vsync, but hte game itself remains untouched (if the game ignores it).

Though still, i don't see that much reason for the VI, for me it's basically VI == FPS, they should be the same, then i atleast know what's going on;P
Find
Reply
10-20-2016, 11:35 AM
#304
Meowmaritus Offline
Zelda Enthusiast
***
Posts: 111
Threads: 0
Joined: Oct 2016
It randomly occurred to me that you guys might be curious as to how long the 60 FPS codes are. To give you an idea, the current implementation for Wind Waker's 60 FPS hack is 64 lines of Gecko codes, excluding the titles of the codes. Also, right now, as I'm testing new things out and whatnot, the [Gecko] section in my GZLE01.ini is 114 lines long.
Find
Reply
10-20-2016, 12:15 PM (This post was last modified: 10-20-2016, 12:16 PM by Zerowalker.)
#305
Zerowalker Offline
Member
***
Posts: 208
Threads: 19
Joined: Jan 2016
Haha wow, now that's A Lot of code.
How do you keep track of the code, i mean, i am assuming you have the ASM at hand with notes or something?
And do you use CodeWrite, pretty sure you don't as i think i remember you saying you used another tool without a name.

Question, can Gecko code be for different addresses in the same code, or do you need a new code for each "insert address" segment?

Also, good news, i may have solved the Cutscenes on Pikmin, i finally found the "Next Frame" function, and i just use Your "Run every other" code to make it half the speedWink
I don't know if it CAN bug the last frame, if so i guess that's the price to pay.
Might not be flawless, but i tried quite a bit of different cutsenes, as well as other places which usually goes to 30fps during my (run 30fps during cutscene) code,
and those seems to be unaffected luckily by this as they don't count as Movies/CutscenesSmile

If i have indeed solved it, it's now time for the more complex part, which is that particlegeneration seems to be going twice as fast, but i notice that when i run it in half, it kinda goes the correct speed,
but the effect is different from 30fps on another effect, so i may have to find a way to just run each particle generation in half value.

Which leads me to the question, how set a value in a float register?
Looked all over the place, can't find anything on that:S

(Why is because i need to divide, and in order to divide float, all registers need to be float it seems, which make sense i guess).
Find
Reply
10-20-2016, 12:20 PM (This post was last modified: 10-20-2016, 12:29 PM by gamemasterplc.)
#306
gamemasterplc Offline
Above and Beyond
*******
Posts: 1,111
Threads: 7
Joined: Mar 2016
You could inject the assembly manually and build branches to your code and ending your code with a blr to have short codes that need many identical injects. You have to store and reload a float into a floating point register to set a floating point register. Store a float by encoding the float into a GPR in hex and using a 32 bit store of that GPR into the stack. You can store GPRs and FPRs you want to use on the stack and the game is less likely to crash when you do it. Remember to decrement the stack pointer by the space needed before you store on the stack and increment the stack pointer by the exact same amount when you are ready to return. Also remember to restore saved registers from the stack.
Website is gamemasterplc.com. Youtube Channel is gamemasterplc.
Website Find
Reply
10-20-2016, 03:49 PM
#307
Zerowalker Offline
Member
***
Posts: 208
Threads: 19
Joined: Jan 2016
hmm, okay all that was really complicated, will take some time to melt that, (really have no real clue how registers, stack pointers etc work, i just see registers currently as "temporary storage").
Hmm, i will try my way to see if i can figure it out, usually i will figure it out and be proud of myself, i then expect a reward, like a cookie!

Oh also, in Pikmin there is a bug in 60fps which is that when you want to throw a pikmin, you often can't do it no matter how many times you press (he just start and stop an animation).
in 30fps it Never happens, and moving etc will help it in 60fps.

Do you have Any clue what could be the cause, and if so where i should try to look?
Just thinking that something similar may happen in Zelda and you got experience of it perhaps, cause i personally don't know.
I am guessing it's some function i can't find that triggers when you are supposed to throw, and that goes by a timer, and it ends too quickly so it "returns false" cause the game runs at twice the speed.
Find
Reply
10-20-2016, 03:59 PM
#308
Meowmaritus Offline
Zelda Enthusiast
***
Posts: 111
Threads: 0
Joined: Oct 2016
(10-20-2016, 12:15 PM)Zerowalker Wrote: Haha wow, now that's A Lot of code.
How do you keep track of the code, i mean, i am assuming you have the ASM at hand with notes or something?
And do you use CodeWrite, pretty sure you don't as i think i remember you saying you used another tool without a name.

Question, can Gecko code be for different addresses in the same code, or do you need a new code for each "insert address" segment?

Also, good news, i may have solved the Cutscenes on Pikmin, i finally found the "Next Frame" function, and i just use Your "Run every other" code to make it half the speedWink
I don't know if it CAN bug the last frame, if so i guess that's the price to pay.
Might not be flawless, but i tried quite a bit of different cutsenes, as well as other places which usually goes to 30fps during my (run 30fps during cutscene) code,
and those seems to be unaffected luckily by this as they don't count as Movies/CutscenesSmile

If i have indeed solved it, it's now time for the more complex part, which is that particlegeneration seems to be going twice as fast, but i notice that when i run it in half, it kinda goes the correct speed,
but the effect is different from 30fps on another effect, so i may have to find a way to just run each particle generation in half value.

Which leads me to the question, how set a value in a float register?
Looked all over the place, can't find anything on that:S

(Why is because i need to divide, and in order to divide float, all registers need to be float it seems, which make sense i guess).

I have a folder full of .ASM files containing the commented ASM code files for CodeWrite:
Spoiler: (Show Spoiler)
[Image: 20a9c378c09d432edcd112863890da1d.png]

Also, for loading a value into a float register, I usually just borrow a data slot that the game normally uses for other stuff:

lwz r17, 0 (r3) #IMPORTANT: Backup the game's value we're about to write over.
lis r18, 0x3F00 #Load a 0.5 single-precision float value into r18
stw r18, 0 (r3) #Save that float value into the location which we backed up the value of earlier
lfs f19, 0 (r3) #Load our float from the value we just saved
stw r17, 0 (r3) #IMPORTANT: Save our backup value back to where it originally was.


Generally, the location I choose to save something will be any save/load address I see close to the code's entry point. If I'm modifying a value that the game is about to save over anyways, I don't bother with restoring the backup (cuz its about to be overwritten anyways). HOWEVER, better safe than sorry. There are probably more fancy/less performance-intensive ways of loading a float value, but the method I just shared with you is how Wind Waker does it every single time.
Find
Reply
10-20-2016, 04:39 PM
#309
Zerowalker Offline
Member
***
Posts: 208
Threads: 19
Joined: Jan 2016
Wow, nice, i still can't bring myself to understand how the hell you find those stuff in the code and then figure out how it works more or less.
Cause i mean, sure you have the symboling which helps A Lot.
But still, a function has like 50 lines and it's just loading storing dividing multiplying adding branching All over the place XD
I try so hard to make some sense out of it, though the only things i look for is basically "If" stuff, cause that i can relate to.
And then Add/sub etc, cause well, you can relate to that as well, but random branching and stuff randomly tells me absolutely nothingTongue

Thanks for the code, that was as complex as expected, didn't know you could even load float in an "int register" thing, but then again it makes sense as it's just random values;D
Find
Reply
10-20-2016, 06:53 PM (This post was last modified: 10-20-2016, 07:05 PM by Zerowalker.)
#310
Zerowalker Offline
Member
***
Posts: 208
Threads: 19
Joined: Jan 2016
Hmm, i can get the dividing part to work.
However, no matter what i do the game goes into and endless loop if i alter that section.

Even if i alter it by using the same function.
In this case "fmr f1, f31".
So if i replace that, with the same function, it will still go into an endless loop.
It makes no sense to me, shouldn't it be exactly the same, the only difference is a branch jump which i expect shouldn't really do any harm, except maybe a performance loss.

EDIT:


//Original Code
801a133c: fmr f1, f31
//Gecko Code
C21A133C 00000001
FC20F890 00000000
//ASM
Address: 801A133C
fmr f1,f31
Find
Reply
« Next Oldest | Next Newest »
Pages (84): « Previous 1 ... 29 30 31 32 33 ... 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