WiiRd forum

USB Gecko Related => USB Gecko Dev => Topic started by: Link on August 06, 2009, 06:42:16 PM

Title: C# USB Gecko handler
Post by: Link on August 06, 2009, 06:42:16 PM
It's done:

http://l0nk.org/GeckoHandler.zip (http://l0nk.org/GeckoHandler.zip)

contains:
-Gecko interface to handle all communcation between PC and Wii - this is a port of the Delphi interface which is used by the WiiRD console. It is completely compatible and not better or worse. WiiRD implements it, that's what you need to do, I do not provide example code (yet)!
-documentation which contains some code snippets for examples! But again: no runnable application!

requires:
-FTDI .NET wrapper at http://www.ftdichip.com/Projects/CodeExamples/CSharp.htm (http://www.ftdichip.com/Projects/CodeExamples/CSharp.htm)
Title: Re: C# USB Gecko handler
Post by: Romaap on August 06, 2009, 06:57:17 PM
Thanks.
I don't think I'll be able to make anything productive but i'll look into it :D
Title: Re: C# USB Gecko handler
Post by: Panda On Smack on August 07, 2009, 09:55:21 AM
Thanks Link
Title: Re: C# USB Gecko handler
Post by: giantpune on October 30, 2009, 09:06:07 AM
has anything been made of this yet?  i'd like to see a new and improved version of wiird that uses this.
Title: Re: C# USB Gecko handler
Post by: Link on October 30, 2009, 04:46:42 PM
Quote from: giantpune on October 30, 2009, 09:06:07 AM
has anything been made of this yet?  i'd like to see a new and improved version of wiird that uses this.

Write it.. all functionality of WiiRd is in that little file! I developed it for that.. and it's very unlikely I write it! It has a documentation, it has commented code and I spent hours of porting that because so many people requested it.. to all who still read this: I am utterly depressed how I wasted my time! Sorry to say this! I spent like 50 hours of that piece of code!

I never expected anyone to write a WiiRd copy.. however: I would have been happy myself to just see some use.. even if people just use the code for a simple search tool or something else simple.. no need to reinvent the wheel. Just to show: hey guys, I used it. Nothing to be emberrassed about. But that way.. seeing how nobody seemed to use it..
Title: Re: C# USB Gecko handler
Post by: Panda On Smack on October 30, 2009, 05:46:59 PM
Aww man

This is dedicated to you Link:

(http://img524.imageshack.us/img524/6416/linkf.gif)

When I get more things working i will upload a file, just dumps as per your demo in the txt file


USBGecko gecko = new USBGecko();
gecko.Connect();
FileStream save = new FileStream("data.bin",FileMode.OpenOrCreate);
gecko.Dump(0x80000000,0x80400000,save);
save.Close();
gecko.Disconnect();
Title: Re: C# USB Gecko handler
Post by: Link on October 30, 2009, 06:17:59 PM
Epic.. now it just doesn't respect the contents of the "To" and "From" boxes ;)
Title: Re: C# USB Gecko handler
Post by: Panda On Smack on October 30, 2009, 07:11:06 PM
Heh, took me ages to realise this:

UInt32 From = Convert.ToUInt32(textBox1.Text, 16);

What's the deal in packaging the DLL along with the exe?

http://rapidshare.com/files/300212061/Link.rar.html

Needs the FTD2XX_NET.dll file to be in the same folder. Wasn't sure if I can redistribute this?

It's built in Visual Studio 2008. Version 3.5 of .NET

(http://img402.imageshack.us/img402/3840/link2.gif)

Got lots of questions but initially how do I use chunkUpdate? I don't understand where to get the data from to pass to it. Is something happening when I call gecko.Dump for me to tap into and read?
Title: Re: C# USB Gecko handler
Post by: Link on October 31, 2009, 03:06:56 PM
Quote from: Panda On Smack on October 30, 2009, 07:11:06 PM
Got lots of questions but initially how do I use chunkUpdate? I don't understand where to get the data from to pass to it. Is something happening when I call gecko.Dump for me to tap into and read?

chunkUpdate is used like a button event or so.. you click the button and the click event gets fired. During dumping the chunkUpdate event is fired to keep you up to date how far the dump has processed.

You create a function called:

void update(UInt32 currentchunk, UInt32 allchunks, UInt32 transferred, UInt32 length, bool fail);

then you connect that function to your USBGecko object.
gecko.chunkUpdate = update;

Now whenever the USBGecko receives new data it will fire the update function.

The parameters are as follows:

currentChunk = a dump or upload is seperated into packets (chunks). This is the number of the package it just transferred!
allchunks = how many packets are to be expected
transferred = how many bytes have already been transferred
length = How many bytes are gonna be transferred totally
fail = False if the last attempted package it tried to transfer failed - after 3 fails it will give up (WiiRd for example shows a / on the console when a package transfer fails..)
     = True if the last attempted package transferred correctly (WiiRd shows a . )
Title: Re: C# USB Gecko handler
Post by: Link on October 31, 2009, 03:18:26 PM
And self-reply:

I also now for demonstration uploaded another Gecko demonstration application:
http://l0nk.org/GCTSend.7z

That one sends code data! It is kinda unfinished (drag & drop of codes does not fully work) but it's good for demonstration. What it does? Simply type in codes (it can't save) and send them to the console. It will create a cheat stream which is sent to the Gecko.

I should note it has the most user friendly code input ever :p you can type in whatever you like in the code field. It will parse the input string and extract digits and A-F - all other characters are ignored - if the parsed string is a multiple of 16 it accepts it!
Title: Re: C# USB Gecko handler
Post by: Panda On Smack on October 31, 2009, 08:21:26 PM
Cheers mate

I hope to have the time to create something that can do as much as WiiRd but short term will try and get all the main things done

Bit of a learning curve
Title: Re: C# USB Gecko handler
Post by: Link on October 31, 2009, 09:23:12 PM
Yeah, that's one of the reasons I made up that cheat code generator.. it's a little more complicated but gives people the idea how it could be used!
Title: Re: C# USB Gecko handler
Post by: Romaap on November 01, 2009, 02:06:05 PM
What a coincidence, I've been trying to make a WiiRDGUI replacement too in C#.
But the only downside is that i can't get it to search fast enough :(
But I have a "watchlist" :)
The update speed of the watchlist is customizable. :D

