Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 12:49

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Working with DMA - PCIe Screamer

Discussion on Working with DMA - PCIe Screamer within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
AcTiViSioN911's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 32
Received Thanks: 16
Working with DMA - PCIe Screamer

Hi guys. I have a PCIe Screamer and I am writing a program like Cheat Engine. So far I have implemented search and filtering, but already ran into some questions. I tried to google and figure it out myself, but it didn't give much results. I hope someone can give me a hint and help with a solution.
For example, I took the Terraria game, found a 4 byte number and then repeated it in my program. It took a lot longer, since I either searched all over my memory, or grabbed a lot of unnecessary things, I don't really know. Now in more detail:
I am using MemProcFS with Dokany. I find the game at "M:\name\Terraria.exe-*", there is a 256 TB memory.vmem file. There is a pte.txt file in the memmap folder where the address ranges are listed and I go through each one. Here is the content of this file:
Code:
   #    PID    Pages      Range Start-End              FLAGS   Description                                                     
--------------------------------------------------------------------------                                                     
0000   8564        1 00000000001c0000-00000000001c0fff -r-- 32 Terraria.exe
0001   8564        1 00000000001c2000-00000000001c2fff -r-- 32 Terraria.exe
***
0017   8564        1 00000000013c0000-00000000013c0fff -r--
0018   8564        8 00000000013e0000-00000000013e7fff -rw-
***                                                                
006c   8564        1 0000000003870000-0000000003870fff -r-- 32 _DATA-0x3870000.dll
006d   8564        5 0000000003872000-0000000003876fff -r-- 32 _DATA-0x3870000.dll
etc...


I noticed that I can skip lines containing .dll in the Description as they are clearly not related to game memory. However, this is still a lot. For example, a Cheat Engine search for a 4 byte took 1 second and found 884 addresses, ranging from 01A79AD4 to 5923B7BC. My program scanned for 24 seconds (I admit that my methods are not as perfect as those of CE + I use only one thread), but I found 1408 addresses with a range from 001E72A3 to 76555294.
And here my first question is, how does CE find the beginning and end of the memory related to the game, or how does the CE skip everything unnecessary? Probably need to skip 1-2 page / -r-- / -rw- / -rwx ranges, but I'm not sure about that, and I don't want to accidentally skip the addresses I need.
Then I would like to know how to search for pointers to addresses in order to find the correct address after a restart. I think this is also related to my first question. I know how to do this in CE, but have not yet figured out how to implement it myself.
Perhaps someone has already asked similar questions somewhere on the forum, and I would be very grateful for a tip, or at least a hint where to look. I'm not as advanced as the guys on this forum, but I want to learn.
PS: not for sale, purely for my own use.
AcTiViSioN911 is offline  
Old 04/09/2021, 03:29   #2
 
elite*gold: 0
Join Date: Apr 2011
Posts: 363
Received Thanks: 167
Quote:
Originally Posted by AcTiViSioN911 View Post
Hi guys. I have a PCIe Screamer and I am writing a program like Cheat Engine. So far I have implemented search and filtering, but already ran into some questions. I tried to google and figure it out myself, but it didn't give much results. I hope someone can give me a hint and help with a solution.
For example, I took the Terraria game, found a 4 byte number and then repeated it in my program. It took a lot longer, since I either searched all over my memory, or grabbed a lot of unnecessary things, I don't really know. Now in more detail:
I am using MemProcFS with Dokany. I find the game at "M:\name\Terraria.exe-*", there is a 256 TB memory.vmem file. There is a pte.txt file in the memmap folder where the address ranges are listed and I go through each one. Here is the content of this file:
Code:
   #    PID    Pages      Range Start-End              FLAGS   Description                                                     
--------------------------------------------------------------------------                                                     
0000   8564        1 00000000001c0000-00000000001c0fff -r-- 32 Terraria.exe
0001   8564        1 00000000001c2000-00000000001c2fff -r-- 32 Terraria.exe
***
0017   8564        1 00000000013c0000-00000000013c0fff -r--
0018   8564        8 00000000013e0000-00000000013e7fff -rw-
***                                                                
006c   8564        1 0000000003870000-0000000003870fff -r-- 32 _DATA-0x3870000.dll
006d   8564        5 0000000003872000-0000000003876fff -r-- 32 _DATA-0x3870000.dll
etc...


