Gecko dotNET Bugs and Requests

Started by Mal1t1a, January 19, 2010, 12:08:54 AM

Previous topic - Next topic

dcx2

#255
Quote from: Bully@Wiiplaza on September 16, 2010, 10:03:10 PM
- No "Should a game be automatically loaded" message when starting gecko os, because it won´t do it ANYWAY, if you press "yes!"
Maybe trying to do that by using some of WiiRDs source code... ???
I would love to make it automatically load.  But, unfortunately, I do not have access to WiiRDGUI source code.  I'll look into killing the dialog.

Quote- No repeated message " Connection to the gecko has failed" if you just didn´t boot up a game in the same minute, while you are still connected
I don't understand this request.  I'll search through the source for this message...remember, I picked Gecko.NET up after Link had done all the heavy lifting, so there are many pieces of Gecko.NET that I am unfamiliar with because I've never touched them.

Quote- Disassembly search should search till it finds what you wanted to search and no "couldn´t be found, want to continue searching?" message. The abililty there to select to search above or after the adress is very nice/useful ;)
If disasm search were to continue indefinitely, Gecko.NET could potentially end up dumping all of MEM1.  This could take a long time.  That's why I put the built-in range limit; most of the time if you're searching for something, it's going to be within 1000 instructions (I think that's the window).  If you want to continue searching, you could just hold down the keyboard key that corresponds to "OK" or "Yes".

Also, regarding "search above or after"...the disasm search already does this, using the up and down radio buttons.  But I can't tell from your comment if you were asking for that feature or complementing it.

Quote- Often, if I press "next frame" it doesn´t go further, only if I press it multiple times, maybe you could do something there?
WiiRD made bigger "leaps" which were more useful generally. ;D
Do you have BPNext checked on the About tab?  BPNext makes the "Next Frame" button set an Execute Breakpoint on the code handler.  So if the Gecko OS hook you're using is executed more than once per frame, BPNext will hit multiple times per frame.

I have seen other instances where I do in fact *know* that the game moved forward one frame, but the screen didn't change.  The only way to really know the passage of time is to find a timer that is incremented once every frame.  In the event that you find such a timer, you can change the BPNext address to set an Execute Breakpoint on your once-per-frame instruction.

Finally, if BPNext is not checked, then Gecko.NET will use the same unpause/wait/pause method that I believe WiiRDGUI uses.  However, I made the wait period as small as possible, because I hated it when WiiRDGUI would skip two frames while I was looking for a timer using different-by-1 searches.  The unpause/wait/pause method is unreliable, in my opinion, which is why I created the BPNext method instead.

If you want "bigger leaps", you should try using the Slow checkbox/spinner on the About tab.  You can pause the game; then set the Slow spinner to maybe 2 frames per second (FPS); then check the Slow checkbox, and the game moves forward at about 2 FPS.  Uncheck the Slow checkbox and the game goes back to being paused.  You can slow the game down to 0.1 FPS (one frame every 10 seconds!), up to about 12 FPS.

Quote- Feature to download the codes from geckocodes.org for the given game ID to the gct codes tab, when wished (it´s cooler not to copy in all the codes :P)
I was considering this.  Haven't gotten around to it yet, though.  EDIT: you could try opening the wgc file in the codes directory and copying/pasting the codes directly into that file, saving it, and then hitting "Load Code List" on the GCT tab.

Quote- Hex to Ascii converter and a calculator in the gui, ready to use! (Same as decimal to hex and so on!)
You guys already made the notepat feature, which is a great idea! Why not more of this hacking related useful stuff? :smileyface:
This is actually a great suggestion.  BTW, the Notepad was Link's creation.  Personally, I would rather have a context menu full of tools that can be called with customizable command lines.  I use OpenOffice's word application for my notes, because I can paste screenshots into the document.

Quote- A function to check automatically for new geckodotnet test or release versions at startup of the program...
I doubt that I'll do this.  I would need a server for Gecko.NET to phone home to when it started up.  You should just click "Notify" on the release thread so that you get emails when I make new releases.

Romaap

