Page 1 of 1

AMIGA - ready to play

Posted: Thu Mar 07, 2013 7:21 pm
by Stefan
Hi all,

i have add today AMIGA Games - WinUAE, now lets go and download WinUAE and get your favorite ADF Files and play ;-)

You can get the last free WinUAE here: http://www.winuae.net/
and you can find "amiga adf files" or "amiga roms" with Google.

First, make the options, check all 4 Floppy Disks to avaiable, load the Kick-ROM (you need this - Google help you), config your Joysticks, check Screenresolutions and Fullscreen and save "Configurations" as default.uae

Note: you can use the default.uae at the bottom, there is the basic inputs 1:mouse, and 2:joystick(arrowkeys and others, this you can remap).
sure, you can complete redesign your inputs too.

But what is, if they have 1, 2, or 3 or maybe 4 ADF Disks for a Game ?
Change while play in fullscreen is to crazy ...


Now i have a AutoIT Script for you, that will check for you, if Disk2, 3, or 4 avaiable, and load it automatic in WinUAE.

And here, a icon.png File.

Have Fun !

( Edit: see more infos in next post )

Re: AMIGA - ready to play - but some Questions

Posted: Mon Mar 11, 2013 4:00 pm
by Stefan
Hi Admin (and all others),

i have a solution for our "nice listening" in mGalaxy UI.

First, i am at work for this ... give me "some hours"

The way of the solution is:
1. command line disk parameters must be in "_"
2. the first disk can have a clear name with spaces, ex: Bards Tale.adf (display: Bards Tale)
3. all other disks (there will not displayed) must named as, ex: Bards Tale Disk 2.adfx (with a x at the end)
4. the new AutoIt Script check, if there a NAME Disk 2.adfx, 3, and 4 ... File, and load this too.

I have test one game, it works ...

I am back with news, after i have complete my works ...

Re: AMIGA - ready to play

Posted: Mon Mar 11, 2013 9:03 pm
by Stefan
Hi again,

ok this was a hard work for me, some scripting and understanding how winuae and filesystem working.

lets begin, download the latest winuae, and make it ready to run.
http://www.winuae.net

i use real floppy drive sounds from here too, exttract this in your amiga-path:
plugins/floppysounds/(soundfiles)
http://www.winuae.net/files/stuff/drive_sounds.zip
they are use in my default.uae - try it - they are VERY NICE !
you can edit this in winuaeMenu(UI) at "sounds"

use the attached config file here: default.uae ... in winuaeUI (not see ? press F12) go to configurations and load from ... this one default.uae.
now you can config your own setings for "display" and "game ports", but on "display" be sure, native is on "fullscreen".
Take a look at "ROM", here please select your Kickstart-Rom-File (correct path),
at the end, go to configuration again and click "save" for save this in default folder.

note: this one attached file use ESC to real quit winuae  :D

So, what do this now ?

This script load your game from mGalaxy into winuae. if you have more disks for a game, it will load next disks into, too.

Now you must rename your disk names, only a little, to get a clear mGalaxy screen, here an example:

Elite.adf (one disk only, nothing to do)
Elite.png (i use Screens in the same folder)

Defender of the Crown.adf (this is the Disk 1)
Defender of the Crown Disk 2.adx (this is the Disk 2 of a Game, rename it as NAME and "Disk 2.adx")
Defender of the Crown.png

Ok, whats this ?
In mGalaxy, all .adf Files (.adx not) are now listening and show correct with pictures.
The .adx Files do not show, but the winuae check it as .adf

Continue your renaming with 3 or up to 4 disks as example:

Game.adf
Game Disk 2.adx
Game Disk 3.adx
Game Disk 4.adx
Game.png

So, i am happy enough, i have now my ESC button, clear names in mGalaxy, and an autoload for winuae !  :D

one thing at the end:
ok, most of the games are compatible with multi disk drives to autoload disk 2, 3 and 4, if needed-
some games - not.
this games have in program code they comands, it must read from drive 1, at the second disk too.
but ok, my scripts load all other disks to winuae ... if you have a message to "insert disk 2" or others,
then press the KEYS: [home] and [2] or [3] or [4] for insert and read disk 2, 3 or 4.

