Codes
WiiRd forum
May 12, 2024, 11:13:35 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome on the new server

Update 4.3 - do NOT update!
Gecko 1.9.3.1
Should I get a USB Gecko, I wanna hack?
How do I use my USB Gecko
Where can I get WiiRd?
 
   Home   CODE DATABASE GAMEHACKING Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Gecko.Net Latency Timer code  (Read 1883 times)
Nuke
Hacker
Hero Member
*****

Karma: 53
Posts: 661


« on: September 17, 2010, 03:23:10 AM »

The below code will help smooth things out a little, It also prevents any USB Suspend happening on the device (Keeps connection alive).

It will need to be inserted in the 'public bool Connect()' method, and a DLL wrapper will need to be made. (link will know what I mean here).
Code:
byte LatencyTimer = 2;

ftStatus = PFTDI.SetLatency(LatencyTimer);
if (ftStatus != FT_STATUS.FT_OK)
{
    Disconnect();
    throw new EUSBGeckoException(EUSBErrorCode.FTDITimeoutSetError);
}
Logged

0xFFFFFFuuuuuuu
Deathwolf
Hacker
Legendary Member
*****

Karma: 62
Posts: 1795


WWW
« Reply #1 on: September 17, 2010, 01:02:17 PM »

Nuke?  shocked
Logged

lolz
Link
that dev there
Moderator
Hero Member
*****

Karma: 76
Posts: 1254

I hate everyone in this community. Except for you!


WWW
« Reply #2 on: September 17, 2010, 02:44:34 PM »

I guessed he would post.. he contacted me before and well.. believe me I did perform IP checks and everything compared to old IP and really came to the end that I was not fooled!
Logged

Nuke
Hacker
Hero Member
*****

Karma: 53
Posts: 661


« Reply #3 on: September 17, 2010, 04:15:58 PM »

Nuke?  shocked
I was thinking the same thing. I know this has nothing to do with this topic, but welcome back Nuke!  Smiley

Thank you.
Logged

0xFFFFFFuuuuuuu
dcx2
Computer Engineer
Moderator
Legendary Member
*****

Karma: 165
Posts: 3468


WWW
« Reply #4 on: September 17, 2010, 05:11:28 PM »

*blinks*

*rubs eyes*

*looks at screen again*

Hey, cool.

Back on topic...I'll add the latency code to the Connect() method in the next release.  There are several places in the code where we manually sleep for about 100 ms, because otherwise it seems that the communication with the USB Gecko would fail.

Unfortunately for the mono version, I have been requested to switch away from the FTDI library because it wants to open the USB Gecko as root and the udev rules are a massive headache.

Though I'm still not sure why you say that there's a need for a DLL.  I mean, sure, the dllimport tag makes it trivial to use in C#, but it just seems like it would add unnecessary complexity, and I can't think of any other applications right now besides WiiRDGUI that might use such a library.
Logged

hetoan2
Moderator
Legendary Member
*****

Karma: 348
Posts: 2279


I hack WiFi, but I don't cheat on WiFi ;)


WWW
« Reply #5 on: September 17, 2010, 07:44:23 PM »

I love you nuke please stay this time D:
Logged



Check out my site with codes obviously...
http://hetoan2.com/

and youtube...
http://youtube.com/hetoan2
Link
that dev there
Moderator
Hero Member
*****

Karma: 76
Posts: 1254

I hate everyone in this community. Except for you!


WWW
« Reply #6 on: September 17, 2010, 10:00:58 PM »

Officially I started using a FTDI .NET wrapper DLL.. later on I switched to DllImport - I haven't looked too deep yet, however the function needed should be the SetLatencyTimer in the ftd2xx.dll .
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!