What's new

sammargh

Professional
Joined
Jul 24, 2017
Messages
568
Reaction score
413
Location
South Dakota
Hi! Attached is @corey 's keyboard code that has been modified to match a 1 player setup. All controls including service and test should function as well as coin. I didn't split coin off to its own thread so io will lock for 150ms while it pulses coin credits. Works well enough for me but up to you how you launch mame.

My current setup uses a heavily modified hacked together version of Niko's 1.4 multi on a P&D X3 with an older version of the NesicaXLive launcher. My shell boots the old nesica launcher which launches Attract Mode from E:\NesicaXLive\AM\Attract.exe. I'm not sure if the older launcher files are uploaded so I can add them if needed but basically I renamed the binary to "ttxjvs.exe" and placed it alongside the launcher. This allows the launcher to automatically handle loading MAME with the older method of having cjvs running in the background but FastIO this time around.

This along with swapping out the NVidia GPU with a Radeon 7550 I had laying around allows me to run the TypeX games minus Samurai Showdown Sen and Mame all from the same launcher with switchresx on my trisync. As for exiting MAME I re-bound the UI escape sequence to holding B1-3 and start. Outside of re-binding the escape sequence key everything else should be mapped for keyboard input on MAME. You also need to change the keyboard handler in mame.ini from auto to dinput.

If you want to expand this to two players you need to add a check for the coin2 chute along with handling player 2's input. It should be pretty straightforward to add in and re-map the keys for p2, only gotcha is the node for p2 coin is you need to setup a new registered read variable for the chute as it is a different memory area from buttons & left chute - #define FIO_NODE_0_COINSLOT_2 0x4144. I also believe I already had setup the scan codes for player 2 so it just needs input handled.

As for how to make this work with your setup it likely is YMMV and up to you to integrate in your setup. XP and Type X2 are 100% not supported with this build as it's a slow machine and I don't see a point in targeting it.

Edit: also the standard idmac driver is necessary alongside the keyboard exe to launch.

I also opted to treat someone shoveling 300 coins in at a time as being parsed in sets of "when I get to it." Basically the coin counter is always incremented by 1 so if the driver sees an increase it spams the credit key for 150ms and then sets the internal counter to match the coin counter variable regardless of the number of times it was increased. The reason for this is credits are kept in-memory by FastIO and don't decrease unless you do a registered write back telling the io to decrease the credit counter. Doing this method means that credit will only be spammed once on switching between games in MAME when the keyboard exe is first launched rather than spamming 100 credits.

Other reason I went with this approach is that coins shouldn't be functional in a way that you can run the Type X games alongside MAME while taking credits in a serious fashion. This is not supported for any commercial environments in any fashion.
 

Attachments

  • FastIO2KB-mame.7z
    733.6 KB · Views: 248
Last edited:
Added 2p support, tried to move coins to run via async although I probably did it wrong. Supports common & individual chutes, coins still do not decrease.
 

Attachments

  • FastIO2KB-mame.7z
    128.1 KB · Views: 240
Can you do a video of your setup? that sounds really cool man. I want to do the same sort of thing. You pick up puzzle dragons cheap? are you using the original mobo? Can you swap the HDD for a SSD? I think these have bit locker yes?
 
Back
Top