Thoughts on a menu/launcher with auto config (revised)
Posted: Thu Jan 26, 2023 1:04 am
Update:
It seems like a launcher is the way to go, with a simple manifest file format to populate the entries:
The launcher will maintain its own menus, but it will also auto-scan the SD card for AUTOBOOT.X16 and MENU.X16 files.
So here's my current thought:
The launcher would boot up (manually or via AUTOBOOT) and read its config file to display existing, known programs. On that menu, you would have options like:
F1: SCAN FOR NEW PROGRAMS F2: ADD A PROGRAM F3: ADD A CATEGORY F4: DELETE AN ITEM
If the user presses F1, the launcher will scan through the SD card, looking for new manifest files. the manifest can be in the form of a PETSCII text file or a BASIC program.
MENU.X16 is a plain text file and looks like:
NAME:CHECKERS
BY:JOHN SMITH
CATEGORY:GAMES
RUN:CHECKERS.PRG
README [[
THIS IS A SIMPLE CHECKERS GAME. PLAYERS TAKE TURNS AND USE THE
KEYBOARD OR MOUSE TO SELECT AND MOVE A PIECE.
]]
AUTOBOOT.X16 would be similar, but use REM statements. AUTOBOOT does not need a RUN: line, because
the launcher will run the AUTOBOOT.X16 file, which will in turn run the actual program.
10 REM NAME:CHECKERS
20 REM BY:JOHN SMITH
30 REM CATEGORY:GAMES
40 REM README [[
50 REM THIS IS A SIMPLE CHECKERS GAME. PLAYERS TAKE TURNS AND USE THE
60 REM KEYBOARD OR MOUSE TO SELECT AND MOVE A PIECE.
70 REM ]]
100 LOAD "CHECKERS.PRG"
For other BASIC programs, you could add the same data as REM statements, and the launcher could just pick them up and add them. For machine language programs with BASIC launchers, you could do the same as above, just moving your start point a little higher in memory to allow for the metadata.
So really, the only thing we'd be asking programmers to do is to consistently add this information to the top of their programs. It not only makes it easier on everyone to have a consistent header, but it makes it easy to automatically parse and add this to menu programs.
Original post:
So the discussion on the Snake topic made me start thinking about a one-click installer for the Commander.
It would need to unpack and install files for both the physical machine (via SD card) and the emulator.
Basically, this would start out as a Zip file, with a custom extension (like P16) that would allow us to open the file in the installer.
The installer would look for a configuration file in the Zip and would do a few things.
Right now, this is a loose collection of ideas, and I don't have a specific implementation in mind yet. Quite frankly, the Commander side could simply be BASIC code, and I'm picturing something simple and cross-platform for the PC side... maybe even something bundled with the emulator. Maybe even a program that runs in the emulator.
What are your thoughts?
It seems like a launcher is the way to go, with a simple manifest file format to populate the entries:
The launcher will maintain its own menus, but it will also auto-scan the SD card for AUTOBOOT.X16 and MENU.X16 files.
So here's my current thought:
The launcher would boot up (manually or via AUTOBOOT) and read its config file to display existing, known programs. On that menu, you would have options like:
F1: SCAN FOR NEW PROGRAMS F2: ADD A PROGRAM F3: ADD A CATEGORY F4: DELETE AN ITEM
If the user presses F1, the launcher will scan through the SD card, looking for new manifest files. the manifest can be in the form of a PETSCII text file or a BASIC program.
MENU.X16 is a plain text file and looks like:
NAME:CHECKERS
BY:JOHN SMITH
CATEGORY:GAMES
RUN:CHECKERS.PRG
README [[
THIS IS A SIMPLE CHECKERS GAME. PLAYERS TAKE TURNS AND USE THE
KEYBOARD OR MOUSE TO SELECT AND MOVE A PIECE.
]]
AUTOBOOT.X16 would be similar, but use REM statements. AUTOBOOT does not need a RUN: line, because
the launcher will run the AUTOBOOT.X16 file, which will in turn run the actual program.
10 REM NAME:CHECKERS
20 REM BY:JOHN SMITH
30 REM CATEGORY:GAMES
40 REM README [[
50 REM THIS IS A SIMPLE CHECKERS GAME. PLAYERS TAKE TURNS AND USE THE
60 REM KEYBOARD OR MOUSE TO SELECT AND MOVE A PIECE.
70 REM ]]
100 LOAD "CHECKERS.PRG"
For other BASIC programs, you could add the same data as REM statements, and the launcher could just pick them up and add them. For machine language programs with BASIC launchers, you could do the same as above, just moving your start point a little higher in memory to allow for the metadata.
So really, the only thing we'd be asking programmers to do is to consistently add this information to the top of their programs. It not only makes it easier on everyone to have a consistent header, but it makes it easy to automatically parse and add this to menu programs.
Original post:
So the discussion on the Snake topic made me start thinking about a one-click installer for the Commander.
It would need to unpack and install files for both the physical machine (via SD card) and the emulator.
Basically, this would start out as a Zip file, with a custom extension (like P16) that would allow us to open the file in the installer.
The installer would look for a configuration file in the Zip and would do a few things.
- Copy the files from the package to a directory on the SD card or the emulator's SD image.
- Add an entry to a boot menu, pointing to the program
- Optionally sync files between the emulator and the SD card
Right now, this is a loose collection of ideas, and I don't have a specific implementation in mind yet. Quite frankly, the Commander side could simply be BASIC code, and I'm picturing something simple and cross-platform for the PC side... maybe even something bundled with the emulator. Maybe even a program that runs in the emulator.
What are your thoughts?