English Amiga Board

English Amiga Board (http://eab.abime.net/index.php)
-   request.UAE Wishlist (http://eab.abime.net/forumdisplay.php?f=56)
-   -   WinUAE - Trainer Plugin (http://eab.abime.net/showthread.php?t=95606)

tlenl 02 January 2019 20:06

Beg your pardon i've just expressed myself in the wrong way.

I agree with you (as i've said in the previous post) with everything.

I've just elaborated my post from a "user" perspective.

I would expect to indicate in the mask the offset of the variable of interest, and you behind the scene would decide the better approach about what part of the mask before or after the indicated offset to monitor to happen.

I was just too pricky on the sintax, sorry :)

As soon i'll do some tests (actually i have 3 variables on gods to fingerprint and test, lives, energy, money).

PS. could you point me to the link?

Thank you very much

DamienD 02 January 2019 20:37

Quote:

Originally Posted by tlenl (Post 1294741)
PS. could you point me to the link?

Probably this tlenl: http://www.winuae.net/files/b/winuae.7z ;)

tlenl 02 January 2019 20:45

@DamienD
Thank you for the link :)

PS.
Atm winuae.net is down from here.
I'll check later.

DamienD 02 January 2019 21:26

Quote:

Originally Posted by tlenl (Post 1294755)
PS.
Atm winuae.net is down from here.
I'll check later.

Yup, as are a few other "abime.net" resources currently:

http://i67.tinypic.com/2r21wmt.png

i.e:

... HOL
... Amiga Magazine Rack

I'm sure RCK will fix shortly ;)

Toni Wilen 06 January 2019 14:21

Tiny update: multiple [patch] sections are now supported, "name" field added (name of patch/trainer). Some logging while parsing also added.

EDIT: multiple "data" strings are also now supported inside single section, for example:

[patch]
name=Test patch #1

data=200e46802d400026200c6602 ; blah
offset=2
eaoffset=0
replacedata=1234
replaceoffset=4

data=11223344556677889900
offset=10

Next "data" = new "hidden" section starts.
Replacedata = copy data in replacedata over found data + offset. This makes "physical" patch instead of letting memwatch point system to change/freeze the data.

Toni Wilen 12 January 2019 13:35

Basic operations should be mostly implemented now.

GUI/keyshort support will be done later, first I need to have at least 3 trainers (different games) with at least 2 different options. Must be also single disk games, I am not bothered to change disks :)

Current ini spec. Some options have changed. enable=true will now enable it fully (memwatch point added/replacedata copied)

Code:


[patch]
name=name
enable=true/false

; patch descriptor
data=200e46802d400026200cxx02 ; this is comment
offset=2
access=write
setvalue=<value>
type=nop/freeze/set/setonce

; patch descriptor
data=11223344556677889900
offset=10
replacedata=4e71
replaceoffset=4

; next patch section
[patch]


name: name of the option (appears in GUI in the future)
enable: true = automatically enabled at startup. (false=manually activated using key shortcut etc.., will be implemented later)

data: match data, when emulated CPU executes first opcode of this data and following words also match: match is detected. x = anything.
offset: word offset from beginning of "data" that points to memory read/write instruction that you want to "patch". Default=0.
access: read=read access, write=write access. Default: write if instruction does both memory read and write, read if read-only.

setvalue: value to write if type is set or setonce.
type=nop: found instruction's write does nothing. This instruction only. Other instruction(s) modifying same memory location are not skipped.
type=freeze: found instruction's memory read always returns value in memory. Write does nothing.
type=set: found instruction's memory read always returns "setvalue" contents. Write works normally.
type=setonce: "setvalue" contents are written to memory when patch is detected.

replacedata: data to be copied over data + replaceoffset. x masking is also supported. Memory is modified.
replaceoffset: word offset from data.


BippyM 12 January 2019 18:34

I have started to try and play with this and am working with rainbow islands and the player 1 life reduction, however it doesn't seem to work (more like I am doing this wrong)

The unique id is

Code:

5368 0006 7000 1140 0026 1140 002C 1140

00011C4A 5368 0006                SUB.W #$01,(A0,$0006) == $00000006 [0276]
00011C4E 7000                    MOVE.L #$00,D0
00011C50 1140 0026                MOVE.B D0,(A0,$0026) == $00000026 [42]
00011C54 1140 002c                MOVE.B D0,(A0,$002c) == $0000002c [00]
00011C58 1140 002a                MOVE.B D0,(A0,$002a) == $0000002a [08]
00011C5C 3228 0012                MOVE.W (A0,$0012) == $00000012 [4292],D1
00011C60 0801 000e                BTST.L #$000e,D1

naturally all I need to do is change the sub.w to nop or freeze the address.

here is my patch code

Code:


[patch]
name=Infinite lives player 1
enable=true

;patch descriptor
data=536800067000114000261140002c1140
offset=0
;eaoffset=0
;replacedata=4e714e71
;replaceoffset=0
access=read
;setvalue=
type=nop

This doesn't work, and neither does the replacedata if I use that instead. Any tips on what i'm doing wrong here?

Toni Wilen 12 January 2019 20:00

Remove "access=read" because ignoring reads does not do much (default is writes), everything else appears to be fine, and redownload winuae.7z, latest update broke parsing..

BippyM 12 January 2019 20:06

Still not working.

Toni Wilen 12 January 2019 20:08

Yes, it does. (I tested the game!).

Make sure you downloaded update version (It is very common to get cached version if downloaded too soon). Check the log.

BippyM 12 January 2019 20:11

Sorted and working :)