If you want the auto update function, you could just use my server.
The only code you need is one that downloads a txt file wich holds the latest version number and checks if it is the same as the installed version.
If it is not the same, downloads the latest version.
Maybe a fancy hash check to confirm a proper download.


At least, thats what I would do.

dcx2

Yeah, but then that's just one more thing I have to do when I go to release.  Here's what I go through for each and every test build.

1.) Test alpha builds on my local machine
2.) Create a list of all the changes made since the last SVN commit
3.) Commit the new changes to SVN
4.) Build the new binary
5.) Rename the binary to match SVN log
6.) Zip it up
7.) Upload the zip to mediafire
8.) Create an edited change log that is more user-friendly (i.e. leave out all the developer-centric comments)
9.) Post the new build to the release thread with the user-friendly change log

I imagine I would have to FTP into your server and edit the latest version file.  But I'm not eager to add any more steps to this process.

Releasing an official build is even more troublesome.  I have to FTP into the server where the official build is stored.  But the real pain in the ass is updating the source zip, because I have to double check that I didn't add any new source files, and I have to make sure I don't include stuff that isn't source.

giantpune

#258
Quote from: dcx2 on September 16, 2010, 10:32:48 PM
Quote from: Bully@Wiiplaza on September 16, 2010, 10:03:10 PM
- No "Should a game be automatically loaded" message when starting gecko os, because it won´t do it ANYWAY, if you press "yes!"
Maybe trying to do that by using some of WiiRDs source code... ???
I would love to make it automatically load.  But, unfortunately, I do not have access to WiiRDGUI source code.  I'll look into killing the dialog.
maybe this helps you.  this is the part where geckoOS responds to commands it gets from the USB gecko.
[spoiler]
MOD EDIT: removed code tag because it screws up spoiler tag
case 0x42:
               // Debugger on, pause start off
               config_bytes[7] = 0x01;
               config_bytes[5] = 0x00;
               usb_recvbuffer_safe(gecko_channel,&oldconfigbytes,2);   // Get config
               config_bytes[0] = oldconfigbytes[0];
               switch (oldconfigbytes[1])
               {
               case 0x00:
                  config_bytes[1] = 0x00;
                  break;
               case 0x01:
                  config_bytes[1] = 0x01;
                  break;
               case 0x02:
                  config_bytes[1] = 0x00;
                  break;
               case 0x03:
                  config_bytes[1] = 0x01;
                  break;
               case 0x04:
                  config_bytes[1] = 0x03;
                  break;
               case 0x05:
                  config_bytes[1] = 0x03;
                  break;
               case 0x06:
                  config_bytes[1] = 0x02;
                  break;
               case 0x07:
                  config_bytes[1] = 0x02;
                  break;
               }
               menu_number = 8;
               apploader_thread();
               gecko_command = 0;
            break;
               
            case 0x43:
               // Debugger on, pause start on
               config_bytes[7] = 0x01;
               config_bytes[5] = 0x01;
               usb_recvbuffer_safe(gecko_channel,&oldconfigbytes,2);   // Get config
               config_bytes[0] = oldconfigbytes[0];
               switch (oldconfigbytes[1])
               {
                  case 0x00:
                     config_bytes[1] = 0x00;
                     break;
                  case 0x01:
                     config_bytes[1] = 0x01;
                     break;
                  case 0x02:
                     config_bytes[1] = 0x00;
                     break;
                  case 0x03:
                     config_bytes[1] = 0x01;
                     break;
                  case 0x04:
                     config_bytes[1] = 0x03;
                     break;
                  case 0x05:
                     config_bytes[1] = 0x03;
                     break;
                  case 0x06:
                     config_bytes[1] = 0x02;
                     break;
                  case 0x07:
                     config_bytes[1] = 0x02;
                     break;
               }
               menu_number = 8;
               apploader_thread();
               gecko_command = 0;
            break;

[/spoiler]

the short version here is that if you send a 0x42 or 0x43 it will read 2 more bytes from the gecko which determine a couple settings, and then boot the game in the DVD drive.  0x42 = paused start OFF, 0x43 = paused start ON.  the next 2 bytes, i believe, are the language and video mode bytes.

