Emulator Issues #3097
closedBad collision checking using JTIL Recompiler
0%
Description
New Super Mario Brothers is broken in SVN6118 when using the experimental JITIL recompiler. Jumping near the blocks leads to instant death (i.e. just few steps into the world 1-1 jump up next to the blocks).
Updated by BhaaL over 14 years ago
- Status changed from New to Accepted
Doesn't matter why he uses it, its clearly a bug.
I don't have NSMB tho, so I can't test it.
Were there any revisions where this worked?
Updated by samljer over 14 years ago
This is also an issue in R6115 while using JitIL
@ WC-PREDA
Who cares why he uses it brah, its a bug and he reported it.
Personally i use JitIL whenever possible, as it seems a lot faster
some games just +1 fps, while others 5-10fps thats a big deal.
One day i imagine with its much better speed, the devs would "i assume"
make it the primary CPU core of choice. but for now, people need to keep those
bug reports comming, ++meyerpr
Updated by dok.slade over 14 years ago
I don't have NSMB, so I can't test it but I think there is a bug in instruction mtcrf.
The CR fields seem to be reversed (and I already had collision problems while modifying CR instructions).
In JitIL_SystemRegisters.cpp (line 151), I think it should be replaced with:
if (inst.CRM & (0x80 >> i))
Updated by samljer over 14 years ago
I Did your suggestion dok.slade
to attempt to fix collision errors in JitIL
replacing line 151 as:
// if (inst.CRM & (1 << i)) /* Attempt to fix collision error in JitIL */
if (inst.CRM & (0x80 >> i))
It didnt work. In fact the game played as if I made no changes at all.
Sorry brah.
Updated by frango0010 over 14 years ago
"Who cares why he uses it brah, its a bug and he reported it.
Personally i use JitIL whenever possible, as it seems a lot faster
some games just +1 fps, while others 5-10fps thats a big deal.
One day i imagine with its much better speed, the devs would "i assume"
make it the primary CPU core of choice. but for now, people need to keep those
bug reports comming, ++meyerpr"
And I wonder why in hell my JIT is faster than JITIL while everybody keeps saying "Oh, JiTIL is SOOOOO much faster..." On SMG I get 110 FPS on domes with JiT, while I get about 65FPS with JiTIL... And I lose about 3-4 FPS on the observatory... Maybe JitIL works better with Intel, I don't know, but it surely don't work fine with my Phenom 8650 ¬¬
Updated by BhaaL over 14 years ago
dok.slade: thanks for the pointer, gonna take a look; maybe I'll find something while reviewing it.
frango: JitIL optimizes the code before actually Jitting anything to native x86 asm, so it has the potential of producing faster code.
Heavily depends on the game, how it uses instructions, and of-course in the end on your CPU - some CPUs benefit from the instruction reordering and optimizing, while others simply don't care/are fast enough not to notice anything.
Updated by samljer over 14 years ago
And I wonder why in hell my JIT is faster than JITIL while everybody keeps saying "Oh, JiTIL is SOOOOO much faster..." On SMG I get 110 FPS on domes with JiT, while I get about 65FPS with JiTIL... And I lose about 3-4 FPS on the observatory... Maybe JitIL works better with Intel, I don't know, but it surely don't work fine with my Phenom 8650 ¬¬
Works faster for me
and i too have a phenom2 920 quad lol
stop guessing.
Updated by BhaaL over 14 years ago
Seems we keep getting more reports of that, did something recently break it?
r6115 and r6111 might be good candidates to test.
Updated by nodchip over 14 years ago
I don't have NSMBW. I think we need more reports, too.
Updated by giaga7 over 14 years ago
For me jit works faster than jitil... 54 fps in observatory jit and 48 in jitil! I've a intel quad q9550
Updated by BhaaL over 14 years ago
This is not a discussion on whether Jit or JitIL is faster; only comment if you have something to contribute.
Updated by bill123x over 14 years ago
Sample of the NSMBW issue
http://www.youtube.com/watch?v=jIzVTapof0k
I've also encountered the issue in MP2 trilogy version, sometimes when opening the door to a room, you'll automatically pickup all the expansions, or you can pickup an item by scanning it from across the room, other times you'll get hit to death by enemies that are nowhere near you, etc.
The issue first occurs in r6110, and every build since then, r6109 works as it should.
Updated by MofoMan2000 over 14 years ago
That's strange, since the changes in r6110 were allegedly "ported" from existing JIT64 instructions... at least we know which revision caused it.
Off topic: JIT is slightly faster on my core 2 duo, 8800GT winXP x86...
Updated by nodchip over 14 years ago
I committed r6130 to check the bug. The detail about the commit is described in the commit log. Please test it. If it does not work well, I will revert r6110.
Updated by bill123x over 14 years ago
I just tested r6130 with NSMBW, the issue is still there.
Another example also caused by r6110 in MP2
http://www.youtube.com/watch?v=T1gK0TdVgIk
Instead of staying in morphball form on the track, you turn into your normal
form, but rolled up, it should be noted you can't use bombs on the track while in that shape.
Updated by nodchip over 14 years ago
bill123x: Thank you for reporting. I partially reverted the code to r6110. If it does not work well, I will completely revert to r6110.
Updated by bill123x over 14 years ago
It seems the partial revert fixed it, NSMBW and MP2 seem to be working properly.
Updated by nodchip over 14 years ago
- Status changed from Accepted to Fixed
bill123x: Thank you for the reporting. If I get NSMBW or MP2 in the future, I will investigate the bug.
Updated by bill123x over 14 years ago
Well it looks like I spoke too soon, I played through a few levels in NSMBW and it worked okay. The morphball track issue in MP2 was fixed, then I went on to the power bomb guardian who throws bombs around the room, and I kept falling off the track even though the bombs were no where near me. I could even get hit while standing on the opposite side of the room, I switched back to r6109 and it worked correctly again with no issue, it seems the partial revert only partially fixed it.
Updated by meyerpr over 14 years ago
For me at least World 1-1 is working again. Thanks
Updated by bill123x over 14 years ago
Sample of Power Bomb Guardian (r6133)
http://www.youtube.com/watch?v=NGTqJcW1h5k
This is how it should be in r6109
http://www.youtube.com/watch?v=bI0tZ2RV4Ps
In r6133 it doesn't matter how far you are from the explosion, you still mysteriously keep getting hit.
Updated by nodchip over 14 years ago
bill123x: I fixed another bug in r6134 and r6135. I think it relates to the bug you reported here. Could you test both of them? If r6134 works fine, the bug is due to the wrong implementation in r6111. If both r6134 and r6135 work fine, the bug will not relate to r6110. Anyway, they were my mistakes. I'm sorry for inconveniences.
Updated by bill123x over 14 years ago
I just tested r6134, it has the same MP2 issue I last reported in r6133.
In r6135, the NSMBW issue is back, it doesn't seem like that was it.
Updated by nodchip over 14 years ago
bill123x: Thank you for the reporting. I reverted in r6137 again.
Updated by bill123x over 14 years ago
An update on this issue
I've just encountered a collision problem that traces back much earlier then r6110 to as early as r53xx.
MP2 collision issue
http://www.youtube.com/watch?v=y4g8ymBWsAQ
As you can see, as you get to the end of the hall, you start getting hit constantly.
I can even leave the room, into the save room, have the door close behind me,
and I'm still getting hit.
This issue exists with JitIL only, all the way back to revisions as early as 5398.
I still can't find the exact revision where it starts,
and as I went back to the 52xx builds, the game doesn't even start.
It should be noted this is the wii trilogy version of MP2.
Updated by nodchip over 14 years ago
bill123x: Thank you for reporting. I'm at work now. I will check it after I get home.
Updated by nodchip over 14 years ago
bill123x: I think it takes for a while to reach the scene. Because I'm bad at action games...
Updated by bill123x over 14 years ago
I can post the save file, it's for the NTSC prime trilogy R3ME01.
http://www.mediafire.com/download.php?yx1jcerk7rv9u26
The save file is the same as what you see in the video.
There's a second save file to test that's just before the power bomb guardian, it's the same save as the video.
If you're using the gamecube version, I can easily get a save for it as well.
Updated by nodchip over 14 years ago
bill123x: Thank you for posting the save file. However I'm using the gamecube version. Could you post the gamecube version?
Updated by bill123x over 14 years ago
The save file for the gc version DL-DOL-G2ME-USA
http://www.mediafire.com/download.php?zhy0rb9vrne4c6f
I wasn't sure if I'd get the same issue with the gamecube version,
but luckily it's still there. In addition the screen turns a yellow colour, so you can't see, but you can still see the red hit indication. The fps drops from 60 to around 15, but you still die pretty quickly.
Updated by nodchip over 14 years ago
bill123x: I confirmed the bug. Now I started to fix it.
Updated by nodchip over 14 years ago
bill123x: I fix the bug that the screen become yellow and the game hang in r6165. Unfortunately I don't know whether the collision bug was fixed because I don't have Wii version. Could you check it?
Updated by bill123x over 14 years ago
I just checked r6169, and it appears the collision issue is fixed,
the save file I sent works correctly now, if I find it occurring again I'll post it.
Updated by BhaaL over 14 years ago
- Status changed from Work started to Fixed
Good to hear.
Can you see if anything of Issue 3114 still applies?
Updated by bill123x over 14 years ago
I haven't seen any graphics problems related to JitIL since the changes in r6151, asides from what was related to the collision issue, which was fixed in r6165.
Updated by nodchip over 14 years ago
bill123x: Thank you for testing. I'm grad to hear that the issue was fixed.
Updated by nodchip about 14 years ago
I bought NSMBW and fixed the bad collision checking bug in r6282.