example: Defender of the Crown do it auto, Bards Tale(s) too.
Blood Money, sorry no, ok here press [home] and [2], if need the second disk (then press fire or mouse button, or whatever you read in message on game-screen)

try it, this is a realy good working solution.
boah i hope you understand my quick and bad english  ::)

ok, at the end again: edit the paths in Runway, if they are others.

so, lets play a game ... cu !

( Edit: see more infos in next post )

Re: AMIGA - ready to play

Posted: Tue Mar 12, 2013 6:32 am
by Stefan
hi again,

some fine tuning here, now you can all your path set on mGalaxy_Runway only.

Use this <System> part:

Code: Select all

  <System>
    <Name>AMIGA</Name>
    <AppPath>C:\AMIGA\AMIGA_X.exe</AppPath>
    <RomPath>C:\AMIGA\DISKS</RomPath>
    <SnapPath>C:\AMIGA\DISKS</SnapPath>
    <Emu selected="0">
      <Cmd id="0" name="WinUAE" value=""%path\*%file"" />
    </Emu>
    <Ext selected="0">
      <Suf id="0" value=".adf" />
    </Ext>
    <Active>True</Active>
  </System>
And this one AutoIt:

Code: Select all

$PS = StringSplit($CmdLine[1], "*")
$DP = $PS[1]
$Disk1 = "-0 " & '"' & $DP & $PS[2] & '"' & " -s diskimage0=" & '"' & $DP & $PS[2] & '"'
$Disk2 = ""
$Disk3 = ""
$Disk4 = ""
$FN = StringTrimRight($PS[2], 4) 

If $CmdLine[0] == 1 Then
	  If FileExists($DP & $FN & " Disk 2.adx") Then
		 $Disk2 = " -1 " & '"' & $DP & $FN & " Disk 2.adx" & '"' & " -s diskimage1=" & '"' & $DP & $FN  & " Disk 2.adx" & '"'
	  EndIf
	  If FileExists($DP & $FN & " Disk 3.adx") Then
		 $Disk3 = " -2 " & '"' & $DP & $FN & " Disk 3.adx" & '"' & " -s diskimage2=" & '"' & $DP & $FN  & " Disk 3.adx" & '"'
	  EndIf
	  If FileExists($DP & $FN & " Disk 4.adx") Then
		 $Disk4 = " -3 " & '"' & $DP & $FN & " Disk 4.adx" & '"' & " -s diskimage3=" & '"' & $DP & $FN  & " Disk 4.adx" & '"'
	  EndIf
	  Run("winuae.exe -config=default.uae " & $Disk1 & $Disk2 & $Disk3 & $Disk4)
   EndIf
Exit 0
... here you can see, nothing to edit needed.

You can use the attached AutoIt.exe too.

Put this into the same folder as winuae.exe.

And this new default.uae use ESC to Quit all, and the "^" Button for ESC on Amiga.
Yes, now you can use "ESC" (ok, with ^) for in-game-functions too  :)



[attachment deleted by admin]

Re: AMIGA - ready to play

Posted: Sun Apr 14, 2013 5:42 pm
by Aeliss
Nice it work fine, but in my case I need to add 1 line.

Code: Select all

Run("winuae.exe -config=mGalaxy.uae " & $Disk1 & $Disk2 & $Disk3 & $Disk4 )
 sleep(1000)
 ProcessWaitClose("winuae.exe")
for the front end wait for the end of game.

Re: AMIGA - ready to play

Posted: Tue Apr 16, 2013 9:38 pm
by mgalaxy
There's a change in the "Systems.xml" file: '%ext' parameter is included in the command line.
It will be replaced at run-time by the extension suffix that you chose in mGalaxy Runway.
Previously, it was automatically added to the command line by mGalaxy...but since some emulators don't accept the rom name WITH its suffix it's now a variable in the command line, that you can pass...or not!

Anyway it has no influence on the existing Auto-It scripts!

Re: AMIGA - ready to play

Posted: Sat Aug 24, 2013 4:52 pm
by Aeliss
A last modification. Some roms work on A500 but not on A1200, with this script you just need to put (A500) in the name to use the good kickstart.

Code: Select all

$PS = StringSplit($CmdLine[1], "*")
$DP = $PS[1]
$Disk1 = "-0 " & '"' & $DP & $PS[2] & '"' & " -s diskimage0=" & '"' & $DP & $PS[2] & '"'
$Disk2 = ""
$Disk3 = ""
$Disk4 = ""
$FN = StringTrimRight($PS[2], 4) 

