View previous topic :: View next topic |
Author |
Message |
bknight2602 Grandmaster Cheater Reputation: 0
Joined: 08 Oct 2012 Posts: 577
|
Posted: Sun Oct 09, 2016 9:25 am Post subject: Changing addresses in mass with code. |
|
|
I'm working on a table within the forum FF8_EN.ct
All of the addresses are in the form of
FF8_EN.exe+18FE0EC
I used a text program to change those address to the form
psxfin.exe+18FE0EC
Now all the addresses in the psxfin seem to be + 0x4EF9740 from the FF8_EN addresses.
What programming steps would be required to bulk change all the addresses?
I am stumped to the point of not knowing where to start.
|
|
Back to top |
|
|
sbryzl Master Cheater Reputation: 6
Joined: 25 Jul 2016 Posts: 252
|
Posted: Sun Oct 09, 2016 11:00 am Post subject: |
|
|
I use autohotkey to automate changing addresses by a set amount. This is the script I use for it.
Code: | SetFormat, Integerfast, H
!x::
send {alt up}
/* ^!(enter) opens table entry for editing, tabbing changes item
Sendinput ^!{enter}
Sendinput {tab 3}
sleep 100
*/
;sendinput {home} ;places cursor at start
;Sendinput +{end} ;highlights to end
clipboard :=
sendinput ^c ;places on clipboard
clipwait
StringReplace, clipboard, clipboard,%clipboard%,0x%clipboard% ;adds '0x' context to beginning
var := clipboard ;sends to variable
var += 0x4 ;adds 0x04, use any hex number
StringReplace,newvar,var,0x ;puts 0x on beginning
Sendinput %newvar% ;prints to output
;Sendinput {home} ;jumps to front
;Sendinput {Del}{Del} ;removes 0x context
return |
Autohotkey must be run as administrator to have access to cheat engine.
|
|
Back to top |
|
|
++METHOS I post too much Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Sun Oct 09, 2016 11:00 am Post subject: |
|
|
Not entirely sure what you're trying to do, but it's not likely to work (assuming you're trying to port PC cheats over to an emulator by simply changing out the module base).
|
|
Back to top |
|
|
bknight2602 Grandmaster Cheater Reputation: 0
Joined: 08 Oct 2012 Posts: 577
|
Posted: Sun Oct 09, 2016 11:27 am Post subject: |
|
|
++METHOS wrote: | Not entirely sure what you're trying to do, but it's not likely to work (assuming you're trying to port PC cheats over to an emulator by simply changing out the module base). |
Yes attempting to take a pc game address and converting them to emulator
addresses. You may be correct that it won't work, but I won't know until I change all the addresses.
Currently I have manually adjusted the first two table addresses:
FF8_EN.exe+18FE0EC
FF8_EN.exe+18FE0E8
psxfin.exe+67F782C
psxfin.exe+67F7828
The values seem to be correct after the change.
|
|
Back to top |
|
|
panraven Grandmaster Cheater Reputation: 55
Joined: 01 Oct 2008 Posts: 942
|
Posted: Sun Oct 09, 2016 11:51 am Post subject: |
|
|
It may work if FF8_En.exe is actually an emulator which work similar with psxfin.exe that they reference the emulated ram base as a FIXED offset from its respective *.exe base.
May try add a memory record in the ORIGINAL FF8_EN.ct:
Code: |
unregistersymbol(FF8_EN.exe)
[ENABLE]
define(FF8_EN.exe,psxfin.exe+4EF9740)
registersymbol(FF8_EN.exe)
[DISABLE]
|
and activate it after attached to psxfin.exe
bye~
_________________
- Retarded. |
|
Back to top |
|
|
sbryzl Master Cheater Reputation: 6
Joined: 25 Jul 2016 Posts: 252
|
Posted: Sun Oct 09, 2016 12:24 pm Post subject: |
|
|
Another solution is to use notepad++ replace feature. That should be pretty simple if you are always replacing the same text.
|
|
Back to top |
|
|
bknight2602 Grandmaster Cheater Reputation: 0
Joined: 08 Oct 2012 Posts: 577
|
Posted: Sun Oct 09, 2016 1:41 pm Post subject: |
|
|
Toying with ideas
Code: | al = getAddressList()
for x = 0, 2 do
print((addresslist_getMemoryRecordByID(al,x)).Description)
end |
received the following;
Current HP
Slot 2 Current HP
Error:[string "al = getAddressList()..."]:3: attempt to index a nil value
Script Error
I remember trying to use Index a while back and one of the members indicated ID was the way to go because Index values could be nil, if a record was deleted for example.
Why does the code above have a nil value to a ID number? Further is there a better way to write that little procedure to skip over the nils if any?
|
|
Back to top |
|
|
bknight2602 Grandmaster Cheater Reputation: 0
Joined: 08 Oct 2012 Posts: 577
|
Posted: Thu Oct 13, 2016 2:03 pm Post subject: |
|
|
++METHOS wrote: | Not entirely sure what you're trying to do, but it's not likely to work (assuming you're trying to port PC cheats over to an emulator by simply changing out the module base). |
You were right and wrong, but since I don't know what you exactly meant by "not likely to work", I'll give you the befit of doubt.
A. Some associates working with excel built language to do what I was attempting, not a problem.
B. After that procedure nearly all the addresses are correct(from the table I built), after applying a psxfin.exe = constant 0x400000 and whatever additional 0x0xxxxx was necessary to locate the first address.
C. The problem occurs every time psxfin opens, it allocates the game to different locations (all in the same relative addresses locations). So the procedure fails in that light.
|
|
Back to top |
|
|
++METHOS I post too much Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Thu Oct 13, 2016 2:57 pm Post subject: |
|
|
I was not wrong. This is typical for memory that occurs inside of an emulated environment.
|
|
Back to top |
|
|
bknight2602 Grandmaster Cheater Reputation: 0
Joined: 08 Oct 2012 Posts: 577
|
Posted: Thu Oct 13, 2016 3:04 pm Post subject: |
|
|
Typical in fceu and znes emulators.
|
|
Back to top |
|
|
++METHOS I post too much Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Thu Oct 13, 2016 3:17 pm Post subject: |
|
|
And others, obviously.
|
|
Back to top |
|
|
bknight2602 Grandmaster Cheater Reputation: 0
Joined: 08 Oct 2012 Posts: 577
|
Posted: Thu Oct 13, 2016 3:23 pm Post subject: |
|
|
I don't know as I have not tried anything but those three(fceu, znes and psxfin) plus an attempt at espxe, emulator for one game, found set-ups for add-ins too difficult, so not much work there.
|
|
Back to top |
|
|
|