Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Cheat Engine 6.4 Released
Goto page Previous  1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Thu Jun 26, 2014 2:06 am    Post subject: Reply with quote

Getting this error while trying to generate trainer:



It seems adding custom sounds for activate/deactivate must follow specific bit sample rates. In order to circumvent this error, I had to re-sample my 352kbps wav files to 256kbps.

Also, the activate/deactivate sounds work properly for toggle (on/off), but not for enable/disable (on/off). For example, 'toggle on' plays 'activate' sound and 'toggle off' plays 'deactivate' sound. However, 'enable' plays the 'activate' sound, but 'disable' also plays the activate sound.

Thanks.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25296
Location: The netherlands

PostPosted: Thu Jun 26, 2014 5:27 am    Post subject: Reply with quote

can you post a link to the wav file you originally used? I doubt it's the sample rate but more an issue with converting a binary file to xml

edit: Actually, I think just the filename would be enough for me to test. I think something extremely stupid is going on with the xml module

e.g if you name your file as "325462.pdf" it will fail, but "bla.pdf" will work fine
guess it's a rule that xml names may not start with a number...

i've uploaded a new build that fixes these two last issues

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Thu Jun 26, 2014 9:19 am    Post subject: Reply with quote

64bit disassembler


_________________
Back to top
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25296
Location: The netherlands

PostPosted: Thu Jun 26, 2014 9:46 am    Post subject: Reply with quote

that's lea ebx,[eax-01] (67 8d 58 ff)
that 67 is quite useless here as far as I can see as it causes the first 32-bit of the result to get stored into ebx (which would truncate it to 32-bit anyhow)

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Thu Jun 26, 2014 10:03 am    Post subject: Reply with quote

yeah. I've just found this by simply attaching 64bit CE to itself and disassembling executable memory.
_________________


Last edited by mgr.inz.Player on Thu Jun 26, 2014 10:09 am; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25296
Location: The netherlands

PostPosted: Thu Jun 26, 2014 10:08 am    Post subject: Reply with quote

anyhow, it gives an opportunity to show off a new feature of CE
(not so useful in this case, but still funny:)
Code:

function assemblerfix(sender, address, ldd)
  local bytes=readBytes(address, 4, true)

  if bytes[1]==0x67 and bytes[2]==0x8d and bytes[3]==0x58 and bytes[4]==0xff then
    ldd.address=address
    ldd.opcode="lea"
    ldd.parameters="[eax-01]"
    ldd.description="stupid method to get the address of eax-1"
    ldd.bytes={0x67, 0x8d, 0x58, 0xff}
    return ldd.opcode, ldd.description
  else
    return nil,nil
  end


--[[
      address: integer - The address that was disassembled
      opcode: string - The opcode without parameters
      parameters: string - The parameters
      description: string - The description of this opcode
      bytes: table - A table containing the bytes this instruction consists of (1.. )

      modrmValueType: DisAssemblerValueType  - Defines the type of the modrmValue field (dvtNone=0, dvtAddress=1, dvtValue=2)
      modrmValue: Integer - The value that the modrm specified. modrmValueType defines what kind of value

      parameterValueType: DisAssemblerValueType
      parameterValue: Integer - The value that the parameter part specified

      isJump: boolean - Set to true if the disassembled instruction can change the EIP/RIP (not ret)
      isCall: boolean - Set to true if it's a Call
      isRet: boolean - Set to true if it's a Ret
      isConditionalJump: boolean - Set to true if it's a conditional jump
--]]
end

registerGlobalDisassembleOverride(assemblerfix)

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Thu Jun 26, 2014 10:12 am    Post subject: Reply with quote

Can we override assembler as well ?
_________________
Back to top
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25296
Location: The netherlands

PostPosted: Thu Jun 26, 2014 10:16 am    Post subject: Reply with quote

yes, registerAssembler

Code:

registerStructureNameLookup(function(address): name, address OPTIONAL):
  Registers a function to be called when dissect data asks the user for the name of a new structure define. If you have code that can look up the name of a structure, and perhaps also the real starting point, you can use this to improve the data dissection.

unregisterStructureNameLookup(ID)

registerAssembler(function(address, instruction):bytetable)
  Registers a function to be called when the single line assembler is invoked to convert an instruction to a list of bytes
  Return a bytetable with the specific bytes, or nil if you wish to let another function, or the original x86 assembler to assemble it

unregisterAssembler(ID): Unregisters the registered assembler

registerAutoAssemblerPrologue(function(script, syntaxcheck))
  Registers a function to be called when the auto assembler is about to parse an auto assembler script. The script you get is after the [ENABLE] and [DISABLE] tags have been used to strip the script to the according one, but before comment stripping and trimming has occured

  script is a Strings object which when changed has direct effect to the script

unregisterAutoAssemblerPrologue(ID)

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Thu Jun 26, 2014 10:43 am    Post subject: Reply with quote

