xboxscene.org forums

Author Topic: Dpc's (a Possible Solution Against Freezes)  (Read 154 times)

Mios∞ft

  • Archived User
  • Full Member
  • *
  • Posts: 119
Dpc's (a Possible Solution Against Freezes)
« on: June 14, 2008, 08:51:00 AM »

This MOST probably will show my STUCK project some light  love.gif  

 happy.gif
Logged

Mios∞ft

  • Archived User
  • Full Member
  • *
  • Posts: 119
Dpc's (a Possible Solution Against Freezes)
« Reply #1 on: June 23, 2008, 01:27:00 PM »

CODE

int _MainLoop()
{
   while (1)
   {
 KeInsertQueueDpc(&myDPCObject,NULL,NULL);
   }
}

Is that OK?  huh.gif
This atleast works but screen doesn't refresh so fast.... Also unstable.


When I do this, I get a blackscreen and all I see is "DPC call".
CODE


void XBoxStartup()
{
//inits
_MainLoop();
}

int _MainLoop()
{
    debugPrint(" DPC call"); //gets stuck?
 KeInsertQueueDpc(&MYDPCObject,NULL,NULL);
}

static void __stdcall MYDPC(PKDPC Dpc,
PVOID DeferredContext,
PVOID SystemArgument1,
PVOID SystemArgument2)
 {
    for (;;)
   {
///Lots and lots of code
   }
}
Logged

Mios∞ft

  • Archived User
  • Full Member
  • *
  • Posts: 119
Dpc's (a Possible Solution Against Freezes)
« Reply #2 on: June 23, 2008, 02:03:00 PM »

QUOTE(Mi©®os∞ft @ Jun 23 2008, 04:03 PM) View Post

CODE

void XBoxStartup()
{
//inits
_MainLoop();
}

int _MainLoop()
{
    debugPrint(" DPC call"); //gets stuck?
 KeInsertQueueDpc(&MYDPCObject,NULL,NULL);
}

static void __stdcall MYDPC(PKDPC Dpc,
PVOID DeferredContext,
PVOID SystemArgument1,
PVOID SystemArgument2)
 {
    for (;;)
   {
///Lots and lots of code
   }
}



Update: I removed all PB_PRINT stuff and replaced it with debugPrint.

Controller doesn't respond but I see the text printing.  sad.gif

--

Controller works when DPC is removed tho :|
Logged

openxdkman

  • Archived User
  • Hero Member
  • *
  • Posts: 550
Dpc's (a Possible Solution Against Freezes)
« Reply #3 on: June 26, 2008, 03:00:00 PM »

you don't initialize with this?
KeInitializeDpc(&MYDPCObject,&MYDPC,NULL);

also there is surely a limit, so don't enqueue an infinite number in no time
Logged