Now I will add another trainer option and see if it works

Mclane 13 January 2019 16:08

How would all this be organised, a set of ini's that come with WinUAE (unlikely, increases file footprint even tho its tiny ini's) or hosted on here as a download.

I truly love the idea because a. I'm a cheat and b. I'm not so good at the fast stuff now so cheats for untouched games sounds perfect. No crack mess ups and a clean game..

BippyM 13 January 2019 16:29

I have created a folder inside my winuae folder called trainers. I pop the ini file in there and then from the game config i'd point it to the ini. I think there does need to be a better way of doing this as the config for every game would need to be adjusted for its individual trainer.

@Toni. Maybe have a trainer tab that lists all trainers within the trainer folder, and when selecting one within the gui it brings up the various options for that trainer. Once enabled it is active. This would work because it'll only work with the specific game due to the fingerprint ID

Toni Wilen 13 January 2019 18:44

I don't have any trainer file selection plans (except normal file dialog).

I also don't see any reliable and non-complex ways to make it automatic. "Fingerprint" can't be used because most games are compressed. Disk image based matching probably is the only possible way but there are far too many different ways to name them. Also it wouldn't work if game is hd installed.

I am not going to include it with winuae, packaging, dowloads etc.. are someone else's problem as usual :)

Mclane 13 January 2019 21:23

Got it Toni... :)

Still appreciate the idea and the work by all...Thanks guys...

BippyM 22 January 2019 11:13

Are memwatch points broken? I enter the following into the debugger

Code:

w 0 e330 100 ALL
to monitor any changes to the player data in Rainbow Islands and it doesn't trigger. I know the score is stored at $e330, lives $e336, Bonuses at $e340 etc..

Toni Wilen 22 January 2019 16:38

Sounds like too old version. Because this is alpha version, it will change randomly: build date is required.

BippyM 22 January 2019 17:44

I used this one http://www.winuae.net/files/b/winuae.7z

Downloaded today

Toni Wilen 22 January 2019 17:49

Download date is irrelevant (because it is common to get cached copy in some situations). Date in GUI is important.

EDIT: Of course it must be also tested if it worked in last official version. Alpha = very unsupported.

BippyM 23 January 2019 10:20

Sorted. Windows didn't copy it over properly from the archive. Sorted that and memwatch is working. The trainer function has since stopped working. (same game and same config/ini files). I'll muster up some logs shortly


All times are GMT +2. The time now is 04:51.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.

Page generated in 0.07096 seconds with 11 queries