I noticed that I can skip lines containing .dll in the Description as they are clearly not related to game memory. However, this is still a lot. For example, a Cheat Engine search for a 4 byte took 1 second and found 884 addresses, ranging from 01A79AD4 to 5923B7BC. My program scanned for 24 seconds (I admit that my methods are not as perfect as those of CE + I use only one thread), but I found 1408 addresses with a range from 001E72A3 to 76555294.
And here my first question is, how does CE find the beginning and end of the memory related to the game, or how does the CE skip everything unnecessary? Probably need to skip 1-2 page / -r-- / -rw- / -rwx ranges, but I'm not sure about that, and I don't want to accidentally skip the addresses I need.
Then I would like to know how to search for pointers to addresses in order to find the correct address after a restart. I think this is also related to my first question. I know how to do this in CE, but have not yet figured out how to implement it myself.
Perhaps someone has already asked similar questions somewhere on the forum, and I would be very grateful for a tip, or at least a hint where to look. I'm not as advanced as the guys on this forum, but I want to learn.
PS: not for sale, purely for my own use.
Cheat engine filter writable/readable memory regions to speed up the process and use multithreading for scans so its even faster.

Here is the logic it follows:

1) Query Mem regions and filter valid ones (store in a struct (baseAddress, size))
For each valid region increment totalMemorySize
2) Obtain scan block size (totalMemorySize / threadCount), last block will be a bit longer, so don't forget to append rest.
3) Make scan threads structs
3.a) Read process memory is super slow so don't call it on a loop for reading lets say (4 bytes), call it to read a fixed buffer size, (CE uses 1024*4 buffer size for dword scans i think) then perform your "mini scan" in that buffer.
3.b) Make scan functions that works for you, when searching for aligned memory you will skip a lot but scan speed is increased.
4) Start and wait for scan threads to end.


1)

2)

3)

3.a)
3.b)

4)

You can look at CE code its a bit messy but better than nothing
elmarcia is offline  
Thanks
1 User
Old 04/09/2021, 07:32   #3
 
AcTiViSioN911's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 32
Received Thanks: 16
Quote:
Originally Posted by elmarcia View Post
Cheat engine filter writable/readable memory regions to speed up the process and use multithreading for scans so its even faster.
Thanks a lot for the tips, I really have a lot to change. Apart from optimization, I'm stuck on the question of pointers and offsets. In the example of the game Terraria, I searched for a static address using CE, but I never found it. Instead, I found something similar, with the start of + 6 offsets to the address I needed. This THREADSTACK0 is constantly changing (only CE can work with it) and I have no idea how to find it. It looks like I'm missing something, but I reviewed many CE guides and did not find an explanation of what to do if a static address such as Terraria.exe + ** cannot be found. Perhaps this game is more complicated than the one used in the examples and where in 2 scans it was possible to find a static address ... I cannot use debuggers or any other programs, only the functionality that pcileech + memprocfs gives. I heard that it is possible to use WinDBG, but only a small amount of functionality without breakpoints, and I'm not sure if that will help me with anything. Also, I don't quite understand how to find offsets, because as I understand it, CE uses debugger with breakpoints, but I can't. So far, I manually find the addresses I need and try to identify a pattern by which I can repeat the search like a sequence of bytes before the start of the part I need), but I think this is not the best method. If you have any ideas, please share with me.
AcTiViSioN911 is offline  
Old 04/12/2021, 16:25   #4
 
AcTiViSioN911's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 32
Received Thanks: 16
I am almost satisfied with the performance of the program, and most likely this is the maximum DMA speed. The question of finding pointers and offsets is still open...

AcTiViSioN911 is offline  
Old 03/26/2022, 04:47   #5
 
elite*gold: 0
Join Date: Mar 2022
Posts: 1
Received Thanks: 0
Why not just use Cheat Engine with PCILeech directly? There's no need to write a new Cheat Engine.
iflores is offline  
Old 02/20/2023, 05:00   #6
 
elite*gold: 0
Join Date: Jul 2017
Posts: 8
Received Thanks: 0
sorry to bump this threat. the pcileech is down and just wondering if you ever made what you were working on or what
miserymodz is offline  
Old 01/10/2024, 10:10   #7
 
