MAMEWorld >> Programming
Previous thread Previous  View all threads Index   Next thread Next   Flat Mode Flat  

megaman_exe
MAME Fan
Reged: 12/02/07
Posts: 1
Send PM
Start game with coins inserted or press a button without user intervention
12/02/07 05:20 PM


Hi, sorry if my first post is a question, but I've been wondering for this for a long time:

I've tried to make any game in mame start with coins already inserted, that is, the user starts mame with the command line and then with an option the game starts for example with 2 coins.

I've tried messing with the coin_counter_w function in common.c, but with no avail. I've also tried making the coin switch (for example, the first which is KEYCODE_5 by default) be pressed automatically after a certain amount of time, but it seems there are no functions to press a button without user intervention. (the "input_ui_pressed(int keycode)" function DETECTS key presses, it doesn't "press" them )

I've tried both of these putting code in the function "cpu_run" of cpuexec.c, waiting some time for it to be executed (say 10 seconds).

Is there a way to achieve this? And more important, does it go against the rules of the forum?

Thanks for any replies!

EDIT: I know that with free play there's no need for this, but I don't want that way.

Edited by megaman_exe (12/02/07 05:22 PM)







Entire thread
Subject Posted by Posted on
* Start game with coins inserted or press a button without user intervention megaman_exe 12/02/07 05:20 PM
. * Re: Start game with coins inserted or press a button without user intervention R. Belmont  12/02/07 07:47 PM

Extra information Permissions
Moderator:  Pi 
0 registered and 48 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 3173