Report:
With just the "revised" Final Beta code, I also get a completely black screen for the main menu. Additionally, it's still 30FPS. Using that 2-line code you posted along with the Final Beta code makes the main menu seemingly 60FPS, but the FPS counter jumps constantly between 60 and 30. Also, if you try to continue, it briefly loads the file select screen before immediately booting you back to the main menu. It's impossible to get past it.
The two-line code he posted was just the main 60fps code without any of the related speed fixes. It was meant to help debug my stuttering, not be used in conjunction with anything. As for the main menu being 30fps, try deleting all gecko related stuff from your Xenoblade config, save it, let Dolphin load it, then re-add the code to the config (use the final beta he posted back on page 4).
Edit: I've filed a bug report for the stuttering, since 4575 seems to have caused it with codes for a few games. We'll see where it goes. I can try to isolate which specific code it is tomorrow.
Sorry, fixed black intro. I rewrote the timers to all use the same timer address and accidentally fudged one address reference. Fixed. I use 3819 to work on my code, so no wonder I didn't notice the stuttering bug. Thanks for looking into it. If you test the code, try using the AR code with the gecko one and delete any line where the left starts with 20 or 22 in gecko, then delete 04 for a second test. 04 changes memory directly (which is sometimes game code). 20/22 is an IF statement. All the rest rewrite game code.
I can't test Dolphin anymore today, but as for the maths again - when you say you were thinking you don't need to worry about negatives in the difference, do you mean negative sin values, or negative angles because they have the same sin values as their positive counterparts? If it's the latter, that's incorrect; the sin of 90 is 1, but the sin of -90 is -1. If it's the former, that just seems bizarre to me; it'd cap the largest possible difference at 90. Wouldn't that also limit the possible rotation each frame, since it can only rotate 90 in either direction? While I have 0 experience with animations, I can't imagine that being right.
Edit:
I've tried replacing the codehandler as a workaround for the stutter, to fantastic results. The game is pretty much locked at 60fps. However, I am still interested in pegging down which code(s) is causing the stutter, in order to help debug what the new codehandler's doing wrong in the first place. So, I've tried doing the 2 tests you mentioned, and they didn't fix the stutter. Removing all 04 lines may have reduced it, but I'd need to do more thorough testing to be sure. If that's the case, there could be multiple lines causing the stutter.
It could just be the code handler itself, try one line that's 00000000 00000000 or E0000000 80008000
I'm away from my computer right now, but I can tell you that plenty of other codes work just fine, and the two line code you posted before works fine as well. If the codehandler stuttered with every code, people would've noticed.
Edit: just to be clear, it's definitely something wrong with the code handler (or how dolphin handles it). It's only affecting a small number of codes, though.
So, some actual bug reports (mostly nitpicks, I'll admit):
-the last few seconds of movie-class scenes are very choppy, around 15fps by my eyes. however, the frame counter still says 30, and they play at full speed
-the skip scene menu in movies responds at half speed
-in the X menu, when holding the left/right, it goes through the options at double speed
-in the party affinity chart, the animations for the icons representing affinity (the smileys) play at double speed
I spent today updating the Japanese code. It should be caught up.
Thanks for the bug reports!
-One way to check movie scene choppiness is to use frame advance, to advance 1 frame at a time, and see if the animations change each frame. I'll look into it.
-Hmm since I have to slow down menu stuff, maybe nothing to be done for that.
-I'm not sure what the X menu is referring to.
-Good eye on the smileys --fixed
-Using frame advance, nothing moves every 3rd-4th frame once it kicks in. Definitely more than 15fps, but the irregular nature of it makes it more noticeable, I think.
-It's not a big deal, honestly. If menus can't be sped up during switches to 30fps, that's fine - and probably more work than it's worth anyway.
-I didn't know what else to call it, but I'm referring to the menu that pops up when you hit 'X' during regular gameplay if you're using the classic controller. Just saying menu felt too generic. Come to think of it, it probably affects art selection as well, though I haven't looked for it. /edit: It does.
-I'm also having a really hard time (like, possibly 0% success rate) getting perfect responses from B-prompts. I haven't gotten it once on burst affinity (the prompts that have a chance of coming up after someone crits/evades), even though I swear I'm pressing it at the right time. AFAIK, this is the only b-prompt that has a sure-fire way of telling you got it perfect, as it'll reward 3 hearts of affinity instead of 1. I'll have to try to get a save state right before one and frame advance it to be sure.
Thanks for looking into the B Prompt. If you can find which frame(s) give you a perfect, I could check the code. It's possible the amount a frames that equal a perfect have been halved.