What's new

mathewbeall

Champion
Joined
Nov 6, 2017
Messages
1,753
Reaction score
1,261
Location
Mission Viejo, CA, USA
WMMT


Ok - here is a image file that I have modified from @chunksin PiforceWeb 1.2 fork of piforcetools. This is the one with a nice web interface and also had the card emulator already set up and good to go...

The modifications I made are all towards making it as easy as possible to run a WMMT1/2 cabinet with a dedicated tablet and make it really easy for people to use cards electronically. I tried to keep track of the files I changed and they are listed below.

Upon bootup the image is in "single" mode - so it loads up WMMT1 and also loads a temp card, so that the card reader boot test passes. After the boot test passes the card is "ejected".

After the game boots - connect to "naomi" as the SSID and "segarocks" as the password - then just go to any webpage (I use a.com). My version defaults to the cardemulator page (although the full menu is still available).

It's hardcoded just to show WMMT cards, and also allows you to create a new card (like the original PiforceWeb). Once you either load, or create a card, the screen will then show you what card is active, and starts polling to look for an eject. Once you finish your race and say "no" to continue, then within 10 seconds the screen will change after it detects the card is deleted and let's you select another.

Below is the mega link for the image - it's sized for an 8G card. Feel free to download and modify to your hearts content... :) no warranty is implied!

**NOTE** ensure your Chihiro is set to ip address of 10.0.0.1.

mega.nz/#!9mBWnASQ!Tpg6jmsKard…khcuERunfzbhbOUSdEZDrEy0c


(changes to base image)

