Hi Riley,
You look new to the forum, so I'll have to assume new to MAME setup. I will also assume that you aren't trying to map directly in Windows for a specific reason, but rather simply trying to figure out how to map the joysticks/buttons to keystrokes. That said, the keyboard encoding sounded confusing to me until I finally did it and discovered how easy it was. Very simple. Unless I'm not understanding exactly what you want to do, this is what I'd suggest...pick yourself up an IPAC2 (up to 32 inputs) from Ultimarc, for $40.
The inputs on the IPAC are screw down connectors, which are all clearly labeled. See
http://www.ultimarc.com/ipac1.html). There is configuration software that comes with it, but I haven't even had the need to load it as the IPAC2 comes pre-configured. If you run wire from a button to the input labeled '1COIN', that input is already configured for button '5'. It's that simple. When all wires and grounds are connected, and the IPAC is connected to your PC, pressing that button is just like pressing '5' on the keyboard. As long as you wire your inputs (joysticks/buttons) to the correct input, you're golden!
The IPAC is also connected to your PC/Laptop via either USB or PS/2. You need to know prior to ordering. This connection will also provide power to the IPAC.
Hope that helps,
HanoiBoi