Codes
WiiRd forum
October 07, 2024, 03:16:04 PM *
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 2 3 [4] 5 6 ... 52
  Print  
Author Topic: Gecko dotNET Bugs and Requests  (Read 140611 times)
Mal1t1a
I love hacking. Programming as well.
Hacker
Jr. Member
*****

Karma: 0
Posts: 53

I <3 Hacking


WWW
« Reply #45 on: March 22, 2010, 01:35:57 AM »

By updating the Address I was talking about, Updating the Value of the Address.

Here is an Example of what I mean:


You Select the Addresses you want to Update in the Found Addresses Area.


You then Right Click and Select "Update Value"


It will then Show you the Updated Values of the Selected Addresses.


I hope the Diagram Helps you understand what I mean.  Smiley


Regarding your float thing, I think I follow you less now.  Instead of searching for all ints that are less than 33, you wanted to search for floats less than 33.33, right?

Also, searching for equals on a float is a bad idea.  You need to do this thing called "fuzzy equals", which is actually a lot more like "different by less than" than it is equals.

Yeah, like say I did an Unknown Value Search. If I were to do a Less Than Search, then it would only calculate addresses that have the Hexadecimal Value lower than the Previous.
Here's another Example: The Address of 811AC658 had the Float Value of 1200 (44960000 in hex), and then The next time it changes, I scan for a Less Than, and the Float Value is now -1200 (C4960000 in hex). It would remove 811AC658 from the Found Addresses because it's Hexadecimal Value increased (Even though for a float it is decreasing).

A Possible Solution could be:

Code:
if(viewmode=="float"){
//do search
//convert each value of the search into a float (I'd suggest creating either one big function with an if statement or select case, or create two search functions).
//return results.
}else{
//do search
//do everything normally.
}
« Last Edit: March 22, 2010, 01:45:56 AM by Mal1t1a » Logged

Hacking is not always about ruining the game for others, its about making the game funner and seeing what is possible and what is not.
Link
that dev there
Moderator
Hero Member
*****

Karma: 76
Posts: 1254

I hate everyone in this community. Except for you!


WWW
« Reply #46 on: March 22, 2010, 04:43:22 AM »

Yeah, like say I did an Unknown Value Search. If I were to do a Less Than Search, then it would only calculate addresses that have the Hexadecimal Value lower than the Previous.
Here's another Example: The Address of 811AC658 had the Float Value of 1200 (44960000 in hex), and then The next time it changes, I scan for a Less Than, and the Float Value is now -1200 (C4960000 in hex). It would remove 811AC658 from the Found Addresses because it's Hexadecimal Value increased (Even though for a float it is decreasing).

Hm.. I get it.. however, not a float search would really help there (a float search indeed would not be easy as the inner core only handles integers during searches).. A feasible idea would be to allow the search for signed integers.. C4960000 is unsigned 3298164736 so indeed it is magnificently higher than 44960000 (1150681088). However, if allowing signed searches then C4960000 would be counted as -996802560 - and thus lower. That wouldn't allow searching for floats yet, but it would work for unknown searches and at least in the current build it would be easier to add! If that would be okay for you!
Logged

dcx2
Computer Engineer
Moderator
Legendary Member
*****

Karma: 165
Posts: 3468


WWW
« Reply #47 on: March 22, 2010, 11:42:22 AM »

a float search indeed would not be easy as the inner core only handles integers during searches

I was thinking about this...all we'd have to do is add another bool to MemSearch::Compare(...).  If the bool is true, then we can cast the integers "given" and "loExpected" to floats and return the comparison result.  None of the other code needs changed, except a way for the user to specify what type of search they're doing, and that can be derived from the selected index of whatever combo box we use.
Logged

dcx2
Computer Engineer
Moderator
Legendary Member
*****

Karma: 165
Posts: 3468


WWW
« Reply #48 on: March 22, 2010, 01:10:51 PM »