elite*gold: 0
Join Date: May 2017
Posts: 4
Received Thanks: 2
Quote:
Originally Posted by miserymodz View Post
sorry to bump this threat. the pcileech is down and just wondering if you ever made what you were working on or what
I'm exactly on the same boat as you. So far I've found these;



They both "work" for me. But the speed of searching a value is below par even though my DMA speed is over 180MB/s
StrawGuy is offline  
Old 02/06/2024, 22:31   #8
 
elite*gold: 0
Join Date: May 2021
Posts: 3
Received Thanks: 1
Quote:
Originally Posted by StrawGuy View Post
I'm exactly on the same boat as you. So far I've found these;



They both "work" for me. But the speed of searching a value is below par even though my DMA speed is over 180MB/s
Hey maybe you can help me ?
i installed server from the Rep. and copied pcileech.dll in the folder. When i want to start server with connectet PCISquirrell card i get an error:
[22:27:10.591] ServerMain: Initializing PCILeech...
java.lang.RuntimeException: Unable to initialize PCILeech.
at iflores.ceserver.pcileech.ServerMain.main(ServerMa in.java:71)
*** Server died with exit code -1
Mayber you can help me?

Quote:
Originally Posted by AcTiViSioN911 View Post
I am almost satisfied with the performance of the program, and most likely this is the maximum DMA speed. The question of finding pointers and offsets is still open...

Awesome... did you plan a release for this?
ltMorlock is offline  
Reply


Similar Threads Similar Threads
Sale of DMA, Screamer M.2 Upgraded version Only 250 euros
07/19/2021 - Escape from Tarkov Trading - 3 Replies
https://www.elitepvpers.com/forum/attachment.php?a ttachmentid=320237&stc=1&d=1616145866 Only 250 euros contact information: QQ:252124777 Discord:淘宝经销Q25212477 7#8980 Next-Gen Memory Access By accessing the physical memory of the host system through Direct Memory Access you can explore and analyze an operating system and its processes LIVE. This not only gives you unmatched control over the host system, you can also circumvent any software-based solutions that might prevent you from...
Großer unterschied PCIe 3.0 und PCIe 2.0?
03/07/2013 - Hardware Discussions / Questions - 3 Replies
Hey Leute will mir demnächst die Graka bestellen: Gigabyte Radeon HD7970 3GB GDDR5 + Never Settle Reloaded | Gigabyte | Radeon HD7000 Serie | AMD/ATI | Grafikkarten | Hardware | hoh.de Diese besitzt PCIe 3.0. Ich weiß dass es abwärtskompatibel ist, aber mache ich mit einem 2.0 Motherboard große einbußen? Ich will nämlich schon meine volle Grafikkarte ausnutzen können.. Und ich hätte noch 2 Fragen :P Ist dieses Netzteil gut? OCZ ZS Series 650W 80+ Bronze | 500-700 Watt | Netzteile |...
ASUS P7P55D (PCIe 2.0) mit GTX 670 windforce 3x (PCIe 3.0)
07/28/2012 - Hardware Discussions / Questions - 13 Replies
halllooooo leuteee wollte mir in der nächsten zeit eine gigabyte gtx 670 zulegen, da meine alte graka so langsam manchmal an ihre virtuellen grenzren kommt und kein PhysX unterstützt^^ meine frage ist jetzt: -mein mainboard unterstützt nur den pcie 2.0 standard, passt die graka auf das mainboard drauf und wird sie laufen( auf PCIe 2.0 geschwindigkeit) -Gibt es einen unterschied zwischen dem 2.0 und 3.0 steckplatz? (abgesehen von der verdoppelten bandbreite die eh noch keine karte...
PCIe und PCIe Gen
03/20/2012 - Technical Support - 0 Replies
Hallo, Ich hab mich ma so gefragt gibt es da eigendlich einen unterschied zwischen PCIe und PCIe Gen oder sind das beides einfach die selben?
passt pcie 2.1 auf pcie 3.0
02/12/2012 - Hardware Discussions / Questions - 13 Replies
passt eine PCIe 2.1 Graka auf einen PCIe 3.0 Slot



All times are GMT +1. The time now is 12:50.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.