MSX2driver Torso (MSX2) by Kaido Kotoni
A downloadable game
I used DeepL and Google Translate.
The creator is Japanese, and we would appreciate your understanding.
----- MSX2driver Torso -----
-- Overview
(Doctor)
How are you feeling?
(A man)
Yes, very good.
Thanks to that YouTuber, I feel very sunny.
In fact, we bought a new computer, so we had to make a new version of the previous program.
I would like to invite you to see...
(Doctor)
Oh, I see.
Well, let's change to a slightly stronger medicine.
"Webdriver Torso"
https://www.youtube.com/@realwebdrivertorso
has finally been ported to the MSX2!
Now you can watch the exciting and inspiring Webdriver Torso on your computer anytime, anytime, for hours!
Fantastic!
Works on MSX2/VRAM 64K or higher systems.
That is, all MSX2 and above systems.
-- Entry Sheet
Entry to
"12th Edition of BASIC 10 Liner Contest"
- Category
SCHAU
(DEMO)
- System requirement
All MSX2 and above systems.
- Files
Torso2.dsk
Disk images that can be used with openMSX / blueMSX / webMSX.
Torso2.cas
Tape images that can be used with openMSX / blueMSX / webMSX.
Torso2.bas
A program file in ASCII format.
ReadMe_T2-jp.txt
ReadMe in Japanese.
ReadMe_T2-en.txt
Translation into English was done using DeepL and Google Translate.
ScreenShot_T2.gif
Screen capture image.
-- Startup
- Disk <Torso2.dsk>
LOAD "TORSO2.BAS"
RUN
- Tape <Torso2.cas>
CLOAD
RUN
Both have the same content.
Operation has been confirmed with openMSX / blueMSX / webMSX.
-- Source code
100 CLEAR:DEFINT A-Z:SCREEN 6:COLOR 3,0,0:CLS:OPEN"GRP:"AS#1 110 R=RND(-TIME):P=0:C=0:SN=0:S$=SPACE$(32) 120 COLOR=(0,7,7,7):COLOR=(1,0,0,7):COLOR=(2,7,0,0):COLOR=(3,0,0,0):SOUND 1,0:TIME=99 130 P=ABS(P-1):SET PAGE ,P:CLS:C=1:GOSUB 190:C=2:GOSUB 190 140 S$="aqua.flv - slide "+RIGHT$("000"+MID$(STR$(SN),2),4):PSET(0,200),0,OR:PRINT #1,S$;:PSET(1,200),0,OR:PRINT #1,S$; 150 SN=SN+1:IF SN=10000 THEN SN=0 160 IF TIME<60 THEN 160 170 TIME=0:SET PAGE P:SOUND 0,RND(1)*128+64:SOUND 8,15 180 IF INKEY$="" THEN 130 ELSE SOUND 8,0:COLOR 15,0,0:SCREEN 0:END 190 LINE(RND(1)*512,RND(1)*212)-(RND(1)*512,RND(1)*212),C,BF,PSET:RETURN
-- Description
Not many programs use SCREEN 6 on MSX2.
You can only use four colors, so you have no use for them.
Webdriver Torso uses only four colors, "white, black, red, and blue," so it fits perfectly.
Again, double buffering is used.
At the speed of V9938, even this level of screen cannot be rewritten during VBlank.
However, this time it can be realized with standard BASIC commands without rewriting the work area.
Compared to the program for MSX1, it is very simple.
It explains the points for MSX BASIC beginners.
This is a common sense technique for intermediate and above, but may be helpful for those who are just starting out.
- Variable
R For random value initialization.
P Screen page.
C Color code.
SN Slide Number.
S$ Character display work.
- Line 100 initialization
CLEAR:
Memory initialization.
In the case of this program, there is no need to specify the variable area, so there is no need to write it in a strong manner.
DEFINT A-Z:
All numeric variables shall be of type integer.
DEFINT is also a CLEAR. In other words, there is no need to write the preceding CLEAR.
However, this cannot be written in reverse. Reversing it will also clear the DEFINT declaration.
SCREEN 6:COLOR 3,0,0:CLS:
Screen initialization.
OPEN"GRP:"AS#1
Required to display text on the graphics screen.
- Line 110 Variable declarations
R=RND(-TIME):P=0:C=0:SN=0:S$=SPACE$(32)
Initialize all variables to be used.
Allocate the maximum required size for string variables "after numeric variables".
Numeric variables are fixed in size, so rewriting their contents does not cause garbage collection.
Since string variables have variable contents, garbage collection will occur if they run out of size while in use.
String variables can reduce the occurrence of garbage collection by allocating the required size at the end.
- Line 120 Color Setting / Sound Setting
COLOR=(0,7,7,7):COLOR=(1,0,0,7):COLOR=(2,7,0,0):COLOR=(3,0,0,0):
Set the color palette.
Color 0 is set to white and Color 3 is set to black.
SOUND 1,0:
Set the initial value of PSG.
TIME=99
Set the initial wait time. Set a value of 60 or more for the first drawing to be displayed immediately.
- Line 130 Draw Page setting / Box drawing
P=ABS(P-1):
Subtract 1 from P and put its absolute value in P.
You mean?
The value of P is 0,1,0,1,0,(repeat...).
SET PAGE ,P:CLS:
Set and clear the page to be rewritten.
C=1:GOSUB 190:C=2:GOSUB 190
Draw a blue (C=1) and a red (C=2) box.
- Line 140 Footer Drawing
S$="aqua.flv - slide "+RIGHT$("000"+MID$(STR$(SN),2),4):
Create a footer string.
PSET(0,200),0,OR:PRINT #1,S$;:PSET(1,200),0,OR:PRINT #1,S$;
Draw the footer.
For character drawing in PRINT #1, the operator of the immediately preceding PSET statement is used.
When drawing in OR, the text is displayed without erasing the drawn box.
For this purpose, color 0 is set to white and color 3 to black.
In addition, the typeface can be made bold by writing over it.
Since line feed processing is also performed on the graphics screen, ";" should be added.
- Line 150 Slide number calculation
SN=SN+1:IF SN=10000 THEN SN=0
Slide numbering is up to 9999.
Oh, you want more digits? Are you taking your medicine properly?
- Line 160 Waiting Process
IF TIME<60 THEN 160
Wait for 60 VBlank time (approx. 1 sec. / NTSC).
It is BASIC, so it is not entirely accurate, but it will not be too fast, even with a clocked-up machine or turboR.
- Line 170 Display Page Setting / Sound Setting
TIME=0:
Initialize wait time.
SET PAGE P:
Switches the display page.
SOUND 0,RND(1)*128+64:SOUND 8,15
Set a great sound.
- Line 180 Loop / End processing
IF INKEY$="" THEN 130 ELSE SOUND 8,0:COLOR 15,0,0:SCREEN 0:END
If there is no keyboard input, it loops.
If any keystrokes are made, the sound is stopped, the screen is restored, and the program exits.
- Line 190 Box drawing subroutine
LINE(RND(1)*512,RND(1)*212)-(RND(1)*512,RND(1)*212),C,BF,PSET:
Draws a box.
RETURN
Return from subroutine.
-- About me
This application was created by Kaido Kotoni.
Home page
YouTube
https://www.youtube.com/channel/UC5egj_wXPhi8UQgg8xNPNKw
Nico Nico Douga
Status | Released |
Author | BASIC 10Liner |
Tags | 8-Bit, basic, basic10liner, msx2 |
Download
Install instructions
-- Startup
- Disk <Torso2.dsk>
LOAD "TORSO2.BAS"
RUN
- Tape <Torso2.cas>
CLOAD
RUN
Leave a comment
Log in with itch.io to leave a comment.