How is this 68K instruction addressed?

If you are having problems finding or using cheats for an Emulator (particularly MAME/MESS) or have found a trick that you wish to share this is the place to do it. But please read the Cheat FAQ first.
Post Reply
pasky13
Posts: 27
Joined: Wed Nov 08, 2006 8:31 am

How is this 68K instruction addressed?

Post by pasky13 »

027218: move.l ($22,PC,D0.w), D0

Code: Select all

A0=0003B854, A1=0090C280, A2=00085410, A3=00179042, A4=FFFF8800, A5=00FF8000, A6=00FF8400, A7=00FF06D2, D0=00000058, D1=0000004C, D2=0009EE00, D3=FF00F002, D4=F000F000, D5=00000007, D6=0000FFFF 027218: move.l  ($22,PC,D0.w), D0
A0=0003B854, A1=0090C280, A2=00085410, A3=00179042, A4=FFFF8800, A5=00FF8000, A6=00FF8400, A7=00FF06D2, D0=00013333, D1=0000004C, D2=0009EE00, D3=FF00F002, D4=F000F000, D5=00000007, D6=0000FFFF 02721C: move.b  ($a,A6), D1
I thought it would be the pointer at 0x22 + 0x27218 + 0x58 = 0x27292 but the address that gets written to D0 does not match up with the pointer in that address. How is this calculated? Thanks.
pasky13
Posts: 27
Joined: Wed Nov 08, 2006 8:31 am

Re: How is this 68K instruction addressed?

Post by pasky13 »

Surely someone has run into this type of addressing before? =/
User avatar
Pugsy
Posts: 3675
Joined: Fri Aug 17, 2001 12:59 am
Location: North Wales, UK.
Has thanked: 1 time
Been thanked: 15 times
Contact:

Re: How is this 68K instruction addressed?

Post by Pugsy »

I can't remember, the more obscure instructions like this which you often see more of in compiled code can be worked out by looking at the memory at the time or by using a large read watchpoint, without the name of the game or the bytes needed to implement the instruction I'm not going to look.
Pugsy

Servicing your cheating needs since 1985 8)

Grab the latest cheat collection:
MAME 0.264 XML cheat collection (3 APRIL 2024) from http://www.mamecheat.co.uk or direct from:-
https://mega.nz/file/SxsQUJoT#jBdz6GLm_ ... QzFGSMms2c (ZIP Archive 3.8 MB)
pasky13
Posts: 27
Joined: Wed Nov 08, 2006 8:31 am

Re: How is this 68K instruction addressed?

Post by pasky13 »

It's Vsav, moving anakaris forward or backward.
User avatar
Pugsy
Posts: 3675
Joined: Fri Aug 17, 2001 12:59 am
Location: North Wales, UK.
Has thanked: 1 time
Been thanked: 15 times
Contact:

Re: How is this 68K instruction addressed?

Post by Pugsy »

A quick solution....you are getting confused because it uses encrypted memory so the memory viewer window is showing the encrypted data.

In the example above:-

0x22 + 0x27218 + 0x58 = 0x27292

this is correct...BUT you should look at what's in 27292 in the disassembly window rather than the memory viewer window to see the unencrypted values rather than the encrypted values.
Pugsy

Servicing your cheating needs since 1985 8)

Grab the latest cheat collection:
MAME 0.264 XML cheat collection (3 APRIL 2024) from http://www.mamecheat.co.uk or direct from:-
https://mega.nz/file/SxsQUJoT#jBdz6GLm_ ... QzFGSMms2c (ZIP Archive 3.8 MB)
pasky13
Posts: 27
Joined: Wed Nov 08, 2006 8:31 am

Re: How is this 68K instruction addressed?

Post by pasky13 »

I see, thanks.
Post Reply