Weird, I just tried the OP code again and now it didn't happen. And yeah, with the OP code I don't get the weird lags in battle that I was getting with the beta code. Huh.
The thing is, the pause bug seems to be random... Sometimes it happens, sometimes it doesn't. My Dolphin build is 5.0-6106, will update to the latest. Also I don't think it was my computer causing these lags with the beta code, since I have a i7 6700k at 4.4 GHz
If you could try the beta code with line:
044CD248 C042CF74 //Effect fix
deleted, and report back on any changes in lag, that would help me out.
(01-04-2018, 02:10 AM)One More Try Wrote: [ -> ]If you could try the beta code with line:
044CD248 C042CF74 //Effect fix
deleted, and report back on any changes in lag, that would help me out.
Yep, the lag is gone by doing that.
(12-21-2017, 07:51 PM)One More Try Wrote: [ -> ]Heya! Not much changed with that code I posted and what I ended with before - it is after the trig lookup. I just went frame by frame with my code and didn't notice any bugs with camera switching. I would need a video or screenshot with my code running to look into it. I'm not sure about the characters, as the bug happens outside the trig calcs and angle setup area. It would either require following the code from the initial counter, which seems like an ordeal, or finding the memory for a buggy character and trying to follow read/writes for it, which may or may not work out. Also, if you haven't fiddled with Symbols, you might want to. It makes it easier to jump around the code and whatnot. Older versions (5.0-3819) lets you tag single lines of code (right click -> add function then Symbols -> save symbol map).
With the new skill effect bug, I'll probably record the intro movies and every character skill and compare with my fix, to make sure nothing is breaking. It'll take awhile to get that done.
/edit I wrote a value finder. You probably want to use it during 30fps. I'll probably find the buggy soldier memory in a few minutes with this, but not sure I can follow it to the bug.
Zeroes angles for assets between the value placed in memory at 8066da80 and 8066da84
Breakpoint 803e1a90 and look at r6 to see what asset pointers/values are being used.
For example, on the second part of the intro movies:
Something above 92793000 sets the camera values, so you want to exclude those from being zero'd, so that goes into 8066da84 to exclude everything above 92793000
Then if you put 92750000 into 8066da80, you'll break all the soldiers, helping to get closer to the values of the soldiers we want to find (the buggy ones)
8066daa0 can change the behavior from forcing zeroes to something else, like 90 degree angles. Use float values.
$movie value finder range
C23E1A90 00000006
8062FFE0 7C033040
41A10020 8062FFE4
7C033040 41A00014
3BA00000 C3E20000
C3C20000 C3A20000
7F63DB78 00000000
/edit2 Ok, I figured out the location bug. I had to crack open the game code in a text editor and do a regex for " psq_st.*qr3 ", which is how they round off the counter to see if it has a fractional component. I found each one and deleted it in game, until the game bugged out. There weren't that many to test, but I had trouble confirming what that code did until I adapted the soldier finder code to that area. In the end it's: 803e0c94 and below. The game sets asset locations here, but it's a bit tricky because it only does one value at a time and not x/y/z. I'm not even sure most things have y or z components, it seems they manage to make it 1 dimensional for many things. ANYWAY, the bug is that it appears to re-use models that have gone off-screen, by changing their location to a place they need a new model to appear. Since the code averages locations for fractional frames, the model only moves halfway to its new location, which puts it in the wrong place for one buggy frame. The fix will be to detect large variations in location and skip averaging if it is too large, and hopefully nothing moves across the screen too fast, or I'll have to do something more complex.
Buggy memory breakpoints: Range from 92753564 to 927536a8 during soldier intro movie, running from the hill to the sniping/scope part.
The other bug that I thought was easy, is more complicated. With Mechonis' fingers disappearing for a frame and also affecting stationary/dead soldiers being displayed. I don't think I need to look for where the bug occurs though.
/edit I've been back at work on the main code. Tweaking a few things. Probably be a few more days before I post a new update.
Hmm. I can't get your code to break on camera switches anymore either, so I might've just derped there. It also seems that I just so happened to pick a few buggy switches with mine, and most actually work okay. Whoops :p
That value finder code should be useful when I look at this again, since I was doing basically that process manually already lol.
As for the location bug... while different, it's still fairly similar in practice to what I described. Interpolation assumes continuous movement, so getting this working despite that should prove tricky. You seem to know this already, but the easy fix will only work if every movement that's for a model moving to act as a 'new' model is bigger than all standard movements. (Though I suppose if we can find a value that only leaves a few models breaking, exception cases could theoretically be hard-coded...)
I'm not getting anywhere on a lag-free Melia effect fix. She's unique because the effect is set when you prep the spell, not when you cast it. As far as I can tell, it assumes the effect code will run in one(?) frame and then changes the memory in a different section of code. 60fps means things take twice as many frames to run, and forcing it back to 1 frame fixes it, but lags the game. I'm not sure if it lags due to Melia's effect or many other things being affected by the fix.
I don't think it's natural lag. It could be a mismatch with the rest of the code in that section which follows 60fps values. I can't change everything though.
For movies, I don't think fixing model locations will lead to many/any bugs. There are still other 1-frame bugs that I don't know about.
/edit Instead of adding 0.5 to the skill effect counter check (was 0.0), I instead subtracted 0.5 from the counter when it is initially set. It seems to be more compatible and less laggy this way. I don't think it'll break 30fps movies, because it only counts in whole numbers and checks for less than or equal tp zero. Hoping this works out. I need to test thoroughly.
The boss battle force field is a moving texture. It's bugged to move at 1/4th the speed it should. Unlike other moving textures, it uses the global speed factor to decrease its speed for 60fps, but it gets hit with it twice, making it 0.25 speed when the moving texture code is not acting on it. Then the moving texture code halves the speed again to 0.125. It should just be 0.5. It'll take some work to figure out the correct way to fix it. I don't know if there are times it should slow down normally. I'll do that after getting the current fixes finalized and updated.
I was trying to figure out why a boss battle is so laggy, but this doesn't appear to make the lag worse.
Main Post and wiki updated with new code. Can someone test Japanese version's Melia and make sure her fire spell makes the correct effect? I can't find a save with Melia.
/edit I will start posting test fixes on the main page. The only fixes I have are for stuff most people won't even notice and there's a chance they'll break something.
/edit2 Maybe Xeno movie discussion needs it's own post. It's so extensive. Anyway, the Mechonis finger bug happens with memory breakpoint: 926fe438. A bug with a soldier running away after the snipe shot is at 92767de4. The code block starts at 803e0fd4. It loads and converts R6 and R6 + 4 to floats. One problem is that it only loads two digits of the memory value., which is something like a counter, so when it hits FF it can reset to 00 and the difference between the two cause a bug. It seems to just not be formatted right since it's for 30fps movies.
C23E1020 00000005 //First
EC0200FA EC650028
FC601A10 C0E2CEF0
ECE739FA FC033840
40A10008 FC002890
60000000 00000000
C23E0D08 00000003 //Second
EC070028 FCC00210
C122CEF0 ED29482A
FC064840 00000000
C23E0D4C 00000002 //Second
EC24007A 40A10008
C0240004 00000000
/edit May have to modify the comparisons, but these seem to mostly fix stuff. The second block of code could probably be more robust. Not sure the first one can be anything more than a difference check. I noticed these trigger quite a bit during the load screen... not sure if that impacts anything.
Brushing up on my general register maths, I think we have something better now:
(Show Spoiler)
$DEV ONLY Movie Location 2 Fix
C23E0FD4 00000006 //Mod This
80860000 80060004
80A6FFFC 7C040050
7CA52050 7C050050
3CA00020 7C002800
4080000C 3CA0FFE0
7C050000 00000000 //END
C23E1020 00000002
EC0200FA 40A10008
FC002890 00000000
$DEV ONLY Movie Location fix
C23E0CF8 00000002
ED610028 EC400024
FC020040 00000000
C23E0D08 00000007 //Mod this
EC070028 41820030
C0C4FFF8 ED073028
FD004210 FC600210
EC634028 C122CEF0
ED294A7A FC034840
40A10008 60000000
60000000 00000000 //END
C23E0D4C 00000002
EC24007A 40A10008
C0240004 00000000
This code compares the current frame, next frame, and previous frame to find buggy values. The one issue might be Location 2's code at the start of a new counter/section. Probably no big deal. Can modify the comparisons to make the allowed differences wider or narrower.
The game freezes except from the sound using this code, it freezes at random moments and can even happen on loading screens. I have tried switching to the beta code but that doesn't seem to fix the issue.
I'm using 6x IR, the 4x IR bloom code, fullscreen borderless window, v-sync.
can anyone help me with this?
What beta code? I didn't post a beta. Does it freeze without the Bloom code? Are you using CPU overclock in the config menu?
(02-17-2018, 10:42 AM)One More Try Wrote: [ -> ]What beta code? I didn't post a beta. Does it freeze without the Bloom code? Are you using CPU overclock in the config menu?
(01-01-2018, 07:03 PM)One More Try Wrote: [ -> ]I had to mess with the basic timing stuff, so here's a new English beta code:
$60fps
A8000000 00000000 //Run once when apply
C206C36C 00000003 //Camera speed optional
EE81082A EE81A024
EC210532 EC000532
D00D82BC 00000000
C206C384 00000004
EC420532 EEB4A02A
EC150028 EC000532
EC150028 D04D82F4
60000000 00000000
044CD248 C042CF74 //Effect fix
04668860 42080000 //Affinity Screen Fixes
04668864 41900000
0466886C 41200000
04668868 C1200000
046684DC 42200000 //Gem Crafting Animations
046684D4 42C80000
046684D8 42700000
04666fdc 42F00000 //Condition cycle speed
04667038 42F00000
046673f0 43340000 //UI slideout
04667420 43340000
C24C1ED4 00000002 //Stairs unsticky
EC3F0024 EC2100B2
60000000 00000000
0466606c 3b23d000 //Buggy lift
04667870 43480000 //Burst B fix timing
C2181264 00000002
EC0010FA EC00182A
60000000 00000000
04666090 3F7D6A16 //Ice Slide Speed
04666098 3F400000
0466609C 3F7DD000
0412e66c 41820008 //Slow Text
C212E668 00000003
7F85E378 7F66DB78
3E608000 82731824
2C130001 00000000 //Text End
041a3dec 41820008 //Slow Cutscene Text
C21A3DE8 00000003
807F0088 7FA4EB78
3E608000 82731824
2C130001 00000000 //End
0466AB90 3F000000 //Cutscene Switch speed
C24A0838 00000002
3E808082 82949E68
2C140002 00000000
C203A52C 00000004 //Screen dimming duration
3E808082 82949E68
2C140001 3803F800
41A20008 3803F000
60000000 00000000
C24ED0AC 00000001 //Head Movement
ECC0C63A 00000000
C24EC8BC 00000001
EC40FFFA 00000000
C24ED0B4 00000001
ECA0C63A 00000000
C249A358 00000004 //Menu 60fps
3FC080CA 63DE54B4
C282CF74 7C03F000
41A20008 EC210532
83C10008 00000000
041C3904 3803FFFA
041C38EC 2800001A
041C3890 2800001A
041C38A8 3803FFFA
046687A0 41A00000
046687A8 40666667
04668890 42080000
04668894 41900000 //Menu End
C24497D4 00000002 //Select art controls
7D084214 7CE83A14
60000000 00000000
C24497FC 00000002
7D084214 7CE83850
60000000 00000000
C2449844 00000002
7D084214 7C083800
60000000 00000000 //Controls End
C20BAD8C 00000003 //Grass double value if fraction
EEA1082A FE810878
FC34A86E C01F2F48
60000000 00000000
C23DFE1C 00000003 //Moving Texture
1C00000C D022FFFC
F0223FF8 E0223FF8
60000000 00000000
C23DFEBC 00000002
C043000C C022FFFC
60000000 00000000
C23E5B54 00000004
C02D9BE0 3D808082
818C9E68 2C0C0002
4182000C C062CF74
EC230072 00000000
C23E5128 00000004
C02D9BE0 3D808082
818C9E68 2C0C0002
4182000C C062CF74
EC230072 00000000
C23E8AEC 00000004
C02D9BE0 3D808082
818C9E68 2C0C0002
4182000C C062CF74
EC230072 00000000
C23DFEB4 00000012
C062FFFC FC030840
C0230004 41820080
C0630000 C043000C
EC621828 C042C010
C0A2CF74 FC021840
41A20038 C023FFF8
C0630004 FC801A10
FC000A10 FC040040
41A10014 FC801050
FC8120AE EC64182A
4BFFFFE4 EC230828
EC25187A 48000030
C0630010 FC801A10
FC000A10 FC040040
41A10014 FC801050
FC8120AE EC64182A
4BFFFFE4 EC43082A
EC220172 00000000
C244B714 00000011 //Timer FPS Multi
3E808000 62941824 //Gr1824
80140000 68000001 //Extra Speed Multi
90140000 3E808066
82944268 2C140000
38000001 3CA03F00
41A20028 3E808066
82943E18 3C008082
6000CB00 7C140000
38000001 41A2000C
38000002 3CA03F80
3E808082 90149E68
3EA080CA 801554C0
2C000000 41820020
3EC08066 80163D24
2C000001 40A20008
3CA03F80 90B554C0
38630001 00000000
C216ADC4 00000005 //Timer mods using Gr1824
3E808082 82949E68 //skip if movie
2C140002 3A800001
4182000C 3E808000
82941824 7C04A214
60000000 00000000
C216ADCC 00000001
7C03A214 00000000
C21669CC 00000002 //Not Skipped
C242CF74 EC0004B2
D01E01E8 00000000
60000000 00000000 //End Timer
C249A374 00000005 //Speed Multi
FC019840 41820018
3E808082 82B49E68
2C150002 41820008
C022CF74 D023000C
60000000 00000000
C216AD8C 00000004 //Intro Only
3E808082 82949E68
C0229BCC 2C140002
41820008 C022CF74
60000000 00000000
C2137DE8 00000002 //UI Speeds Half
C002CF74 EC210032
C0030010 00000000
C205C414 00000002 //Climb Fix
C3E2CF74 EC01EFFA
60000000 00000000
C244B460 00000001 //Run Speed
38000002 00000000
22CA54C0 00000000 //Check once
04CA54C0 3F000000 //60 fps speed
E0000000 80008000
$60fps
A8000000 00000000 //Run once
C206b914 00000003 //Camera speed optional
C282CF6C EC210532
EC000532 D00D82B4
60000000 00000000
C206b92c 00000004
EC420532 EEB4A02A
EC150028 EC000532
EC150028 D04D82EC
60000000 00000000
044c8e74 C022CF6C //Melia skill effects
0466B114 41900000 //Affinity screen fixes
0466B110 42080000
0466B11C 41200000
0466B118 C1200000
0466AD9C 42200000 //Gem crafting speed
0466AD98 42700000
0466AD94 42C80000
04669900 42F00000 //Condition Cycle Display Enemy
046698A4 42F00000 //Player
04669CB0 43340000 //UI Slideout
04669CE0 43340000
C24bdd78 00000002 //Stairs unsticky
EC3F0024 EC2100B2
60000000 00000000
046688FC 3b23d000 //Lift bug fix
0466a130 43480000 //Burst fix
C2181264 00000002
EC0010FA EC00182A
60000000 00000000
04668928 3F400000 //Ice Slide
0466892C 3F7DD000
04668920 3F7D6A16
0412DB9C 41820008 //Regular text
C212DB98 00000003
7F85E378 7F66DB78
3E608000 82731824
2C130001 00000000
041a26cc 41820008 //Cutscene text
C21A26C8 00000003
807F0088 7FA4EB78
3E608000 82731824
2C130001 00000000
C203A164 00000004 //Scene switch timer
3E808093 8294FE68
2C140001 41A2000C
3404F000 48000008
3404F800 00000000
C249C72C 00000004 //Dimming when 60fps
3E808094 8294FE68
2C140002 41820008
7C842214 548C402E
60000000 00000000
C2446E3C 00000002 //Select art controls
7D084214 7CE83A14
60000000 00000000
C2446E64 00000002
7D084214 7CE83850
60000000 00000000
C2446EAC 00000002
7D084214 7C083800
60000000 00000000
041c1f40 3803FFFA //Controls menu
041c1f28 2800001A
041c1ecc 2800001A
041c1ee4 3803FFFA
0466b050 41A00000
0466b058 40666667
0466b140 42080000
0466b144 41900000
C24E8BF0 00000001 //Head Rotate Anims
ECC0C63A 00000000
C24E8BF4 00000001
ECA2C63A 00000000
C24E8410 00000001
EC40FFFA 00000000
C23ddab8 00000003 //Moving textures
1C00000C D022FFFC
F0223FF8 E0223FF8
60000000 00000000
C23ddb58 00000002
C043000C C022FFFC
60000000 00000000
C23E37F0 00000004 //MoveTex counters
C02D9C10 3D808094
818CFE68 2C0C0002
4182000C C062CF6C
EC230072 00000000
C23E6788 00000004
C02D9C10 3D808094
818CFE68 2C0C0002
4182000C C062CF6C
EC230072 00000000
C23e2dc4 00000004
C02D9C10 3D808094
818CFE68 2C0C0002
4182000C C062CF6C
EC230072 00000000
C23DDB50 00000012 //MoveTex interpolate
C062FFFC FC030840
C0230004 41820080
C0630000 C043000C
EC621828 C042BF38
C0A2CF6C FC021840
41A20038 C023FFF8
C0630004 FC801A10
FC000A10 FC040040
41A10014 FC801050
FC8120AE EC64182A
4BFFFFE4 EC230828
EC25187A 48000030
C0630010 FC801A10
FC000A10 FC040040
41A10014 FC801050
FC8120AE EC64182A
4BFFFFE4 EC43082A
EC220172 00000000
C2165830 00000002 //Intro screen timing
C242CF6C EC0004B2
D01E01E8 00000000
C249628C 00000005 //Other Speeds
C0230008 9262FFFC
3E6080DC 6273B4B4
7C039800 41A2000C
C282CF6C EC210532
8262FFFC 00000000
C2169B5C 00000005 //Timers and skip when 30fps
3E808094 8294FE68
2C140002 3A800001
4182000C 3E808000
82941824 7C04A214
60000000 00000000
C2169B64 00000001
7C03A214 00000000
C2448CA4 00000011 //Timer FPS multi
3E808000 62941824 //Gr1824
80140000 68000001 //Extra speed multi
90140000 3E808066
82946B58 2C140000
38000001 3CA03F00
41A20028 3E808066
82946720 3C008095
600029A8 7C140000
38000001 41A2000C
38000002 3CA03F80
3E808094 9014FE68
3EA080DD 8015B4C0
2C000000 41820020
3EC08066 82D66624
2C140001 40A20008
3CA03F80 90B5B4C0
38630001 00000000
C2496298 00000005 //Speed Multi
FC019840 41820018
3EA08094 82B5FE68
2C150002 41820008
C022CF6C D023000C
60000000 00000000
C2169B24 00000004 //Intro timers
3E808094 8294FE68
C022CF6C 2C140001
41A20008 C0229BAC
60000000 00000000
C20ba46c 00000003 //Grass double up value if fraction
EEA1082A FE810878
FC34A86E C01F2F48
60000000 00000000
C213746C 00000002 //UI speeds half
C002CF6C EC210032
C0030010 00000000
C205BDCC 00000002 //Climb fix
EC1DE82A EFBD0024
EC01E82A 00000000
22DCB4C0 00000000
04DCB4C0 3F000000
E0000000 80008000
*一度コードを走らせたら、効率がよくなるためにコードを無効にしても良い。ツールのチートマネージャーを使う。
**バトル中のスローダウンを減らすために設定の高度な設定のCPU Clock Overrideを利用して110%ぐらいにする必要があるかもしれない。
Changes: Melia skill effect fix. Loading screens use 30fps speed multi to fix some bugs. Movies use 30fps speed multi. Possible bugs: wrong speed multi during gameplay.
/edit Not enough speed checks. More have been added. The trouble is that the code that writes the speed values doesn't t run often enough, but I think I got it worked out.
I'm sorry, I found that the issue wasn't the code itself but using the code with a modded version of xenoblade, using the mod in this thread
https://forums.dolphin-emu.org/Thread-xenoblade-chronicles-hd-expansion-pack and the 60 fps code together made the random freezes happen.
also quoted the comment where you posted a beta code.