Version digit - I'm hesitant to make a change to the game name because there are other consequences than just the text that appears at the top of the window.  For instance, the name of the GCT file is derived from the game name.  Also, some time in the future I would like to add integrated support with the web site, and any changes to the game name would interfere with that as well.

If acceptable, I could try to selectively add "Version x" to *only* the title bar, but nothing else.  But I would also like a chance to try this out before releasing it into the wild, and I have no versioned games that I'm aware of.  Undecided

--

Multi-poke-restart-disabled bug....I couldn't get this to happen.  Learning from the previous lesson, I made sure to use the binary Link released, but I multi-poked every address on a page like 5 times and Restart Search was always enabled...were you doing a specific type of search when this happened?  Unknown, last value, specific?  Equal, not equal, less than, different by, etc?

--

Regarding manual updating, this isn't exactly what you specified, but if you select a bunch of search results and right click -> add to watch list, you can see the values updating in real time with a selectable interval without changing the search results.  It is much more powerful than that though...

1) You can also change the view type, so you can see the values as floats or 32- or 16- or 8-bits.

2) You can also rename them, so in addition to the address you see "x velocity" or "y height" or "health" or whatever.

3) You can provide offsets from a pointer to watch.  You can even do multiple indirections - pointers to pointers to pointers...
Logged

Skiller
Codemaster Skiller
Hacker
Hero Member
*****

Karma: 114
Posts: 806


WWW
« Reply #49 on: March 23, 2010, 01:23:28 AM »

Version digit - I'm hesitant to make a change to the game name because there are other consequences than just the text that appears at the top of the window.  For instance, the name of the GCT file is derived from the game name.  Also, some time in the future I would like to add integrated support with the web site, and any changes to the game name would interfere with that as well.

If acceptable, I could try to selectively add "Version x" to *only* the title bar, but nothing else.  But I would also like a chance to try this out before releasing it into the wild, and I have no versioned games that I'm aware of.  Undecided

Its all good most games are goin to be version 00 since 90% of them have not been rereleased ..
Final Fantasy CC has 2 versions
Zelda twilight might have 3 versions . 
Logged
dcx2
Computer Engineer
Moderator
Legendary Member
*****

Karma: 165
Posts: 3468


WWW
« Reply #50 on: March 24, 2010, 01:07:33 PM »

Skiller - the next release will have support for the version digit.  It only affects the title bar and only shows up if the 7th digit after the start of the name is not 0.  I fake tested it in the debugger but it would be nice if you could test it for real.

Mal1t1a - I added float comparisons to the Lower value info search type combobox.  It now says 8-bit, 16-bit, 32-bit, and Single.  The search results are still in hex (...for now?), but the actual comparisons are performed on floats.  It does not respect the value in Upper value info.  It should work with DifferentBy searches.

FYI, the Exact checkbox on the Breakpoint tab wasn't fully functional in 0.52.  It *looked* like it was, but it wasn't.  So if it doesn't appear to work yet, that's why.

Also, if you delete search results, do it one at a time.  Deleting multiple search results was more complicated than I initially thought and 0.52 does not perform it correctly.

--

I also have a few new features ready.  Rather than annoying Link with requests to update the binary, I'm considering using mediafire to throw up "nightly builds", and then Link can release "official builds" when he has time to double check stability.  Is there any interest in this?
Logged

Mal1t1a
I love hacking. Programming as well.
Hacker
Jr. Member
*****

Karma: 0
Posts: 53

I <3 Hacking


WWW
« Reply #51 on: March 24, 2010, 03:44:33 PM »

Well that is atleast a start. However, it would be nice to show the search results in Floats(Singles) but oh well. I don't use the Upper Value to search so I'm okay with that. As for the Delete Search Results, It's not that easy? It seemed like it was. Couldn't you just assign a hidden value to each Search Result? Say, Index ID and just do a really bad RemoveAt Statement?
As for the "Nightly builds" idea, I think it is great, that way we don't really have to rely on Link being here Tongue
Logged