If $CmdLine[0] == 1 Then
	  If FileExists($DP & $FN & " Disk 2.adx") Then
		 $Disk2 = " -1 " & '"' & $DP & $FN & " Disk 2.adx" & '"' & " -s diskimage1=" & '"' & $DP & $FN  & " Disk 2.adx" & '"'
	  EndIf
	  If FileExists($DP & $FN & " Disk 3.adx") Then
		 $Disk3 = " -2 " & '"' & $DP & $FN & " Disk 3.adx" & '"' & " -s diskimage2=" & '"' & $DP & $FN  & " Disk 3.adx" & '"'
	  EndIf
	  If FileExists($DP & $FN & " Disk 4.adx") Then
		 $Disk4 = " -3 " & '"' & $DP & $FN & " Disk 4.adx" & '"' & " -s diskimage3=" & '"' & $DP & $FN  & " Disk 4.adx" & '"'
	  EndIf
	  ; MsgBox(64, "Passed Parameters", "Parameter " & "winuae.exe -config=mGalaxy.uae " & $Disk1 & $Disk2 & $Disk3 & $Disk4 )
	  
	  if StringInStr($FN,"a500") Then
		 Run("winuae.exe -config=mGalaxy(A500).uae " & $Disk1 & $Disk2 & $Disk3 & $Disk4 )
	  else
		 Run("winuae.exe -config=mGalaxy.uae " & $Disk1 & $Disk2 & $Disk3 & $Disk4 )
	  Endif
	  
	  sleep(1000)
	  ProcessWaitClose("winuae.exe")
	  
   EndIf
Exit 0
For games that don't use drives other than df0: you can assign 2 keys in the input configuration
1 - next slot in disk swapper
2 - insert disk in current slot in df0:

With that you can swap disks with joypad.

Re: AMIGA - ready to play

Posted: Fri Oct 11, 2013 11:42 pm
by PP-Arcade
Hi, I changed the file names like this:

Arabian Nights.adf
Arabian Nights Disk 2.adx

When I start the game it gives an error:

Code: Select all

Line 3
Error: Array variable has incorrect number of subscripts or subscript dimension range exceeded.
(see my attachment "error1.jpg")

??? PP

Re: AMIGA - ready to play

Posted: Sat Oct 12, 2013 9:54 am
by Aeliss
It s an old script for mGalaxy v4, try this one

Code: Select all

;Parsing
Local $count = StringInStr($CmdLineRaw, ".exe", 0 , 1, 1)
local $app = StringLeft ( $CmdLineRaw, $count + 4 )
local $command = StringTrimLeft( $CmdLineRaw, $count + 4 )
if not $command then exit 0

$count = StringInStr($command, " ", 0 , 2, 1)
$command = StringTrimLeft( $command, $count + 1 )
$command = StringTrimRight( $command, 1 )

local $Disk1 = "-0 " & '"' & $command & '"' & " -s diskimage0=" & '"' & $command & '"'
local $Disk2 = ""
local $Disk3 = ""
local $Disk4 = ""
$command = StringTrimRight($command, 4)

If FileExists($command & " Disk 2.adx") Then
   $Disk2 = " -1 " & '"' & $command & " Disk 2.adx" & '"' & " -s diskimage1=" & '"' & $command  & " Disk 2.adx" & '"'
EndIf
If FileExists($command & " Disk 3.adx") Then
   $Disk3 = " -2 " & '"' & $command & " Disk 3.adx" & '"' & " -s diskimage2=" & '"' & $command  & " Disk 3.adx" & '"'
EndIf
if FileExists($command & " Disk 4.adx") Then
   $Disk4 = " -3 " & '"' & $command & " Disk 4.adx" & '"' & " -s diskimage3=" & '"' & $command  & " Disk 4.adx" & '"'
EndIf

; MsgBox(64, "Passed Parameters", "Parameter " & "winuae.exe -config=mGalaxy.uae " & $Disk1 & $Disk2 & $Disk3 & $Disk4 )
 
if StringInStr($command,"a500") Then
   Run('"' & $app & '" -config=mGalaxy(A500).uae ' & $Disk1 & $Disk2 & $Disk3 & $Disk4 )
