sounds like you need a heavy dose of the TAB key!
launch a game, lets use pacman, from within mala. Don't worry about mala's screen orientation yet.
after pacman is running its attract screen, press the tab key and get into mame's configuration. You can select video options and rotate the screen into the proper orientation from there. Then find the dipswitches menu and locate the cabinet style dipswitch, flip it to cocktail from upright. (you will have to reset or restart a game to have that change take effect). Putting the cabinet type into cocktail should enable the screen flipping on the vertical ends. Not all games support this mode. Not all games work properly when put into this mode, so be sure to play test a 2 player game on every cocktail game you have.
Then go into the controls menu and you will need to switch all the P1 and P2 input controls to wherever your joysticks are wired up.
Use the "input (this game)" menu to change your mappings.
Now do that for the rest of your games. There are probably some cheater utilities to let you do this type of thing globally on all games, but I like to do it by hand-its your machine, you should know each game that is on it. It may also be easier to have multiple copies of MAME running on your machine-check the sticky posts in the mala forum on how to do this.
For mala, you will want to have 2 lists. One for cocktails that is displayed when someone on the vertical sides controls the machine, and then one for horizontal. In mala's display configuration section (sorry it's been 2 years since I was in there) you can have it select which list gets displayed when someone uses the joystick or buttons on their respective side.