Hacking is not always about ruining the game for others, its about making the game funner and seeing what is possible and what is not.
dcx2
Computer Engineer
Moderator
Legendary Member
*****

Karma: 165
Posts: 3468


WWW
« Reply #52 on: March 24, 2010, 04:10:32 PM »

However, it would be nice to show the search results in Floats(Singles)

Since the Watch List can display watched variables as floats, and you can highlight a bunch of search results and throw them into the Watch List, I don't think I'll be reworking the search result grid view to support float representations any time soon.  I'll still add your request to the "eventually..." list.

Quote
As for the Delete Search Results, It's not that easy?

When you delete multiple selected rows, the Deleting event is raised once for each row.  But the deleted row indices are not updated in between deletes!  So if you delete rows 1, 2, and 3, it will: delete row 1, slide the remaining rows down, and then attempt to delete row 2, but since row 2 is now where row 1 was, deleting row 2 actually deletes what was row 3.  Similarly, when it goes to delete row 3, it actually deletes what was row 5.

The solution involved ignoring all but one of the multiple Deleting events, and for the one that's not ignored, deleting the selected indices from the results list.

Then I had to find the first and last index so I could use RemoveRange.  Well, if you drag the mouse down, the SelectedRows[0] actually holds the *last* index, not the first.  (hmm...RemoveRange won't work if there are "gaps" of unselected rows between two sets of selected rows...looks like I'll have to do a loop starting from the last index and working backwards)

And then there's the "current cell" which is the cell that has the keyboard focus, and when you change the selected cell, the current cell doesn't change.  And so on.

Quote
As for the "Nightly builds" idea, I think it is great, that way we don't really have to rely on Link being here Tongue

I am all for throwing them up, I just don't want to step on Link's toes 'cos gecko dotNET is 99% him and 1% small contributions by me.
Logged

Mal1t1a
I love hacking. Programming as well.
Hacker
Jr. Member
*****

Karma: 0
Posts: 53

I <3 Hacking


WWW
« Reply #53 on: March 24, 2010, 06:16:27 PM »

Couldn't you do something along the lines of this? (VB.NET Code):

Code:
       Dim SomeArray As New ArrayList
        For Each row In DataGridView1.SelectedRows
            SomeArray.Add(row)
        Next
        For Each item In SomeArray
            DataGridView1.Rows.RemoveAt(DataGridView1.Rows.IndexOf(item))
        Next
        SomeArray.Clear()

C# Code (I hope this works, I haven't tested it):
Code:
            List<DataGridViewRow> SomeArray = new List<DataGridViewRow>();
            foreach (DataGridViewRow rows in dataGridView1.SelectedRows)
            {
                SomeArray.Add(rows);
            }

            foreach (DataGridViewRow item in SomeArray)
            {
                dataGridView1.Rows.RemoveAt(dataGridView1.Rows.IndexOf(item));
            }
            SomeArray.Clear();

This of course is when I set the SelectionMode to: "FullRowSelect"
« Last Edit: March 24, 2010, 06:32:56 PM by Mal1t1a » Logged

Hacking is not always about ruining the game for others, its about making the game funner and seeing what is possible and what is not.
dcx2
Computer Engineer
Moderator
Legendary Member
*****

Karma: 165
Posts: 3468


WWW
« Reply #54 on: March 24, 2010, 06:36:57 PM »

There are two problems with that approach.

First, each time you do RemoveAt(), all of the remaining rows after the deleted row will shift closer to the 0th index.  So if you delete row 1, rows 2:n become rows 1:(n - 1).  To delete row 2, you'd have to delete row 1 *again*, because after deleting an element, the new row 2 is actually the old row 3.

Second, the search results are stored as a List<SearchResult>, and one page at a time is loaded from this backing store into the DataGridView.  Deleting individual elements from the DataGridView does not delete them from the backing store.  That's why I had to over-ride the DataGridView.Deleting event, so that it deleted from the search results list instead of the DataGridView, and then repopulates the DataGridView with the modified List.

