It is currently Thu Mar 28, 2024 7:41 pm


All times are UTC [ DST ]




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: Using Daphne with Advancemenu
PostPosted: Mon Nov 14, 2005 12:39 am 
Registered User
Registered  User

Joined: Wed Nov 03, 2004 9:36 pm
Posts: 23
I've heard of some people having problems with getting Daphne's games included under the (IMHO excellent) Advancemenu frontend's game list. Having spent a couple of hours this morning making it all play nicely myself, I figured I'd document the process for anyone else running into the same problem. Right now I've got it at the stage where it works, it works fine, but there are a couple of minor shortcomings. More on those later.

Disclaimer: these instructions have been written based on my arcade cabinet's setup; it's running Daphne 0.99.7 (current version as of this writing) under Slackware Linux along with the Advancemenu 2.4.11 front end and xmame-0.101 emulator; I don't have a physical laserdisc player, so the vldp is in use.

The overall goal here was to integrate Daphne's games into the list of games already supported by xmame in Advancemenu. While these instructions should be applicable to other platforms with appropriate tweakage, I have no way of making those tweaks or testing them. If folks can make this work on other platforms (which should be entirely possible), that's great, but I'm not going to be the one making it happen. Moving on...

The first thing is to make sure that you've got the Daphne binary, libvldp2.so, the ROMs, framefiles, etc. all installed in one location and that Daphne is already confirmed as working. In my case, I used /mnt/daphne, which looks like this:

Code:
mame@arcade:~$ ls -al /mnt/daphne/
total 1168
drwx--x--x  11 mame mame   4096 2005-11-13 13:20 ./
drwxr-xr-x   7 root root   4096 2002-03-15 23:34 ../
-rwxr--r--   1 mame mame  18332 2005-10-30 09:58 copying*
-rwxr-xr-x   1 mame mame 972876 2005-10-30 09:58 daphne*
drwxr-xr-x   2 mame mame   4096 2004-11-01 22:30 example/
drwxr-xr-x   2 mame mame   4096 2005-11-13 13:32 framefile/
drwxr-xr-x   2 mame mame   4096 2005-10-30 09:58 images/
-rwxr-xr-x   1 mame mame 135487 2005-10-30 09:58 libvldp2.so*
drwx------   2 mame mame   4096 2004-11-30 15:57 lost+found/
drwxr-xr-x   2 mame mame   4096 2005-10-30 09:58 pics/
drwxr-xr-x   2 mame mame   4096 2004-11-10 19:46 ram/
-rwxr--r--   1 mame mame    472 2005-10-30 09:58 readme.txt*
drwxr-xr-x   2 mame mame   4096 2005-10-31 21:22 roms/
drwxr-xr-x   2 mame mame   4096 2005-10-30 09:58 sound/
-rw-r--r--   1 mame mame      4 2004-11-01 21:43 userid.bin
drwxr-xr-x  14 mame mame   4096 2004-11-10 21:29 video/


Realistically, you can put the directory anywhere you want, but my examples are going to refer to /mnt/daphne. Further, while you could conceivably put the Daphne binary and libvldp2.so somewhere else, I wouldn't advise it. It's a lot easier to deal with this setup if everything's under the same directory, and there's no guarantee that any of this will work if you don't have everything in one place.

Next you'll want to edit your advmenu.rc file; this is usually located in ~/.advance. Make sure that Advancemenu is NOT running when you do this; any edits that you make will be obliterated when Advancemenu exits. Add the following lines to the end of the file, editing paths to make sure they match your setup:

Code:
emulator "Daphne" generic "/mnt/daphne/daphne" "%s vldp"
emulator_roms "Daphne" "/mnt/daphne/roms"
emulator_include "Daphne"
emulator_attrib "Daphne" missing include


Save the advmenu.rc file and exit the editor. The next time you start Advancemenu, Daphne's games should be included in the game list. Note that if you subsequently edit advmenu.rc after exiting Advancemenu, the positioning of the lines above will have changed. This is perfectly normal; Advancemenu automatically reorders the contents of the advmenu.rc file on exit.

