v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Editing User:Mattmoss/MacMemoryHacking

Jump to navigation Jump to search

Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.


The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
 
==Addresses==
 
==Addresses==
 
The table below was taken (as a template) from  [[User:AzureLightning/Memory_research|AzureLightning's memory research]] page. I've copied it here as a work-in-progress for myself, to keep track of data, not to steal or misrepresent anything of AzureLightning's work. This is information gathering for Mac memory hacking.
 
The table below was taken (as a template) from  [[User:AzureLightning/Memory_research|AzureLightning's memory research]] page. I've copied it here as a work-in-progress for myself, to keep track of data, not to steal or misrepresent anything of AzureLightning's work. This is information gathering for Mac memory hacking.
 +
 +
The "addresses" are actually offets into a single (approx. 10MiB) chunk of memory pulled from the running executable that I search rather than the whole process memory (which includes other libs and dynamically loaded crap that has nothing to do with DF). For others interested in hacking around and want to know the particular memory chunk I'm pulling...
 +
 +
* Run DF. Start game, pause it.
 +
* Run '''ps''' on the command-line to get DF's process ID.
 +
* Run '''vmmap <ps> | grep '__DATA.*dwarfort.exe' ''' on the command-line, replacing <ps> with the number from the previous step.
 +
* You should get output that looks something like this:
 +
 +
__DATA                00799000-01247000 [ 10.7M] rw-/rwx SM=COW  dwarfort.exe
 +
__DATA                01247000-01275000 [  184K] rw-/rwx SM=S/A  dwarfort.exe
 +
 +
That 10.7M is the desired chunk of data. The two numbers before it is an address range you can use in calls to '''vm_read_overwrite''' (and supposedly '''vm_write'''). (Don't assume that those addresses are consistent; I suspect they are, but I don't know for certain.) If you know what '''vm_read_overwrite''' is, you should be ready to go. If you don't..... well, you'll just have to wait until someone comes up with the tools you like, because beyond what I've just shown you, it's now hunt, peck, code, debug, and profit time. (Okay, no profit.)
  
 
How far am I with hacking? Right now, I've just started. It'll take me a while, especially since I'm at school and doing tons of reading and other things that are far more important than DF. This page (and my main user page) will change as things progress.
 
How far am I with hacking? Right now, I've just started. It'll take me a while, especially since I'm at school and doing tons of reading and other things that are far more important than DF. This page (and my main user page) will change as things progress.
Line 13: Line 25:
  
 
|-
 
|-
| 0x00799104
+
| 0x00000104
 
| 4
 
| 4
 
| long
 
| long
Line 20: Line 32:
  
 
|-
 
|-
| 0x00799108
+
| 0x00000108
 
| 4
 
| 4
 
| long
 
| long
Line 27: Line 39:
  
 
|-
 
|-
| 0x0079910C
+
| 0x0000010C
 
| 4
 
| 4
 
| long
 
| long
Line 65: Line 77:
  
 
|-
 
|-
| 0x009E4FD0
+
| 0x0024BFD0
 
| 4
 
| 4
 
| long
 
| long
Line 72: Line 84:
  
 
|-
 
|-
| 0x009E4FD4
+
| 0x0024BFD4
 
| 4
 
| 4
 
| long
 
| long
Line 79: Line 91:
  
 
|-
 
|-
| 0x009E4FD8
+
| 0x0024BFD8
 
| 4
 
| 4
 
| long
 
| long
Line 86: Line 98:
  
 
|-
 
|-
| 0x009E4FDC
+
| 0x0024BFDC
 
| 4
 
| 4
 
| long
 
| long
Line 93: Line 105:
  
 
|-
 
|-
| 0x009E4FE0
+
| 0x0024BFE0
 
| 4
 
| 4
 
| long
 
| long
Line 100: Line 112:
  
 
|-
 
|-
| 0x009E4FE4
+
| 0x0024BFE4
 
| 4
 
| 4
 
| long
 
| long

Please note that all contributions to Dwarf Fortress Wiki are considered to be released under the GFDL & MIT (see Dwarf Fortress Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)