here is a bit from the rest of the source...
[spoiler]
MOD EDIT: removed code tag because it screws up spoiler tag
switch(langselect)
   {
      case 0:
         config_bytes[0] = 0xCD;
      break;

      case 1:
         config_bytes[0] = 0x00;
      break;

      case 2:
         config_bytes[0] = 0x01;
      break;

      case 3:
         config_bytes[0] = 0x02;
      break;

      case 4:
         config_bytes[0] = 0x03;
      break;

      case 5:
         config_bytes[0] = 0x04;
      break;

      case 6:
         config_bytes[0] = 0x05;
      break;

      case 7:
         config_bytes[0] = 0x06;
      break;

      case 8:
         config_bytes[0] = 0x07;
      break;

      case 9:
         config_bytes[0] = 0x08;
      break;
      
      case 10:
         config_bytes[0] = 0x09;
      break;
   }
   
   // Video Modes
   if(pal60select == 0 && ntscselect == 0 && pal50select == 0){ // config[0] 0x00 (apply no patches)
      config_bytes[1] = 0x00;
   }

   if(pal60select == 1){         // 0x01 (Force PAL60)
      config_bytes[1] = 0x01;
   }

   if(pal50select == 1){         // 0x02 (Force PAL50)
      config_bytes[1] = 0x02;
   }

   if(ntscselect == 1){         // 0x02 (Force NTSC)
      config_bytes[1] = 0x03;
   }



char languages[11][22] =
   {{"Default"},
   {"Japanese"},
   {"English"},
   {"German"},
   {"French"},
   {"Spanish"},
   {"Italian"},
   {"Dutch"},
   {"S. Chinese"},
   {"T. Chinese"},
   {"Korean"}};
[/spoiler]

So, if i had to take a stab at it, i would send 0x42, 0xcd, 0x00 ( start the game, no paused start, default language, default video mode )


and i also have a request, it has to do with the mono version, but i figure i can put it here.  i would like to request that you use the method to talk to the gecko used in wiifuse & wiiload.  it has functions to open/read/write/flush that dont require the ftdi package on linux.  which means that the program does not need to be root, and it does not hikack the usb gecko from all other programs.  this file ( gecko.c ) can be found in the hackmii installer download.  i would prefer to submit a patch myself, but my c# sucks.  you can convert it from c to c# much better than i could.

Bully@Wiiplaza

#259
QuoteI don't understand this request.  I'll search through the source for this message...remember, I picked Gecko.NET up after Link had done all the heavy lifting, so there are many pieces of Gecko.NET that I am unfamiliar with because I've never touched them.

well, it´s a kind of little "bug" that this messages pops up about every 30 seconds even if you are connected to the gecko, but haven´t booted a game yet. Then you hear this "bling" sound from windows. A little annoying!

QuoteIf disasm search were to continue indefinitely, Gecko.NET could potentially end up dumping all of MEM1.  This could take a long time.  That's why I put the built-in range limit; most of the time if you're searching for something, it's going to be within 1000 instructions (I think that's the window).  If you want to continue searching, you could just hold down the keyboard key that corresponds to "OK" or "Yes".

Also, regarding "search above or after"...the disasm search already does this, using the up and down radio buttons.  But I can't tell from your comment if you were asking for that feature or complementing it.

I liked this up and down feature, no complaining here.
Maybe you could bring in a feature which alows you to set the amount of instructions which should be dumped for the search ;)

Quote
...
If you want "bigger leaps", you should try using the Slow checkbox/spinner on the About tab.  You can pause the game; then set the Slow spinner to maybe 2 frames per second (FPS); then check the Slow checkbox, and the game moves forward at about 2 FPS.  Uncheck the Slow checkbox and the game goes back to being paused.  You can slow the game down to 0.1 FPS (one frame every 10 seconds!), up to about 12 FPS.
okay I will try that, seems to do the job well :)

