Ofunniku / dwarftherapist

Automatically exported from code.google.com/p/dwarftherapist
Other
0 stars 0 forks source link

[linux] basic support for v0.31.04 (proposition) #242

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I did some hacking to fix the linux version. In the end, almost no changes.
Here are the results (maybe I should send a patch).

== Values I found for etc/memory_layouts/linux/v0.31.04.ini

[addresses]
translation_vector  = 0x09324fec
language_vector  = 0x09324fd4
creature_vector   = 0x092e3a94
#and/or? creature_vector   = 0x092e3aa0
dwarf_race_index  = 0x092cb608

[dwarf_offsets]
sex         = 0x00A6
id          = 0x00A8
current_job   = 0x0258
labors        = 0x051C
souls         = 0x0500
skills        = 0x01C4
traits        = 0x01DC
happiness     = 0x05AC

== About src/dfinstancelinux.cpp

Fix needed (so the dictionaries are correctly loaded) in:
uint DFInstanceLinux::read_raw(const uint &addr, const uint &bytes, void
*buffer)
When data is > 4096, buffer is overridden
A way to fix: appending the results in a QByteArray data, like in
src/memoryreader.cpp

Added a "dummy" function (calling the void *buffer one), named:
int DFInstanceLinux::read_raw(const uint &addr, const uint
&bytes,QByteArray &buffer) 

Original issue reported on code.google.com by erra...@gmail.com on 28 May 2010 at 2:12

GoogleCodeExporter commented 9 years ago
Sorry, I didn't notice your changes, I was working on a version from days 
ago... I'm
not used to mercurial.
Though it seems there are other problems now. At least, the dwarf_offsets 
should be fine.

Original comment by erra...@gmail.com on 28 May 2010 at 3:00

GoogleCodeExporter commented 9 years ago
Heh yea, I recently got a linux box again and have been hacking DT back into 
working 
order. Thank you for those offsets, I didn't have all of them yet. I'd expect 
cursory 
support for linux again in the near future.

Original comment by treyst...@gmail.com on 28 May 2010 at 3:24

GoogleCodeExporter commented 9 years ago
Thanks to you for all this.

Some other likely dwarf_offsets

  flags1        = 0x008C
  flags2        = 0x0090

I've been lazy and got a working build by dropping the part about dwarfs states 
and
memory mapping check.

Original comment by erra...@gmail.com on 28 May 2010 at 4:41

GoogleCodeExporter commented 9 years ago
Almost everything is working as of rf99e980771

Do you mind giving it an informal try errabes?

Original comment by treyst...@gmail.com on 1 Jun 2010 at 10:58

GoogleCodeExporter commented 9 years ago
I built the latest version (just by adding back read_dword and related), and
everything I tried worked fine.
For information, I'm running debian unstable.

Original comment by erra...@gmail.com on 2 Jun 2010 at 9:06

GoogleCodeExporter commented 9 years ago

Original comment by treyst...@gmail.com on 30 Jun 2010 at 2:11