English Amiga Board


Go Back   English Amiga Board > Requests > request.UAE Wishlist

 
 
Thread Tools
Old 28 May 2024, 19:56   #1
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,169
Pass (host) UAE command line argument to AmigaDOS

Not a fully baked idea, and perhaps it's already possibly and I just don't know about it, but I think it would be convenient to be able easily "inject" some state from the command line into a system friendly environment.

Concretely it'd be nice if I could run say
winuae -config=whdload.uae -cmd="whdload sys:foo/bar.slave CUSTOM1=42" -G
and it would run the command after startup-sequence.Just being able to set an environment variable that could be picked up by s:user-startup would also be sufficient for this I think. (Both use cases are inspired by https://eab.abime.net/showthread.php?t=117593).

Would also be useful if it something like that could work with
winuae64 -cfgparam=quickstart=A1200,0 -0 "%~dp0some.adf" -G
, i.e. you could add command line parameters and/or environment variables on the fly to "one off" launches.

Basically I have two different work flows that I'd ideally like to cover:
- HD based ("whdload development") with a single HD (folder) that covers many different things where I want to launch different stuff from host
- FD based ("trackloaded") - standalone stuff where I'm testing just one thing and just want a way of giving the tested program (launched as a "virtual floppy") a simple argument
paraj is offline  
Old 29 May 2024, 07:55   #2
copse
Registered User
 
Join Date: Jul 2009
Location: Lala Land
Posts: 578
This is how I would try to do it if I had the need:
  1. Go into WinUAE properties. Look in Hardware / Expansions and in the "Miscellaneous Expansions" section.
  2. Check "bsdsocket.library".
  3. For the Amiga side, write a simple telnet server that opens the bsdsocket.library and listens on a port and has two simple commands "blockuntilready" and "execute".
  4. For the windows side, write a simple telnet client that connects to the given port and actions whatever.

A similar thread with external control requirements was here and Hannibal went with using the IPCTester.cpp code in the WinUAE repository. Searching for EVT in the WinUAE repo will find you the definition file with the events. Otherwise DBG for debugger commands.

Last edited by copse; 29 May 2024 at 08:10.
copse is offline  
Old 29 May 2024, 17:40   #3
Seiya
Registered User
 
Seiya's Avatar
 
Join Date: Nov 2014
Location: Italy
Posts: 2,419
Quote:
Originally Posted by paraj View Post
Not a fully baked idea, and perhaps it's already possibly
you do exactly this with GameBase Amiga from 15 years
Seiya is offline  
Old 29 May 2024, 18:54   #4
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,169
Quote:
Originally Posted by Seiya View Post
you do exactly this with GameBase Amiga from 15 years
That's a launcher for various games tough, right? I'm looking for something I can use while developing. (Clarification below).

Quote:
Originally Posted by copse View Post
This is how I would try to do it if I had the need:
  1. Go into WinUAE properties. Look in Hardware / Expansions and in the "Miscellaneous Expansions" section.
  2. Check "bsdsocket.library".
  3. For the Amiga side, write a simple telnet server that opens the bsdsocket.library and listens on a port and has two simple commands "blockuntilready" and "execute".
  4. For the windows side, write a simple telnet client that connects to the given port and actions whatever.
A similar thread with external control requirements was here and Hannibal went with using the IPCTester.cpp code in the WinUAE repository. Searching for EVT in the WinUAE repo will find you the definition file with the events. Otherwise DBG for debugger commands.
Thanks, that would indeed work (though I think it might be easier to use the serial port - at least for me), but my wish is for something simple and built-in that doesn't require extra tooling. It's obviously fine if not every wish is granted

To spell out the whdload use case, I have an emulated root directory with subdirectories containing whdload slaves in development. For each of those I have a SYS:Slave1/Source/Makefile that builds that slave and can launch WinUAE with the correct virtual emulated HD. In s:user-startup I have "cd SYS:slave1 : whdload slave1 <options>". This works fine, but when I switch to slave 2, I have to edit s:user-startup to launch slave2 instead (maybe changing options etc.). Thus some kind of command line argument to inject state would allow me to avoid the user-startup editing part every time I switch between them. Of course, there are other ways around it, like overwriting a common script with the makefile or something like that, so it's not like I'm out of options.

If it's something only I would have a use for it's obviously a bad idea for a feature.
paraj is offline  
Old 29 May 2024, 19:03   #5
Seiya
Registered User
 
Seiya's Avatar
 
Join Date: Nov 2014
Location: Italy
Posts: 2,419
Quote:
Originally Posted by paraj View Post
That's a launcher for various games tough, right? I'm looking for something I can use while developing. (Clarification below).
understood.
Seiya is offline  
Old 29 May 2024, 19:05   #6
DisasterIncarna
Registered User
 
DisasterIncarna's Avatar
 
Join Date: Oct 2021
Location: England
Posts: 1,220
you can low-tech cheese something similar, just add a windows directory as an amiga drive, TEST: or something, and just have your startup-sequence do a RUN >NIL: Execute TEST:Script after LOADWB, maybe wrap it in an if exists statement, if such a script exists ittl get executed then gets deleted after execution, if not business as usual.

Just means you could make a quick dirty script outside of winuae before launch, yeah that wouldnt be "native" but that plus other things can work and do something similar.
DisasterIncarna is offline  
Old 29 May 2024, 19:11   #7
TCD
HOL/FTP busy bee
 
TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,822
Quote:
Originally Posted by DisasterIncarna View Post
you can low-tech cheese something similar, just add a windows directory as an amiga drive, TEST: or something, and just have your startup-sequence do a RUN >NIL: Execute TEST:Script after LOADWB, maybe wrap it in an if exists statement, if such a script exists ittl get executed then gets deleted after execution, if not business as usual.

Just means you could make a quick dirty script outside of winuae before launch, yeah that wouldnt be "native" but that plus other things can work and do something similar.
I had a similar idea until I read the second 'workflow':
Quote:
Originally Posted by paraj View Post
Basically I have two different work flows that I'd ideally like to cover:
- HD based ("whdload development") with a single HD (folder) that covers many different things where I want to launch different stuff from host
- FD based ("trackloaded") - standalone stuff where I'm testing just one thing and just want a way of giving the tested program (launched as a "virtual floppy") a simple argument
TCD is offline  
Old 29 May 2024, 19:18   #8
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,169
Yeah, one off scripts seem like the way to go. Second "workflow" is probably too niche anyway.
paraj is offline  
Old 29 May 2024, 19:41   #9
TCD
HOL/FTP busy bee
 
TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,822
Toni might be able to answer if 'uae-configuration' could be 'abused' for this.
TCD is offline  
Old 29 May 2024, 20:04   #10
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,169
Quote:
Originally Posted by TCD View Post
Toni might be able to answer if 'uae-configuration' could be 'abused' for this.
Oh, yeah, something like that might be a good way to handle it.
paraj 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
Trouble with FS-UAE via command line Asterra support.FS-UAE 7 29 June 2017 08:05
UAE for 68k command line Leandro Jardim support.OtherUAE 1 29 June 2015 01:28
[AmigaDOS] How to pipe output to argument? mrrhq New to Emulation or Amiga scene 5 11 May 2015 11:34
WHDload and FS-UAE command line browniesrgut support.FS-UAE 4 12 April 2013 14:21
AmigaDOS: call several commands in a single command line pintcat Coders. Scripting 6 09 February 2013 16:51

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 13:03.

Top

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