The Toshiba MSX and 64Kb of RAM – A Trip Down Memory Lane

When I was young, I grew up surrounded by old computing magazines from the 60’s, 70’s, and 80’s, a majority of them being the popular publication “creative computing”. I used to read them (and re-read them) voraciously during a time period where people around me were working on PCs running Windows 3.1, which were just emerging into schools, offices, and to a somewhat rare extent, homes. I remember being quite an antiquarian when it came to these old computing magazines and publications, but I enjoyed reading and learning about how the very first computers looked and operated, about the DEC PDP-11, the Macintosh, the IBM PC with all the Charlie Chaplin adverts, and how the landscape of personal computing was constantly evolving to become what it is today…

image credits:



image credits:



image credits:


microsoft ad

image credits:

When remembering all these old computer magazines and articles, what I really miss and remain nostalgic about is my dads Toshiba MSX home computer, which he had bought during the 80’s and was the first ever computer that I learned to program. I was introduced to programming at a very young age as I was always curious about this machine that my dad used to work on, where the display was a television set connected via RF cable and programs were stored and loaded on audio cassette tapes. The Toshiba MSX home computer was first announced by Microsoft in 1983, and conceived by the then vice-president of Microsoft Japan, Kazuhiko Nishi. The MSX computer was quite famous for being an architecture that major Japanese game corporations wrote games for, before the Nintendo era (the first version of metal gear was written for the MSX architecture).

Kazuhiko Nishi and Bill Gates in 1978:


image credits:

The MSX HX-10 model which my dad owned was an amazingly simple machine by today’s standards, having no internal storage or hard drive, instead relying on an external audio cassette recorder to load and store programs on tape (there was a cartridge slot, but audio cassette tapes were widely used as they were a cost effective medium with plenty available). The HX-10 model was based on a Zilog-Z80 processor and came with 64Kb of RAM (user space was about half that, giving about 28Kb for the user with the rest used by the system), which was basically what you had to work with. The machine used a version of the BASIC programming language known as MSX BASIC, which came pre-installed in the ROM.

A Toshiba MSX HX-10 model with packing and user manuals (the cartridge slot is on the upper right of the machine):


image credits:


The rear of the HX-10 (You can see where the television RF cable and audio cassette recorder connect to):


image credits:


A cassette recorder of the type used to save and load programs for the HX-10:


image credits:


What you see on the television screen once the MSX fires up:


image credits:


An early game for the MSX home computer (Blockade Runner):


image credits:

My dad used to program a lot as a hobby, and taught me a lot about coding and computer internals using the MSX HX-10 machine we had at home. Nowadays I look back and admire my dad for learning and coding certain sprite based games and programs in (Z80) assembly, as the graphics processing was quite slow when programmed using plain MSX BASIC. Programming in assembly language is generally considered a time consuming and complicated feat today in the developer community, but back then it was pretty much the norm as it was the only way to write games with fast and smooth graphics, on machines such as the MSX HX-10. On top of that, there was no internet to search for solutions when stuck on some problem, all references and troubleshooting were done through books:


image credits:



image credits:



image credits:



image credits:

Looking back, it was a very interesting and influential time period for me in life where I was exposed to the technicalities of how computers worked, and got so used to working with the MSX HX-10 that it was a strange feeling when working on a Windows (v3.1) machine for the first time (I would assume it’s simpler to switch from a terminal based 80’s machine to the Windows PC with its slick GUI and internal/external drives, but trust me, I was still used to the whirring tape recorder and the television set as a monitor at the time).

In my opinion, it seems computing today has evolved to the point where understanding how computers work and simple programming concepts are considered (or have been made) very complicated. This is one result of the many abstractions, tools, and software that have been built between the machine and the user over the years, which has made it incredibly easy for everyone to use computers, but maybe not understand them well. This is a far different picture from the home computer owner of the 70’s and 80’s, a majority of whom had to learn how the machine worked and programmed it on their own in order to use it. In my case, it was a rewarding experience to have my dad teach me a lot about computers and programming at a very young age, which is a main reason as to what I am doing today in terms of my career. In spite of all the latest hardware advances, programming languages, and software tools/applications, I am still drawn to vintage computers, programming languages, and systems, in a large part due to my childhood experience with the Toshiba MSX. That part of my life and experience is something I can always look back on and count myself lucky to have been through, and is something which inspires and motivates my love for technology today, and will continue to do so in the future.