I will upload a "beta version" when i get that stupid search faster, it works but it takes really long when you have a lot of results.

[spoiler]
(http://i108.photobucket.com/albums/n31/Romaap/Search.png)

(http://i108.photobucket.com/albums/n31/Romaap/Watchlist.png)[/spoiler]

I have just one question, how does WiiRDGUI search?
Title: Re: C# USB Gecko handler
Post by: Link on November 01, 2009, 03:05:29 PM
WiiRd GUI does a normally search by loading all dumps into a memory stream.. the main speed aspect is: kenobi is an assembly programmer and such.. and this is how his programs look like.. he does very basic operations very close to CPU and he certainly never heard of oop which C# enforces. And thus, as his code gets additionally directly translated to x86 assembly and .NET "only" to IL which runs in interpreted mode there is another speed reason there
Title: Re: C# USB Gecko handler
Post by: Link on November 06, 2009, 06:34:47 PM
Again a self-reply..

I was also working on a kinda concept of a .NET GUI.. which is supposed to be a kinda copy of WiiRd GUI.. of course as I spent 4 days on it so far (4 week days where I had to work besides additionally) it isn't even a shadow of WiiRd GUI.. still it shows the direction we might be heading.

[spoiler](http://l0nk.org/geckodotnet1.png)
(http://l0nk.org/geckodotnet2.png)[/spoiler]

@Romaap: I'd happily exchange information with you if you plan to continue your work - if you have IMs or so, PM me with details ^^
Title: Re: C# USB Gecko handler
Post by: Panda On Smack on November 06, 2009, 06:40:21 PM
Awesome

I'm interested in how it all works as well Link
Title: Re: C# USB Gecko handler
Post by: Romaap on November 06, 2009, 11:34:20 PM
oh.... Link, yours already looks far more superior to mine. (But mine has watchlist and displays the game id :) ).
I haven't had the time to really work on it last week because of a big school project, the searching speeded up a lot (except when searching for 0) but it can't do a second search :-\.
I'll PM you about my details :P.
Title: Re: C# USB Gecko handler
Post by: giantpune on November 07, 2009, 04:11:55 AM
wow.  thats looking nice link.  i think that the .NET version will automatically fix some of the GUI bugs from the current version (have to left-click before certain right-click works right).  how is your dumping speed compared to the delphi version?

also, since this is still being worked on, I hope I can make a small request.  currently wiird takes full control of the gecko driver.  i think beside your "reconnect" button there should be a "disconnect" button.  so it will allow temporary use of the gecko for other apps without having to close wiird and lose all current information.

anyways, keep it up.  i cant wait to see this puppy in action.
Title: Re: C# USB Gecko handler
Post by: Link on November 07, 2009, 06:33:00 AM
Quote from: giantpune on November 07, 2009, 04:11:55 AM
wow.  thats looking nice link.  i think that the .NET version will automatically fix some of the GUI bugs from the current version (have to left-click before certain right-click works right).  how is your dumping speed compared to the delphi version?

also, since this is still being worked on, I hope I can make a small request.  currently wiird takes full control of the gecko driver.  i think beside your "reconnect" button there should be a "disconnect" button.  so it will allow temporary use of the gecko for other apps without having to close wiird and lose all current information.

anyways, keep it up.  i cant wait to see this puppy in action.

Admittedly most of the errors are not really kenobi's fault. WiiRd GUI was originally developed in Delphi 6 and was ported to Delphi 2006. It is based on GCNrd GUI and GCNrd GUI originally was only for Windows 98 and ME. Windows 2000 support is already kinda hacked in at certain places if you look at its code.. Windows XP uses the same Windows 2000 code, Windows Vista.. well again.. now I for myself have Windows 7 by now.. and yes, WiiRd GUI still works yet I can't deny multiple occasional crashes, sometimes it overloads the console because Windows Vista/7 have a new messaging concept between applications (the GUI and the console exchange information).

For speeds.. they seem pretty good to me, I didn't stop them but for initial searches they are quite fast. As it does not do that block dumping (yet?) it is however slower on refining searches. The search algorithm however is optimized and works quite fast.

A disconnect button.. hm.. interesting idea, no problem I add that one in!
Title: Re: C# USB Gecko handler
Post by: Link on November 09, 2009, 05:37:21 AM
Well, zoah far, so good:

I guess I am able to release a first beta kinda.. it is still a shadow of what it's supposed to be:

http://l0nk.org/geckodn1b.zip - binaries (please use geckoDotNET.exe)
http://l0nk.org/geckodn1s.zip - source code

Screenshots:
[spoiler]
(http://l0nk.org/g.net/tab01.png)
Code search was optimized for speed.. due to the fact though that it is not blocking downloads it, it cannot reach the speed of WiiRd GUI though when it comes to refining searches!

(http://l0nk.org/g.net/tab02.png)
Memory view is fully functional it does not allow uploading yet!

(http://l0nk.org/g.net/tab03.png)
Breakpoints unfortunately have no stepping yet - changing register values however is well possible, just click them!

(http://l0nk.org/g.net/tab04.png)
Disassembler and one line assembler are functional!

(http://l0nk.org/g.net/tab05.png)
No EFB support yet, other than that fully functional and VERY fast preview code!

(http://l0nk.org/g.net/tab06.png)
Works that way so far

(http://l0nk.org/g.net/tab07.png)
no comment!
[/spoiler]

Oh, before I forget: Gecko dotNET has been compiled against .NET 2.0 - I used the lowest version possible as I tend to not manually enforcing the highest version possible unless I cannot get it to compile with a lower one. In a test it even ran on a Windows 98 Virtual Machine I had.

And yes: no console!

Planned features: FST tab, Watchlist.. for pointer search I am not quite sure if that does not belong in a seperate application.. you know: pointer search while being helpful and important should not lock up the main debugger, thus I think it is going to be a seperate application.
Title: Re: C# USB Gecko handler
Post by: Romaap on November 09, 2009, 10:52:12 PM
Thats unfair!

I spend a month to get mine working, but it still isn't finished.
And you made that in a week?!



EDIT:
I just ran it in Visual Studio and compiled it, but it gave an exception.
I don't remember what I did, but I think I was just in the GCT tab and closed Gecko dotNET (and I think I pressed the add code button).
Here is a screenshot of the exception:
[spoiler](http://i33.tinypic.com/2m3i4x2.png)[/spoiler]
Title: Re: C# USB Gecko handler
Post by: Link on November 10, 2009, 05:03:40 AM
No, you're completely correct.. there are several issues appearing randomly.. I still do not know what exactly happens about the codes.. One other issue I have fixed so far is a breakpoint issue (it was never able to hit on a following address).. for my development.. I admit one thing: I always wanted to write that.. and I develop all application concepts on paper.. and I in the end never implemented it, I have paper work of over 70 pages and that was brain storming concepts for also 2 or 3 months.

Once I have these kinda concepts I can program them in quite a short time. I actually belong to those: without ANY(!) concept I won't get anything done at all, as my head is completely unsorted.
Title: Re: C# USB Gecko handler
Post by: giantpune on November 14, 2009, 09:54:31 PM
so when you are done with this .NET version, is it safe to say it will be able to be compiled in MonoDevelope & run in linux?  I realise that the mounting of  the gecko is handled differently, but will the rest of the program work right once the connecting and reading functions are changed to the ttyUSB0.  im just trying to figure out an easy way to get a GUI for WiiRD going in ubuntu (or if there is already one can somebody link to it).
Title: Re: C# USB Gecko handler
Post by: Link on November 15, 2009, 06:55:23 AM
Quote from: giantpune on November 14, 2009, 09:54:31 PM
so when you are done with this .NET version, is it safe to say it will be able to be compiled in MonoDevelope & run in linux?  I realise that the mounting of  the gecko is handled differently, but will the rest of the program work right once the connecting and reading functions are changed to the ttyUSB0.  im just trying to figure out an easy way to get a GUI for WiiRD going in ubuntu (or if there is already one can somebody link to it).

I already tested compilation with MonoDevelop.. the Windows version compiles out of the box and runs. For Linux.. I must admit: some tests are required and some changes need to be done. To make it short.

The Windows version currently uses ftd2xx.dll (FTDI detection) and shell32.dll (detection of icons for the FST tab). I will include the items required for the FST tab in a Linux version and the Linux version will be rewritten to use libftdi.so - so you'll need to download libftdi but other than that it hopefully compiles! Just some things before hand: it will not use the VCP component in Linux (where the USB Gecko acts as a virtual COM port), it will only work in D2XX mode - Linux unfortunately does not allow both to be used, it's just a fact that D2XX is like 20 times faster. If your kernel is not configured to explicetely use VCP, the USB Gecko will run in D2XX mode by default anyway! Other than that: the Source archive of the beta I released can be downloaded.. if you have a Linux machine to test it on, I'll be happy to see if it compiles (it will not be able to run because of the missing DLLs but it would be nice to see general functionality!
Title: Re: C# USB Gecko handler
Post by: Link on November 15, 2009, 08:52:00 PM
Beta 0.2

So well:

downloads are:

http://l0nk.org/gdns.zip - source code
http://l0nk.org/gdnb.zip - binaries (work with .NET 2.0)

Shots:
[spoiler]
(http://l0nk.org/g.net/tab01.png)
(http://l0nk.org/g.net/tab02.png)
(http://l0nk.org/g.net/tab03.png)
(http://l0nk.org/g.net/tab04.png)
(http://l0nk.org/g.net/tab05.png)
(http://l0nk.org/g.net/tab06.png)
(http://l0nk.org/g.net/tab07.png)
(http://l0nk.org/g.net/tab08.png)
(http://l0nk.org/g.net/tab09.png)
(http://l0nk.org/g.net/tab10.png)
[/spoiler]

And well.. for the Linux question.. with 6 commented lines (shell32.dll access) it currently compiles on Linux.. it will have to be reconfigured though to use libftdi.so - for now: I have no idea how it will behave about the disassembler and the assembler part - those parts use external EXE files.. so while devkitpro (where the assemblers are from) exists for Linux, I need to check if I get vdappc to compile. This is the disassembler. In worst case these parts will have to be deactivated in a Linux build:

First Linux screenshot:
(http://l0nk.org/g.net/linux.png)
Title: Re: C# USB Gecko handler
Post by: hawkeye2777 on November 16, 2009, 03:39:10 AM
Quote from: Link on November 15, 2009, 08:52:00 PM
And well.. for the Linux question.. with 6 commented lines (shell32.dll access) it currently compiles on Linux.. it will have to be reconfigured though to use libftdi.so - for now: I have no idea how it will behave about the disassembler and the assembler part - those parts use external EXE files.. so while devkitpro (where the assemblers are from) exists for Linux, I need to check if I get vdappc to compile. This is the disassembler. In worst case these parts will have to be deactivated in a Linux build

With the source tar.gz provided on the WiiRd download page, I was able to compile vdappc on Ubuntu (32-bit). After compiling, it seemed like it worked alright. Here's a link to the binary I have: http://www.mediafire.com/?rgtqimntdyy

hawkeye2777@Powerhawk:~/WiiRd/asm$ ./vdappc
vdappc V1.3  (c)1998-2001 by Frank Wille
PowerPC disassembler V1.4  (c)1998-2001 by Frank Wille
Modified by Kenobi for WiiRd GUI 26/05/2008
Modified by Link for Gekko instructions 04/08/2008
Build date: Aug 28 2009, 20:20:51 (Gekko build!)

Usage: ./vdappc file|address {offset}
hawkeye2777@Powerhawk:~/WiiRd/asm$ ./vdappc ex.bin
80003100:  38000063 li r0,99
80003104:  60000000 nop
hawkeye2777@Powerhawk:~/WiiRd/asm$


Also, thanks for giving Linux some love as well. :)
Title: Re: C# USB Gecko handler
Post by: Panda On Smack on November 17, 2009, 07:50:20 PM
Thanks Link, appreciate all your work

Will try it now in VS
Title: Re: C# USB Gecko handler
Post by: Panda On Smack on November 19, 2009, 04:27:05 PM
Do you want a new sticky thread outlining any bugs we find and possible additions to the app or would you prefer that via PM?

Ta
Title: Re: C# USB Gecko handler
Post by: Link on November 19, 2009, 05:21:24 PM
You can also post here.. it is still beta so interested who find this thread can happily comment about it.. whether you comment here or per PM.. is cool by me! Here actually everyone can read it!
Title: Re: C# USB Gecko handler
Post by: hetoan2 on November 20, 2009, 11:32:31 AM
Looks nice Link :D

Love the Watchlist feature :D thanks.

Not that you have to do this, but it'd be nice if you could change the game ID midgame. Say if you use rebooter, just force it to recheck the first 8 bits to re-get the game ID. Just for the sake of organization.
Title: Re: C# USB Gecko handler
Post by: Panda On Smack on November 20, 2009, 01:26:16 PM
1 error I have found is if you reload codes from the saved gct file. Sometimes this also corrupts the gct file and you lose the codes you had

Something that I started to build into my mini version was a log of activity, anything that happens is logged in a textfield with basic details so if you poke or dump or search the relevant details are kept with a time stamp.

Often in WiiRd I end up having a notepad file open so i can keep a list of details I have been using

So i dont suggest things you have planned do you have a todo list? Right click menu in the Memory Viewer Tab for example

Thanks Link, its great to be able to see how it all works now in VS
Title: Re: C# USB Gecko handler
Post by: Link on November 21, 2009, 06:59:24 AM
Quote from: hetoan2 on November 20, 2009, 11:32:31 AM
Looks nice Link :D

Love the Watchlist feature :D thanks.

Not that you have to do this, but it'd be nice if you could change the game ID midgame. Say if you use rebooter, just force it to recheck the first 8 bits to re-get the game ID. Just for the sake of organization.

Click the reconnect button.. the reconnect does a complete reinitialization it also reads a new game id.. I am not sure if it would update the code list or the watch list (most likely not) but it will certainly get the new game id.

Quote from: Panda On Smack on November 20, 2009, 01:26:16 PM
1 error I have found is if you reload codes from the saved gct file. Sometimes this also corrupts the gct file and you lose the codes you had

Something that I started to build into my mini version was a log of activity, anything that happens is logged in a textfield with basic details so if you poke or dump or search the relevant details are kept with a time stamp.

Often in WiiRd I end up having a notepad file open so i can keep a list of details I have been using

So i dont suggest things you have planned do you have a todo list? Right click menu in the Memory Viewer Tab for example

Thanks Link, its great to be able to see how it all works now in VS

Yeah, I wonder what's the issue there.. it sometimes does not seem to properly store codes (they are already lost internally).. I am going into deeper checks though. The memory viewer will CERTAINLY get a right click even.. the following parts are planned to go in:

-Upload a bin file
-Break point
-Watchlist (which will also go into the search tab)
-Disassembler

Poke is not planned as poke is already in the memory viewer tab!
Title: Re: C# USB Gecko handler
Post by: Romaap on November 21, 2009, 10:58:22 PM
Quote from: Link on November 21, 2009, 06:59:24 AM
Quote from: hetoan2 on November 20, 2009, 11:32:31 AM
Looks nice Link :D

Love the Watchlist feature :D thanks.

Not that you have to do this, but it'd be nice if you could change the game ID midgame. Say if you use rebooter, just force it to recheck the first 8 bits to re-get the game ID. Just for the sake of organization.

Click the reconnect button.. the reconnect does a complete reinitialization it also reads a new game id.. I am not sure if it would update the code list or the watch list (most likely not) but it will certainly get the new game id.

Quote from: Panda On Smack on November 20, 2009, 01:26:16 PM
1 error I have found is if you reload codes from the saved gct file. Sometimes this also corrupts the gct file and you lose the codes you had

Something that I started to build into my mini version was a log of activity, anything that happens is logged in a textfield with basic details so if you poke or dump or search the relevant details are kept with a time stamp.

Often in WiiRd I end up having a notepad file open so i can keep a list of details I have been using

So i dont suggest things you have planned do you have a todo list? Right click menu in the Memory Viewer Tab for example

Thanks Link, its great to be able to see how it all works now in VS

Yeah, I wonder what's the issue there.. it sometimes does not seem to properly store codes (they are already lost internally).. I am going into deeper checks though. The memory viewer will CERTAINLY get a right click even.. the following parts are planned to go in:

-Upload a bin file
-Break point
-Watchlist (which will also go into the search tab)
-Disassembler

Poke is not planned as poke is already in the memory viewer tab!
You could do something like I was planning to do, a new (small) window for small functions that are pretty important.
Like poke could be on a new window so you can always use it, like in the tools tab a button for show poke window.
Title: Re: C# USB Gecko handler
Post by: Panda On Smack on November 23, 2009, 09:03:10 AM
Something else to keep in mind is that that actual App diocesan have to be the same size as WiiRd, i have no problem with it increasing in size a bit with some extra tabs or common items always at the bottom in any tab
Title: Re: C# USB Gecko handler
Post by: Link on November 23, 2009, 01:21:12 PM
So far I wouldn't know what to add when it comes to more tabs.. a Pointer Search will certainly not come bundled as I already mention in the application. While pointer searching is very cool and an important feature, I seriously feel it would be better off in an external application.. including it would mean you could only do a pointer search while being connected to a game.. and judging deep pointer searches (such as dual or triple pointers) take very long it would be quite tedious!
Title: Re: C# USB Gecko handler
Post by: biolizard89 on December 05, 2009, 08:19:06 PM
Quote from: Link on August 06, 2009, 06:42:16 PM
It's done:

http://l0nk.org/GeckoHandler.zip (http://l0nk.org/GeckoHandler.zip)

contains:
-Gecko interface to handle all communcation between PC and Wii - this is a port of the Delphi interface which is used by the WiiRD console. It is completely compatible and not better or worse. WiiRD implements it, that's what you need to do, I do not provide example code (yet)!
-documentation which contains some code snippets for examples! But again: no runnable application!

requires:
-FTDI .NET wrapper at http://www.ftdichip.com/Projects/CodeExamples/CSharp.htm (http://www.ftdichip.com/Projects/CodeExamples/CSharp.htm)
Hi Link,

In the C# code I see the following in the Dump function:
UInt64 GeckoMemRange = ByteSwap.Swap((UInt64)(((UInt64)startdump << 32) + ((UInt64)enddump)));

This implies to me that the start and end addresses are swapped before sending the data to the USB Gecko.  I think this is different from the C implementation that Nuke posted a while back, in which the bytes for each address were reversed but the start and end addresses were not swapped (i.e. he swapped the endianness for 2 32-bit ints rather than 1 64-bit int).  Which is correct?  (I'm using a modified version of Nuke's C code, and I seem to be crashing the Wii on a regular basis, so I'm wondering if that's my error or if I have a different problem).

Thanks!
Title: Re: C# USB Gecko handler
Post by: Link on December 06, 2009, 06:14:41 PM
To make it short.. BOTH is correct.. the USB Gecko buffers commands, it doesn't matter if you send them in pieces or as one big chunk.. Nuke sends the start address and the end address seperately as Big Endian integers..

The USB Gecko expects the start address in the following format:

[startadress big endian] [end address big endian]

So a dump from 80000000 to 80400000 would be:
80 00 00 00 40 00 00 00

What nuke does.. he has two 32 bit integers: 80000000 and 80400000 which are stored in little endian:
00 00 00 80 and 00 00 40 80 --> then he swaps the first:

80 00 00 00 --> and sends it to the USB Gecko.. then he swaps the second:
80 40 00 00 --> and sends that one to the USB Gecko.. WiiRd sends both together in one 64 bit block..

It internally stores them as a 64 bit integer.. notice again: Little endian!
80000000 << 32 + 80400000 = 8000000080400000

In memory this is stored like: 00 00 40 80 00 00 00 80
Then it performs a 64 bit byte-swap: the out come is:
80 00 00 00 80 40 00 00

Exactly what we want!
Title: Re: C# USB Gecko handler
Post by: ichfly on December 06, 2009, 09:19:22 PM
I want to make a pointer search so i want to know if this is right. The pointer is a U32Int at on memory addres wich is betwean 80000000 and 818000000 so i can sort them wich can be an pointer and which can`t (to make  a faster scan) and some games add a registers as offset.
Title: Re: C# USB Gecko handler
Post by: Link on December 06, 2009, 09:20:08 PM
Quote from: ichichfly on December 06, 2009, 09:19:22 PM
I want to make a pointer search so i want to know if this is right. The pointer is a U32Int at on memory addres wich is betwean 80000000 and 818000000 so i can sort them wich can be an pointer and which can`t (to make  a faster scan) and some games add a registers as offset.

As long as you do not lose the actual address while sorting: Yes, that's working and quite a not so unintelligent way to speed up things!
Title: Re: C# USB Gecko handler
Post by: Panda On Smack on December 07, 2009, 04:13:46 PM
Hi Link

Are you still making your app or have you taken it as far as you plan to?

ta
Title: Re: C# USB Gecko handler
Post by: Link on December 07, 2009, 04:54:57 PM
Right now I am on break although I DO(!) want to continue.. some daily life shit came in my way like stupid stuff.. good that it's not long until I have Christmas break ^^
Title: Re: C# USB Gecko handler
Post by: ichfly on December 07, 2009, 09:14:58 PM
O.K. I have some questions about the pointer again

1. Is it faster to make one dump and look what addreses can be the right pointer and than check if they are right with peek each addres adderes or dump it compleat again?

2. Are all pointer in MEM1 or can pointer be in other regions,too?
Title: Re: C# USB Gecko handler
Post by: Link on December 08, 2009, 04:32:55 AM
1. Dumping complete is the correct way.. peeking single addresses will take a VERY long time.. a peek is technically a true dump.. just a 4 byte dump.. but internally the dump function is always executed even for a tiny memory peek.

2. Pointers can be everywhere - so far the pointer search of WiiRd is only able to find pointers in one memory area (meaning pointers pointing from MEM1 into MEM2 are not possible although they are (unfortunately) quite likely.
Title: Re: C# USB Gecko handler
Post by: ichfly on December 08, 2009, 12:46:59 PM
O.k. my pointersearch is nearly ready to releas only one question can I use the class GlobalFunctions from the gecko dotNET Beta 0.2 or must i reprogramm it ?

What it can yet

search for pointers in 1 - 4 dumps (one is not realy save)
it is the fastest pointesearch for wii mem1 dumps
negative offset (on/off)
change maxoffset

what it can soon

sorting wich pointer are better
pointer level (can be edited)
anty online cheat function (need a while)
dump funktion
cross mem pointer funktion
code converter
possible pointer search
Title: Re: C# USB Gecko handler
Post by: Link on December 08, 2009, 05:44:25 PM
gecko dotNET is open source, all its functions and classes can be freely used without limitation as long as you also release your source codes (GPL)
Title: Re: C# USB Gecko handler
Post by: Codyk on December 08, 2009, 05:45:40 PM
sweet wiird link hey mind cheking a button activator on it cause one of my button acctivators was being screwy
Title: Re: C# USB Gecko handler
Post by: ichfly on December 09, 2009, 01:49:57 PM
Here this is my pointer search (parts from dotNET Beta 0.2) Why can´t I upload it here ???  http://forum.wii-homebrew.com/board42-kreativit%C3%A4t/development/8785-pointer-search (http://forum.wii-homebrew.com/board42-kreativit%C3%A4t/development/8785-pointer-search) at »ichfly« hat folgende Datei angehängt:

An other question are pointers only on 80000000,80000004,80000008 usw. or can they be on each Address

Update Dump function, search in mem1 and mem2
Title: Re: C# USB Gecko handler
Post by: Link on December 11, 2009, 11:15:13 PM
Pointers can only be on addresses which are multiple of 4.. no 80012345 or so!
Title: Re: C# USB Gecko handler
Post by: ichfly on December 16, 2009, 05:06:31 PM
Here is my pointer search rev.2 (many bugs) (parts from dotNET Beta 0.2)

search for pointers in 1 - 4 dumps (one is not relay save)
it is the fastest pointesearch for wii mem dumps
negative offset (on/off)
change maxoffset
possible pointer search
code converter
cross mem pointer funktion
dump funktion
sorting which pointer are better (bad code)

what it can soon

pointer level (can be edited)
any online cheat function (need a while)

I have uploadet it on wii-homebrew.com http://forum.wii-homebrew.com/board42-kreativit%C3%A4t/development/8785-pointer-search/#post93011 at ichfly« hat folgende Datei angehängt:

Something other I have a problem with fst.DumpTree(); on Mario kart wii at line 286 it try to dump until 81800001 it can be fix whith replazing gecko.Dump(fstadd,fstadd+fstsize+1,stream); whith gecko.Dump(fstadd,fstadd+fstsize,stream);
stream.WriteByte(0x00);
Title: Re: C# USB Gecko handler
Post by: ichfly on December 26, 2009, 04:17:02 PM
pointersearch update. now the levl2 search runs that means pointer in pointer a bug slow the start down yet and the printing too. sorce is uploadet better file missed(d2xxwarpper.cs).
Title: Re: C# USB Gecko handler
Post by: Thomas83Lin on December 26, 2009, 07:25:37 PM
Quote from: ichichfly on December 26, 2009, 04:17:02 PM
pointersearch update. now the levl2 search runs that means pointer in pointer a bug slow the start down yet and the printing too. sorce is uploadet.
Sorry to bug you, but i have to register to that site to download it, its in a different language, could i request a direct download link
Quote
search for pointers in 1 - 4 dumps (one is not relay save
Thats sweet, will come in handy thanks
Title: Re: C# USB Gecko handler
Post by: ichfly on December 26, 2009, 09:13:31 PM
sorry better link http://www.mediafire.com/file/hfytjmnlmyy/pointersearch alpha.zip

The download access has chanched at wii-homebrew.com

If you dump whith dotNET you must rename it in <name>.mem1 and type in <name>

bug at level2 it only use 2 Dumps

please report all bugs

allready known sorter don`t work, if you type dump and you use the second usb slot for dumping it say that it can`t connect, no response sometimes(wait and it is o.k. again), use sometimes 1,5 GB ram or more, out of range offsets(not mutch)(wont fix)(they are working), max. offsets under 100 don´t work, it slows down and use more memory if you use low maxoffset but the "bug" at the printing slow down more than, only finds 99,9954% of all posible pointers
Title: Re: C# USB Gecko handler
Post by: Thomas83Lin on December 27, 2009, 05:29:20 AM
Thanks :)
Title: Re: C# USB Gecko handler
Post by: ichfly on December 28, 2009, 02:48:19 PM
Update of the pointer search I hope all bugs are fixed.

http://www.mediafire.com/?z4gzxdonjjg
Title: Re: C# USB Gecko handler
Post by: Link on December 28, 2009, 03:36:10 PM
Quote from: ichfly on December 28, 2009, 02:48:19 PM
Update of the pointer search I hope all bugs are fixed.

http://www.mediafire.com/?z4gzxdonjjg

which part did you take ;)
my leg? my arm.. oh they are still here ^^

Very good work!
Title: Re: C# USB Gecko handler
Post by: ichfly on December 28, 2009, 04:49:04 PM
sorry I mean made by not from sorry for bad english The next relis will fix that
I used google transation.

please report any problem

allready known:

if it can`t find any pointer it goes out of range
if you use only mem1 dump and no mem2 dump it dose nothing (I hate this bug it is comming back in each version  >:D )(fixed in my version)
print data wrong in the textbox(fixed in my version)

I will test the next version better.
Title: Re: C# USB Gecko handler
Post by: ichfly on December 30, 2009, 10:43:28 AM
pointersearch update http://www.mediafire.com/?jazgjjkdjzh (http://www.mediafire.com/?jazgjjkdjzh)

fixed:if you use only mem1 dump and no mem2 dump it dose nothing
fixed:print data wrong in the textbox
a litle speed up (I don`t know why)

The level > 2 button don´t work yet but I am working on that (not a bug I haven`t made that yet only the button)
Title: Re: C# USB Gecko handler
Post by: giantpune on January 02, 2010, 06:20:03 AM
is there any word on the linux/mono version?  i saw that nice picture a couple pages ago and i cant wait to test drive it