Skip to content

Commit 8468212

Browse files
committed
Remove the "FilterRule" button and replace it with a "Clone" button in the Query window.
1. Remove the "FilterRule" button in the Query window because modifying filtering rules is not a frequently needed action. If you need to change the filtering rules, you can do so in the Query page of the Options window. 2. Added a "Clone" button in the Query window, allowing the current scanning state and results to be duplicated into a new Query window. For example, after performing an "Unknown Initial" scan, you can copy the scan results into multiple new Query windows and then execute different scans.
1 parent bc67f36 commit 8468212

File tree

5 files changed

+72
-36
lines changed

5 files changed

+72
-36
lines changed

PS4CheaterNeo/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.1.4")]
36-
[assembly: AssemblyFileVersion("1.0.1.4")]
35+
[assembly: AssemblyVersion("1.0.1.5")]
36+
[assembly: AssemblyFileVersion("1.0.1.5")]

PS4CheaterNeo/Query.Designer.cs

Lines changed: 17 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

PS4CheaterNeo/Query.cs

Lines changed: 43 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public partial class Query : Form
3232
bool UnknownInitialScanDoNotSkip0 = Properties.Settings.Default.UnknownInitialScanDoNotSkip0.Value;
3333
bool SectionViewDetectHiddenSection = Properties.Settings.Default.SectionViewDetectHiddenSection.Value;
3434
bool WriteHiddenSectionConf = Properties.Settings.Default.WriteHiddenSectionConf.Value;
35+
bool isCloneScan = false;
3536

3637
List<ListViewItem> sectionItems = new List<ListViewItem>();
3738
List<ListViewItem> resultItems = new List<ListViewItem>();
@@ -59,6 +60,16 @@ public Query(Main mainForm)
5960
SectionView.FullRowSelect = Properties.Settings.Default.SectionViewFullRowSelect.Value;
6061
}
6162

63+
public Query(Main mainForm, ComparerTool comparerTool = null, int bitsDictDictsIdx = 0, List<Dictionary<uint, BitsDictionary>> bitsDictDicts = null) : this(mainForm)
64+
{
65+
if (bitsDictDicts == null || bitsDictDicts.Count <= 0) return;
66+
67+
this.isCloneScan = true;
68+
this.comparerTool = comparerTool;
69+
this.bitsDictDictsIdx = bitsDictDictsIdx;
70+
this.bitsDictDicts = new List<Dictionary<uint, BitsDictionary>>(bitsDictDicts);
71+
}
72+
6273
public void ApplyUI()
6374
{
6475
try
@@ -115,8 +126,8 @@ public void ApplyUI()
115126
SectionSearchBtn.BackColor = BackColor;
116127
GetProcessesBtn.ForeColor = ForeColor;
117128
GetProcessesBtn.BackColor = BackColor;
118-
FilterRuleBtn.ForeColor = ForeColor;
119-
FilterRuleBtn.BackColor = BackColor;
129+
CloneScanBtn.ForeColor = ForeColor;
130+
CloneScanBtn.BackColor = BackColor;
120131
RedoBtn.BackColor = BackColor;
121132
UndoBtn.BackColor = BackColor;
122133
NewBtn.BackColor = BackColor;
@@ -138,6 +149,12 @@ private void Query_Load(object sender, EventArgs e)
138149
}
139150
ScanTypeBox.SelectedIndex = 2;
140151
if (Properties.Settings.Default.AutoPerformGetProcesses.Value) GetProcessesBtn.PerformClick();
152+
if (isCloneScan)
153+
{
154+
SyncSections("Clone scan");
155+
TaskCompleted(System.Diagnostics.Stopwatch.StartNew());
156+
NewBtn.Enabled = true;
157+
}
141158
}
142159

