WinUAE launcher for you!

Discussion in 'Tips and Tricks' started by gazoot, January 10, 2006.

  1. gazoot

    gazoot New Member

    Joined:
    January 10, 2006
    Messages:
    4
    Likes Received:
    0
    Location:
    Sweden
    Ratings:
    +0 / 0
    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/mediaportal/winuae_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/mediaportal/winuae_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
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. aasmund Nordal

    aasmund Nordal Portal Pro

    Joined:
    June 20, 2005
    Messages:
    204
    Likes Received:
    0
    Location:
    Norway
    Ratings:
    +0 / 0
    Home Country:
    Norway Norway
    thank you.
    I love Amiga games :)
     
  4. gazoot

    gazoot New Member

    Joined:
    January 10, 2006
    Messages:
    4
    Likes Received:
    0
    Location:
    Sweden
    Ratings:
    +0 / 0
    Updated version

    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
     
  5. aasmund Nordal

    aasmund Nordal Portal Pro

    Joined:
    June 20, 2005
    Messages:
    204
    Likes Received:
    0
    Location:
    Norway
    Ratings:
    +0 / 0
    Home Country:
    Norway Norway
    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 (Text):
    1. #!/bin/sh
    2.  
    3. # WinUAE launcher script for MediaPortal
    4. # By Andreas Söderlund (gazoot [care of] home [dot] se)
    5. #
    6. # Download the BEST Media center at
    7. # https://www.team-mediaportal.com/
    8. #
    9. # Unix utils from http://unxutils.sourceforge.net/
    10. # (Not totally compatible with unix though - Use cygwin)
    11. #
    12. # Please edit the configuration below to suit your needs.
    13.  
    14. ##### Configuration #######################################
    15.  
    16. # NOTE: Use forward slashes in the filenames!
    17.  
    18. # WinUAE executable file
    19. WINUAE="C:/Programfiler/WinUAE/winuae.exe"
    20.  
    21. # Template configuration file for WinUAE
    22. CONFIG="C:/Documents and Settings/Ã¥smund/Mine dokumenter/winuae_launcher/launcher/mediaportal.uae"
    23.  
    24. # Multi disk regexp search (EGREP)
    25. # If this pattern is found in file, use multiple floppies
    26. # and also put them in the Disk Swapper.
    27. MULTIDISK_REGEXP="\(Disk [0-9]+ of [0-9]+\)"
    28.  
    29. ##### End of configuration! ###############################
    30.  
    31. ##### Functions ###########################################
    32.  
    33. writefloppy ()
    34. {
    35.     echo >> $LAUNCH_CONFIG
    36.     echo floppy$1=$2 >> $LAUNCH_CONFIG
    37.     echo floppy$1type=0 >> $LAUNCH_CONFIG
    38.     echo floppy$1sound=0 >> $LAUNCH_CONFIG
    39. }
    40.  
    41. writeswapper ()
    42. {
    43.     echo >> $LAUNCH_CONFIG
    44.     echo diskimage$1=$2 >> $LAUNCH_CONFIG
    45. }
    46.  
    47. writefloppies ()
    48. {
    49.     echo >> $LAUNCH_CONFIG
    50.     echo nr_floppies=$1 >> $LAUNCH_CONFIG
    51. }
    52.  
    53. ##### Main program ########################################
    54.  
    55. if [ -z $1 ];
    56. then
    57.     echo Need disk file!
    58.     exit 1
    59. fi
    60.  
    61. DISK=$1
    62. BACKSLASH='\\'
    63.  
    64. # Create temporary configuration that will be launched with WinUAE
    65. LAUNCH_CONFIG="`dirname $CONFIG`/mediaportal_winuae_launcher_temp_config.uae"
    66.  
    67. cp "$CONFIG" "$LAUNCH_CONFIG"
    68.  
    69. # Remove floppy information from new config
    70. sed -r -e "/^(nr_)?flopp(y[0-9]\w*|ies)=/d" "$LAUNCH_CONFIG" > "$LAUNCH_CONFIG.bak"
    71. sed -r -e "/diskimage[0-9]+=/d" "$LAUNCH_CONFIG.bak" > "$LAUNCH_CONFIG"
    72. rm "$LAUNCH_CONFIG.bak"
    73.  
    74. # Test for multiple disks
    75. multi=`echo $DISK|sed -n -r /"$MULTIDISK_REGEXP"/p`
    76.  
    77. if [ ! -z "$multi" ]
    78. then
    79.     # Multiple disks found
    80.     # Extract start of file name without regexp.
    81.     FILES=`echo $DISK|sed -r s/"$MULTIDISK_REGEXP"/\.\*/`
    82.    
    83.     # Avoid globbing by replacing square brackets with .
    84.     FILES=`echo $FILES|sed -r s#[\[]#.#g`
    85.     FILES=`echo $FILES|sed -r s#[\]]#.#g`
    86.    
    87.     DIR=`dirname "$DISK"`
    88.    
    89.     # Strip dir from full filename to get the search criteria
    90.     SEARCH=${FILES#"$DIR"\\}
    91.    
    92.     let "i = 0"
    93.    
    94.     OLD_IFS=$IFS
    95.     IFS='?'
    96.    
    97.     for floppy in `./find "$DIR" -iregex ".*$SEARCH" -printf "%p?"`;
    98.     do
    99.         if [ ! -z "$floppy" ];
    100.         then
    101.             #echo $floppy
    102.             if [ $i -le 3 ];
    103.             then
    104.                 writefloppy "$i" "$floppy"
    105.             fi
    106.            
    107.             writeswapper "$i" "$floppy"
    108.             let "i = i + 1"
    109.         fi
    110.     done
    111.    
    112.     IFS=$OLD_IFS
    113.    
    114. else
    115.     # No multidisk, just write simple configuration
    116.     # and start.
    117.     writefloppy 0 "$DISK"
    118.    
    119.     let "i = 1"
    120. fi
    121.  
    122. writefloppies $i
    123.  
    124. # Replace slash with backslash in config file
    125. # to be windows compatible
    126. LAUNCH_CONFIG=`echo $LAUNCH_CONFIG|sed -r s#/#"$BACKSLASH"#g`
    127.  
    128. # Lets go!
    129. "$WINUAE" -config="$LAUNCH_CONFIG"
    130.  
     
  6. gazoot

    gazoot New Member

    Joined:
    January 10, 2006
    Messages:
    4
    Likes Received:
    0
    Location:
    Sweden
    Ratings:
    +0 / 0
    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
     
  7. aasmund Nordal

    aasmund Nordal Portal Pro

    Joined:
    June 20, 2005
    Messages:
    204
    Likes Received:
    0
    Location:
    Norway
    Ratings:
    +0 / 0
    Home Country:
    Norway Norway
    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 (Text):
    1. 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.
     
  8. aasmund Nordal

    aasmund Nordal Portal Pro

    Joined:
    June 20, 2005
    Messages:
    204
    Likes Received:
    0
    Location:
    Norway
    Ratings:
    +0 / 0
    Home Country:
    Norway Norway
  9. gazoot

    gazoot New Member

    Joined:
    January 10, 2006
    Messages:
    4
    Likes Received:
    0
    Location:
    Sweden
    Ratings:
    +0 / 0
    From the screenshot, it looks like you didn't change the configuration paths to winuae and the configuration file. Are they set correctly in launcher.sh?

    /Gazoot
     
  10. baloubic

    baloubic Portal Member

    Joined:
    June 10, 2006
    Messages:
    32
    Likes Received:
    1
    Ratings:
    +1 / 0
    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?
     
  11. Roy

    Roy Portal Member

    Joined:
    January 29, 2007
    Messages:
    18
    Likes Received:
    2
    Location:
    Bergen
    Ratings:
    +2 / 0
    Home Country:
    Norway Norway
    Show System Specs
    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?
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!