need help pre-binding cheat keys for my MAME cab

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
darthbane2k
Posts: 3
Joined: Tue Feb 21, 2006 10:07 pm

need help pre-binding cheat keys for my MAME cab

Post by darthbane2k »

I have recently installed a light gun on my MAME cabinet and have noticed that games such as lethal enforcers 1 (llethalen), lethal enforcers 2 (le2) and under fire (undrfire)cannot reload no matter what key you map or press. this according to MAWS is because of a bug to do with off screen co-ordinates. the only way these games are at all playable is to enable the INFINATE AMMO cheats which eliminates the need to reload at all.

Now, I read the FAQ and tried to preload the cheat for lethal enforcers 2 LE2 adding the code to the bottom of cheats.dat, the game launched but did not move past the crosshair screen - normally this goes into the title screen. disabling the cheat made the game load normally. so It seems to get these games to work I CANNOT pre load the cheat.
My next idea is to activate the cheat using a button on the gun. there is a C button I would like to use. I press tab in the game, goto cheat engine and set the key to C. however when I exit the game and load it again, this setting has not saved!

Now what I would like to do is to pre-bind the infinate ammo cheats for all three of these games to the 'c' key - I am unsure how to do this, what to put in cheat.dat and where to put it.

Please could someone help me as im totally confused!
kelvSYC
Posts: 1121
Joined: Thu Sep 27, 2001 1:00 am
Location: Calgary, AB, Canada

Post by kelvSYC »

Pre-enable is typically not a good idea as most arcade machines do read/write memory tests which the cheat could interfere with when it boots.

As for key binding, check viewtopic.php?t=2227 for info on key prebinding. It's been a fairly common topic with ample coverage.
kelvSYC's Guide to the Cheat Engine - http://members.shaw.ca/kelvsyc/cheatguide.html

The New Move List Cheat Collection - http://mamecheat.co.uk/forums/viewtopic.php?p=6469

Underscore Command - What better game is there?
darthbane2k
Posts: 3
Joined: Tue Feb 21, 2006 10:07 pm

Post by darthbane2k »

kelvSYC wrote:Pre-enable is typically not a good idea as most arcade machines do read/write memory tests which the cheat could interfere with when it boots.

As for key binding, check viewtopic.php?t=2227 for info on key prebinding. It's been a fairly common topic with ample coverage.
I read this thread and it makes NO sense to me. Where does he in cheat.dat specify the key to bind it to and where abouts does he place that line in the script???

Its all very confusing, could someone PLEASE just give me a specific example using lethal enforcers 2 as to how to pre bind the unlimited ammo cheat to the C button
ShimaPong
Posts: 1063
Joined: Wed May 21, 2003 4:19 pm
Location: Japan

Post by ShimaPong »

It is hard to understand pre-enable and pre-activation key for a beginner because any information on FAQ etc is too abstract to comprehend.

Pre-activation key :
1) Put the following code after the line of "Infinite Ammo PL1".
:le2:63004000:00000002:000000xx:00000000:Assign Infinite Ammo PL1 to xx-button

Code: Select all

le2:0:C01316:06:000:Infinite Ammo PL1
:le2:63004000:00000002:000000xx:00000000:Assign Infinite Ammo PL1 to xx-button
The position of the code for pre-activation is free as long as put after a code you want to assign.
But if you put before the line of "Infinite Ammo PL1", it doesn't work.
Therefore the following is wrong example.

Code: Select all

:le2:63004000:00000002:000000xx:00000000:Assign Infinite Ammo PL1 to xx-button
le2:0:C01316:06:000:Infinite Ammo PL1
CAUTION : If you join another cheat file, need to modify the code index too.

2) Replace "xx" by the key index of C-button. but I don't know your input.
In my Hori PS joypad which has 6-buttons allocation like Sega Saturn, C-button is "R1" and this key index is "77".

Code: Select all

le2:0:C01316:06:000:Infinite Ammo PL1
:le2:63004000:00000002:00000077:00000000:Assign Infinite Ammo PL1 to R1
In my case, the key index for 1P joypad is from 6E to 7B.

3) Check current setting of the activation key in cheat menu -> Add/Edit a cheat.
If pre-activation code is available, activation key is set from the beginning.

Pre-Enable :
This game has RAM/ROM check at boot. Therefore if you enable any pre-enable code, the game will fail to boot due to RAM or ROM error.
But the following code makes the game boot up in spite of working pre-enable.

Code: Select all

:le2:20800000:200CC8:00000060:FFFFFFFF:Skip RAM/ROM Check Error
:le2:20810000:201020:00000060:FFFFFFFF:Skip RAM/ROM Check Error (2/2):1st = RAM, 2nd = ROM
Setting pre-enable for the above code, you will be able to work other pre-enable codes too.

Code: Select all

:le2:64004000:00000x:00000000:00000000:Pre-Enable "Skip RAM/ROM Check Error"
Modify a code index. When you put Skip code after "Infinite Ammo PL2", it is "5" because skip code is in 5th position.
The position of pre-enable code oneself is the same as pre-activation.

Code: Select all

:le2:20800000:200CC8:00000060:FFFFFFFF:Skip RAM/ROM Check Error
:le2:20810000:201020:00000060:FFFFFFFF:Skip RAM/ROM Check Error (2/2):1st = RAM, 2nd = ROM
:le2:64004000:000005:00000000:00000000:Pre-Enable "Skip RAM/ROM Check Error"
So...

Code: Select all

; [ Lethal Enforcers II: Gun Fighters (ver EAA) ]
le2:0:C012AD:09:000:Infinite Credits
le2:0:C012F4:05:000:Infinite Lives PL1
le2:0:C01316:06:000:Infinite Ammo PL1
:le2:64004000:000002:00000000:00000000:Pre-Enable "Infinite Ammo PL1"
:le2:63004000:000002:00000077:00000000:Assign "Infinite Ammo PL1" to R1-button
le2:0:C01334:05:000:Infinite Lives PL2
le2:0:C01356:06:000:Infinite Ammo PL2
:le2:20800000:200CC8:00000060:FFFFFFFF:Skip RAM/ROM Check Error
:le2:20810000:201020:00000060:FFFFFFFF:Skip RAM/ROM Check Error (2/2):1st = RAM, 2nd = ROM
:le2:64004000:000005:00000000:00000000:Pre-Enable "Skip RAM/ROM Check Error"
NOTE : Replace "77" by a key index of a button you want to assign.
darthbane2k
Posts: 3
Joined: Tue Feb 21, 2006 10:07 pm

Post by darthbane2k »

many thanks, but when I said I want to bind to "C" I meant letter C on my keyboard>
any idea what the key index code or whatever is for letter C?
ShimaPong
Posts: 1063
Joined: Wed May 21, 2003 4:19 pm
Location: Japan

Post by ShimaPong »

The key index list for the keybord exists in official cheat.dat.
Post Reply