Main > Software Forum
Cheat options (overclock) from command line (adding to derivative)
ianpatt:
--- Quote ---Quick Questions - I was thinking of using frames rather than milliseconds, but I don't guess it matters - but - I need the cheat to happen after 720 frames so I assume 720/60 fps = 12 sec = 12,000 milliseconds = 2EE0 hex milliseconds so the cheat becomes
:crusnu21:65004000:002EE000:00004500:00000000
--- End quote ---
That's right. I used milliseconds instead of frames because the MAME timer system doesn't support it, plus it avoids complications with games that change their refresh rates.
--- Quote ---Also, would it be possible to use the following commands:
:crusnu21:65004000:00000000:00003333:00000000
:crusnu21:65004000:00000001:00001999:00000000
:crusnu21:65004000:002EE000:00001999:00000000
This would run CPU0 initially at 20%, CPU1 initially at 10% and then drop CPU0 to 10% after 12 seconds of gameplay?
--- End quote ---
Yes.
--- Quote ---Would the order that the entries are listed matter?
--- End quote ---
Not unless you do weird things like make multiple overclock requests at the same time on the same CPU.
--- Quote ---Finally, could you add this to a future MAME build, or do you mind if someone submits it or adds it to a derivative?
--- End quote ---
I don't mind if someone uses it in a derivative build, but stuff like this doesn't really belong in the main build.
Tiger-Heli:
--- Quote ---I don't mind if someone uses it in a derivative build, but stuff like this doesn't really belong in the main build.
--- End quote ---
I don't really see why not - it's basically just an expansion on the overclock ability that is already present in the cheat.c file which is part of the main build, but no worries.
Thanks again for the assistance!!!!
TheGatesofBill:
That code will not compile.
--- Quote ---C:\Documents and Settings\Sunookitsune\Desktop\noname>make
Compiling src/cheat.c...
src/cheat.c: In function `HandleLocalCommandCheat':
src/cheat.c:8443: incompatible type for argument 1 of `_mame_timer_set'
make: *** [obj/noname/cheat.o] Error 1
--- End quote ---
creatine28:
Just curious if this needs to also be added?
"Static Void HandleOverclock(int Param);"
Before this?
"static void HandleLocalCommandCheat(UINT32 type, UINT32 address, UINT32 data, UINT32 extendData, char * name, char * description);"
TheGatesofBill:
Still nothing.