| |||||||
| Tips and Tricks Post your Tips and Tricks in here. |
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Portal User Join Date: Jan 2006 Location: Sweden
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
| Hello guys and gals, first off let me thank you developers for a media portal with class. It has everything I've ever wanted, so thanks a LOT! Feeling the urge to give something back to you for this excellent product, and being a bit of an emulator freak, I've put together a wrapper for my favourite computer Amiga, and it's emulator WinUAE. My goal was this: * Launch any game conveniently, even multidisk games. * Being able to control the emulator without keyboard, only remote and joypads. * And of course, using My Programs to launch it seamlessly. Thanks waeberd for writing this plugin, you rock! After a day an night of coding, I present the WinUAE launcher! Quick install (for experienced people): Download it from http://hem.passagen.se/gazoot/mediap...e_launcher.zip Extract the zip to a folder, maybe in the winuae dir. Edit the configuration part of the "launch.sh" script. Use My Programs to launch "launch.bat" with your disk files, and you're set! Longer explanation: You need a good WinUAE configuration file, so create a one that you really like, or take inspiration from "mediaportal.uae" in the launcher directory. It's the one I use. [edit] Important: Be sure to set use_gui=no in the configuration! [/edit] The script will work without effort for any single-disk game. What you need for multidisk is a consistent naming scheme. The default is (Disk X of Y), which needs to be somewhere in the file name for all disks. The script will then locate all disks with this pattern, put them in disk drives up to df3:, and finally put all disks in the disk swapper, so you can switch disks in case you have lots of disks, or a game that doesn't support more than one drive. You can change this naming pattern in the configuration in case you have another naming already. For the remote, use HIP to configure your remote with winuae. Except for the disk swapper, everything seems to be remote configurable. To use the disk swapper from the keyboard, hold down the End key and press 1-0 on the normal keyboard (not the numeric) to swap to disk 1-10 in df0:. If you are able to map the remote to the disk swapper, please let me know! I lost too many hours of sleep trying to make it work... Use the following settings for My Programs: Launcher Application: launcher_dir\launcher.bat Shellexecute: No Wait for exit: Yes Arguments: <blank> Startup directory: launcher_dir Quotes around filenames: Yes File-extensions: .zip,.adf,.adz I think this should get you started. Please post any bugs, question or ideas to make it better. Have fun! Download url again: http://hem.passagen.se/gazoot/mediap...e_launcher.zip WinUAE download here: http://www.winuae.net/ HIP: http://www.byremote.com.au/HIP/Download.htm (a bit complicated but very good program) /Gazoot |
| | |
| | #3 (permalink) |
| Portal User Join Date: Jan 2006 Location: Sweden
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
| No problem - I love'em too. I fixed a problem in this updated version - all unix tools required for the job is now included in the zip file. I hope it will work perfecly now. If you still wonder what this launcher really does, it rewrites the .uae configuration file with "useful" data, and launches winuae with the new config. It would be very nice to hear if it works for you, so please let me know here! /Gazoot |
| | |
| | #4 (permalink) |
| Portal Member Join Date: Jun 2005 Location: Norway
Posts: 199
Thanks: 1
Thanked 0 Times in 0 Posts
| I get theese errors: http://aasmund.mscon.net/ting/error.JPG I use your .uae config. When I found your post I just thought it was someting good for the winuae but I am not shure what it is. But I am guesing it adapts the configuration to the game? or add features? The problem for me right now is that I cant use one config for every game and sometimes I have to click the mouse or press a key go go further in the game. my config to launch.sh Code: #!/bin/sh
# WinUAE launcher script for MediaPortal
# By Andreas Söderlund (gazoot [care of] home [dot] se)
#
# Download the BEST Media center at
# http://www.team-mediaportal.com/
#
# Unix utils from http://unxutils.sourceforge.net/
# (Not totally compatible with unix though - Use cygwin)
#
# Please edit the configuration below to suit your needs.
##### Configuration #######################################
# NOTE: Use forward slashes in the filenames!
# WinUAE executable file
WINUAE="C:/Programfiler/WinUAE/winuae.exe"
# Template configuration file for WinUAE
CONFIG="C:/Documents and Settings/Ã¥smund/Mine dokumenter/winuae_launcher/launcher/mediaportal.uae"
# Multi disk regexp search (EGREP)
# If this pattern is found in file, use multiple floppies
# and also put them in the Disk Swapper.
MULTIDISK_REGEXP="\(Disk [0-9]+ of [0-9]+\)"
##### End of configuration! ###############################
##### Functions ###########################################
writefloppy ()
{
echo >> $LAUNCH_CONFIG
echo floppy$1=$2 >> $LAUNCH_CONFIG
echo floppy$1type=0 >> $LAUNCH_CONFIG
echo floppy$1sound=0 >> $LAUNCH_CONFIG
}
writeswapper ()
{
echo >> $LAUNCH_CONFIG
echo diskimage$1=$2 >> $LAUNCH_CONFIG
}
writefloppies ()
{
echo >> $LAUNCH_CONFIG
echo nr_floppies=$1 >> $LAUNCH_CONFIG
}
##### Main program ########################################
if [ -z $1 ];
then
echo Need disk file!
exit 1
fi
DISK=$1
BACKSLASH='\\'
# Create temporary configuration that will be launched with WinUAE
LAUNCH_CONFIG="`dirname $CONFIG`/mediaportal_winuae_launcher_temp_config.uae"
cp "$CONFIG" "$LAUNCH_CONFIG"
# Remove floppy information from new config
sed -r -e "/^(nr_)?flopp(y[0-9]\w*|ies)=/d" "$LAUNCH_CONFIG" > "$LAUNCH_CONFIG.bak"
sed -r -e "/diskimage[0-9]+=/d" "$LAUNCH_CONFIG.bak" > "$LAUNCH_CONFIG"
rm "$LAUNCH_CONFIG.bak"
# Test for multiple disks
multi=`echo $DISK|sed -n -r /"$MULTIDISK_REGEXP"/p`
if [ ! -z "$multi" ]
then
# Multiple disks found
# Extract start of file name without regexp.
FILES=`echo $DISK|sed -r s/"$MULTIDISK_REGEXP"/\.\*/`
# Avoid globbing by replacing square brackets with .
FILES=`echo $FILES|sed -r s#[\[]#.#g`
FILES=`echo $FILES|sed -r s#[\]]#.#g`
DIR=`dirname "$DISK"`
# Strip dir from full filename to get the search criteria
SEARCH=${FILES#"$DIR"\\}
let "i = 0"
OLD_IFS=$IFS
IFS='?'
for floppy in `./find "$DIR" -iregex ".*$SEARCH" -printf "%p?"`;
do
if [ ! -z "$floppy" ];
then
#echo $floppy
if [ $i -le 3 ];
then
writefloppy "$i" "$floppy"
fi
writeswapper "$i" "$floppy"
let "i = i + 1"
fi
done
IFS=$OLD_IFS
else
# No multidisk, just write simple configuration
# and start.
writefloppy 0 "$DISK"
let "i = 1"
fi
writefloppies $i
# Replace slash with backslash in config file
# to be windows compatible
LAUNCH_CONFIG=`echo $LAUNCH_CONFIG|sed -r s#/#"$BACKSLASH"#g`
# Lets go!
"$WINUAE" -config="$LAUNCH_CONFIG"
__________________ htpc- all in one. |
| | |
| | #5 (permalink) |
| Portal User Join Date: Jan 2006 Location: Sweden
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
| Whoops! Some pretty heavy errors you're getting there. I can see three probable causes right now: 1. You're not using the latest version. I updated the launcher yesterday, so please update and see if it works then. Sorry about that.If that doesn't work: 2. The shebang line "#!/bin/sh", I don't think it's needed because sh.exe is launched with the script as argument anyway. So try removing the top line in launcher.sh. 3. You use the char å in your CONFIG path, it should probably work but you never know... try using an path without our scandinavian chars. Thanks for the report, let me know if it still doesn't work and I'll look into it some more. /Gazoot |
| | |
| | #6 (permalink) |
| Portal Member Join Date: Jun 2005 Location: Norway
Posts: 199
Thanks: 1
Thanked 0 Times in 0 Posts
| I just want to say, I wil post I just had a lot of things to do. Today I get visit from my brother and kids, and they wil spend the night. Pherhaps I wil try your new files and the other sugestions tonight. Although I did download the files after this post. Code: I fixed a problem in this updated version - all unix tools required for the job is now included in the zip file. I hope it will work perfecly now.
__________________ htpc- all in one. |
| | |
| | #7 (permalink) |
| Portal Member Join Date: Jun 2005 Location: Norway
Posts: 199
Thanks: 1
Thanked 0 Times in 0 Posts
| Finaly I have tried again with no luck. I get theese errors http://aasmund.mscon.net/ting/mediaportal/error2.JPG
__________________ htpc- all in one. |
| | |
| | #9 (permalink) |
| Portal Member Join Date: Jun 2006
Posts: 32
Thanks: 1
Thanked 1 Time in 1 Post
| I have problems with the diskswapper... If I use zip files to store the correctly named adf files ( Disk 1 of 3, etc), the launcher tries to load zip files with winuae - nothing happens. If I unzip the files, so that I have three correctly named adf files in a directory, the launcher only starts the one I chose in media portal. If I look at the created configuration it says "one floppy", nothing loaded into disk swap or other df:s. Anyone? |
| | |
| | #10 (permalink) |
| Portal Member | Ey Gazoot. Nice initiative for ppl still caught up in the 80's and 90's. ![]() I have a question regarding exiting WinUAE. I've configured WinUAE to exit when I press CTRL + F11, but everything just seems to hang when I do that. I don't know if it has something to do with the waitclose.exe stuff or what. Any suggestions? |
| | |
![]() |
| Bookmarks |
| Tags |
| launcher, winuae |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MP Launcher | ohdarklord | Plugins | 1 | 2006-05-26 07:52 |