143160
private void Query_FormClosing(object sender, FormClosingEventArgs e)
@@ -286,6 +303,8 @@ private void NewBtn_Click(object sender, EventArgs e)
286303
ScanBtn.Text = "First Scan";
287304
ScanTypeBox.Enabled = true;
288305
AlignmentBox.Enabled = true;
306+
AddrIsFilterBox.Enabled = true;
307+
ProcessesBox.Enabled = true;
289308
NewBtn.Enabled = false;
290309
UndoBtn.Enabled = false;
291310
RedoBtn.Enabled = false;
@@ -333,6 +352,13 @@ private async Task<bool> UnReDO(bool isUnDo, System.Diagnostics.Stopwatch ticker
333352
else if (!isUnDo && bitsDictDictsIdx < bitsDictDicts.Count - 1) bitsDictDictsIdx++;
334353
else return false;
335354

355+
SyncSections(msg);
356+
357+
return true;
358+
});
359+
360+
private void SyncSections(string msg)
361+
{
336362
Invoke(new MethodInvoker(() => { SectionView.BeginUpdate(); }));
337363
for (int sectionIdx = 0; sectionIdx < sectionItems.Count; ++sectionIdx)
338364
{
@@ -359,9 +385,7 @@ private async Task<bool> UnReDO(bool isUnDo, System.Diagnostics.Stopwatch ticker
359385
RedoBtn.Enabled = bitsDictDictsIdx < bitsDictDicts.Count - 1;
360386
SectionView.EndUpdate();
361387
}));
362-
363-
return true;
364-
});
388+
}
365389

366390
Task<bool> scanTask = null;
367391
CancellationTokenSource scanSource = null;
@@ -457,6 +481,7 @@ private void ScanBtn_Click(object sender, EventArgs e)
457481

458482
ScanTypeBox.Enabled = false;
459483
AlignmentBox.Enabled = false;
484+
ProcessesBox.Enabled = false;
460485
NewBtn.Enabled = true;
461486
}
462487
}
@@ -1187,6 +1212,7 @@ private void TaskCompleted(System.Diagnostics.Stopwatch tickerMajor)
11871212
ResultView.EndUpdate();
11881213
ScanTypeBox_SelectedIndexChanged(null, null);
11891214
ScanBtn.Text = "Next Scan";
1215+
if (AddrIsFilterBox.Checked) AddrIsFilterBox.Enabled = false;
11901216
if (!CompareFirstBox.Enabled) CompareFirstBox.Enabled = true;
11911217
}));
11921218
}
@@ -1621,7 +1647,11 @@ private void AddrMinMaxBox_Leave(object sender, EventArgs e)
16211647
FilterChecked("filterAddr", AddrIsFilterBox.Checked);
16221648
}
16231649

1624-
private void AddrIsFilterBox_CheckedChanged(object sender, EventArgs e) => FilterChecked("filterAddr", AddrIsFilterBox.Checked);
1650+
private void AddrIsFilterBox_CheckedChanged(object sender, EventArgs e)
1651+
{
1652+
FilterChecked("filterAddr", AddrIsFilterBox.Checked);
1653+
if (AddrIsFilterBox.Checked && bitsDictDicts.Count > 0) AddrIsFilterBox.Enabled = false;
1654+
}
16251655

16261656
private void IsFilterSizeBox_CheckedChanged(object sender, EventArgs e) => FilterChecked("filterSize", IsFilterSizeBox.Checked);
16271657

@@ -1636,7 +1666,7 @@ private void FilterChecked(string filter, bool isFilterChecked)
16361666
AddrMinBox.Tag = null;
16371667
AddrMaxBox.Tag = null;
16381668
}
1639-
ProcessesBox_SelectedIndexChanged(ProcessesBox, null);
1669+
if (filter != "filterAddr" || !isFilterChecked) ProcessesBox_SelectedIndexChanged(ProcessesBox, null);
16401670
if (isFilterChecked)
16411671
{
16421672
SectionView.BeginUpdate();
@@ -1686,13 +1716,10 @@ private void SectionSearchBtn_Click(object sender, EventArgs e)
16861716
SectionView.Items[item.Index].EnsureVisible();
16871717
}
16881718

1689-
private void FilterRuleBtn_Click(object sender, EventArgs e)
1719+
private void CloneScanBtn_Click(object sender, EventArgs e)
16901720
{
1691-
string SectionFilterKeys = Properties.Settings.Default.SectionFilterKeys.Value;
1692-
1693-
if (InputBox.Show("Section Filter", "Enter the value of the filter keys", ref SectionFilterKeys) != DialogResult.OK) return;
1694-
1695-
Properties.Settings.Default.SectionFilterKeys.Value = SectionFilterKeys;
1721+
Query query = new Query(mainForm, comparerTool, bitsDictDictsIdx, bitsDictDicts);
1722+
query.Show();
16961723
}
16971724

