Run Linux programs from Amiga (in Amibian)
I don't know how strange this will sound, but here's what I am doing, and where I want to get to.
Running Amibian V1.4 From boot, I want to go as directly as possible to the Amiga. I have set that up fairly well. I have written a few small programs that are called in the /usr/local/bin/amiga script. They play a (fairly long) sound, flash an LED, and turn on another LED. They are run in background, and keep running while the Amiga is loading. I can run a similar set of program after coming back from Amiga mode, but it sorta loses something when I have to start the sound and light stuff AFTER I exit the Amiga and AFTER I hit the QUIT button and AFTER I see the Linux screen. So, I am wondering if I can run a Linux program from the Amiga mode. I would like to tell the Amiga I want to exit, and have it exit all the way to the Linux prompt without me having to click on the 'quit' button, and have it also start a sound and light sequence that will execute before I see the Linux prompt, and finish just after. So.. any way I can call a Linux proram from Amiga mode? Edit: On a related note, what gets called when I hit an F12 to exit Amiga mode? |
there are some support tools for the uae emulators, for example: uaectrl, uae-control, uae_rcli.
source files and exectuables you can find for example in p-uae-src.tar.gz ( /PUAE/amiga/programs and /PUAE/amiga/source/ ). here is someone talking about the possibility to launch a windows app from within amiga. but I cannot find the tool in question. #1) i guess it is winlaunch. does not work anymore, using winuae 3.6.0 beta, I allways get "failed to open dll" no matter where i put the winlaunch.alib. winuae_dll folder or elsewhere. |
Quote:
Now all I need to do is to find the code that runs when F12 is hit, and modify that. |
Quote:
for instance, with Pi3 and Amibian, My needs would be: Just like yours on startup - go straight in to Amiga without seeing Linux. Two options for exiting Amiga. One to exit Amibian and automatically shutdown the pi. Or Shutdown Amiga (Amibian) and automatically launch Sox. I use Sox to sample for OctaMed that I have installed in Amibian so it would be nice to close out of Amibian for the sake of sampling then going back in when done. I'm not too linux/Pi savvy but I'm learning and am grateful for folks like you experimenting in these things. Would love to see how it works out for a and what you did. :great |
Quote:
Quote:
has some code dealing with F12 and AKS_ENTERGUI. |
Quote:
|
Quote:
but while looking at the winuae src, i found some "fake winlaunch" entries and finaly a hint: - winlaunch.lib is now built-in feature and is also 64-bit compatible (winuae 3.5.0). i think there is some incompatibility between the old and new approach. have to find the new tool(s). |
Quote:
In /root/amiga To go straight into Amiga mode, use autostart. I just copied my preferred uae file to autostart.uae, though I can't rememmber if I then set use_gui=no or if it was already set. At any rate, if it is set to use_gui=no, it will boot straight to Amiga. In /usr/local/bin There are a load of executable scripts. menu - prints the instuctions you usually see on boot. when you type 3 and Enter, you execute 3, which calls amiga. The script amiga cd's to /root/amiga and runs the following executable binary ./6 -f autostart.uae At this point, you will end up in the GUI or in the Amiga based on the use_gui setting in the autostart file. If you write any code you want to execute before or during the loading of your preferred Amiga, place it before the ./6 line. If you want to run any code as you exit back to Linux, place it after the ./6 call. Here's my ./6 file... Code:
cd /root/amiga aplay is a Linux program, but pulse.py is a python program I found on the net, and modified for the purpose of putting the beacon on the Tardis. Note that both of these are run in background, so they continue to run while the Amia is loading. Exit from Amiga mode is the tricky part. I don't think winlaunch will be a lot of help, being specifically for Windows. I did have look at some of the source that emufan pointed me to, and that looks more promising, though I don't know if I have the skills to modify it to do what I want. I'll keep you posted about any progress I make. |
Quote:
In /root/amiga/conf To go straight into Amiga mode, use autostart. I just copied my preferred uae file to autostart.uae, though I can't rememmber if I then set use_gui=no or if it was already set. At any rate, if it is set to use_gui=no, it will boot straight to Amiga. In /usr/local/bin There are a load of executable scripts. menu - prints the instuctions you usually see on boot. when you type 3 and Enter, you execute 3, which calls amiga. The script amiga cd's to /root/amiga and runs the following executable binary ./6 -f autostart.uae At this point, you will end up in the GUI or in the Amiga based on the use_gui setting in the autostart file. If you write any code you want to execute before or during the loading of your preferred Amiga, place it before the ./6 line. If you want to run any code as you exit back to Linux, place it after the ./6 call. Here's my ./6 file... Code:
cd /root/amiga aplay is a Linux program, but pulse.py is a python program I found on the net, and modified for the purpose of putting the beacon on the Tardis. Note that both of these are run in background, so they continue to run while the Amia is loading. Exit from Amiga mode is the tricky part. I don't think winlaunch will be a lot of help, being specifically for Windows. I did have look at some of the source that emufan pointed me to, and that looks more promising, though I don't know if I have the skills to modify it to do what I want. I'll keep you posted about any progress I make. |
Quote:
|
Quote:
thanks to AmigaSystem for that info :spin |
Got it going...
While I still haven't figured out how to intercept the exit of Amibian before it actually drops back to Linux, I do have it working very well.
I have 3D printed a case for the Pi 3. It is based on the TARDIS Deluxe Kit by countspatula, https://www.thingiverse.com/thing:124033. It is a VERY well designed print. The whole thing just snaps together. I modified it by first editing out three "sections" on the back panel to give myself plenty or room for the cabling. I then printed it at 140% and drilled mounting holes for the Pi 3. I added two LEDs, a white one for the beacon, and an amber one for the interior light. I added code to flash the beacon, turn on the interior light, and play the sound. I then adjusted everything to end just after the Amiga screen appears. Very pleased with the result. Video available on YouTube... https://www.youtube.com/watch?v=7HkrkMe3UTE |
All times are GMT +2. The time now is 11:47. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.