Home > Technical > How to Configure Initial Emulator Input Settings

How to Configure Initial Emulator Input Settings

October 12th, 2010 Leave a comment Go to comments

Before you can start using MacroLua, the first thing you need to do is install and configure a supported emulator. For arcade games, your primary choices are FBA-RR and MAME-RR. Both work fine, so choose whichever one you’re familiar with.

Due to the sheer number of built-in commands, the default control settings tend to have some overlapping key assignments. Sort those out first. For instance, FBA-RR has Load State 2 and Diagnostic both assigned to F2. Likewise, they have Load State 3 and Reset assigned to F3.

My general advice is clear everything that doesn’t look useful at first glance. The less clutter you have to deal with, the better. You can always add more stuff later.

You’ll be using Reset a lot, and you’ll need Diagnostic as well, so either map those to different keys, or remove the Load State assignments. It’s also a good idea to clear whatever hotkey is assigned to Tab, because you’ll be using Alt+Tab frequently to switch back and forth between your emulator and your script file.

Emulation speed controls are important too. Personally i have Turbo Speed assigned to Q, Normal Speed assigned to W, and Fast Forward assigned to E. I’ve got Pause assigned to P and Frame Advance assigned to the \ key.

Of course you’ll need the Lua Custom Hotkeys assigned to control macro options, but the main one is Lua Custom Hotkey 1, which controls script playback. I have that assigned to the ; key. You’ll be using the others far less often, so it’s okay to assign them to out-of-the-way key combinations such as Shift+, and Ctrl+/ or whatever. In fact, i don’t even have Lua Custom Hotkey 2 mapped because i never use that function.

You’ll also want easy access to both players’ controls. Here’s my usual configuration:

Player 1 Controls
Player 2 Controls
P1 Up
Up Arrow
P2 Up
P1 Down
Down Arrow
P2 Down
P1 Left
Left Arrow
P2 Left
P1 Right
Right Arrow
P2 Right
P1 Button 1
P2 Button 1
P1 Button 2
P2 Button 2
P1 Button 3
P2 Button 3
P1 Button 4
P2 Button 4
P1 Button 5
P2 Button 5
P1 Button 6
P1 Button 6

PPP and KKK are useful sometimes – for selecting alternate colors and such – but i usually keep them unassigned because there’s not much room for them. Trying to press multiple buttons on a keyboard is a pain, but you can always Pause the game, hold multiple buttons, and use Frame Advance to get them all to register simultaneously.

That covers almost everything you need to get started, so just find whatever configuration feels comfortable and dive in. Remove any mappings that get in the way. There are tons of hotkeys that you’ll use less than once a month, so go ahead and get rid of them.

Categories: Technical Tags:
  1. October 13th, 2010 at 13:40 | #1

    Since i’ve been bouncing around so much with these combo scripting articles, i thought it would be a good idea to create an organized scripting guide index with a proper reading order. Hopefully that makes things easier for anyone who wants to give TACV-making a shot.

  2. October 15th, 2010 at 15:25 | #2

    It’s really hard to fit a second controller on a keybord
    I use the numpad for directions and uiojkl for the buttons. It really helps for frame advance to put the directions and keys on a different part of the keyboard for frame advance. Because you can’t press three buttons on the same part of the keyboard at once. So you can press Num4+Num2+P+I but not A+F+Y.
    Plus if you want to control the character manually it’s not hard

  3. October 15th, 2010 at 16:30 | #3

    There’s no numpad on a laptop though. What i listed are basically the oldschool Kawaks default controls. If you have more keys than i do, feel free to spread them out as you like. Using a USB control pad might not be a bad idea either.

  4. Rufus
    October 15th, 2010 at 18:03 | #4

    Buttons like control, alt and shift are good at overlapping with other buttons, so it’s possibly worth trying to use them. Also, I think Macrolua can send them.

  5. Dammit
    October 17th, 2010 at 19:05 | #5

    Macrolua sends the game’s own keys rather than keystrokes, so it doesn’t matter what you map them to. The game buttons don’t even have to be bound to anything.

    It’s worth mentioning that MAME discriminates between the shift/alt/ctrl keys on the left and right side, which can be useful or annoying.

    As error mentioned there’s a limit to the number of keys you can press at once (depends on the keyboard) but the modifier keys tend to be exempt from the limits. Something to keep in mind if you need to hold a lot of things during frame advance.

  6. October 17th, 2010 at 20:36 | #6

    Yeah, but it feels good to try out basic stuff manually, especially after four failed ideas in a row. It also feels good simply to move around and gauge things like walk speed, jump height, fireball velocity, etc. in real time.

  7. October 19th, 2010 at 18:39 | #7

    Thank you Maj, Error and whomever else has contributed to bringing these learning-enhancing and awesome fun tools to my attention.
    After great success with the well documented FBA-rr and lua, I have become stuck in setting up scripts with Snes9x-rr 1.52.

    ### I cannot get a working config module in macro-modules.lua, even though there is a module configured for Snes9x emulator by default. (I am under the impression that lua script first originated with snes9x, further confusing me?) Running macro.lua in snes9x-rr states that no module for the emulator can be found. ###

    — from macro-modules.lua —
    {“D”,”down”}… etc.

    In this instance im assuming the EmuName must be the name of the executable, without extension? In FBA-rr the arcade games are individually specified and configured under parent ROMs etc, however here the requirement is for one overall emulator button config…
    I just cant find the right name? I think ? Older versions of both macrolua and snes9x exhibit the same behavior, arrghhh.

    “Snes9X v1.52-rr (svn184) for Windows” from snes9x-rr “about” contains reserved characters so it can’t be that. After numerous hours with trial and error i submit my plea for help !

  8. October 20th, 2010 at 12:16 | #8

    If there’s anyone we should be thanking for MacroLua, it’s Dammit. He’s the one who wrote it and keeps it updated with cool new features.

  9. Dammit
    October 20th, 2010 at 16:27 | #9

    The names in macro-options.lua are the aliases for the “emu” table of functions, internally defined each emulator.

    snes9x 1.52 is new and the current ver (svn184) has no such alias, so macrolua has no way of knowing what emulator it is. Even if it had one, it doesn’t have the essential joypad Lua functions. Hopefully gocha will add these soon.

    On the subject of snes9x-rr, 1.51 also has a problem accepting input from joypad.set so you’ll have to use the 1.43 branch.

    Are you sure you get the same problem with 1.43? You should change the name in macro-options.lua back to snes9x because the check is case sensitive.

    I’ll mention 1.52 in the docs in next update.

  10. October 20th, 2010 at 19:22 | #10

    1 believed i had tested 1.43 versions correctly – What i did wrong was to make the assumption that everytime i hit browse to load macro.lua, explorer would open the current folder, but it was in fact showing me the contents of v1.52 and i guess i repeated that mistake over. What an embarrasing thing to miss.
    1.43 works perfectly for me now, awesome.

    Dammit you are a hero; thank you for sharing your project and the support.

  11. Dammit
    October 20th, 2010 at 19:37 | #11

    No problem.

    If you have more questions just ask.

  1. No trackbacks yet.
You must be logged in to post a comment.