At this point, you've probably noticed at least one of the shortcomings: Daphne's games in the Advancemenu gamelist are shown as only the first part of the ROM name - i.e., astron.zip is displayed as 'Astron', cliff.zip is shown as 'Cliff', and so forth. There are also no preview images available for the games.

The reason for the first problem has to do with how Advancemenu 'knows' about games. If you're using xmame via Advancemenu, you're probably aware of the MAME.xml file in ~/.advance; this file was generated with `xmame -listxml' and is where Advancemenu gets the game names, etc. from. There's no equivalent to -listxml under Daphne, and attempts at creating the flatfile that the Advancemenu documentation (see Section 4.1) claims should be able to hold this info have thus far been unsuccessful. I'll keep banging away on it, though.

As for the preview images... I'm not entirely certain what's going on there. I've tried using the emulator_altss directive to specify their location, changing the image formats, and a couple of other things but all to no avail. The one thing I haven't tried yet: putting them in xmame's snap directory, which is where the xmame preview images are pulled from. Still, it'd be nice to be able to keep them corralled under /mnt/daphne.

Another issue stems from how Daphne handles the `-useoverlaysb' switch. Basically, if you specify this switch on the commandline for a game that doesn't support overlay scoreboards, Daphne exits without starting the game and spits an error back to the commandline. If you want to play games that use the overlay scoreboard in Daphne through Advancemenu, it's doable, but with a caveat. Change the line:

Code:
emulator "Daphne" generic "/mnt/daphne/daphne" "%s vldp"


in advmenu.rc to read:

Code:
emulator "Daphne" generic "/mnt/daphne/daphne" "%s vldp -useoverlaysb 1"


The caveat: this will prevent games that don't use the overlay scoreboard from loading via Advancemenu; Daphne will effectively silently fail when you try to start them since you won't actually be able to *see* the error message before getting tossed back into Advancemenu. Thank God for daphne_log.txt; it saved my sanity on more than one occasion.

Anyway, that's about it for now. It's fairly unpolished at this point, but at least the games are in and this should hopefully help keep someone else from tearing out their hair.


Top
Offline Profile  
 
 Post subject:
PostPosted: Mon Nov 14, 2005 11:53 pm 
DAPHNE Creator
DAPHNE Creator

Joined: Sat Jan 20, 2001 1:00 am
Posts: 2127
Location: Salt Lake City,Utah, USA
thx for the tutorial...

I can see that -useoverlaysb should return a warning, and not an error.


Top
Offline Profile  
 
 Post subject:
PostPosted: Wed Nov 16, 2005 8:04 pm 
Registered User
Registered  User

Joined: Wed Nov 03, 2004 9:36 pm
Posts: 23
Matt Ownby wrote:
thx for the tutorial...


No problem :) Actually, I just caught an omission in it that causes some minorly-annoying behaviour with the mouse pointer under X.

Basically, the line in the config that reads:

Code:
emulator "Daphne" generic "/mnt/daphne/daphne" "%s vldp"


Should have read:

Code:
emulator "Daphne" generic "/mnt/daphne/daphne" "%s vldp -fullscreen"


What this does is allow the mouse pointer to be visible in Advancemenu, but hides it once Daphne starts. If you don't explicitly specify '-fullscreen' with Daphne, the pointer is displayed over the game's video. By doing things this way, you can retain the pointer in Advancemenu (handy for game and option selection) but have it go away when Daphne launches.

This happens because of how two settings in advmenu.rc relate to each other: if 'device_video_output' is set to 'auto' and 'device_video_cursor' is also set to 'auto' (both being the default settings), the only way to make the pointer hide during gameplay is for the *emulator* to go to fullscreen mode itself. Basically, it's mentioned in the advdev.txt doc file under the entry for device_video_cursor that "The cursor is enabled in window modes, and disabled in fullscreen modes" - which is fine, but it doesn't mention that 'fullscreen modes' applies to the emulator being run as well as Advancemenu's own modes.


