Recording game input

Installing ARpiCADE for the first time? Having issues? Check here first for solutions and tips on installing.

Moderator: dee2eR

Post Reply
fippi
Community Member
Community Member
Posts: 5
Joined: Sat Aug 17, 2019 6:36 am

Recording game input

Post by fippi » Thu Oct 24, 2019 11:39 pm

Hi all,

I'm wondering if anybody has had any success generating `.inp` files within Arpicade? Big fan of the RaspberryJamma / arpicade kit but may have to retire it if I can't get the inp recording working :(

Thanks!!
Fip

dee2eR
Inventor
Inventor
Posts: 912
Joined: Tue Aug 22, 2017 2:07 pm

Re: Recording game input

Post by dee2eR » Fri Oct 25, 2019 12:09 am

I haven't tried this before on a RPi (I have used WolfMAME 106 to record inputs years ago...) but it should be possible, possibly not in all versions of MAME.

AdvMAME should definately support it (it maybe the only version on ARpiCADE that does, I'm not sure), but will require setup, from their documentation on the available command line options:
-record FILE
Record all the game inputs in the specified file. The file is saved in the directory specified by the `dir_inp' configuration option.
-playback FILE
Play back the previously recorded game inputs in the specified file.
you will need to set the dir_inp option in advmame.rc (and prob advmame.nosdl.rc too). Set it to a place in /home/pi and not to somewhere on /boot as I don't think AdvMAME will be able to write to /boot due to file permissions/ownership. I think the default directory is /home/pi/.advance/inp which should work.
After that adding the --record [filename] command to the command line in /boot/launchers/advmame.sh should be enough. I just quick tested it on my desktop and the command:
advmame --record test.inp snowbros
worked fine. That command launches Snowbros and creates the file test.inp in .advance/inp/ (I didn't change the default config for the inp directory).

Playback can be done similarly with the command:
advmame --playback test.inp

fippi
Community Member
Community Member
Posts: 5
Joined: Sat Aug 17, 2019 6:36 am

Re: Recording game input

Post by fippi » Sun Oct 27, 2019 10:08 pm

Thanks dee2er! I appreciate your super speedy response.

Your guidance had me up and running (with input recording) very quickly.

My problem now is that apparently Donkey Kong score submissions require the input from *WolfMAME* specifically, which is a whole different kettle of fish. Sadly this is the only thing I could find, but i've barely been able to get it to work

dee2eR
Inventor
Inventor
Posts: 912
Joined: Tue Aug 22, 2017 2:07 pm

Re: Recording game input

Post by dee2eR » Mon Oct 28, 2019 2:46 am

I hadn't tried WolfMAME on RPi before. 167 seems like it runs at pretty good speed, if it had all the scaling options of 172 I wouldn't hesitate including it.

I may look at compiling WolfMAME 172 or maybe 203 for Pi in the future (otherwise it will put back the next release further than it already has been), .inp recording for high score submissions would be a nice feature, might even get me back into chasing the Snowbros record....

fippi
Community Member
Community Member
Posts: 5
Joined: Sat Aug 17, 2019 6:36 am

Re: Recording game input

Post by fippi » Mon Oct 28, 2019 3:41 am

I hadn't tried WolfMAME on RPi before. 167 seems like it runs at pretty good speed, if it had all the scaling options of 172 I wouldn't hesitate including it.
That's the trouble i ran into. I was able to get it running, although the scaling was really quite bad; that was using the binary linked in b4nd1to's link above.

Is there anything special that needs to be done when compiling the emulator binaries specifically for the pi? Or will compiling for linux do the job?
...might even get me back into chasing the Snowbros record
Snow bros is a game i'd love to get good at.. Maybe once I smash a kill screen on DK i'll give it a go. We have a Snow Bros machine at Bartronica here in Melbourne as well! Fun game

dee2eR
Inventor
Inventor
Posts: 912
Joined: Tue Aug 22, 2017 2:07 pm

Re: Recording game input

Post by dee2eR » Mon Oct 28, 2019 8:29 am

We have a Snow Bros machine at Bartronica here in Melbourne as well! Fun game
I didn't realize there was a Snow Bros being operated in Melbourne or I would have been in to play it... I'm rusty but it would be fun to try and 1cc it at a bar.

As far as compiling MAME for RPi it's become as easy as typing 'make' in the latest releases but it will take a lot of hours to build on RPi (current MAME supports so much stuff...). Cross compiling on an x86 PC can be faster (to compile) but can have it's own issues compared to just building on Pi. It varies from version to version but RPi is a supported build target for MAME now. If you plan on patching it don't forget to before compiling too, I once finished a 5 hour compile only to realize I forgot to remove the white box that pops up when the game is loading.

To successfully build MAME on ARpiCADE you will also need to adjust /etc/fstab temporarily for the build as it's setup to reduce SD card writes which will cause issues building software as big as MAME.

Post Reply