Gilbert François Duivesteijn
Around 1986, when I was in 2nd grade of Gymnasium, I bought a Canon V-20 MSX computer and I loved it. I remember that for that time, buying it from own saved pocket money, it was an expensive computer. Most of the time I was programming all kinds of little experiments in MSX Basic and later in assembly, using Champ ASM which I bought on cassette. The MSX computer was capable of creating nice color graphics, but I had it connected to a B&W TV, and because of that, I didn't care about the colours so much.
Since there was no such thing as Github back then, I wrote the code down in a notebook (pen and paper!). Only later, I got a cassette recorder and saved the programs on tape. Now, > 35 years later, the tapes are lost and I didn't have this computer anymore. However, in july 2021, I started to type in some of the programs from the old notebook and put them in Git for conservation and most of all, for fun.
Please visit also my other MSX page: Journey into MSX Z80 Assembly programming
fractal.bas The complex function
is tested for every point within the domain. When after a finite amount of iterations the value
Mandelbrot figure 1 | Mandelbrot figure 2 |
Mandelbrot figure 3 | Mandelbrot figure 4 |
Parameters:
Mandelbrot figure 1:
Mandelbrot figure 2:
Mandelbrot figure 3:
Mandelbrot figure 4:
attrac.bas In the mathematical field of dynamical systems, an attractor is a set of states toward which a system tends to evolve,[2] for a wide variety of starting conditions of the system. System values that get close enough to the attractor values remain close even if slightly disturbed. In this program, art is generated by a system of 2 simple formulas:
Then after taking an initial
flow.bas I was always intreaged by fluid flow simulations. However, solving the Navier-Stokes equations on a MSX with given computational power and memory limitations is not really feasible, even if you let the computer run for several days. However, you can still get decent flow-like looking images, using perlin noise. This technique is mainly used in the game industry to get fluid flow like behavior with the least amount of computational cost. I've made my own implementation of perlin noise, which I use in this code. To speed-up the computations on the MSX even more, I'm using lookup tables for sin() and cos() operators.
streamln.bas Another variation of showing pseudo flows is to integrate a vector field. I used again my own implementation of the perlin noise, like in the flow.bas code. Then, from a given point in the flow field, I follow the flow upstream and downstream until it goes out of the computational domain.
vecfield.bas The vector field code visualises the output of libnoise.bas, my own implementation of the perlin noise, as described in: Perlin, Ken (July 1985). "An Image Synthesizer". SIGGRAPH Comput. Graph. 19 (97–8930): 287–296. 10.1145/325165.325247. A reference implementation with verification and validation is available in this repository:
gilbertfrancois/partial-differential-equations/notebook/Perlin noise.ipynb
A collection of small sketches, made in Basic.
squares.bas | barcode.bas |
spiders.bas | dots1.bas |
phyllo.bas | spirals1.bas |
groovy.bas | rainbow.bas |
rndwalk1.bas | rndwalk2.bas |
fibonacc.bas | blocks1.bas |
plot2d.bas plotting program to visualize 2D plots
Plot view | Values view |
Plot view of function
plot3d.bas plotting program to visualize 3D plots
Plot view | Values view |
Plot view of function
palette.bas This program shows the 15 MSX(1) colors on screen 2. I always found the default sorting of the colours quite odd. I tried to order them in a more logical way. The tones of the colors in the palette are different on an MSX and MSX2. Note that yellow has only 2 tones. To simulate the medium tone of yellow, the color patch is an interlaced representation of color 10 and 11. (Screenshots made with openMSX)
Canon V-20 MSX | Sony HB-700P MSX2 |
B/W | Red | Yellow | Green | Blue | Magenta |
---|---|---|---|---|---|
1 | 6 | 10 | 12 | 4 | 13 |
14 | 8 | (10/11) | 2 | 5 | |
15 | 9 | 11 | 3 | 7 |
On an MSX2 with floppy drive, it is easy to dump the screen with the bsave "filename",s
command. But on an MSX1 with a cassette data recorder, it is not so easy. The ,s
option on bload/bsave
is not yet supported on MSX1. The only way to store the state of the screen is to copy the VRAM into RAM first and then use bsave
to store it on cassette.
s2dumpv1.bas This method works only on MSX2 computers with floppy drives.
s2dumpv2.bas This method works on MSX1 computers with cassette data recorders. The program is written in pure basic and easy to understand. However, copying the VRAM to RAM and vice versa is very slow, around 120 seconds.
s2dumpv3.bas This method works on MSX1 computers with cassette data recorders. The program is written in MSX-Basic and assembly. Copying from VRAM to RAM or RAM to VRAM takes about 0.2 (!) seconds, over 600x faster than the pure MSX-Basic version.
Nowadays we are spoiled with cross compilers and fast computers. However, it is still fun to write assembly code on a real msx computer. Click on the link below for a tutorial on how to use the assembler Champ and see how I programmed in assembly in the 80s! Champ is fantastic, since it is a assembler, editor, debugger and monitor all in one. Moreover, it allows the developer to switch between the development environment and basic interpreter.
Journey into MSX Z80 Assembly programming
nyan cat Nyan cat forever! This version is made for MSX(1). The music is composed with Arkos Tracker 2, de animation and music player are programmed in assembly.
doom Prepare to be transported back in time with this video showcasing a remarkable remake of Doom's iconic E1M1 soundtrack, composed by Robert Prince for ID Software in 1994. Curiosity sparked my imagination as I wondered how this epic composition would sound on an even older system—the MSX. This remake is crafted for the MSX1, utilizing its original 3-channel PSG sound chip, the AY-3-8910, to capture the essence of retro gaming. With Arkos Tracker 2, I composed the music and with my own developed BLiTzBLiT Digitizer software and NEON Cheese for MSX, I created the graphics. The resulting program is made in z80 assembly, assembled with vasm, and can be run on MSX-DOS 1.0 or higher.
The Matrix The Matrix digital rain, made for MSX(1) in Z80 assembly code, takes advantage of screen 2 graphics mode since the MSX doesn't support color text mode. It uses a custom character set featuring Latin, Greek, Cyrillic, Katakana, and Hiragana characters, all centered in the middle of the tiles. The program includes many small, cool nerdy features, such as syncing with interrupts to ensure a constant running speed. The green rain trails are designed with three different shades of green, starting with a highlighted head and fading out smoothly at the end. The trails move at random speeds, and some characters are randomly permuted for an extra cool visual effect. I'm very pleased with the result and love pushing the possibilities of 8-bit hardware.
memory.bas I made this program around 1986-1987 to get a better understanding of the used memory of my Canon V-20. The program is expected to work well on any MSX with 64kB RAM. If you have another configuration, some parameters have to be adapted. The program is not efficient in terms of speed.
Memory viewer for MSX(1), showing the memory usage of a Canon V-20. |
memmon.bas Memmon is a very simple memory monitor, written in basic. It asks for the start address and shows the memory content of the following 128 bytes. I developed this program to help me with finding the last used address in my compiled assembly programs, needed for saving the binary data to cassette.
Simple Memory Monitor, screen 1 | Simple Memory Monitor, screen 2 |
This program helps you to find the right register settings for the 99x8 Video Display Processor to set it in de mode of choice.
VDP Wizard: User input | VDP Wizard: Register settings. |