Now, your general approach is a good one, it just needs one tweak.  SomeArray will hold row indices, and will need to be sorted descending.  Then, I can go through the List, and starting from the highest indices, I can start deleting without worrying about changing the index of the rows I'm trying to delete.

So, if I'm deleting elements 1, 2, and 3, when I sort descending the array will contain 3, 2, and 1.  Then I will delete element 3, and rows 4:n will become rows 3:(n - 1), leaving elements 2 and 1 in the same place so that they can still be deleted.

EDIT

lol, I totally missed this part.  You're getting the new index based on a cached copy of the selected rows.

dataGridView1.Rows.RemoveAt(dataGridView1.Rows.IndexOf(item));

This makes problem 1 fuzzier, but still doesn't get around problem 2.  The List probably has an IndexOf method, as well, but I'm still leaning towards start-deleting-from-the-end.
« Last Edit: March 24, 2010, 06:44:06 PM by dcx2 » Logged

Romaap
Hacker
Moderator
Legendary Member
*****

Karma: 89
Posts: 1794


WWW
« Reply #55 on: March 24, 2010, 06:56:49 PM »

Maybe you could do it something along this lines:
Code:
for(int i = 0;i > number_of_results_to_delete;i++)
{
   results.delete(row_to_delete - i);
}


I dont know how you get the selected results, so i just left that out. Smiley
Logged
Mal1t1a
I love hacking. Programming as well.
Hacker
Jr. Member
*****

Karma: 0
Posts: 53

I <3 Hacking


WWW
« Reply #56 on: March 24, 2010, 06:58:59 PM »

Which is why I said "something like this" Smiley It was just supposed to be a general Idea. Now, would you be-able to modify the SearchResults based upon the Rows? You could store the Values and do an IndexOf() operation, which would sort them separately by the Values (if that is how the SearchResults work).
Logged

Hacking is not always about ruining the game for others, its about making the game funner and seeing what is possible and what is not.
dcx2
Computer Engineer
Moderator
Legendary Member
*****

Karma: 165
Posts: 3468


WWW
« Reply #57 on: March 24, 2010, 07:38:37 PM »

Romaap - your solution would work when the SelectedRows are one contiguous block, but if you used ctrl + click to select multiple (EDIT: non-contiguous) results, it will get very confused.  This is the same problem as the current solution (well, not really current, since 0.52 doesn't have these changes yet...), which is to find the first and last indices in the selected row and then use List.RemoveRange() to get them all at once.

Mal1t1a - I could reconstruct the SearchResult from the values in the DataGridView's Row and then pass that to List.IndexOf().  But traversing the List in search of the index of a given value is probably an O(n) operation, and if you put that inside another loop, the deleting event becomes O(n^2)...

I probably shouldn't be worried about the performance implications too much, especially since deleting one element at a time is probably going to be far slower than using RemoveRange().

Thanks for having this nice discussion with me.  ^_^
Logged

Mal1t1a
I love hacking. Programming as well.
Hacker
Jr. Member
*****

Karma: 0
Posts: 53

I <3 Hacking


WWW
« Reply #58 on: March 25, 2010, 04:00:23 PM »

I'm sure we can sacrifice some speed optimization for quality. Smiley

Also, I would REALLY like the "Single" searching soon Wink
Logged

Hacking is not always about ruining the game for others, its about making the game funner and seeing what is possible and what is not.
dcx2
Computer Engineer
Moderator
Legendary Member
*****

Karma: 165
Posts: 3468


WWW
« Reply #59 on: March 25, 2010, 04:04:25 PM »

I posted here with a link to the Nightly Builds folder.  That test release is for you and Skiller, so you can test your Single search compares and he can test the Version digit.  It also has other new features too...Show Mem button, conditional branch detection/toggling, and some more.
Logged

Pages: 1 2 3 [4] 5 6 ... 52
  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!