Dolphin, the GameCube and Wii emulator - Forums

Full Version: NTSC/JP Xenoblade 60fps and other mods
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
(09-08-2017, 06:06 AM)One More Try Wrote: [ -> ]Yeah, then it multiplies them together in various ways between the three values.
Ah, I see. That's not what I expected, since each of the three values seems to correspond to an axis, but I suppose if the axes are relative to the object and not the plane that would make sense.

Quote:I think rather than automatic calcs after setting it between -180, 180  we need to compare the difference and make adjustments based on it.  Like if the difference is greater than 90, but it's 88 vs -88, then just neg one. Or just check if the negative of one side makes the difference smaller -- within limits 2, -2 wouldn't want to trigger it probably...
We seem to be at about the same place now regarding this. My only problem, though, is that there should be some kind of rule governing when to neg and when not too, but it just doesn't seem to be consistent.

Quote:I saw a value over 3000 Sad   I'll need that remainder code.
I'll see what I can do about a proper one; I'd rather not have to use a loop like I have been for numbers that high.

Quote:It'll sometimes skip over our difference code entirely and intentionally load a certain value. Not sure if that's the source of any bugs.   My difference comparison code runs rather well with mostly camera glitches.
That's strange. Any idea why?
I've posted a video of what the intro currently looks like for me if you want to compare. Obviously, make sure you're viewing at 60fps.
http://www.youtube.com/watch?v=BrnW0JTZlQA
(09-08-2017, 11:10 AM)JershJopstin Wrote: [ -> ]Ah, I see. That's not what I expected, since each of the three values seems to correspond to an axis, but I suppose if the axes are relative to the object and not the plane that would make sense.

We seem to be at about the same place now regarding this. My only problem, though, is that there should be some kind of rule governing when to neg and when not too, but it just doesn't seem to be consistent.

I'll see what I can do about a proper one; I'd rather not have to use a loop like I have been for numbers that high.

That's strange. Any idea why?

I think we can get the light sword to work correctly, and since we have the memory range for its values, I've been focusing on that.  Your video looks similar to my results.

I can write a remainder code without a loop, but the problem is that it causes codewrite to output junk code at the end, so it's more of a final optimization code.

I'm not sure why it skips the difference. There's some comparison to determine it.

Rotating one value by 180 and seeing if it's near the second value seems important. Probably helps to load another float for comparisons:
0466daaX 41700000 X = 4, 8, or C and then lfs f##, X (r2) . 41700000 is a float of 15 in hex. You stick it above or below the codewrite output.
0466daa4 41700000 -> lfs f##, 4 (r2) -> f## = 15
We've basically been going through the same thought process since you realized negative angles give different sine lookups. I've been hesitant to rotate by 180, since that effectively limits the output to [-90,90], which feels too small. However, I'd also expect 4 to be about 172 degrees away from -176, based on a circle, and yet it's not. I may as well try it, I suppose.
Here's some more analysis:
f31= x = -156 vs 19
f30 = y = -47 vs -132
f29 = z = 62 vs -113

Outputs that are nearly equal:
-Sin(z)Cos(y) (output twice)
-Sin(y)

Maybe:
Cos(z)Cos(y)

I might be able to write a code that differences the outputs, but the angles themselves are saved for later too. Maybe a hybrid between saving good angle estimates and differencing the outputs.

Here's a crude rotation code, if the abs values add to 180 +/- 20. It also checks if the negative of one value is near the second value, in which case it negates one. Negatives may not line up.
Movie code: (Show Spoiler)
That works pretty well. I may try to refine the rotation calc, but I'd like to entertain another small idea I have first. What's the memory addresses for the function calls to the sine and cosine lookup tables? I can't seem to find them.
8040d608 code -> 8051d7fc mem. The psq_l after that for r5 loads the sin/cos, then I think it loads the next sin/cos values to calculate the fractions. The code might step in increments of 8 or 10 (hex). Code above 8040d680 is just getting the values and dealing with the decimals, so breakpoint at this address to see the values in f0,f1,f2. ps calculations do math on both the left and right float register at once and hold sin and cos for one value. ps instructions look complicated, but aren't much different than float instructions. http://wiibrew.org/wiki/Paired_single

Someone said there was a speed bug at the end of movies, which I forgot to look into. Going to go back to bug hunting the main code.

/edit Objects that flicker (the hand when it crashes into the ocean) or soldiers that pop onto the screen for one frame are due to it skipping our code. Haven't looked into if it can be fixed.

Final alpha/beta bug fixes. Including: Burst Hit B! prompt accuracy, selection controls for arts ect being slowed down to normal, movies lagging at the end.

I'd like to post this on the first page, but I'll wait a day in case someone wants to try it and report back. I saw no problems myself.
(09-09-2017, 04:06 PM)One More Try Wrote: [ -> ]8040d608 code -> 8051d7fc mem. The psq_l after that for r5 loads the sin/cos, then I think it loads the next sin/cos values to calculate the fractions.  The code might step in increments of 8 or 10 (hex). Code above 8040d680 is just getting the values and dealing with the decimals, so breakpoint at this address to see the values in f0,f1,f2. ps calculations do math on both the left and right float register at once and hold sin and cos for one value. ps instructions look complicated, but aren't much different than float instructions. http://wiibrew.org/wiki/Paired_single

Someone said there was a speed bug at the end of movies, which I forgot to look into. Going to go back to bug hunting the main code.

/edit Objects that flicker (the hand when it crashes into the ocean) or soldiers that pop onto the screen for one frame are due to it skipping our code. Haven't looked into if it can be fixed.

Final alpha/beta bug fixes. Including: Burst Hit B! prompt accuracy, selection controls for arts ect being slowed down to normal, movies lagging at the end.

I'd like to post this on the first page, but I'll wait a day in case someone wants to try it and report back.  I saw no problems myself.

I noticed that this new code stutters more than the old one even in Vulkan renderer, CPU Clock Override 250% and no antialiasing. In the beginning, once you are able to control Dunban and his party against the mechons it stutters every 15 seconds or so, this little inconvenience didn't happened with the older code you provided. I only tested that little bit though, I reverted back to the old code because of this inconvenience, don't know if anyone else is having that stutter.

But anyways like always, keep up the amazing work dude!
Thanks, I tend not to use the intro as a benchmark because it has more lag than normal. Could you see if a normal fight after that, with the Monado, is much worse? I can probably look into any lag issues that are past the intro.

Also, what is the last code you're referring to? Is it a final alpha code or a code in the first post?
I've found something interesting regarding angle calcs 60fps movies, but I'll need to investigate a bit more before I can put it into words here. /edit: Okay, I made a mistake and didn't find what I think I did. However, I did find something else; it's conditionally negating the sine value. Figuring out what the condition is may tell us how to correctly find the intermediate angle. /edit2: Nevermind, it seems the sine lookup table will always produce a positive result. The conditional flip just flips sine if the angle was less than 0, giving the correct value. Strangely, the cosine lookup table works perfectly fine.

@Resus: In addition to One More Try's questions, what do you mean by stutter? Dropping down below 60 but still running (and still staying above 30), or hard pauses that last half a second or so? If it's the latter, are you running a version of dolphin that's newer than 5.0-4575?
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31