Let say I want "NOP8" or "nop8" to be assembled into 0F 1F 84 00 00 00 00 00

Then, I will use this
Code:
registerAssembler(
function (address, instruction)
   if instruction:upper()=="NOP8" then
    return {0x0F, 0x1F, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00}
   else
    return nil
   end
end
)

_________________
Back to top
View user's profile Send private message MSN Messenger
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Thu Jun 26, 2014 12:41 pm    Post subject: Reply with quote

Dark Byte wrote:
edit: Actually, I think just the filename would be enough for me to test. I think something extremely stupid is going on with the xml module
-You are right. The original files had numerical names, but I changed them to be alpha-based in lieu of overwriting the originals. Good catch.
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Thu Jun 26, 2014 3:11 pm    Post subject: Reply with quote

Dark Byte wrote:
anyhow, it gives an opportunity to show off a new feature of CE
(not so useful in this case, but still funny:)

problem with your script, 67 8D 58 FF is disassembled to "lea [eax-1]" instead of "lea ebx,[eax-1]"
and highlighting is messed,
and copy to clipboard doesn't work as should (ctrl+c or copy options from context menu).


EDIT:
Here my multibyte nops and padding:
http://forum.cheatengine.org/viewtopic.php?t=574426


There shouldn't be a problem with storing/reading data by using MOVDQA, ORPS, CVTTPD2DQ, PADDQ, MULPS, MOVAPS, MOVAPD
Code:

...
...

newmem:
...
...
...
...
...

PADDING 16
placeToStoreAlignedPackedSinglePrecisionFloatingPointValues:
dd 0
dd 0
dd 0
dd 0

...
...

_________________
Back to top
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25296
Location: The netherlands

PostPosted: Thu Jun 26, 2014 5:59 pm    Post subject: Reply with quote

just be aware of some extra nops when using address based assembling (or just not properly working at all)

aa scripts assemble code twice. Once with an absurd address to force out the biggest possible size the instruction will need, build up label locations, and then assembles the actual instruction. If afterwards it appears the extra bytes where not needed, it places nop's

(So I recommend managing the alignment yourself by placing variables first in the script/allocated memory)


and yes, in the example of mine could use some fixes, the return parameter is a bit wrong (used by some of the older disassembler parsers, and awareness of the visual disassembler)

Code:

unregisterGlobalDisassembleOverride(assemblerfix)

function assemblerfix(sender, address, ldd)
  local bytes=readBytes(address, 4, true)

  if bytes[1]==0x67 and bytes[2]==0x8d and bytes[3]==0x58 and bytes[4]==0xff then
    ldd.address=address
    ldd.opcode="lea"
    if sender.syntaxhighlighting then
      ldd.parameters="{R}ebx{N},[{R}eax{N}-{H}1{N}]"
    else
      ldd.parameters="ebx,[eax-1]"
    end
    ldd.description="stupid method to get the address of eax-1"
    ldd.bytes={0x67, 0x8d, 0x58, 0xff}
    return string.format("%.8x", ldd.address).." - 67 8d 58 ff - "..ldd.opcode.." "..ldd.parameters, ldd.description
  else
    return nil,nil
  end


--[[
      address: integer - The address that was disassembled
      opcode: string - The opcode without parameters
      parameters: string - The parameters
      description: string - The description of this opcode
      bytes: table - A table containing the bytes this instruction consists of (1.. )

      modrmValueType: DisAssemblerValueType  - Defines the type of the modrmValue field (dvtNone=0, dvtAddress=1, dvtValue=2)
      modrmValue: Integer - The value that the modrm specified. modrmValueType defines what kind of value

      parameterValueType: DisAssemblerValueType
      parameterValue: Integer - The value that the parameter part specified

      isJump: boolean - Set to true if the disassembled instruction can change the EIP/RIP (not ret)
      isCall: boolean - Set to true if it's a Call
      isRet: boolean - Set to true if it's a Ret
      isConditionalJump: boolean - Set to true if it's a conditional jump
--]]
end

registerGlobalDisassembleOverride(assemblerfix)

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Redouane
Master Cheater
Reputation: 3

Joined: 05 Sep 2013
Posts: 363
Location: Algeria

PostPosted: Fri Jun 27, 2014 1:52 pm    Post subject: Reply with quote

Hey Dark-Byte,I found a bug:
Attach to a process,open a new scan tab (CTRL+T),switch the scan type to 'string',the Caption of the checkboxes 'unicode' and 'Case sensitive' get erased.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Mon Jun 30, 2014 5:40 pm    Post subject: Reply with quote

Running the latest build 6.4.0.4107, adding the underscore prefix to audio files seems to be causing the same error as before...at least, I assume so because I can't add a custom audio file for enable/disable now.

Thanks.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25296
Location: The netherlands

PostPosted: Mon Jun 30, 2014 6:22 pm    Post subject: Reply with quote

check that the filenames all are normal english names. Rename them inside the table if you have to
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 3 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites