Page 2 of 4

Re: Program Launcher utility

Posted: Thu Oct 19, 2023 5:55 am
by JimmyDansbo
voidstar wrote: Wed Oct 18, 2023 10:58 pm AndyMt: I was hoping the X Commander project would be along these lines. Seems it would need some sort of "file management" capability, so then it's just deciding on how to manage the descriptions.
X Commander would maybe be along the lines of what you want, but I do not have any plans of adding functionality to show descriptions and/or screenshots of programs.
Even though your requirements are pretty close to a normal file manager, I think that it is far enough away to warrant a separate program.

Re: Program Launcher utility

Posted: Thu Oct 19, 2023 6:33 am
by AndyMt
Didn't someone implement a "Kiosk" to demo games etc on VCF last year? Don't remember the details any more, but could that be a starting point?

Re: Program Launcher utility

Posted: Fri Oct 20, 2023 3:25 am
by DragWx
DragWx wrote: Thu Oct 19, 2023 3:30 am When a game is selected in the launcher, the launcher could directly modify the currently-running BASIC program at $801 to add a line 2 with the DOS command to switch directories, and a line 3 to LOAD the desired program file:
Giving this a little more thought, the launcher itself can perform the DOS commands along with simple error checking to make sure the target directory and target file actually exist. So, my original idea can be simplified such that only the LOAD line would need to be injected into the BASIC program.

Of course, if the launcher were itself a BASIC program, it can just branch to a LOAD statement, so my idea is only if the launcher weren't a BASIC program.

EDIT: To clarify, the purpose of my idea is to explore a way of getting BASIC to load and run a selected program from the launcher without needing to touch AUTOBOOT.X16. :P

Re: Program Launcher utility

Posted: Mon Oct 23, 2023 1:42 pm
by AndyMt
I actually solved the "launch anything like it was just after a reset" like this:
  • clear the sceen
  • print the DOS CD command at line 2
  • print the LOAD command at line 6
  • print the RUN command at line 11
  • put 3 "enter" keycodes into the keyboard buffer
  • exit launcher
This works very reliably for my little debug launcher. I haven't tried if this works with basic programs, though... but it should. No changes to AUTOBOOT.X16 are needed, or in fact the launcher could be renamed to AUTOBOOT.X16

I'm tempted to extend this into a proper launcher which should show a screenshot + description. Each software would reside in its own directory. Preview bitmap file (optional) plus info text file (mandatory) need to go in there, too.

Re: Program Launcher utility

Posted: Fri Nov 10, 2023 5:52 pm
by AndyMt
I have a very first prototype running:
animation.gif
animation.gif (148.32 KiB) Viewed 11241 times
You can scroll through games and it shows a thumbnail. Pressing "enter" will start the game.
Each game needs to be in it's own directory - and that's what's listed here.

To be extended :) ...

Re: Program Launcher utility

Posted: Fri Nov 10, 2023 6:44 pm
by Stefan
AndyMt wrote: Thu Oct 19, 2023 6:33 am Didn't someone implement a "Kiosk" to demo games etc on VCF last year? Don't remember the details any more, but could that be a starting point?
The kiosk also started programs by filling the keyboard buffer before exiting to Basic. I think there is nothing much to learn from that code, but it is still available on my Github page.

Re: Program Launcher utility

Posted: Fri Nov 10, 2023 6:47 pm
by AndyMt
Yes, that's how I've implemented it now. Works very well :).

Re: Program Launcher utility

Posted: Tue Nov 14, 2023 8:56 am
by AndyMt
Did some progress:
x16emu-2023-11-14-09-53-33.png
x16emu-2023-11-14-09-53-33.png (124.12 KiB) Viewed 11175 times
Now it can navigate through a directory tree.
Shows a title, author and description for each game.

What do you think about this? It's not a file manager, it's purpose is only to launch stuff.

Re: Program Launcher utility

Posted: Tue Nov 14, 2023 9:24 am
by ahenry3068
Looks pretty good so far.

How are you storing the thumbnails ?

Re: Program Launcher utility

Posted: Tue Nov 14, 2023 9:27 am
by ahenry3068
Also what if there is more than 1 prg in the directory. In HANGMAN I have HANGMAN.PRG and CREDITS.PRG