added /var/www/html/ejectcard.php
modified /var/www/html/cardemulator.php
modified /var/www/html/launchcard.php
added /var/www/html/PHPBackgroundProcesser.php
modified /sbin/piforce/check.py
Changed ip address of raspbi to 10.0.0.10 - Chihiro should be 10.0.0.1
turned off access logs for webserver (don't want disk to fill up).
 
MKGP:


Ok - here is a image file that I have modified from @chunksin PiforceWeb 1.2 fork of piforcetools. This is the one with a nice web interface and also had the card emulator already set up and good to go...

The modifications I made are all towards making it as easy as possible to run a MKGP1/2 cabinet with a dedicated tablet and make it really easy for people to use cards electronically. I tried to keep track of the files I changed and they are listed below.

Upon bootup the image is in "single" mode - so it loads up MKGP1 and also loads a temp card, so that the card reader boot test passes. Additionally it sets up the mjpg_streamer as well as long as usb camera is plugged in that is supported (I tried 3 of them - they all worked). After the boot test passes the card is "ejected".

After the game boots - connect to "naomi" as the SSID and "segarocks" as the password - then just go to any webpage (I use a.com). My version defaults to the cardemulator page (although the full menu is still available).

It's hardcoded just to show MKGP cards, and also allows you to create a new card (like the original PiforceWeb). Once you either load, or create a card, the screen will then show you what card is active, and starts polling to look for an eject. Once you finish your race and say "no" to continue, then within 10 seconds the screen will change after it detects the card is deleted and let's you select another.

Below is the mega link for the image - it's sized for an 8G card. Feel free to download and modify to your hearts content... :) no warranty is implied!

**NOTE** ensure your Triforce is set to 192.168.29.150 (this is setup for PCB1).

https://mega.nz/#!x7xihKCC!LiNbu8VKwHIlE6rKP6NO-vUrxXGlWLDp7HWMI3g6eYw


(changes to base image)

added /var/www/html/ejectcard.php
modified /var/www/html/cardemulator.php
modified /var/www/html/launchcard.php
added /var/www/html/PHPBackgroundProcesser.php
modified /sbin/piforce/check.py
Changed ip address of raspbi to 192.168.29.104 - Triforce should be 192.168.29.150 (This is set up for a single unit - these ip's matter).
turned off access logs for webserver (don't want disk to fill up).
 
Thank you @mathewbeall and @winteriscoming very much for this. I just got a wmmt2 can few weeks ago and 1 card reader is busted. So this will be perfect. I’ll definitely be using this. Now I just need to get my force feedback working and pick up a triforce for some Mario kart
 
@ThisGuy - I just went through a lot of work on mine getting the FFB card working - let me know if you need help as it’s pretty fresh for me!
 
@ThisGuy - I just went through a lot of work on mine getting the FFB card working - let me know if you need help as it’s pretty fresh for me!
Thank you. I can definitely use some help. I’m kinda at a lose at the moment and not sure where to start with either of them. I’ve got one replacement board on its way. Hopefully that one works fine. Then I have the intermittent one and the never works one. Then hopefully from those 2 I can get 1 good one.
 
Update - Here are new images for both - my changes didn't take into account when cards needed to be "refreshed" - so I had to make some more modifications - hopefully in my limited testing I got all permutations! I also do backups every hour of the cards directory under /boot/config/backups/

WMMT

https://mega.nz/#!M6YASKrQ!g7abC1zKfKnxBm921RUYRd-BS-kFDSfsMRQ5S8W4Tmk

MKGP

https://mega.nz/#!YiBCzYSL!sl8O705ShmunoJIrI31ZggrOAw1xwZcPE5t9TvS2TBo


If you had downloaded my previous images - delete them and use these please!
 
Last edited:
So I just got this setup with my Mario Kart cabinet. I'm wondering if the system has to have a card reader present for this to work? My cab doesn't have a card reader at all and when I try to boot it complains that it can't initialize it.
 
Nope - just go into the game menu and turn off the card reader....
 
FYI: I've got a new version of the WMMT card reader script that should be more conducive to hooking into via a frontend. I'm going to download your WMMT rpi image and see if I can retool your frontend to work with the new script.
 
Man, the options packaged on this version of minibian are difficult to work with when trying to edit configurations. The lack of nano is killing me, and vi is not the least bit intuitive! :P I haven't been successful in getting dhcp working to get apt-get working. I was able to get the ip updated to sFTP into it when plugged up to my router, so that's progress.
 
I still have muscle memory with VI - so that was working pretty good for me...

and yeah - DHCP... I think I edited /etc/network/interfaces and uncommented out a line - but i never quite actually figured out how the DHCP and such was working... just hacked it until i got it working well enough.
 
I figure it's not worth messing with it trying to get apt-get working. I had been messing with multiple auto assigned IP addresses, but seemed to have screwed up something to do with the auto game launching. I went back to your stock image and just do temporary ifconfig command to change the IP and ftp into it for file updates. On the same computer, I can bring up the front end in a web browser and see immediate results, so I've got an ok workflow going.

I've got a successful continuous script running and the front end is allowing me to change cards between games. There is no error generated if a card file is not chosen, but the players buys a new card. It just gets saved down to a default file that is then deleted.

My short term goal is to make it so one RPi can netboot multiple machines and host multiple, simultaneous card scripts. At first it's just going to be WMMT 1 and 2, but I want to expand it so the same setup works with all the card scripts.

At the moment, I seem to have to start the card script manually. I'm currently doing this via a link on the main page that runs the command to start the script. Cron wasn't running it successfully, but if want to accommodate multiple scripts and multiple simultaneous scripts, the frontend is going to need to be able to start and stop them. I just need to figure out the best way to manage script states, know if they're running, start them if needed, and kill them if needed.
 
I think in my image I fire off some things things at startup -at the end of rc.local I think? If you can't find it, I can fire it up and look.

Matt
 
Yeah, there's some stuff in rc.local. I have not tried running it from there. I think ultimately it's going to need to be managed via php, to allow starting and stopping scripts as need.
 
After a ton of messing around with it, I migrated everything over to a more robust version of raspbian. Now I have nano and working apt-get for expanding functionality!
 
I'm not quite ready to post it, but I've implemented some features into the server to accommodate my needs.

-It can take in a list of expected IP addresses via a text file on the boot partition. The frontend then allows you to send a game to any of the IPs it finds when pinging the list. This allows more than one game to be sent via the same RPi server.

-It allows up to 4 instances of a card emulator. At the moment, only WMMT1/2, but I'll work others into it.

-It has the ability to send reset commands to any valid IP, as a means of resetting a game if there's an error or if needing to synchronize multiple games.

-There's an admin mode accessed via a password. The admin can netboot games, reset games, start/restart card emulators.

-Basic mode is what a user sees by default. A user in this state can only go to pages for existing instances of card emulators that the admin has started or they can access the admin login screen, where they need to know the pw that's contained in a text file on the boot partition (i.e. admin can set the pw).
 
That sounds great - and what I tried to do by hacking around the HTML - making it boot in the background, and then all that is actually available is the ability to select a card or eject a card.

Making it support up to 4 at a time is great if you have a multicab setup!

Matt
 
Back
Top