English Amiga Board

Go Back   English Amiga Board > Support > support.Apps

Thread Tools
Old 15 February 2013, 04:30   #1
Registered User
Join Date: Oct 2009
Location: Salem, OR
Posts: 1,393
Program spawn help

OK, I have been playing with the CD32 emulator in the Surf Squirrel.
I was playing with Flink, and it works...
But, it requires a CD32 gamepad, which I don't have.

So, I found this program on Aminet called FakeCD32Joypad

When I manually run it before I launch CD32-Startup, (in a newCLI window of its own) I can play the game with the keys (that program swaps the joypad for keys).

But, that program is setup so that you launch it, and if you hit ENTER in that shell window when done, it exits.

OK, so I'm working with the CD32 emulator scripts..
I can launch that program first, but the screen sits there waiting for me to hit enter to finish.

So, I have to "spawn" it so it runs in the background..
I use RUN FakeCD32Joypad, which launches it...
and then the program unloads..

Something about using the RUN command is also closing it.

So I put it in a script and execute it.. It's runs, but sits there waiting.

So I c:run c:execute fixjoy (my script name) and it runs and then closes as tho I hit enter..


How can I spawn a new window for this thing to run in and run it without it quitting right away??

Manually, I type newcli and have 2 windows.
I launch fakecd32joypad in one of them and leave it there.
Then I go to my other CLI and type CD32-Startup and the game works.

But I'd like to script this if possible...

My Amiga scripting is pretty rusty... ;-(


desiv is offline  
Old 15 February 2013, 14:13   #2
Registered User
Join Date: Oct 2009
Location: Germany
Posts: 2,787
Did you tried "FakeCD32Joypad <>NIL:"? Or just "<NIL:".
daxb is offline  
Old 15 February 2013, 14:52   #3
Registered User
thomas's Avatar
Join Date: Jan 2002
Location: Germany
Posts: 6,213
newshell from Run_FakeCD32Joypad

run >nil: FakeCD32Joypad <con:

If you want to hide it from the user you can use something like this:

run >nil: FakeCD32Joypad <pipe:fake
and to stop it just

echo >pipe:fake

Or you could contact the author and ask for the source code. Should be easy to change it to listen for Ctrl-C.
thomas is offline  
Old 15 February 2013, 16:42   #4
Registered User
Join Date: Oct 2009
Location: Salem, OR
Posts: 1,393
Will try!

As for contacting the author, I thought about that (so I could also get it to redirect keys and (best bet) allow a normal joystick with 1 (or 2) buttons AND keys for the others).
He said in the readme he would have preferred to use CTRL-C but didn't know how.
I thought that was funny, as I think what he did already was more complicated than listening for a CTRL-C myself. ;-)

desiv is offline  
Old 15 February 2013, 17:10   #5
Registered User
Join Date: Oct 2009
Location: Salem, OR
Posts: 1,393
Originally Posted by thomas View Post
run >nil: FakeCD32Joypad <con:
That one did it, thanx!!

It was funny, because with my 2-button sega pad, button A did nothing, but button B was jumping or bringing up a magic window. Which was annoying, but it was ALSO causing the screen to flash.
Drive me crazy..

Figured out, it was doing all the other buttons. So Jump/Magic Window AND..
Toggle NTSC/PAL (There's a button for that on the joypad in FLINK????)

There's another program on aminet called just fakepad that might work better which I just found. :-)
Still glad I asked so I learned something.. ;-)
OK, just tried using fakepad instead and it works without the needed redirection and lets me use a 1 or 2 button joystick (and then keys for the rest). It also includes source which might be nice for redefining keys, although it's in ASM which I don't really know. (But just changing values and recompiling should be feasible, if needed.)

Last edited by desiv; 15 February 2013 at 18:42.
desiv is offline  

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
External windows program communicating with program running inside WinUAE xxxxx support.WinUAE 10 19 February 2013 09:27
Paint program or program....... amigagenie request.Apps 2 29 January 2013 19:56
For a beginner what Program and Program language would you recommend? amigang New to Emulation or Amiga scene 5 27 March 2012 13:06
knights of the sky enemy spawn issue? Raid27 support.Games 0 08 September 2010 22:18
Calling another program from a compiled Amos program...? andyr support.Apps 3 24 October 2004 23:47

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 06:07.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Page generated in 0.06617 seconds with 15 queries