Proposal for Addition of Preload Feature

This forum is for posting M.A.M.E. Work In Progress "Arcade"cheats that are not quite ready for the prime time. If the cheats are buggy or the cheat descriptions are non-standard then please post them here. Help maybe given but there are no guarantees and they will only be added to the cheat file when the cheat file maintainer is happy with them.
User avatar
NotAGoodName
CheatFinder Lieutenant
CheatFinder Lieutenant
Posts: 331
Joined: Wed Feb 18, 2009 7:09 am
Location: MO, USA
Contact:

Proposal for Addition of Preload Feature

Postby NotAGoodName » Thu Sep 30, 2010 12:29 am

Disclaimer: I admit that I do not know any C programming and I'm not going to bother seeing if this compiles or works because I'm not in the mood to play go fish with SDKs on a computer with a dud video card. On with the show.


Proposal:
Add an attribute to the <cheat> tag called "preload" which, when it equals 1, sets the default status of an onoff cheat to RUN. This may also require modification of the code at default line 695.

DIFF starting at line ~180:

Code: Select all

/* a single cheat */
typedef struct _cheat_entry cheat_entry;
struct _cheat_entry
{
   cheat_entry *      next;                     /* next cheat entry */
   astring            description;               /* string description/menu title */
   UINT32            preload;                  /* preload cheat? */
   astring            comment;                  /* comment data */
   cheat_parameter *   parameter;                  /* parameter */
   cheat_script *      script[SCRIPT_STATE_COUNT];      /* up to 1 script for each state */
   symbol_table *      symbols;                  /* symbol table for this cheat */
   script_state      state;                     /* current cheat state */
   UINT32            numtemp;                  /* number of temporary variables */
   UINT64            argindex;                  /* argument index variable */
   UINT64 *         tempvar;                  /* value of the temporary variables */
};



DIFF starting at line ~1262:

Code: Select all

   /* set the initial state */
   if (is_onoff_cheat(cheat))
   {
      if (xml_get_attribute_int(cheatnode, "preload", NULL) == 1)
      {
         cheat->state = SCRIPT_STATE_RUN;
      }

      else
      {
         cheat->state = SCRIPT_STATE_OFF;
      }
   }

   else
   {
         cheat->state = SCRIPT_STATE_OFF;
   }
Aww yeah. AMD A10-7850K givin' MAME and MESS systems what for.

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

Re: Proposal for Addition of Preload Feature

Postby Pugsy » Thu Sep 30, 2010 8:00 pm

I've re-added a few missing things to the xml cheat engine - like Reload All, Comment Display (+ SPACE to repeat comments), Toggle Cheats On/OFF (F6), mess crc32 based cheat support and the multi-cheat file parsing (which was rewritten by Aaron). I've not compiled that in myself....but that looks simple - if it works. From reading between the lines though, pre-enable is likely to be a no-no because it could lead to incorrect mametester reports. I do think it could be a useful feature though.
Pugsy

Servicing your cheating needs since 1985 ;-)

Grab the latest cheat collection:
MAME 0.187 XML cheat collection 7 JULY 2017) from http://www.mamecheat.co.uk or direct from:-
http://www.mediafire.com/file/0dvubha3b ... at0187.zip (ZIP Archive 1826 KB)

User avatar
NotAGoodName
CheatFinder Lieutenant
CheatFinder Lieutenant
Posts: 331
Joined: Wed Feb 18, 2009 7:09 am
Location: MO, USA
Contact:

Re: Proposal for Addition of Preload Feature

Postby NotAGoodName » Thu Sep 30, 2010 8:39 pm

I'm certainly very satisfied with the cheat engine now and I'm very thankful for your work, but I'd like to see the number of things DAT could do that XML can't go from "a couple" to "none". I wouldn't even know where to start with activator buttons, but I thought that the old preload feature might be easy enough.
Aww yeah. AMD A10-7850K givin' MAME and MESS systems what for.


Return to “M.A.M.E. WIP "Arcade" Cheats”

Who is online

Users browsing this forum: No registered users and 1 guest