Top
Offline Profile  
 
 Post subject:
PostPosted: Mon Nov 28, 2005 6:44 pm 
DAPHNE Creator
DAPHNE Creator

Joined: Sat Jan 20, 2001 1:00 am
Posts: 2127
Location: Salt Lake City,Utah, USA
I believe that Daphne's behavior is to also show the mouse pointer in window mode and hide it in full screen mode.


Top
Offline Profile  
 
 Post subject: Re: Using Daphne with Advancemenu
PostPosted: Sun Aug 20, 2006 1:59 am 
DAPHNE Bronze Donator
DAPHNE Bronze Donator

Joined: Mon Jul 31, 2006 4:57 am
Posts: 22
casm wrote:
As for the preview images... I'm not entirely certain what's going on there. I've tried using the emulator_altss directive to specify their location, changing the image formats, and a couple of other things but all to no avail. The one thing I haven't tried yet: putting them in xmame's snap directory, which is where the xmame preview images are pulled from. Still, it'd be nice to be able to keep them corralled under /mnt/daphne.


I know I'm really dredging this up from the past but I got preview images working... Make sure they are in .png format (or one of the others that advmenu recognizes). In your advmenu.rc file use the following:

emulator_altss "Daphne" "/home/mame/sc/"

where "home/mame/sc/" is the location of the screenshot. Remember that the name of the shot must be the same as the name as the rom used for that game.

Works like a charm!!


Top
Offline Profile  
 
 Post subject: An additional note (Concerning Overlay issues)
PostPosted: Mon Oct 02, 2006 8:53 am 
DAPHNE Gold Donator
DAPHNE Gold Donator
User avatar

