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 » Thu Oct 18, 2012 7:20 pm

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 » Fri Nov 02, 2012 5:06 pm

Surely someone has run into this type of addressing before? =/

User avatar
Pugsy
Posts: 3304
Joined: Fri Aug 17, 2001 12:59 am
Location: North Wales, UK.
Contact:

Re: How is this 68K instruction addressed?

Post by Pugsy » Sat Nov 03, 2012 11:44 am

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 ;-)

Grab the latest cheat collection:
MAME 0.206 XML cheat collection 08 FEBRUARY 2018) from http://www.mamecheat.co.uk or direct from:-
http://www.mediafire.com/file/ybw7c4xyd ... at0206.zip (ZIP Archive 1931 KB)

pasky13
Posts: 27
Joined: Wed Nov 08, 2006 8:31 am

Re: How is this 68K instruction addressed?

Post by pasky13 » Tue Nov 13, 2012 1:34 pm

It's Vsav, moving anakaris forward or backward.

User avatar
Pugsy
Posts: 3304
Joined: Fri Aug 17, 2001 12:59 am
Location: North Wales, UK.
Contact:

Re: How is this 68K instruction addressed?

Post by Pugsy » Tue Nov 13, 2012 8:16 pm

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 ;-)

Grab the latest cheat collection:
MAME 0.206 XML cheat collection 08 FEBRUARY 2018) from http://www.mamecheat.co.uk or direct from:-
http://www.mediafire.com/file/ybw7c4xyd ... at0206.zip (ZIP Archive 1931 KB)

pasky13
Posts: 27
Joined: Wed Nov 08, 2006 8:31 am

Re: How is this 68K instruction addressed?

Post by pasky13 » Fri Nov 16, 2012 5:14 am

I see, thanks.

Post Reply