Book Review – Seveneves by Neal Stephenson

(image source:

In my (humble) opinion, when it comes to intellectually stimulating and hardcore cyberpunk science fiction, there is no better author than Neal Stephenson, who does a great job in each and every one of his novels to date. For anyone who likes vast concepts steeped in technical, scientific, philosophical, and mathematical landscapes, portrayed in even more vast settings within (science) fiction, Neal Stephenson presents just that, taking your brain on an intellectual roller coaster ride each time you read one of his books. The very first book I read was Cryptonomicon, (a copy which belonged to my uncle) and it blew my mind. I also went on to read two more of his novels, Anathem, and Reamde, which showcased the ability of the author to create unimaginably different worlds and settings from book to book. For instance, Anathem is speculative fiction featured in a monastic setting (with a theme revolving around the many worlds interpretation of quantum mechanics) which has deep philosophical implications, whereas Reamde is a fast paced techno thriller revolving around a MMORPG with crypto-currencies, social networking, and hacker culture thrown into the mix.

Coming back to why I wrote this post, Seveneves is a novel by Neal Stephenson published in 2015, which was also recommended by Bill Gates who says it is the first science fiction book he has read in a decade. It is a work of speculative fiction, and starts off with a major catastrophe brought on by the destruction of the moon, that triggers a series of apocalyptic events. The story spans from the time this event takes place, to thousands of years in the future, which in itself, requires the reader to digest a vast time range of activities pertaining to the human will for survival. Personally for me, it is a book with an interesting premise that evokes a lot of thought and insight.

My advice on reading books by Neal Stephenson: pick a book that has a theme interesting to you, and see if you like his style and presentation (You might learn a lot about Mathematics, Cryptography, The Enigma machine, Van Eck phreaking, UNIX, and the history of world war two just by reading one book, which is what happened when I finished reading Cryptonomicon).

Installing MINIX 3 on QEMU/KVM with networking

For quite some time I’ve been wanting to play around with the source code of MINIX, partly because I like to understand how operating systems, well, operate, and partly because I am a firm believer in the design philosophy of a modular micro-kernel OS architecture (vs the traditional monolithic approach) and wanted to see how one was implemented. I was trying to set up a MINIX installation on VirtualBox but could not get the networking to function properly inside of my MINIX guest OS which I needed. This post is basically a detailed (b)log (expanding on the MINIX guideline) of how I switched to QEMU/KVM and got a working MINIX 3 installation complete with networking, to experiment with (when I mention “networking”, I am referring to accessing the Internet from the MINIX guest OS).

First off, I need to mention my host OS is Ubuntu 16.04 (32bit) running on a core 2 duo machine with 1GB of RAM. I also enabled the virtualization extensions in my BIOS (required by KVM, else there will be an error during the MINIX installation), which is quite trivial to configure in your machines.

A word about QEMU and KVM: QEMU (short for Quick Emulator) is an open source machine and peripheral emulator, focusing primarily on portability. KVM (Kernel based virtual machine) was originally a fork of QEMU, is a Linux kernel module that handles virtualization, and is now part of the main Linux source by default. To make a long story short, QEMU is a stand alone software, but will use KVM if it is available. There are many online resources on these two technologies which can be referred for a further understanding of emulation vs virtualization.

In order to install QEMU in Ubuntu, we need to type the following in the terminal:

sudo apt-get install qemu qemu-kvm libvirt-bin

Once this has run, QEMU will be installed in your host system.

Next, we will create a folder which will hold our QEMU VM image. In my system, I created a folder named “qemuVMs” in my Home folder. Also, we need need the MINIX 3 ISO file that will be used to install the MINIX system, which can be downloaded from the MINIX download page. At the time of this writing there were two versions available for download, and I selected version 3.3.0. Once the file is downloaded, you can extract the contents to get the ISO file, which needs to be copied into the folder we created earlier (in my case /Home/qemuVMs/).

Once the ISO file is in our folder, we can fire up a terminal, navigate to the folder containing the MINIX ISO file, and type the following command to create the VM image:
qemu-img create minix.img 2G
The above command will create a VM image named ‘minix’ with 2Gb space to hold our MINIX system (you can change the image name and size as you see fit). Now the contents in the folder should be something like the following:

Screenshot from 2016-06-11 22-33-52

Once the VM image is ready, we can boot the ISO file by running the following command at the terminal:

qemu-system-x86_64 -localtime -net user -net nic -m 128 -cdrom minix_R3.3.0-588a35b.iso -hda minix.img -boot d

This command basically tells QEMU to use the minix_R3.3.0-588a35b.iso file in the minix.img VM, and to allocate 128Mb of RAM for the VM. Please note to replace minix_R3.3.0-588a35b.iso with the name of the ISO file you downloaded, when running the above command.

If everything goes as planned, you should be taken through the normal MINIX 3 installation routine, which you can follow based on the guidelines given in the MINIX site. There are two important points to note during the MINIX setup:

1. When the option to select a network interface is given, select the “Virtio network device” option.
2. When asked whether to configure network using DHCP or manually, select “Automatically using DHCP”.

(We can always change the above network configuration in MINIX by typing “netconf” at the MINIX command prompt, but setting them during the initial setup will save us a step when we reboot into the new system)

Once MINIX 3 is installed in the VM, we need to change some configurations in the newly installed MINIX system, in order to utilize the virtualized disk and network drives and have internet access from the MINIX system. So boot into the new MINIX system by typing the following at the (Host OS) terminal:

qemu-system-x86_64 -rtc base=utc -net user -net nic -m 128 -hda minix.img

Once we are logged into the MINIX system, we need to go up one directory from the default file location, and navigate into the etc/ folder to modify the boot.cfg.default file. The following image shows how I have navigated from the point I was logged into the MINIX system till where I am going to edit the configuration file using the (ported) vi editor already available in the MINIX system:

Screenshot from 2016-06-11 23-11-07

When I open the file with vi, I need to add a new menu line with the following contents:
menu=Start MINIX 3 latest serial virtio:load_mods /boot/minix_latest/mod*;multiboot /boot/minix_latest/kernel rootdevname=$rootdevname $args cttyline=0 virtio_blk=yes

(basic editing commands in vi can be found in numerous sites online. Generally you will type shift + i to edit text, escape key to finish the edits, then shift + ‘:’ to get the vi prompt, and type “wq” at the vi prompt to write changes to disk and exit the editor)

You can see the last three lines in below screenshot, where I have added this new line of text in the boot.cfg.default file:

Screenshot from 2016-06-11 23-20-13

Once the above changes are done, we can exit the editor. We are still in the /etc/ folder, so we need to go back up one step in the file hierarchy, and then navigate into the /bin folder for the next step. Inside the /bin folder, we just need to run the update_bootcfg (just type “update_bootcfg” at the MINIX command prompt and press enter) command to make the changes we did in the boot configuration file come into effect. The below screenshot shows this (from the point we exit the vi editor):

Screenshot from 2016-06-11 23-29-49

After the step above is completed, we can shutdown the system by typing “poweroff” at the MINIX prompt, and reboot into the system using the following new command:

kvm -net nic,model=virtio -net user -drive file=minix.img,if=virtio -serial stdio -m 128

(It would be easy to have this command in a shell script so that we do not need to type it each time we need to fire up the MINIX guest OS)

Now when you boot into the MINIX guest OS, you should see a new option named “Start MINIX 3 Latest serial virtio” which is what we configured in the boot configuration file earlier (option 6 in below image):

Screenshot from 2016-06-11 23-37-24

If we select this boot option and login to the system, you would find that we have full access to the internet via the virtual network interface we have configured. If you do a “pkgin update” at the MINIX prompt, you should be able to see MINIX retrieving package details over the internet and updating the package database.

If you run into any issues when installing MINIX 3 (with networking) in QEMU following the steps outlined above, please do leave a comment.The MINIX3 Google group is also a great place to check for common issues and support, and a better forum to put your discussions/problems forward, as it will benefit the whole MINIX community.

Using the DirectX SDK in Windows 8 with Visual C++ 2010

This post is a result of some insight and necessary steps to get the June 2010 DirectX SDK working on a Windows 8 system, with Visual C++ 2010 express. Given the fact that DirectX 11 comes bundled in with the Windows 8 SDK, my stubbornness to change the configuration is due to the fact that I wanted to follow Frank D. Luna’s latest book, mirroring the same development environment (Visual Studio 2010 and the DirectX SDK) in my Windows 8 machine. Without further ado, lets dive in to the details…

  • Windows 8 comes with DirectX bundled in – The Windows 8 SDK comes with the DirectX SDK bundled in, and in turn, Visual Studio 2012 comes with the Windows 8 SDK. This means, you can download VS 2012, and start writing DirectX code without any further configuration. Microsoft recommends (Specifically in this blog), that developers transition to coding DirectX application using the new Windows 8 SDK and VS2012. If you are planning to go down this route, just install VS 2012 Express for Desktop on your Window 8 machine, and try out these great tutorials.
  • Windows 8 Contains DirectX 11.1 – What you will not be able to get from the DirectX SDK are the new features available in DirectX 11.1. This does not pose much of a problem, as much of the DirectX code out there is based on the DirectX SDK, and DirectX 11.1 features have not been widely adopted yet. If you are interested in the new DirectX 11.1 features, head over to this page and check them out. But bear in mind that you need to develop using the Windows 8 SDK if you are planning to use it (The windows 8 SDK is available as a separate download if you want to develop in Windows 7 for example).

If you are like me and want to use Visual C++ 2010 and the June 2010 DirectX SDK in Windows 8, then the below steps outline what needs to be done (I am assuming you are using a Windows 8 machine):

  • Install Visual C++ 2010 Express Edition – Navigate to the download page for VC++ 2010 express and install the product on your Windows 8 machine. (On Windows 8, after installation, there were some problems where the product did not fire up, stating that I needed to install the service pack for all VS2010 products in my system. When downloading and installing the service pack, some errors were thrown as well. But after restarting the machine and firing up VC++ 2010 Express, it worked properly… am still investigating why all this fuss. This seems to happen if you have other VS2010 express edition products installed already).
  • Install the DirectX SDK on your machineGo to the DirectX SDK download page, download the SDK and install in your system. One thing to note when installing in Windows 8, you will get installation errors if there are existing 32-bit and 64-bit VC++ 2010 redistributables installed in your system (This is because the DirectX SDK uses an older version of them). Follow the steps outlined in this page, in order to get the DirectX SDK installed properly on your Windows 8 system.

If everything went well, you should be up and running in coding and building DirectX applications using VC++ 2010 (provided that you link the appropriate libraries and set the folder paths in the project settings) on your Windows 8 system.

Infragistics UltraWebGrid column format not being applied

Just a short post today, recalling an incident I came across recently, which I thought I should jot down here, and hopefully It’ll save someone else a headache.

If you have been working with the 3rd party UltraWebGrid control for offered by Infragistics, you would have worked with columns where you might have wanted to display numerical values formatted in a certain way (for example, you may want to show 12, 300, 450.0 instead of 12300450.0000). This is done by setting the format expression in the column.Format property inside the ‘InitializeLayout()’ UltraWebGrid method. This is exactly what I was doing but was puzzled to have rows of integers merged from two DataTable sources showing different formats, even though each Integer in the rows were applied the same column.Format expression in code. The first few integers would display in the correct format I apply, but sometimes the last few integers don’t have the formatting applied.

This was getting way too frustrating till I (out of curiosity, and nothing else to try) wrote the following line of code before the ‘column.Format’ expression:

string dType = column.DataType;

When I debugged the code, one set of integers from the original DataTable was of type ‘System.Decimal’, and displayed correctly, but the second set of merged integers from the second DataTable was of type ‘System.String’. When I set the following line of code inside the loop applying the formatting to the column.Format property, all the integers displayed in the correct format:

column.DataType = “System.Decimal”;

So bottom line? The UltraWebGrid control cannot format columns with decimal format expressions if even one value in the column is going to be of a type other than ‘System.Decimal’. If there are several columns which will display numerical data in a certain format that you need, it would be defensive coding to write the logic in UltraWebGrid_InitializeLayout() as follows:

foreach (<column in UltraWebGrid that is going to display numeric values>) {

column.DataType = “System.Decimal”;

column.Format = <your numeric format expression here>;