Project: Live Cheat File

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
kelvSYC
Posts: 1121
Joined: Thu Sep 27, 2001 1:00 am
Location: Calgary, AB, Canada

Project: Live Cheat File

Post by kelvSYC »

A while back, someone (maybe it was me) suggested that there should be a "live cheat file" where cheats would be constantly updated (hence, we won't have to wait as long).

While most people hated the idea, it was somewhat easy to implement in PHP. Let me explain how it works:

We have three PHP files that do the gruntwork: core_functions.php, search.php, and game.php. The names are fairly self-explanatory (ie. core_functions is just a collection of functions that is needed, search is the search page, and game is a page to display the game, info about the game, and cheats for the game). Using a GET-form (POST was too hard for me to do), the search page looks in a file called mamegamelist.txt (a tab-and-return-separated list of short names, long names, driver status, year, manufacturer, and source driver C file), search.php does a simple string match for the _short_ name of a file. Then, the search results are posted, and each matching result will have a link to game.php, which will show you the meat and potatoes.

In turn, game.php will show cheats for a particular game. How it does so is by presenting the contents of a file (currently wired to mame/gamename.dat) to them.

Currently on my to-do list is, obviously, to expand that to encompass MESS (which, of course, has no cheat files). Also, I plan to expand the search function to include long names (again, because of my want for MESS inclusion) and to have a compile.php, which will compile a customized FULL cheat list for someone to download (ie. if you want to make a cheat file for games other than SF in cps2.c and zn.c, it will compile and download for you). Furthermore, my PHP coding skills are very basic at best, and I have yet to secure my file-handling routines.

There are three obstacles to this project. First, I need some feedback. This is why I am posting. The second is a limitation of PHP: since I do all my work on a Mac, my line endings will be a Mac line-ending (which means you need to change php.ini so it automatically detects Mac line endings, which is disabled by default). This should be a minor problem, since I can change all my line endings here (Thank you, BBEdit). The third and most serious problem is that I have nowhere to host it (the place where I place updated versions of the Guide and MLC collection disallows PHP files, and the place where I test this project is my own computer, which I cannot allow to host such a thing for security purposes).

Anyone who wants to comment can feel free to do so.
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?
User avatar
ianpatt
Posts: 336
Joined: Sat Sep 22, 2001 1:00 am
Location: San Francisco, CA

Post by ianpatt »

Sounds like a good idea - if there is some sort of access restriction on who can add cheats. Preferably, there should be a general-case submission form (for random people finding cheats) that would require approval from one of us before addition to the master file, with the ability to log in and bypass the approval procedure (for people who've been doing this for a while.)

A method for editing already-posted cheats would be nice also.

Can't help with hosting - sorry. However, I can check over the code for security holes.
kelvSYC
Posts: 1121
Joined: Thu Sep 27, 2001 1:00 am
Location: Calgary, AB, Canada

Post by kelvSYC »

So far, I have no plans for any form of submission mechanism - the host of the Live Cheat File would be solely responsible for its upkeep.

But I'll take that thought into consideration...
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?
User avatar
ianpatt
Posts: 336
Joined: Sat Sep 22, 2001 1:00 am
Location: San Francisco, CA

Post by ianpatt »

Thanks for sending me the code - and now to make Apache and PHP start talking to each other...
kelvSYC
Posts: 1121
Joined: Thu Sep 27, 2001 1:00 am
Location: Calgary, AB, Canada

Post by kelvSYC »

Yeah, and now MAME is now at v.65 (argh, I'm still cheatfinding with v.62), now I need something to generate the datafiles that this would need from the source code...
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?
Post Reply