|Re: [hatari-devel] Running Atari programs with parameters|
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
On 03/26/2017 12:56 PM, Miro Kropáček wrote:
I'm wondering -- how useful would you consider an option to run Atari apps
with parameters, i.e. mainly .TTPs, from Hatari's command line?
It's a bit more complicated than just parsing Hatari's command line because
the trick with DESKTOP/NEWDESK/EMUDESK.INF doesn't work anymore -- you can
specify parameters in "Install application" but they are ignored in the
So what would be needed is some kind of listener on Hatari side which would
call Pexec() on TOS side with given path and parameters.
Would you find such feature useful? :)
Hatari does have that feature. It's implemented by
the "hatari-prg-args.sh" script.
Setting arguments requires modifying the program
basepage contents. The script does it using Hatari
debugger and couple of chained, conditional breakpoints.
Or did you mean doing that in the in the Hatari itself?
That would require:
* options.c: option for command line content, verifying
that it fits to basepage  + documentation
* Code that makes sure command line args are there only for
the autobooted program, not for later programs, and it
being available for the autobooted program also after reboot
* Storing that date somewhere in emulated memory space,
probably somewhere in cartridge memory area
* cart_asm.s: if that data exists, copying it to basepage
gotten one from TOS, before doing Pexec
If Nicolas or Thomas are interested to update the m68k
cartridge code for this, I can look to the rest.
 = 127 bytes. ARGV can support more, but handling
that from the emulator side would be quite a bit more