Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Dec 1997 20:41:22 -0500
From:      Randall Hopper <rhh@ct.picker.com>
To:        emulation@freebsd.org
Subject:   Re: Now here's the ultimate in emulation, I think.. ;-)
Message-ID:  <19971203204122.04230@ct.picker.com>
In-Reply-To: <199711050718.IAA13423@sos.freebsd.dk>; from S\xren Schmidt on Wed, Nov 05, 1997 at 08:18:28AM %2B0100
References:  <18926.878698372@time.cdrom.com> <199711050718.IAA13423@sos.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help

--GvXjxJ+pjyke8COw
Content-Type: text/plain; charset=us-ascii

In reply to Jordan K. Hubbard who wrote:
> http://members.pairnet.com/delite/arcade_mame.html

Pretty slick.  About all it needs is a GUI ROM menu script to wrap it
(attached).  Your choice of xmenu or 9menu -- xmenu looks best.

Randall



--GvXjxJ+pjyke8COw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=xmame-menu

#!/bin/sh
#
# xmame-menu - Display a menu of XMAME arcade games using XMENU/9MENU.
#              Kick off XMAME when user picks an arcade game.
#              (Randall Hopper, 12/3/97)
#
# Supports xmenu & 9menu -- xmenu looks best:
#   XMENU: http://ftp.lth.se/archive/usenet/comp.sources.x/volume08/xmenu/
#   9MENU: ftp://ftp.mathcs.emory.edu/pub/arnold/9menu-1.5.shar.gz
#

PROG=xmenu
#PROG=9menu

ROMPATH=/opt/pkg/xmame-0.29.2/lib/roms
BINPATH=/opt/pkg/xmame-0.29.2/bin

TITLE="XMAME GAMES"
FONT=9x15
#FONT="-freefont-tekton-*-*-*-*-0-*-*-*-*-0-iso8859-1"
#FONT="-freefont-engraver-*-*-*-*-0-*-*-*-*-0-iso8859-1"
FOREGROUND="white"
BACKGROUND="DarkOrchid"

PATH=$BINPATH:$PATH
export PATH

DO_MENU() {
   if [ $PROG = xmenu ]; then
      menu="-heading '$TITLE'"
   else
      menu="-label '$TITLE' -popup"
   fi
   menu="$menu -fg $FOREGROUND -bg $BACKGROUND -geometry +0+0 -font $FONT"
   
   for c in "$@"; do
      if [ $PROG = xmenu ]; then
         if [ $c = "--" ]; then 
            menu="$menu -line"
         else
            menu="$menu '$c=$c'"
         fi
      else
         if [ $c != "--" ]; then
            menu="$menu '$c:echo $c'"
         fi
      fi
      done

   choice="`echo $menu | xargs $PROG`"
}

# IF USER TOLD US WHAT GAME, JUST GO RUN IT
if [ -n "$1" ]; then
   exec xmame "$@"
fi

# OTHERWISE, DO SOME GAME MENUS SO USER CAN CHOOSE
while [ 1 ]; do
   DO_MENU A B C D E F G H I J K L M N O P Q R S T U V W X Y Z -- QUIT
   if [ $choice = QUIT ]; then exit 0; fi
   choice=`echo $choice | tr "[A-Z]" "[a-z]"`

   cd $ROMPATH
   roms="`echo $choice*`"
   DO_MENU $roms -- BACK QUIT
   if [ $choice = BACK ]; then continue; fi
   if [ $choice = QUIT ]; then exit 0; fi

   xmame "$choice"
   done





--GvXjxJ+pjyke8COw--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19971203204122.04230>