Difference between revisions of "Loader:yabause loader0910"
Jump to navigation
Jump to search
(→Usage) |
|||
Line 1: | Line 1: | ||
+ | = Yabause 0.9.10 Loader = | ||
== About == | == About == | ||
This script addresses an issue with the broken commandline in Yabause 0.9.10. To work around this issue the loader rewrites the ini file at launch time with the required options. | This script addresses an issue with the broken commandline in Yabause 0.9.10. To work around this issue the loader rewrites the ini file at launch time with the required options. | ||
Line 9: | Line 10: | ||
# Add the loader into Wah!Cade | # Add the loader into Wah!Cade | ||
# Configure the commandline_format as per the Usage section | # Configure the commandline_format as per the Usage section | ||
+ | # Start Yabause manually and config all the required option so a new ini is written | ||
+ | # Copy ~/.config/yabause.ini to ~/.config/yabause-template.ini | ||
+ | |||
+ | == Reconfiguring Yabause == | ||
+ | If you need to reconfigure Yabause for any reason you will need to replace the yabause-template.ini. | ||
+ | # Copy ~/.config/yabause-template.ini to ~/.config/yabause.ini | ||
# Start Yabause manually and config all the required option so a new ini is written | # Start Yabause manually and config all the required option so a new ini is written | ||
# Copy ~/.config/yabause.ini to ~/.config/yabause-template.ini | # Copy ~/.config/yabause.ini to ~/.config/yabause-template.ini |
Revision as of 00:06, 9 January 2011
Yabause 0.9.10 Loader
About
This script addresses an issue with the broken commandline in Yabause 0.9.10. To work around this issue the loader rewrites the ini file at launch time with the required options.
The script itself is very much in an alpha state, use at your own risk.
Installation
- Save the script below to <filename>.pl
- Make the script executable. chmod +x <filename>.pl
- Add the loader into Wah!Cade
- Configure the commandline_format as per the Usage section
- Start Yabause manually and config all the required option so a new ini is written
- Copy ~/.config/yabause.ini to ~/.config/yabause-template.ini
Reconfiguring Yabause
If you need to reconfigure Yabause for any reason you will need to replace the yabause-template.ini.
- Copy ~/.config/yabause-template.ini to ~/.config/yabause.ini
- Start Yabause manually and config all the required option so a new ini is written
- Copy ~/.config/yabause.ini to ~/.config/yabause-template.ini
Wah!Cade commandline_format
Execute the script with the following commandline_format:
<full path to bios file> "[rompath]/[name].[romext]"
Perl Script
#!/usr/bin/perl # # Yabause Loader # Work around to launch yabause 0.9.10 use IO::Handle; my $home = "/home/" . `whoami`; chomp($home); ######## CONFIG OPTIONS ######## my $cdromcore = "1"; my $yabpath = $home . "/.config/"; #my $yabpath = $home . "/.yabause/"; my $command = `which yabause-gtk`; #my $command = `which yabause-qt`; ######## END CONFIG OPT ######## chomp($command); my $cdrom = $ARGV[1]; my $biosfile = $ARGV[0]; my $procfile = $yabpath . "yabause-template.ini"; my $destfile = $yabpath . "yabause.ini"; # Pickup last used yabuse.ini at runtime if ( -e $destfile ) { system( "cp", "-u", $destfile, $procfile ); } if ( -e $procfile && @ARGV > 1 ) { open (YABINI, ">", $destfile) or die $!; open (YABTINI, "<", $procfile) or die $!; while ($line = <YABTINI>) { if ($line =~ m/^CDROMCore\=/) { print YABINI "CDROMCore=1\n"; } elsif ( $line =~ m/^CDROMDrive\=/ ) { print YABINI "CDROMDrive=".$cdrom."\n"; } elsif ( $line =~ m/^BiosPath\=/ ) { print YABINI "BiosPath=".$biosfile."\n"; } else { print YABINI $line; } } system($command, "-a", "-f"); } else { print "Yabause Loader v0.1 by sairuk"; print "\n"; print "Usage: $0 BIOSFILE ISO\n"; }