• 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 ... 21 22 23 24 25 ... 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-15-2016, 10:17 AM
#221
Meowmaritus Offline
Zelda Enthusiast
***
Posts: 111
Threads: 0
Joined: Oct 2016
(10-15-2016, 08:03 AM)gamemasterplc Wrote: You placed your instructions in the middle of Actor Memory. Do not use memory below 0x817F0000 in Wind Waker or Twilight Princess or the game will crash in some areas.

I made sure there was nothing important there in most situations (and it's not what caused the crash I had), but thank you for the advice.
Find
Reply
10-15-2016, 12:54 PM
#222
Zerowalker Offline
Member
***
Posts: 208
Threads: 19
Joined: Jan 2016
(10-15-2016, 09:12 AM)masterotaku Wrote: Usually, I play my monitor (Dell S2716DG) in 3D Vision 2 mode. That's 60Hz per eye (the monitor itself is at 120Hz).


Let's think about a 60Hz strobing monitor, like a CRT. A 30fps game will show frames like this:

1,1,2,2,3,3,4,4,5,5,6,6

Every frame is shown twice, so following things in movement will make a double image appear. With the black frame insertion code, it's like this:

1,black,2,black,3,black,4,black5,black,6,black

This time, you only see each frame once, so it doesn't show the double image effect. However, it's effectively strobing as if it were a 30Hz CRT. Unbearable for most people.


Now, imagine that you are using a 120Hz monitor while you use ULMB (strobing). The game as usual:

1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6

Evey frame displayed four times. Quadruple image effect. With the code:

1,1,black,black,2,2,black,black,3,3,black,black,4,4,black,black,5,5,black,black,6,6,black,black

You get double image effect AND the flickering. A pretty lose-lose situation in my opinion. To lose the double image effect, you would need 1 frame followed by three black frames:

1,black,black,black,2,black,black,black,3,black,black,black,4,black,black,black,5,black,black,black,6,black,black,black


In my case, I discovered a secret mode in my monitor to enable ULMB and G-Sync at the same time. So the monitor synchronizes the strobing to the 60fps Dolphin is sending (using 60Hz automatically, without any desynchronization, tearing or input lag), but 30 of them are black frames. And that's why I'm getting the second case, as if I had a 60Hz monitor (1,black,2,black,3,black,4,black5,black,6,black). Of course, if this G-Sync+ULMB mode could work with framerates under 40fps without introducing double image, I wouldn't need the black frame insertion code.


For people with unstrobed monitors, there isn't any double image issue but there is a lot of motion blur. With the black frame insertion code you get all the bad flickering and half the motion blur (you get the same motion blur as with a 60fps game). At 120Hz it's the same because the monitor is showing the frames fully, without flickering, acting essentially the same way as a 60Hz monitor with a 60fps game.


Ah well i understand what you mean there.

I failed to explain what i meant with 120hz, i meant that as in having the equal strobing effect as a 60hz.

Which would of course result in double fps (120hz =60fps + 60 black frames).
And that is what i mean ii assume wouldn't look like a Disco compared to 60hz (30fps + 30 black frames).

though  i didn't know G-Sync worked with strobing effects, was sure i read that they hadn't solved that or something.
But if it works, than it's clearly a win win.

Though, don't you still get input lag though, the same as Vsync even with GSync etc?
Could n ever confirm this when searching around, some say you get lag, some say you get less, some say you get none.
Technically you must get at least more input lag then no sync, cause there has to be some wait to sync both the monitor and the GPU, else they wouldn't be in sync;P
Find
Reply
10-15-2016, 08:13 PM (This post was last modified: 10-15-2016, 08:13 PM by Meowmaritus.)
#223
Meowmaritus Offline
Zelda Enthusiast
***
Posts: 111
Threads: 0
Joined: Oct 2016
Just a quick update: I've got the game running in 60 FPS with 30 FPS animation and physics speeds (with no smoothing). It looks pretty bad though so I'm not even gonna bother copying the code here. What I'm working on currently is getting 60 FPS smooth animations and physics at the very least (things like walking might not be quite as smooth)

Anyways, the camera is 60 FPS either way, so it will hurt your brain less in VR.
Find
Reply
10-16-2016, 03:18 AM
#224
theboy181 Offline
Member
***
Posts: 60
Threads: 6
Joined: Feb 2015
(10-15-2016, 08:13 PM)Meowmaritus Wrote: Just a quick update: I've got the game running in 60 FPS with 30 FPS animation and physics speeds (with no smoothing). It looks pretty bad though so I'm not even gonna bother copying the code here. What I'm working on currently is getting 60 FPS smooth animations and physics at the very least (things like walking might not be quite as smooth)

Anyways, the camera is 60 FPS either way, so it will hurt your brain less in VR.

Please PM the codes? I would likes to test and see what type of results..
Find
Reply
10-16-2016, 03:52 AM (This post was last modified: 10-16-2016, 04:04 AM by retroben.)
#225
retroben Offline
N64 Code Hunter
****
Posts: 328
Threads: 21
Joined: Jul 2015
If it changes pre-existing values,then it could be beneficial for trying to find the pace slowdown code/s nearby.
Another idea of what to find is that it needs to not alter the fps value while only changing the speed of the game itself,so it would be doubly smooth and slower than its supposed to be,it could be vastly different from the code for SMS or it could be exactly the same case.

I would really like to know what each ASM equivalent is to N64 coding so I can directly tinker with values randomly until something interesting happens much like I do with PJ64.

Such as these many different common values of N64 MIPS code:
27BDxxxx,03E00008,3C053F80,240100xx,3C0180xx,240400xx,24060001,0Cyyxxxx (0C0C8A00),460Cxxxx,4481xxxx,00064080,and 10000002
Changes result in this:
crash,03E00004,3C054040,240100xx xx+4/-4,breaks?,240400xx xx+/-4,24060000,2400xxxx,660Cxxxx,6481xxxx,000640C0/00024080,and 10000001
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-16-2016, 04:30 AM
#226
gamemasterplc Offline
Above and Beyond
*******
Posts: 1,111
Threads: 7
Joined: Mar 2016
Use ASMWiird to assemble opcodes for the PowerPC Gekko and Broadway.
Website is gamemasterplc.com. Youtube Channel is gamemasterplc.
Website Find
Reply
10-16-2016, 08:29 AM (This post was last modified: 10-16-2016, 08:57 AM by Meowmaritus.)
#227
Meowmaritus Offline
Zelda Enthusiast
***
Posts: 111
Threads: 0
Joined: Oct 2016
(10-16-2016, 03:18 AM)theboy181 Wrote: Please PM the codes? I would likes to test and see what type of results..

I've already got them all changed up to where only Link runs normal speed and everything else is fast (cuz I was trying to manually half the update speeds of everything EXCEPT the camera).

Anyways, here are the AR codes to have 30 FPS Link on a 60 FPS background lol (in Wind Waker US - GZLE01):
Disclaimer: It is not fit for normal play!
Spoiler: (Show Spoiler)

$60FPS_0000_RootUpdater
04006450 497E9BB0
057F0000 3E00817F
057F0004 82301000
057F0008 2C110001
057F000C 41A20010
057F0010 3A200001
057F0014 92301000
057F0018 4A81643C
057F001C 3A200000
057F0020 92301000
057F0024 4A81789D
057F0028 4A81642C

$60FPS_Uncapper
044C8D44 000A4CB8

$60FPS_0030_LinkUpdater
04122D3C 496CD2F4
057F0030 3E00817F
057F0034 82301000
057F0038 2C110001
057F003C 41A20008
057F0040 4A932D00
057F0044 4A93182D
057F0048 4A932CF8

The final code will likely be anywhere from 50 - 150 lines lol


(10-16-2016, 04:30 AM)gamemasterplc Wrote: Use ASMWiird to assemble opcodes for the PowerPC Gekko and Broadway.

Thanks for the tip. I'll definitely switch to that for Wii ASM but for now, since I'm messing with GameCube, I'd rather continue using the Action Replay code generator that I'm using.


(10-16-2016, 03:52 AM)retroben Wrote: If it changes pre-existing values,then it could be beneficial for trying to find the pace slowdown code/s nearby.
Another idea of what to find is that it needs to not alter the fps value while only changing the speed of the game itself,so it would be doubly smooth and slower than its supposed to be,it could be vastly different from the code for SMS or it could be exactly the same case.

I would really like to know what each ASM equivalent is to N64 coding so I can directly tinker with values randomly until something interesting happens much like I do with PJ64.

Such as these many different common values of N64 MIPS code:
27BDxxxx,03E00008,3C053F80,240100xx,3C0180xx,240400xx,24060001,0Cyyxxxx (0C0C8A00),460Cxxxx,4481xxxx,00064080,and 10000002
Changes result in this:
crash,03E00004,3C054040,240100xx xx+4/-4,breaks?,240400xx xx+/-4,24060000,2400xxxx,660Cxxxx,6481xxxx,000640C0/00024080,and 10000001
I hate to break it to you, but Wind Waker and Twilight Princess do not have those values. Everything is updated with hardcoded values.
For instance, Link's walking speed is a constant value, it has nothing to do with the timestep. No matter what, Link moves the same distance every time his update function is called.
If you run the game 60 fps as it is, his update function gets called twice as fast, since updates and frame drawing are on the same thread.
However, if you call Link's update function only half as often, effectively only updating him 30 times per second, his model will only move 30 times/second, making the image of Link's model appear 30 FPS, rather than smooth (Link would appear really jittery and blurry if the camera was at 60 fps, like when using the codes I posted.
The ONLY way to get Link to be entirely in smooth 60 FPS at normal speed would be to extract the game, open each of Link's animation files, double the animation length, save the animation file, run the boot.dol directly in Dolphin, find Link's update functions in ASM, manually half all of his movement timings to half their duration, modify all of his motion delta values to be half, and here's the best part: MODIFY THE TIMING VALUES AND MOTION DELTA VALUES OF EVERY SINGLE ONE OF LINK'S ITEMS AND ADDITIONALLY EDIT THE ANIMATION FILES OF THOSE WHICH ARE ANIMATED.

But yeah, N64 games on MIPS had so much varying framerate (since 3D games were a rather new thing and they were still trying to get it right [which they failed at for those 20 fps games lol]) that they very frequently included scalable timings, in case the framerate needed to be adjusted. They continued this trend on Super Mario Sunshine, the VERY FIRST GameCube game ever programmed, because the GameCube's hardware hadn't been decided for the majority of development. The fact that the game runs full speed at 60 FPS without emulated CPU overclocking suggests that the framerate was halved only due to uncertainty of the GameCube's hardware (with it being a launch title, I'd guess that they probably had to start manufacturing the game discs before the GameCube's hardware specs were finally decided.

So, after that point, when GameCubes had definite hardware specifications and all developers knew whether they wanted to target 30 FPS nice graphics or 60 FPS slightly less nice graphics, I think it's safe to believe that they simply determined the framerate early in development and hardcoded everything to just work with that speed. I mean, come on, you know how Nintendo developers are; The New Nintendo 3DS underclocks itself to the old 3DS's cpu clock rate and reduces the cpu cache size as well if you play a game released before the new 3ds came out. And honestly at this point, I wouldn't be surprised if Zelda: Breath of the Wild was still 30 FPS on the NX lol.
Find
Reply
10-16-2016, 08:44 AM
#228
gamemasterplc Offline
Above and Beyond
*******
Posts: 1,111
Threads: 7
Joined: Mar 2016
Use a Gecko code. Gecko Codes will be shorter than AR Codes anyway due to being able to write 8 bytes per line using the 06 codetype and supports more than 40 lines on real console. Gecko Codes allow you to use ASMWiird to inject Assembly code into games easily given an address to hook at.
Website is gamemasterplc.com. Youtube Channel is gamemasterplc.
Website Find
Reply
10-16-2016, 09:02 AM (This post was last modified: 10-16-2016, 09:27 AM by Meowmaritus.)
#229
Meowmaritus Offline
Zelda Enthusiast
***
Posts: 111
Threads: 0
Joined: Oct 2016
(10-16-2016, 08:44 AM)gamemasterplc Wrote: Use a Gecko code. Gecko Codes will be shorter than AR Codes anyway due to being able to write 8 bytes per line using the 06 codetype and supports more than 40 lines on real console. Gecko Codes allow you to use ASMWiird to inject Assembly code into games easily given an address to hook at.

It's not any easier to use ASMWiird than it is to use the tool I'm using. HOWEVER, I'll switch to using gecko codes simply because of the 40 line limit thing. I never knew AR codes had a length limit that low on an actual GameCube (I was thinking more along the lines of a few hundred at least). Anyways, since I'll be using Gecko codes, I guess I'll use ASMWiird now if that makes you happy.

Edit: A quick Google search does not produce any "official" sites to download ASMWiird so if you have a specific reccomendation on where I should get it, please give me a...Link ( ͡° ͜ʖ ͡°)


Edit 2: None of these programs seem to let you specify multiple insertion offsets within the same ASM code, so I'm gonna program my own GUI that does let you do that.
Here's an example of how it would work, using one of my Wind Waker 60 FPS code injections as an example:
Spoiler: (Show Spoiler)

# Half all input updates and update custom frame counter value
0x817F0000: # New Function
lis r16, 0x817F
lwz r17, 0x1000(r16)
cmpwi r17, 1
beq+ 0x10

# if r17 == 0
li r17, 1
stw r17,0x1000(r16)
b ((0x80006450 + 0x04) - (0x817F0000 + 0x18)) # Branch to instruction after entry point

# if r17 == 1
li r17, 0
stw r17,0x1000(r16)
bl (0x800078C0 - (0x817F0000 + 0x24)) # Branch to wrapped function to run this frame
b ((0x80006450 + 0x04) - (0x817F0000 + 0x28)) # Branch to instruction after entry point

0x80006450: # Entry Point
b (0x817F0000 - 0x80006450) # Branch to New Function

Find
Reply
10-16-2016, 09:28 AM
#230
gamemasterplc Offline
Above and Beyond
*******
Posts: 1,111
Threads: 7
Joined: Mar 2016
Download the program CodeWrite instead at https://github.com/TheGag96/CodeWrite/releases/download/v1.0.2/CodeWrite.v1.0.2.zip.
Website is gamemasterplc.com. Youtube Channel is gamemasterplc.
Website Find
Reply
« Next Oldest | Next Newest »
Pages (84): « Previous 1 ... 21 22 23 24 25 ... 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