QuoteI doubt that I'll do this.  I would need a server for Gecko.NET to phone home to when it started up.  You should just click "Notify" on the release thread so that you get emails when I make new releases.
After I read all the points you would need to add to your "to do" list for considering the autoupdate feature, it´s not worth it!
It´s fine how it is with the notification :D
My Wii hacking site...
http://bullywiihacks.com/

My youtube account with a lot of hacking videos...
http://www.youtube.com/user/BullyWiiPlaza

~Bully

giantpune

i just hit a crash in geckoDotNET.
1) start scoobydoo ( SJ2EWR )
2) go to 0x800cf534 in the disassembler "addi r4, r4, 1"
3) change it to 2 instead of 1 and click assemble
4) the disassembler disappears and says "random error"
5)
[spoiler]

************** Exception Text **************
System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string.
Parameter name: startIndex
   at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
   at GeckoApp.Disassembly.MainBoxClick(Object sender, EventArgs e)
   at System.Windows.Forms.ListBox.OnSelectedIndexChanged(EventArgs e)
   at System.Windows.Forms.ListBox.set_SelectedIndex(Int32 value)
   at GeckoApp.Disassembly.DissToBox(UInt32 address)
   at GeckoApp.Disassembly.Assemble(UInt32 address, String command)
   at GeckoApp.MainForm.Assemble_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
Gecko dNet
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Documents%20and%20Settings/Administrator/Desktop/vmware_wiishit/geckoDotNET/Gecko%20dNet%20r95.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

[/spoiler]
[spoiler]

[/spoiler]

dcx2

You're using an old version; I can tell because I don't see the disasm search.  I think that is fixed in newer versions.

Bully@Wiiplaza

Quote from: dcx2 on September 20, 2010, 03:41:25 PM
I think that is fixed in newer versions.
yes it is... ;D

@giantpune
try to get built 108 from the release thread (last post)
My Wii hacking site...
http://bullywiihacks.com/

My youtube account with a lot of hacking videos...
http://www.youtube.com/user/BullyWiiPlaza

~Bully

Deathwolf

is it maybe possible to search for 3 32 bit values?
like 3F8000003F8000003F800000 via codesearch
lolz

dcx2

Go to Memory Viewer

Switch the Search mode to "Hex"

Deathwolf

Quote from: dcx2 on September 27, 2010, 09:18:31 PM
Go to Memory Viewer

Switch the Search mode to "Hex"

yep that's right, via memory viewer but after second search you lose the first address.
sometimes there are more than 300 addresses. is it possible to save it?
lolz

dcx2

There's no real support for that type of thing.  You should either copy and paste the addresses that you find into a notepad, or use the History for the Memory Viewer address text box.

I can look into making Memory Viewer search results automatically add themselves to the History.

Deathwolf

okay thanks a lot ;D

btw what about a search mode for memory viewer without "next search" , like code search.

search....
if found add to the history....
search....
if found add to the history....
and and and
if finish, show all addresses
lolz

Bully@Wiiplaza

I personnally don´t see the point of that... :-[
My Wii hacking site...
http://bullywiihacks.com/

My youtube account with a lot of hacking videos...
http://www.youtube.com/user/BullyWiiPlaza

~Bully

giantpune

ok, i took your advice and grabbed the latest version of geckoDotNET and this one is throwing exceptions at me left and right.  im not using any codes, just setting breakpoints and poking around in the memory viewer ( guitar hero 6 )

[spoiler]
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.IOException: The process cannot access the file 'C:\Documents and Settings\Administrator\Desktop\vmware_wiishit\geckoDotNET\diss.bin' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode)
   at GeckoApp.Disassembly.Disassemble(UInt32 address, Int32 commands)
   at GeckoApp.Disassembly.DissToBox(UInt32 address)
   at GeckoApp.MainForm.DisPage_Enter(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnEnter(EventArgs e)
   at System.Windows.Forms.TabPage.OnEnter(EventArgs e)
   at System.Windows.Forms.ContainerControl.UpdateFocusedControl()


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
Gecko dNet
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Documents%20and%20Settings/Administrator/Desktop/vmware_wiishit/geckoDotNET/Gecko%20dNet.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
[/spoiler]