elseif StringInStr($command,"D7 prbs") Then
   Run('"' & $app & '" -config=mGalaxy(D7prbs).uae ' & $Disk1 & $Disk2 & $Disk3 & $Disk4 )
else
   Run('"' & $app & '" -config=mGalaxy.uae ' & $Disk1 & $Disk2 & $Disk3 & $Disk4 )
Endif
	  
ProcessWaitClose("winuae.exe")
	  
Exit 0
And there is an improvement on this script, IDK if you know the amiga system, but there is 2 big branch and all games aren't compatible on all system.
So make a mGalaxy.uae config file with A1200 system (with AGA and kickstar 3.0) and an other with the A500 system (kickstar 1.3) called mGalaxy(A500).uae.

For the game that don't work on normal config just rename them
game (A500).adx

This week I will put the script to load amiga game on WHD format, only 1 file (no DSK), no disk acess, no compatibility problem, but I need to make a tutorial for that, it s a little more complicated.

Re: AMIGA - ready to play

Posted: Sat Oct 12, 2013 2:42 pm
by PP-Arcade
Cool thanx works great!

Greets, PP

Re: AMIGA - ready to play

Posted: Wed Oct 16, 2013 10:08 pm
by PP-Arcade
[quote="Aeliss"]
This week I will put the script to load amiga game on WHD format, only 1 file (no DSK), no disk acess, no compatibility problem, but I need to make a tutorial for that, it s a little more complicated.
[/quote]

If I can help let me know!  8)

PS. I see the post in general discusion, I wil test it later.
Thanx

Re: AMIGA - ready to play

Posted: Wed Jul 16, 2014 9:28 am
by beastieboy
Guys, no need to waste your time. There's working Amiga collection based on GameBase here: http://www.t2e.pl/pl/450/134/450/Daxowe ... 1341136105

It's a really impresive collection as it contains EVERY Amiga game and everything works and specific WinUAE configuration for each one is provided via local db. If you can't handle it,j ust let me know, I just set it up on my mGalaxy cabinet.

Re: AMIGA - ready to play

Posted: Sun Aug 31, 2014 8:09 pm
by Laundro
Color me interested - I've been trying to set something up with fs-uae but although the emulator is great (and the integration with the online database as well), I can see no way of integrating it seamlessly with mGalaxy...

Any ideas?

Re: AMIGA - ready to play

Posted: Mon Sep 01, 2014 5:05 pm
by Aeliss
To use fs-uae I use that

Code: Select all

  <System>
    <Name>Commodore Amiga</Name>
    <AppPath>F:\emulateur\Amiga\FS-UAE-251\Windows\fs-uae\fs-uae.exe</AppPath>
    <RomPath>F:\emulateur\Amiga\Jeux</RomPath>
    <SnapPath>F:\emulateur\Mgalaxy\snapsemul\amiga</SnapPath>
    <VidPath />
    <Emu selected="1">
      <Cmd id="0" name="WinUAE" value="-config=mGalaxy.uae -0 "%path\%file%ext"" />
      <Cmd id="1" name="Fs-UAE" value="--floppy-drive-0="%path\%file%ext"" />
    </Emu>
    <Extensions>.adf,.adz,.dms,.fdi,.gz,.hdf,.hdz,.ipf,.rdf,.rdz,.vhd,.zip</Extensions>
    <Active>True</Active>
    <Script>False</Script>
    <Database>False</Database>
  </System>
  <System>
    <Name>Commodore Amiga WHD</Name>
    <AppPath>F:\emulateur\Amiga\MyWHDLoader\WHDloader.exe</AppPath>
    <RomPath>F:\emulateur\Amiga\Jeux WHD</RomPath>
    <SnapPath>F:\emulateur\Mgalaxy\snapsemul\AmigaWHD</SnapPath>
    <VidPath />
    <Emu selected="1">
      <Cmd id="0" name="WinUAELoader" value="-mode whdload -rom "%path\%file%ext"" />
      <Cmd id="1" name="My loader" value=""%path\%file%ext"" />
    </Emu>
    <Extensions>.zip</Extensions>
    <Active>True</Active>
    <Script>True</Script>
    <Database>True</Database>
  </System>
