A downloadable project

I used DeepL and Google Translate.

The creator is Japanese, and we would appreciate your understanding.

----- MSX1driver Torso -----

 -- Overview

(A man)

 I recently found a great YouTuber. I have watched all of his videos!

 But it's not enough. I want to watch more and more of his videos...

 I had no choice but to create this program.


 ...Did you watch all of those videos?

 Hmmm, okay. Let's change your medicine.

"Webdriver Torso"


is coming to MSX1!

You can recreate that excitement with your MSX1 at any time!

Is 10 seconds not enough? You can play it as long as you want!


It works with any country system and memory capacity.

Of course, it also works on MSX2 and higher systems.

However, since it is created based on the NTSC system, the colors will look different in the PAL system.

Also, the default palette is different between TMS9918 (NTSC/MSX) and V9938 (MSX2), so the colors are different.

This is a limitation of the video chip.

 -- Entry Sheet

Entry to

"12th Edition of BASIC 10 Liner Contest"


- Category



- System requirement

 All national MSX systems.

- Files


  Disk images that can be used with openMSX / blueMSX / webMSX.


  Tape images that can be used with openMSX / blueMSX / webMSX.


  A program file in ASCII format.


  ReadMe in Japanese.


  Translation into English was done using DeepL and Google Translate.


  Screen capture image.

 -- Source code

110 R=RND(-TIME):I=0:P=0:X1=0:X2=0:Y1=0:Y2=0:C=0:SN=0:B$=SPACE$(32)
120 FOR I=0 TO 15:VPOKE 1976+I,255:NEXT I:VPOKE &H201E,&H40:VPOKE &H201F,&H80:SOUND 1,0:TIME=99
130 P=ABS(P-1):POKE &HF923,&H18+P*4:CLS:C=247:GOSUB 190:C=248:GOSUB 190
140 LOCATE 0,23:PRINT "aqua.flv - slide ";RIGHT$("000"+MID$(STR$(SN),2),4);
150 SN=SN+1:IF SN=10000 THEN SN=0
160 IF TIME<60 THEN 160
170 TIME=0:VDP(2)=6+P:SOUND 0,RND(1)*128+64:SOUND 8,15
190 X2=RND(1)*32:X1=RND(1)*X2:Y2=RND(1)*23:Y1=RND(1)*Y2:B$=STRING$(X2-X1+1,C):FOR I=Y1 TO Y2:LOCATE X1,I:PRINT B$;:NEXT I:RETURN

 -- Description

Normally, a BASIC program alone cannot instantly rewrite the entire screen.

This program uses a little screen rewriting technique.

By using this technique, double buffering is achieved in BASIC only.

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.

 I Generic Loop Index.

 P Screen page.

 X1,Y1 Top left coordinate of the box.

 X2,Y2 Lower right coordinate of the box.

 C Character code.

 SN Slide number.

 B$ Box display work.

- Line 100 initialization


  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.


  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 initialization.

- Line 110 Variable declarations


  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 Character Pattern Setting / Sound Setting

 FOR I=0 TO 15:VPOKE 1976+I,255:NEXT I:

  Rewrite character codes &HF7 and &HF8 into the box.

  Why &HF7 and &HF8?

  1. Since the character codes are sequential numbers, both can be rewritten in a single FOR loop.

  2. SCREEN 1 can only change the color every 8 characters. Therefore, only &Hn7 and &Hn8 can set different colors.

 VPOKE &H201E,&H40:

  Set character codes &HF0-&HF7 to blue.

 VPOKE &H201F,&H80:

  Set character codes &HF8-&HFF to red.

 SOUND 1,0:

  Set the initial value of PSG.


  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


  Subtract 1 from P and put its absolute value in P.

  You mean?

  The value of P is 0,1,0,1,0,(repeat...).

 POKE &HF923,&H18+P*4:CLS:

  Set and clear the page to be rewritten.

  The &HF923 contains the VRAM address referenced by the BASIC interpreter.

  The BASIC interpreter uses this value to determine the VRAM address for PRINT and CLS.

  This value is not changed by setting the value of BASE(5) and must be rewritten directly.

 C=247:GOSUB 190:C=248:GOSUB 190

  Draw a blue (C=247,&HF7) and a red (C=248,&HF8) box.

- Line 140 Footer Drawing

 LOCATE 0,23:PRINT "aqua.flv - slide ";RIGHT$("000"+MID$(STR$(SN),2),4);

  Draw the footer.

  Since it is the bottom line, the screen will scroll to a new line unless ";" is 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? Do you want me to increase your medicine?

- 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


  Initialize wait time.


  Switches the display page.

  Why not rewrite BASE(5)?

  For BASE, "BASE(5)=&H1800+P*&H400".

  Clearly, "VDP(2)=6+P" is shorter and faster.

  And BASE should be set back to its original value on exit.

 SOUND 0,RND(1)*128+64:SOUND 8,15

  Set a great sound.

- Line 180 Loop / End processing


  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.

  The contents of &HF923 are re-set based on the BASE value when the SCREEN instruction is executed, so you do not have to do anything.

- Line 190 Box drawing subroutine


  Determine the size of the box and create a string for drawing.


  Draws a box.

  Adding ";" speeds up the process just a little bit because line feed processing is not performed.


  Return from subroutine.

 -- About me

This application was created by Kaido Kotoni.

Home page




Nico Nico Douga



Torso1.bas 696 bytes
Torso1.cas 640 bytes
ReadMe_T1-en.txt 14 kB
ReadMe_T1-jp.txt 9 kB

Install instructions

 -- Startup

- Disk <Torso1.dsk>



- Tape <Torso1.cas>



Both have the same content.

Operation has been confirmed with openMSX / blueMSX / webMSX.

Leave a comment

Log in with itch.io to leave a comment.