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


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Support v
« Previous 1 ... 1192 1193 1194 1195 1196

XFB fix for single-core mode
View New Posts | View Today's Posts

Pages (2): 1 2 Next »
Thread Rating:
  • 3 Vote(s) - 2.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
XFB fix for single-core mode
04-22-2009, 09:50 AM (This post was last modified: 04-23-2009, 08:53 PM by Luigi__.)
#1
Luigi__ Offline
Dolphin Dev
***
Posts: 61
Threads: 6
Joined: Apr 2009
The text homebrews take forever to load without XFB enabled. XFB only worked in dual-core mode. I did a small fix that makes it work in single-core mode as well.

I modified the Video_UpdateXFB() function in the OGL plugin (main.cpp, line 321). The changed lines are prefixed with '+++'.

Code:
void Video_UpdateXFB(u8* _pXFB, u32 _dwWidth, u32 _dwHeight, s32 _dwYOffset, bool scheduling)
{
    if (g_Config.bUseXFB && XFB_isInit())
    {
        if (scheduling) // from CPU in DC without fifo&CP (some 2D homebrews)
        {
            XFB_SetUpdateArgs(_pXFB, _dwWidth, _dwHeight, _dwYOffset);
            g_XFBUpdateRequested = TRUE;
        }
        else
        {
            if (_pXFB) // from CPU in SC mode
+++            {
                XFB_Draw(_pXFB, _dwWidth, _dwHeight, _dwYOffset);
+++                g_VideoInitialize.pCopiedToXFB();
+++            }
            else // from GP in DC without fifo&CP (some 2D homebrews)
            {
                XFB_Draw();
                g_XFBUpdateRequested = FALSE;
            }
        }
    }
}

Is it right? Or has it already been tried but dropped it didn't work?

EDIT: attached a patch. I had to upload it as a text file. Rename it to 'xfb_single_core.patch' .


Attached Files
.txt   xfb_single_core.txt (Size: 409 bytes / Downloads: 259)
Find
Reply
04-22-2009, 09:57 AM
#2
LuisR14
Unregistered
 
shown better Tongue (the "[code']" bbtag shows the "[b']" bbtag as text themselves Tongue)

Quote:void Video_UpdateXFB(u8* _pXFB, u32 _dwWidth, u32 _dwHeight, s32 _dwYOffset, bool scheduling)
{
if (g_Config.bUseXFB && XFB_isInit())
{
if (scheduling) // from CPU in DC without fifo&CP (some 2D homebrews)
{
XFB_SetUpdateArgs(_pXFB, _dwWidth, _dwHeight, _dwYOffset);
g_XFBUpdateRequested = TRUE;
}
else
{
if (_pXFB) // from CPU in SC mode
{
XFB_Draw(_pXFB, _dwWidth, _dwHeight, _dwYOffset);
g_VideoInitialize.pCopiedToXFB();
}
else // from GP in DC without fifo&CP (some 2D homebrews)
{
XFB_Draw();
g_XFBUpdateRequested = FALSE;
}
}
}
}
Reply
04-22-2009, 10:06 AM (This post was last modified: 04-22-2009, 10:10 AM by Luigi__.)
#3
Luigi__ Offline
Dolphin Dev
***
Posts: 61
Threads: 6
Joined: Apr 2009
Hmm... the new parts are now boldened, but the tabs are completely lost. I'll stick to the [code] tags, but find another way to highlight the new lines.
Anyway thank you for pointing this out! Wink
Find
Reply
04-22-2009, 10:08 AM
#4
LuisR14
Unregistered
 
yea i noticed that Undecided
Reply
04-23-2009, 07:42 AM
#5
Luigi__ Offline
Dolphin Dev
***
Posts: 61
Threads: 6
Joined: Apr 2009
Code with tabs lost is harder to copy-paste. Because you have to manually add the tabs. Annoying when the code snippet is big.
Find
Reply
04-23-2009, 07:21 PM
#6
DacoTaco Offline
His royal bitchness Tacoboy
*******
Moderators
Posts: 1,134
Threads: 31
Joined: Mar 2009
OR you could just post a patch/diff file Tongue
makes it easier for us al
[Image: PeachSig.jpg]
[Image: 566286.png]
[Image: 2280403.png]
Website Find
Reply
04-23-2009, 08:21 PM
#7
Luigi__ Offline
Dolphin Dev
***
Posts: 61
Threads: 6
Joined: Apr 2009
I'm so new
I don't know how to make such files. Maybe I can make them with TortoiseSVN?
Find
Reply
04-23-2009, 08:23 PM
#8
DacoTaco Offline
His royal bitchness Tacoboy
*******
Moderators
Posts: 1,134
Threads: 31
Joined: Mar 2009
ye you can make them with tortoiseSVN Wink
right click in the folder where the adjusted file is
tortoisesvn->create patch
the rest should be logical
[Image: PeachSig.jpg]
[Image: 566286.png]
[Image: 2280403.png]
Website Find
Reply
04-23-2009, 08:53 PM
#9
Luigi__ Offline
Dolphin Dev
***
Posts: 61
Threads: 6
Joined: Apr 2009
Thank you! I just uploaded a patch.
Find
Reply
04-23-2009, 11:20 PM
#10
DacoTaco Offline
His royal bitchness Tacoboy
*******
Moderators
Posts: 1,134
Threads: 31
Joined: Mar 2009
(04-23-2009, 08:53 PM)Luigi__ Wrote: Thank you! I just uploaded a patch.
where did you upload the patch? :/
[Image: PeachSig.jpg]
[Image: 566286.png]
[Image: 2280403.png]
Website Find
Reply
« Next Oldest | Next Newest »
Pages (2): 1 2 Next »


  • 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