This is the base, with only 1 disk, and using ADF file, not the fs-uae preconfigured file.
In fact after verification, I haven't made script for fs-uae because I m using it only for WHD archive with a special loader.

It's a little bit complicated, It works with zip file, can manage save and special config using ini file, but this file is useless if you don't understand autoit script.

Code: Select all

#include <array.au3>
#include <File.au3>

local $fichier = $CmdLineRaw
;clen name
$fichier = StringTrimRight( $fichier, 1 )
$fichier = StringTrimleft( $fichier, 1 )

local $tmp = @ScriptDir & '\WHD_loader\tmp\'
local $app
local $config = @ScriptDir & '\WHD_loader\WHDLoader.uae'

;delete previous archives
DirRemove(@scriptdir & "\WHD_loader\tmp\",1)
DirCreate(@scriptdir & "\WHD_loader\tmp\")

;unzip archive
_Zip_UnzipAll($fichier,$tmp)

;we get the name of the game
Local $search = FileFindFirstFile($tmp & '*.info')
If $search = -1 Then exit 0
Local $file = FileFindNextFile($search)
$file = StringTrimRight( $file, 5 )
FileClose($search)

;file modification
Local $file2 = FileOpen(@ScriptDir & '\WHD_loader\WHD\S\user-startup',2)
If $file2 = -1 Then exit 0

Local $patch = IniRead(@ScriptDir & "\Data.ini", "PATCH", $file, "")
Local $save = IniRead(@ScriptDir & "\Data.ini", "SAVE", $file, "")

;Add save if exist
if $save <> "" Then
   local $search2 = FileFindFirstFile(@scriptdir & '\SAVE\' & $file & '\' & $save & '\'  & '\*.*' )
   If $search2 <> -1 then
	  local $fileSave = FileFindNextFile($search2)
	  while $fileSave <> ''
		 FileCopy (@scriptdir & '\SAVE\' & $file & '\' & $save & '\' & $fileSave, $tmp & $file & '\' & $save & '\' & $fileSave, 1 )
		 $fileSave = FileFindNextFile($search2)
	  wend
   Endif
   FileClose($search2)
   $patch = 'NOWRITECACHE ' & $patch
Endif

FileWriteLine($file2, 'echo "";')
FileWriteLine($file2, 'echo "WHD loader";')
FileWriteLine($file2, 'echo "Running: ' & $file & '.Slave";')
FileWriteLine($file2, 'echo "Special command : ' & $patch & '";')
FileWriteLine($file2, 'echo "";')
FileWriteLine($file2, 'echo "Remember to use the quit key instead of closing WinUAE!";')
FileWriteLine($file2, 'echo "";')
FileWriteLine($file2, 'cd dh1:' & $file & ';')
FileWriteLine($file2, 'whdload ' & $file & '.Slave PRELOAD ' & $patch & ';')
FileClose($file2)

#CS
;for WinUAE
$app = @ScriptDir & '\..\WinUAE\WinUAE.exe'

;configuration modification
local $aLines

_FileReadToArray($config, $aLines)
for $i = 0 To $aLines[0]
   If StringInStr($aLines[$i], "filesystem2=rw,DH1") Then
         _FileWriteToLine($config, $i ,"filesystem2=rw,DH1:DH1:" & $tmp & ",0", 1)
   EndIf
   If StringInStr($aLines[$i], "uaehf1=dir,rw,DH1:") Then
         _FileWriteToLine($config, $i ,"uaehf1=dir,rw,DH1:DH1:" & $tmp & ",0", 1)
   EndIf
Next
Runwait('"' & $app & '" -config="' & $config )
#Ce

;#cs
;For FS-UAE
$app = @ScriptDir & '\..\fs-uae\fs-uae.exe'

$config = @ScriptDir & '\WHD_loader\whd.fs-uae'
Runwait('"' & $app & '" ' & $config )
;#ce

;Sauvegarde
if $save <> "" Then
   local $search2 = FileFindFirstFile(@scriptdir & '\SAVE\' & $file & '\' & $save & '\'  & '\*.*' )
   If $search2 <> -1 then
	  local $fileSave = FileFindNextFile($search2)
	  while $fileSave <> ''
		 FileCopy ($tmp & $file & '\' & $save & '\' & $fileSave, @scriptdir & '\SAVE\' & $file & '\' & $save & '\' & $fileSave, 1 )
		 $fileSave = FileFindNextFile($search2)
	  wend
   Endif
   FileClose($search2)
Endif

exit 0





;==========================================================================
;
; Function Name:    _Zip_DllChk()
; Description:      Internal error handler.
; Parameter(s):     none.
; Requirement(s):   none.
; Return Value(s):  Failure - @extended = 1
; Author(s):        smashley
;
;===============================================================================
Func _Zip_DllChk()
	If Not FileExists(@SystemDir & "\zipfldr.dll") Then Return 2
	If Not RegRead("HKEY_CLASSES_ROOT\CLSID\{E88DCCE0-B7B3-11d1-A9F0-00AA0060FA31}", "") Then Return 3
	Return 0
 EndFunc   ;==>_Zip_DllChk
 
 ;===============================================================================
;
; Function Name:    _Zip_UnzipAll()
; Description:      Extract all files contained in a ZIP Archieve.
; Parameter(s):     $hZipFile - Complete path to zip file that will be created (or handle if existant)
;					$hDestPath - Complete path to where the files will be extracted
;					$flag = 1
;					- 1 no progress box
;					- 0 progress box
; Requirement(s):   none.
; Return Value(s):  On Success - 0
;                   On Failure - sets @error 1~3
;					@error = 1 no Zip file
;					@error = 2 no dll
;					@error = 3 dll isn't registered
; Author(s):        torels_
; Notes:			The return values will be given once the extracting process is ultimated... it takes some time with big files
;
;===============================================================================
Func _Zip_UnzipAll($hZipFile, $hDestPath, $flag = 1)   
	Local $DLLChk = _Zip_DllChk()
	If $DLLChk <> 0 Then Return SetError($DLLChk, 0, 0);no dll
	If not _IsFullPath($hZipFile) then Return SetError(4,0) ;zip file isn't a full path
	If Not FileExists($hZipFile) Then Return SetError(2, 0, 0) ;no zip file
	If Not FileExists($hDestPath) Then DirCreate($hDestPath)
	Local $aArray[1]
	$oApp = ObjCreate("Shell.Application")
	$oApp.Namespace($hDestPath).CopyHere($oApp.Namespace($hZipFile).Items)
	For $item In $oApp.Namespace($hZipFile).Items
		_ArrayAdd($aArray, $item)
	Next
	While 1
		If $flag = 1 then _Hide()
		If FileExists($hDestPath & "\" & $aArray[UBound($aArray) - 1]) Then
			Return SetError(0, 0, 1)
			ExitLoop
		EndIf
		Sleep(500)
	WEnd
 EndFunc   ;==>_Zip_UnzipAll

;===============================================================================
;
; Function Name:    _Hide()
; Description:      Internal Function.
; Parameter(s):     none
; Requirement(s):   none.
; Return Value(s):  none.
; Author(s):        torels_
;
;===============================================================================
Func _Hide()
	If ControlGetHandle("[CLASS:#32770]", "", "[CLASS:SysAnimate32; INSTANCE:1]") <> "" And WinGetState("[CLASS:#32770]") <> @SW_HIDE	Then ;The Window Exists
		$hWnd = WinGetHandle("[CLASS:#32770]")
		WinSetState($hWnd, "", @SW_HIDE)
	EndIf
 EndFunc
 
 ;===============================================================================
;
; Function Name:    _IsFullPath()
; Description:      Internal Function.
; Parameter(s):     $path - a zip path
; Requirement(s):   none.
; Return Value(s):  success - True.
;                                       failure - False.
; Author(s):        torels_
;
;===============================================================================
Func _IsFullPath($path)
    if StringInStr($path,":\") then
        Return True
    Else
        Return False
    EndIf
Endfunc
But you can edit the winuae script to works with fs-uae, the commands are

floppy_image_0 >>>  for swapping disk (you can swap them trought the FS-UAE UI )
floppy_drive_0 >>> for drive disk 0 to 3

Re: AMIGA - ready to play

Posted: Thu Sep 04, 2014 11:36 am
by Laundro
Thanks, but before I delve into AutoIt scripting, I was primarily wondering how beastieboy succeeded in making mGalaxy boot up Amiga games with their own config settings.