16981725
private void SectionViewHexEditor_Click(object sender, EventArgs e)
@@ -1849,11 +1876,13 @@ private void SectionViewCheck_Click(object sender, EventArgs e)
18491876
List<ListViewItem> selectedItems = ListViewLVITEM.GetSelectedItems(SectionView);
18501877
if (selectedItems.Count == 0) return;
18511878

1879+
bool? isChecked = null;
18521880
SectionView.BeginUpdate();
18531881
for (int idx = 0; idx < selectedItems.Count; ++idx)
18541882
{
18551883
ListViewItem item = selectedItems[idx];
1856-
item.Checked = !item.Checked;
1884+
if (isChecked == null) isChecked = !item.Checked;
1885+
item.Checked = (bool)isChecked;
18571886
uint sid = uint.Parse(item.SubItems[(int)SectionCol.SectionViewSID].Text);
18581887
SectionCheckUpdate(item.Checked, sid);
18591888
}

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
PS4CheaterNeo is a program to find game cheat codes, and it is based on [`ps4debug`](https://github.com/jogolden/ps4debug) and [`.Net Framework 4.8`](https://support.microsoft.com/en-us/topic/microsoft-net-framework-4-8-offline-installer-for-windows-9d23f658-3b97-68ab-d013-aa3c3e7495e0).
44

5-
Currently in `version 1.0.1.4`
5+
Currently in `version 1.0.1.5`
66

77

88
## Table of Contents
@@ -20,6 +20,7 @@ Currently in `version 1.0.1.4`
2020
+ [Query window: Dump Import PS4 section memory block](#query-window-dump-import-ps4-section-memory-block)
2121
+ [Query window: Compare to first scan](#query-window-compare-to-first-scan)
2222
+ [Query window: Detect Hidden Section](#query-window-detect-hidden-section)
23+
+ [Query window: Clone scan result](#query-window-clone-scan-result)
2324
* [Scan Type](#scan-type)
2425
+ [Scan Type: Byte](#scan-type-byte)
2526
+ [Scan Type: 2 Bytes](#scan-type-2-bytes)
@@ -153,7 +154,7 @@ Cheat format used by PS4 Trainer and GoldHEN Cheat (0.9.6.0)
153154
- In addition to query types such as `Byte, Float, Double, Hex`, etc., ScanType also supports `Group` types.
154155
- Make the `section` of the suspected target more obvious.
155156
- The query value will skip the filtered `section` list when the `Filter` checkbox is clicked.
156-
- The preset `section` filter rules is `libSce, libc.prx, SceShell, SceLib, SceNp, SceVoice, SceFios, libkernel, SceVdec`, these rules can also be customized.
157+
- The preset `section` filter rules is `libSce, libc.prx, SceShell, SceLib, SceNp, SceVoice, SceFios, libkernel, SceVdec`, these rules can also be customized in the Query page of the Options window.
157158
- The `section` list whose length is less than `SectionFilterSize` (default is 200K, can be modified in Option) will be filtered when the `FilterSize` checkbox is clicked. (0.9.4.9)
158159
- Support dump `section` to binary files in `section` list. (0.9.6.2)
159160
- Added collapsible split container ui in Query and HexEditor and PointerFinder (can be set in `EnableCollapsibleContainer` options to enable or not). (0.9.7.3)
@@ -260,6 +261,13 @@ The relevant execution steps are as follows:
260261
6. The conf file format is "`SID, Start, End, Valid, Prot, Name`" with each line recording a local Hidden Section. When `"Valid" is false`, it means that this `section has no data`.
261262

262263

264+
### Query window: Clone scan result
265+
266+
- Added a "Clone" button in the Query window, allowing the current scanning state and results to be duplicated into a new Query window. For example, after performing an "Unknown Initial" scan, you can copy the scan results into multiple new Query windows and then execute different scans. (1.0.1.5)
267+
268+
![query_ColneBtn](assets/query_ColneBtn.webp)
269+
270+
263271
## Scan Type [🔼](#table-of-contents)
264272

265273
- Depending on the length of the data, there are different results in the query, you need to use the scan type to specify the type of target data

assets/query_ColneBtn.webp

92.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)