Joined: Wed Sep 27, 2006 11:32 am
Posts: 82
Location: California
casm wrote:
Another issue stems from how Daphne handles the `-useoverlaysb' switch. Basically, if you specify this switch on the commandline for a game that doesn't support overlay scoreboards, Daphne exits without starting the game and spits an error back to the commandline.


I just wanted to share this as I've been researching this topic for a little bit now. Apparently, the workaround that has been discovered/mentioned by another Daphne user at the RetroGames forums is to implement two seperate installs (directories) of Daphne: one simply called Daphne, and the other named something like Daphne-sb. See below for how the advmenu.rc file would be set up using the same syntax of casm's walkthrough:

Code:
emulator "Daphne" generic "/mnt/daphne/daphne" "%s vldp -framefile /mnt/daphne/framefile/%s.txt -fullscreen"
emulator_roms "Daphne" "/mnt/daphne/roms"
emulator_titles "Daphne" "/mnt/daphne/titles"
emulator_include "Daphne"
emulator "Daphne-sb" generic "/mnt/daphne-sb/daphne" "%s vldp -framefile /mnt/daphne/framefile/%s.txt -useoverlaysb 1 -fullscreen"
emulator_roms "Daphne-sb" "/mnt/daphne/roms"
emulator_titles "Daphne-sb" "/mnt/daphne/titles"
emulator_include "Daphne-sb"



casm wrote:
At this point, you've probably noticed at least one of the shortcomings: Daphne's games in the Advancemenu gamelist are shown as only the first part of the ROM name - i.e., astron.zip is displayed as 'Astron', cliff.zip is shown as 'Cliff', and so forth. There are also no preview images available for the games.


Additionally shared, the method that allegedly works to circumvent this shortcoming is to create a *.lst file in the root directory of AdvanceMenu as long as the value of "game" is the same name of the rom file, just like with Lost Dog's thumbnail preview fix. In this example formatting (the .lst file can be named Daphne.lst), this single file can be used to define multiple game names instead of one per file; Dragon's Lair and Dragon's Lair Enhancement 2.1 (see below):

Code:
game (
name lair
description "Dragon's Lair (US revision F2)"
year 1983
manufacturer "Cinematronics (USA)"
)
game (
name dle21
description "Dragon's Lair (US enhancement 2.1)"
year 1983
manufacturer "Cinematronics"
cloneof lair
)


I have not yet personally confirmed this information, but both fixes seem to be accepted by that community.


Top
Offline Profile  
 
 Post subject: Re: An additional note (Concerning Overlay issues)
PostPosted: Fri Dec 22, 2006 5:58 am 
DAPHNE Bronze Donator
DAPHNE Bronze Donator

Joined: Mon Jul 31, 2006 4:57 am
Posts: 22
lowlight wrote:

Code:
game (
name lair
description "Dragon's Lair (US revision F2)"
year 1983
manufacturer "Cinematronics (USA)"
)
game (
name dle21
description "Dragon's Lair (US enhancement 2.1)"
year 1983
manufacturer "Cinematronics"
cloneof lair
)


I have not yet personally confirmed this information, but both fixes seem to be accepted by that community.


I'm dredging this up again... Yup! It works. I've finally gotten around to playing with this and it works!


Top
Offline Profile  
 
 Post subject: Another lil' tidbit...
PostPosted: Sun Jan 07, 2007 10:00 am 
DAPHNE Gold Donator
DAPHNE Gold Donator
User avatar

Joined: Wed Sep 27, 2006 11:32 am
Posts: 82
Location: California
I'm glad to hear that it's working fine for you Lost Dog :)! Here's another bit of info that you may or may not find helpful when it comes to configuring Advancmenu with Daphne. This bit comes straight from Aaron Mahler's website. Apparently, Advancemenu only needs to have something to search against/display when it comes to a "Rom" value in the .rc file. So, you could simply have a game's title show up correctly by creating a new empty file with the full name of the game you want displayed in Advancemenu. The example below shows me making a name file called Dragon's Lair in the "/mnt/dl/titles" directory:

Code:
# cd /mnt/dl/titles
# touch Dragon's Lair
#


Afterwards, your advmenu.rc file would now look like the following below:

Code:
emulator "Daphne" generic "/mnt/dl/daphne" "lair vldp -framefile /mnt/dl/framefile/lair.txt -fullscreen"
emulator_roms "Daphne" "/mnt/dl/titles"
emulator_titles "Daphne" "mnt/games/titles"
emulator_include "Daphne"
...


Doing it this way is pretty handy if you only have one or two games, and keeps you from having to make a declaration file altogether. But this particular example also assumes a few things too:

  • you've clearly declared your asset paths in your framefile
  • you have all of your Daphne and Dragon's Lair stuff in the same folder (in this case, /mnt/dl/).
  • you have another directory in which you keep your game titles (ie: /mnt/games/titles)


Either way, there are at least a couple ways to get around the listed names issue, as you can see :)!


Top
Offline Profile  
 
 Post subject:
PostPosted: Sun Mar 11, 2007 9:27 pm 
DAPHNE Platinum Donator
DAPHNE Platinum Donator
User avatar

Joined: Wed Jan 31, 2007 3:26 am
Posts: 45
Location: Austin, Tx.
Well I have finally been able to get everything working.

1st I run daphne from scripts whose names appear as the name of the emulator in advmenu.rc. Next I created the proper subdirectories for each script/emulator with rom/snap/titles, touch the rom and created a snap of the same name. Lowlight's suggestion of a *.lst worked great for getting the names of Space Ace and Dragon's Lair to appear in advancemenu.

I'm running on gentoo with advancemenu/advancemame and svgalib. My mame user logs in automatic from inittab using mgetty. The .bashrc starts advancemenu. The scripts for daphne start an X session and then daphne in fullscreen. I wanted scripts so that I could separate daphne configurations from advancemenu. Once I had advmenu.rc properly configured for the scripts I don't have to touch it again if I want to change something in the way Space Ace runs; just edit the script for Space Ace. I had some trouble with snaps at first using emulator_altss but I couldn't tell you what I did wrong. It works now though.

Now the difficult decision I have to make is this: Should I play some games or get to work on a controller?.. Ha!


Top
Offline Profile  
 
 Post subject:
PostPosted: Wed Mar 14, 2007 11:18 am 
DAPHNE Gold Donator
DAPHNE Gold Donator
User avatar

Joined: Wed Sep 27, 2006 11:32 am
Posts: 82
Location: California
ztomiccomputers wrote:
Now the difficult decision I have to make is this: Should I play some games or get to work on a controller?.. Ha!


I'm sure you'll figure that out soon enough ;)! Always nice to see another happy Daphne Linux (Gentoo) user!


Top
Offline Profile  
 
 Post subject:
PostPosted: Thu Mar 15, 2007 12:19 am 
DAPHNE Platinum Donator
DAPHNE Platinum Donator
User avatar

Joined: Wed Jan 31, 2007 3:26 am
Posts: 45
Location: Austin, Tx.
Ok, part of the problem with running daphne from advancemenu in linux is that LD_LIBRARY_PATH has to be set. The best way to do this is to run daphne from a script. I made a few changes since my last post; the result makes a little more scence. Here is my tutorial (HOWTO) on getting Daphne working in advancemenu on Gentoo linux.

Daphne is installed in ~/daphne. Make sure the games run in X before trying to run them from advmenu in svgalib. You should also have a look at this before using this method. If you run advancemenu from X then you may find the URL above to be of more value. Again, make sure that you have a way to set LD_LIBRARY_PATH; there are other ways such as /etc/profile or ~/.bashrc.

Make the proper directories and populate them:
Code:
# mkdir ~/daphne/advmenu
# mkdir ~/daphne/advmenu/roms
# mkdir ~/daphne/advmenu/snaps
# mkdir ~/daphne/advmenu/titles
# touch ~/daphne/advmenu/roms/lair.zip
# touch ~/daphne/advmenu/roms/ace.zip


If you have imagemagick installed you can easily convert the daphne jpegs to png format for advmenu:
Code:
# convert ~/daphne/images/lair.jpg ~/daphne/advmenu/snaps/lair.png
# convert ~/daphne/images/ace.jpg ~/daphne/advmenu/snaps/ace.png


Create a script to start daphne called ~/daphne/startdaph. If you run advmenu from svgalib then you need to make sure there is no X display already running. X will exit with an error if it cannot get a display:
Code:
#! /bin/bash
# startdaph
GAME=$1
export LD_LIBRARY_PATH=/home/mame/daphne/lib
case “$GAME” in
   "ace")
   FRAME='/home/mame/.daphne/vldp/ace/ace.txt'
   ;;
   "lair")
   FRAME='/home/mame/.daphne/vldp/lair/lair.txt'
   ;;
esac
# uncomment the appropriate line.
# run from svgalib
xinit /home/mame/daphne/daphne $GAME vldp -framefile $FRAME -fullscreen -x 640 -y 480
# run from X
# /home/mame/daphne/daphne $GAME vldp -framefile $FRAME -fullscreen -x 640 -y 480


Make the script executable:
Code:
# chmod +rx ~/daphne/startdaph


Add the next lines in ~/.advance/advmenu.rc. This gives advmenu something to look for and display in it's menu. I am not using titles at this time but put it in for completeness:
Code:
emulator "Daphne" generic "/home/mame/daphne/startdaph" "%s"
emulator_roms "Daphne" "/home/mame/daphne/advmenu/roms"
emulator_titles "Daphne" "/home/mame/daphne/advmenu/titles"
emulator_altss "Daphne" "/home/mame/daphne/advmenu/snaps"
emulator_include "Daphne"


Now create ~/.advance/Daphne.lst:
Code:
game (
name ace
description "Space Ace (Rev. A3)"
year 1983
manufacturer "Cinematronics (USA)"
)
game (
name lair
description "Dragon's Lair (Rev. F2)"
year 1983
manufacturer "Cinematronics (USA)"
)


Simply edit ~/daphne/startdaph and ~/.advance/Daphne.lst to get the different configurations of the laser games. If you want to add another game do it like this:
In /home/mame/.advance/Daphne.lst add the following lines.
Code:
game (
name sae
cloneof ace
description "Space Ace (Enhanced)"
year 1983
manufacturer "Cinematronics (USA)"
)


Then add these lines into the case statement in /home/mame/daphne/startdaph:
Code:
"sae")
   FRAME='/home/mame/.daphne/vldp/ace/ace.txt'
   ;;


Then create a fake rom file:
Code:
#touch ~/daphne/advmenu/roms/sae.zip

Now your ready to play!


Top
Offline Profile  
 
 Post subject:
PostPosted: Thu Mar 22, 2007 6:43 am 
DAPHNE Gold Donator
DAPHNE Gold Donator
User avatar

Joined: Wed Sep 27, 2006 11:32 am
Posts: 82
Location: California
ztomiccomputers wrote:
Ok, part of the problem with running daphne from advancemenu in linux is that LD_LIBRARY_PATH has to be set.


Hmmm....I never knew than to be an issue with Advancemenu. I use the Wah!Cade front end for my cabinet's OS, so I've never had that occur, but this is great information nonetheless!


Top
Offline Profile  
 
 Post subject:
PostPosted: Sat Mar 24, 2007 2:02 am 
DAPHNE Bronze Donator
DAPHNE Bronze Donator

Joined: Mon Jul 31, 2006 4:57 am
Posts: 22
lowlight wrote:
ztomiccomputers wrote:
Ok, part of the problem with running daphne from advancemenu in linux is that LD_LIBRARY_PATH has to be set.


Hmmm....I never knew than to be an issue with Advancemenu. I use the Wah!Cade front end for my cabinet's OS, so I've never had that occur, but this is great information nonetheless!


I don't have LD_LIBRARY_PATH set and it runs fine with Advancemenu. Strange...


Top
Offline Profile  
 
 Post subject:
PostPosted: Sun Mar 25, 2007 7:44 pm 
DAPHNE Platinum Donator
DAPHNE Platinum Donator
User avatar

Joined: Wed Jan 31, 2007 3:26 am
Posts: 45
Location: Austin, Tx.
lowlight, Lost Dog:

You guys already had libglew installed. I don't. I haven't done any work on that but I think I may because I'm having second thoughts about running from a script. It's good info but you really should be able to do everything you need to do from advancemenu without having to write a script. So it's not a bad way to do it but it is more work than most people would be willing to do.


Top
Offline Profile  
 
 Post subject:
PostPosted: Thu May 03, 2007 4:27 am 
DAPHNE Platinum Donator
DAPHNE Platinum Donator
User avatar

Joined: Wed Jan 31, 2007 3:26 am
Posts: 45
Location: Austin, Tx.
lowlight wrote:
Hmmm....I never knew than to be an issue with Advancemenu. I use the Wah!Cade front end for my cabinet's OS, so I've never had that occur, but this is great information nonetheless!


I revisited this post and noticed Wah!cade. It must have confused me but I have recently tried it.
see post: https://www.daphne-emu.com/phpBB2/viewtopic.php?t=2422
It's pretty doggon cool! I did a small setup with Daphne and it works great.

I found that the libs must be explicitly installed for the newer beta Daphne on Gentoo. And on Ubuntu 6.x you must link the lib in the Daphne home directory. Matt informed me that this problem will eventually go away as the distributions "Catch up" and I just downloaded Ubuntu 7 to see what's gonna happen. Either way, it's a problem that only occures if you don't use the loader. Libglew seems to be my nemisis in most of my posts to the point of embarrasment for linux for us folks that push it, nevermind that there are just as many problems on both OS's. .. I digress.

I was able to find a way that may work better for advancemenu and would require much less work. See my post at:
http://www.anti-particle.com/forum/view ... 277e51b629
I have not adapted it to advancemenu yet but it shouldn't be hard to do.


Top
Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net