• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Development Discussion v
« Previous 1 ... 47 48 49 50 51 ... 115 Next »

Code bug report (based on 3.0-863)
View New Posts | View Today's Posts

Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Code bug report (based on 3.0-863)
12-01-2012, 10:54 PM
#1
konpie
Unregistered
 
I try optimize source code for experimental from 2 years ago, but I found some bug in code, again. Someone dolphin developer, please check.

================================
[1] Lucid bug (as logic)
================================
(1) BPWritten() in BPStructs.cpp:
Line 342,349,353 might delete as well.
if (!GetConfig(CONFIG_DISABLEFOG))
Because fix toggle fog at GraphicsConfigurarion and press OSDkey'6' in playing game.
--------------------------------
(2) VertexShaderManager::SetConstants() in VertexShaderManager.cpp:
Line 210 insert to:
nPostTransformMatricesChanged[0] = nPostTransformMatricesChanged[1] = -1;
--------------------------------
(3) Interpreter:Confusedtswx() in Interpreter_LoadStore.cpp:
Line 793 insert to:
r &= 31;
--------------------------------
(4) Line 381 in AudioInterface.cpp:
pcm_r = (pcm_r * lvolume >> 8) + (int)(*_pDestBuffer);
Replace to:
pcm_r = (pcm_r * rvolume >> 8) + (int)(*_pDestBuffer);
--------------------------------
(5) Jit64::twx() in Jit_Integer.cpp:
Line 2163 and 2165 is inverse. But bug yet, Line 2163 is CMP(mem, mem);....
--------------------------------
*** Basicaly I report 'single line bug' only. Because who have found these bugs, fix is to same. (I don't report 'GUI bug' and 'newer bug' and 'multiline bug or bug related multifile'. Previous reports is the same too.)

================================
[2] More better code
================================
(1) Line 255 in Jit_FloatingPoint.cpp:
fpr.BindToRegister(b, true);
Replace to:
fpr.BindToRegister(b, true, false);

================================
[3] Might solve bug (much more important!)
================================
(1) FlushToZeroAsFloat() Line 82 in MathUtil.h:
if ((x.i & DOUBLE_EXP) < 0x3800000000000000ULL)
I think, this code is not correct.
if ((x.i & DOUBLE_EXP) <= 0x3800000000000000ULL)
Probably this is correct.
(Reference 'If the exponent is not greater than 896, this conversion requires denormalization.' in IBM's manual)
I think, DAZ range is '-FLT_MIN < d < FLT_MIN'. (FLT_MIN = 1.175494351e-38F(0x3810000000000000ULL))
Ideal for code is:
if ((x.i & DOUBLE_EXP) < 0x3810000000000000ULL)
If it is correct, also need modify to Line 1544 or 1545 in IR_X86.cpp.(but unused)

================================
This report is created based on 'dolphin 3.0-863'.
If I found anothor bug, report again. (If it's not too much trouble.)
If you have question or impressions, please reply to this by 'easy english'.
But I may not be able to write a reply with poor english.
Sorry, my bad english from japan.
Reply
12-01-2012, 11:29 PM
#2
neobrain Offline
"Wow, I made my code 1000x faster! That means I can make it 2048x slower now!"
**********
Developers (Some Administrators and Super Moderators)
Posts: 3,209
Threads: 50
Joined: Jun 2009
Thanks, I fixed the VertexShaderManager.cpp issue in revision bed260a. The BPStructs.cpp thing is valid too, but I'll commit that another time.
My blog
Me on Twitter
My wishlist on Amazon.de
Find
Reply
« Next Oldest | Next Newest »


  • 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