Page 3 of 4
Re: Program Launcher utility
Posted: Tue Nov 14, 2023 10:07 am
by AndyMt
ahenry3068 wrote: ↑Tue Nov 14, 2023 9:24 am
How are you storing the thumbnails ?
It's a 128x96 8bpp bitmap file. It assumes that the default X16 palette is used. There are some tools to create those. We have a discussion about a standardised bitmap file format on the Discord. Maybe I'll change to that later.
It would also be nice if the emulator could create these thumbnails directly, like pressing ctrl+T...
The thumbnails have to be named ".THUMB.ABM" (notice the decimal point at the start of the name).
Also there is a ".META.INF" file which contains title, author and description.
ahenry3068 wrote: ↑Tue Nov 14, 2023 9:27 am
Also what if there is more than 1 prg in the directory. In HANGMAN I have HANGMAN.PRG and CREDITS.PRG
Right now it assumes that there is a PRG named exactly the same as the directory name. So in your case this would work.
There of course is the case where multiple PRGs are in one directory, each of them a self-contained program. I have to think about how to approach that...
I also haven't checked if Basic programs will work. That's next on the list.
Re: Program Launcher utility
Posted: Tue Nov 14, 2023 10:22 am
by ahenry3068
AndyMt wrote: ↑Tue Nov 14, 2023 10:07 am
ahenry3068 wrote: ↑Tue Nov 14, 2023 9:24 am
How are you storing the thumbnails ?
It's a 128x96 8bpp bitmap file. It assumes that the default X16 palette is used. There are some tools to create those. We have a discussion about a standardised bitmap file format on the Discord. Maybe I'll change to that later.
..
...
Also there is a ".META.INF" file which contains title, author and description.
.........
...........
.............
There of course is the case where multiple PRGs are in one directory, each of them a self-contained program. I have to think about how to approach that...
I also haven't checked if Basic programs will work. That's next on the list.
For the multiple programs situation. Possibly some extra fields in .META.INF ???
I posted rev 2 of the draft spec this morning .
Re: Program Launcher utility
Posted: Tue Nov 14, 2023 10:23 am
by ahenry3068
One of your problems with BASIC programs will be that there really isn't a way to make sure they run to completion. Anyone can Ctrl/C or Break at any time.
Re: Program Launcher utility
Posted: Tue Nov 14, 2023 12:30 pm
by AndyMt
That's similar with PRGs. If they don't exit nicely, then a reset is needed. For cc65 programs that's the case anyways. So the launcher assumes you reset when you're done and then autoboot.x16 (which is the launcher) will take over again.
Re: Program Launcher utility
Posted: Tue Nov 14, 2023 12:51 pm
by ahenry3068
I'm resetting at the end of HANGMAN because ZSMKit and changing Memtop
Re: Program Launcher utility
Posted: Tue Nov 14, 2023 12:53 pm
by AndyMt
I attach a test version here. It contains some games to demonstrate how it works.:
Hope that's ok with the authors. They are named in the meta information.
Feedback is very welcome.
Re: Program Launcher utility
Posted: Tue Nov 14, 2023 10:15 pm
by desertfish
If you already have that metadata file, you can add a line in there that points to the prg to start. Makes it possible to name it differently from the directory name.
Re: Program Launcher utility
Posted: Wed Nov 15, 2023 8:50 am
by AndyMt
Yes, true. But I'd prefer to have it optional. If there only is one PRG, then it would just start that. Name should not matter. Just haven't figured out how to quickly get all files listed with extension *.PRG. Not file type PRG - that's almost all the files if they are any sort of binary (graphics, music).
Directory filters like LOAD"$:*.PRG" seem not to be working...
Re: Program Launcher utility
Posted: Wed Nov 15, 2023 10:07 am
by ahenry3068
I haven't quite got wildcards figured out in CBM DOS myself. But I know the support isn't the same as in Windows or Linux or Mac.
It might be best to pull an entire directory and parse out the list in your own code.
Re: Program Launcher utility
Posted: Wed Nov 15, 2023 6:19 pm
by kelli217
AndyMt wrote: ↑Wed Nov 15, 2023 8:50 am
Yes, true. But I'd prefer to have it optional. If there only is one PRG, then it would just start that. Name should not matter. Just haven't figured out how to quickly get all files listed with extension *.PRG. Not file type PRG - that's almost all the files if they are any sort of binary (graphics, music).
Directory filters like LOAD"$:*.PRG" seem not to be working...
CMDR-DOS stops parsing the filename after encountering a '*' wildcard. I'm not sure whether CBM DOS did as well, and its behavior
might depend on which drive you're using and what revision its firmware is.