Simple Program Launcher (MSX) by Kaido Kotoni
A downloadable tool
I used DeepL and Google Translate.
The creator is Japanese, and we would appreciate your understanding.
----- Simple Program Launcher -----
-- Overview
Launcher for selecting and executing BASIC programs.
Put them on a Disk with all the past BASIC 10 Liner Contests and you're ready to play!
It can be used on any machine running Disk BASIC version 1.0.
Unfortunately, it does not work correctly in Ver 2.0 (DOS2).
-- Entry Sheet
Entry to
"12th Edition of BASIC 10 Liner Contest"
- Category
SCHAU
(Utility)
- System requirement
MSX system running Disk BASIC version 1.0.
- Files
SPL.dsk
Disk images that can be used with openMSX / blueMSX / webMSX.
SPL.bas
A program file in ASCII format.
ReadMe_SPL-jp.txt
ReadMe in Japanese.
ReadMe_SPL-en.txt
Translation into English was done using DeepL and Google Translate.
ScreenShot_SPL.png
Screen capture image.
-- How to operate
- Cursor keys / Joystick
Cursor control.
- Spacebar / Joystick 1 button
File Execute.
There is no way to determine if the selected file is a BASIC file, so any file can be selected.
-- Source code
100 CLEAR:SCREEN 0:W=40:WIDTH W-2:I=0:S=0:T=0:BX=0:BY=0:X=0:Y=0:F$="01234567.012" 110 CLS:FILES:PRINT:PRINT:PRINT STRING$(W-2,45);"Select a file and press the spacebar":GOTO 170 120 S=STICK(0) OR STICK(1):T=STRIG(0) OR STRIG(1):IF T<>0 THEN 180 ELSE IF S=0 THEN 120 130 VPOKE X*13+Y*W,32:VPOKE X*13+Y*W+13,32:BX=X:BY=Y:X=X+(S=7)-(S=3):Y=Y+(S=1)-(S=5) 140 IF (X<0) OR ((X*13+13)>W) THEN X=BX 150 IF (Y<0) OR (Y>23) THEN Y=BY 160 IF VPEEK(X*13+Y*W+1)=32 THEN X=BX:Y=BY 170 VPOKE X*13+Y*W,60:VPOKE X*13+Y*W+13,62:IF (STICK(0) OR STICK(1))>0 THEN 170 ELSE 120 180 F$="":FOR I=1 TO 12:F$=F$+CHR$(VPEEK(X*13+Y*W+I)):NEXT I 190 IF INKEY$<>"" THEN 190 ELSE PRINT:PRINT "Execute : ";F$:RUN F$
-- Description
Disk BASIC has no way to get a list of files from a program.
What to do, then, is to use the file name as it appears on the screen with the FILES instruction.
This display cannot be used properly in Ver. 2.0 because the format is different. Therefore, it is for Ver1.0 only.
- Variable
W Number of columns. Available values are 40 or 80.
I Generic Loop Index.
S Cursor keys value.
T Spacebar value.
BX,BY X,Y coordinates before move calculation.
X,Y Cursor coordinates.
F$ Name of file to be read.
- Line 100 initialization
CLEAR:
Memory initialization.
SCREEN 0:W=40:WIDTH W-2
Screen initialization.
If W-2(38), there will be space for one character to the left and right when the file name is displayed in FILES.
The cursor is displayed here.
If you want to use 80-digit mode on MSX2, simply change W=80.
I=0:S=0:T=0:BX=0:BY=0:X=0:Y=0:F$="01234567.012"
Initialize all variables to be used.
- Line 110 Startup screen
CLS:FILES:
Displays a list of files on the screen.
PRINT:PRINT:PRINT STRING$(W-2,45);"Select a file and press the spacebar":
Prompts the user to operate the system.
GOTO 170
To display the initial cursor position, first jump to the cursor display routine.
This is a little ungainly, but in order to keep it to 10 lines, I had to do it this way.
- Line 120 Key Entries
S=STICK(0) OR STICK(1):T=STRIG(0) OR STRIG(1):IF T<>0 THEN 180 ELSE IF S=0 THEN 120
Check key entry.
If the spacebar is pressed, go to the file execution routine,
or continue checking until some input is received.
- Line 130 Cursor control
VPOKE X*13+Y*W,32:VPOKE X*13+Y*W+13,32:
Erases the currently drawn cursor.
BX=X:BY=Y:
Saves the value before move calculation.
X=X+(S=7)-(S=3):Y=Y+(S=1)-(S=5)
Movement calculations by logical expressions.
This method was introduced in various magazines, so if you are not familiar with it, please do an Internet search.
I think there are many articles that are easier to understand than I can explain.
- Line 140 Cursor X-coordinate check
IF (X<0) OR ((X*13+13)>W) THEN X=BX
Check that the cursor fits within the range.
If out of range, returns to the position before the move.
- Line 150 Cursor Y-coordinate check
IF (Y<0) OR (Y>23) THEN Y=BY
Same as X.
- Line 160 Cursor position check
IF VPEEK(X*13+Y*W+1)=32 THEN X=BX:Y=BY
If the cursor position is blank, it is returned to the position before calculation.
- Line 170 Cursor display / Continuous keystroke suppression
VPOKE X*13+Y*W,60:VPOKE X*13+Y*W+13,62:
Displays "<",">" as a cursor.
IF (STICK(0) OR STICK(1))>0 THEN 170 ELSE 120
Loop this line until nothing is pressed.
If nothing is pressed, it returns to line 120.
- Line 180 Get file name
F$="":FOR I=1 TO 12:F$=F$+CHR$(VPEEK(X*13+Y*W+I)):NEXT I
Get the file name at the cursor position in F$.
- Line 190 Clear key buffer / File Execute
IF INKEY$<>"" THEN 190 ELSE PRINT:PRINT "Execute : ";F$:RUN F$
The contents of the key buffer are cleared, and then the retrieved filename is executed.
-- About me
This application was created by Kaido Kotoni.
Home page
YouTube
https://www.youtube.com/channel/UC5egj_wXPhi8UQgg8xNPNKw
Nico Nico Douga
Status | Released |
Category | Tool |
Author | BASIC 10Liner |
Tags | 8-Bit, basic, basic10liner, MSX |
Download
Install instructions
-- Startup
- Disk <SPL.dsk>
The file is saved as "AUTOEXEC.BAS" and will start automatically.
TORSO1.BAS/TORSO2.BAS/DJB.BAS are included for operation check.
Operation has been confirmed with openMSX / blueMSX / webMSX.
Leave a comment
Log in with itch.io to leave a comment.