Blog

Category Archives: How-to


Relearning MSX #19: Assembly language concepts

Posted by in How-to,MSX,Technology | August 23, 2015

It’s been a looong while since the last post. Almost half a year. That’ll teach me to set deadlines for stuff I do in my free time.

Let’s continue where we left it in the last post: we’re going to start learning how to code in assembly language. It will be very handy even when working with C because often we will need to understand what the computer is doing behind the scenes. Plus, it’s actually very simple to learn (though mastering it and learning the underlying hardware will take some more time.)

In this series of articles we’re going to follow the book MSX-DOSアセンブラプルグラミング (MSX-DOS Assembler Programming) by Tetsuya Kageyama,  published by ASCII Publications in 1988:

MSX-DOS Assembler Programming (ASCII Publications, 1988)
MSX-DOS Assembler Programming (ASCII Publications, 1988)

Without further ado:

Assemblers and the assembly language

When reading a book on machine code, we often read sentences like this:

…to create programs in machine code we write an assembly language program and we use a tool called an assembler.

Sometimes the meaning of this isn’t obvious to everybody. What does the assembler do? What kind of programming language is assembly?

Let’s try and answer these questions.

Read more ›

Restoration and whitening of a Panasonic FS-A1ST

Posted by in Hardware,How-to,MSX,Technology | May 8, 2015

I posted about this on my Facebook account a few days ago and several people asked for more photos and a followup, so here it is.

My Facebook post from May 3rd.

My Facebook post from May 3rd.

Background

Some time ago I bougth a Panasonic FS-A1ST computer on Yahoo! Auctions. The description said that the unit was “as is” and that it wasn’t guaranteed to work properly. The photos were a bit dark, but there wasn’t any obvious physical damage. The price wasn’t high, so I bid on it and I won.

The package arrived a few days later. I couldn’t wait to open the box and try it (I had been without an MSX turbo R for quite a while), but my happiness vanished quickly: the computer came in a terrible shape. It was very dusty, and both the case and keyboard had yellowed a lot, not to mention the tobacco smell.

panasonic_fs-a1st_restoration-8

The computer as it arrived. Because of the bad light it doesn’t look as bad in the photo as it did in real life.

Read more ›

Relearning MSX #15: MSX-C commands: CG.COM

Posted by in How-to,MSX,Retro,Technology | February 18, 2015

In the previous two posts we’ve seen a detailed description of CF (MSX-C’s parser) and FPC (MSX-C’s function parameter checker). Today we’ll see the last one: CG.COM, MSX-C’s code generator.

What I said about the previous two articles applies to this one as well: this explanation is for experienced users who want to have more control over the compile process. If you’re a beginner then you don’t need to bother paying too much attention to this (yet). However, it won’t hurt to at least skim it and find out what are the available options.

msx-c_cg

MSX-C’s code generator (CG.COM)

Read more ›

Relearning MSX #14: MSX-C commands: FPC.COM

Posted by in How-to,MSX,Retro,Technology | February 16, 2015

This is the second post describing MSX-C’s command line tools. In the previous article we examined the parser (CF.COM), and today we’ll see the Function Parameter Checker (FPC.COM).

As before, this post is rather technical and assumes experience programming in C. It’s targetted at users who already have experience programming in C. However, I still recommend to read it at least once if you’re a beginner, because it will familiarize you with problems you’ll find in the future.

msx-c_manual_and_disk

The MSX-C Ver.1.2 manual and disk

Read more ›

Relearning MSX #13: MSX-C commands: CF.COM

Posted by in How-to,MSX,Retro,Technology | February 13, 2015

It’s been a while since the last post in this series. At the end of the previous chapter we had a working installation of MSX-C Ver 1.2 with the MSX-C Library package.

Today’s post and the few that follow are a lot more technical. What comes now is a detailed description of the command line programs that compose the MSX-C compiler. The purpose is to allow users who already have some experience programming in C to dive deeper into software development in the MSX platform. If you’re new to compilers and the C language then this probably won’t make much sense yet, and that’s ok. We’ll go back to the basics after explaining these tools.

The information here comes from the books MSX-C Ver.1.2 User’s Manual and the Introduction to MSX-C (MSX-C入門上巻), both by ASCII Corporation.

msx-c_and_introduction_to_msx-c

MSX-C Ver.1.2 package and the Introduction to MSX-C book

Read more ›

Relearning MSX #12: Setting up the MSX-C environment (part 6)

Posted by in How-to,MSX,Retro,Technology | January 17, 2015

During the last few posts we’ve finished setting up the MSX-C environment and we’ve learnt how to use the AKID text editor. At this point we can already create and compile C programs, but the process is annoying because we have  to run all the compiler steps by hand.

In this post we’re going to create a couple of batch files: one to set up some useful parameters in MSX-DOS2, and another to automate compilation of our C programs.

msx_magazine_1985-05_msx-c

MSX-C ad from 1985. Yes, it was THAT expensive (MSX Magazine, May 1985)

AUTOEXEC.BAT

The first file we’re going to create is called AUTOEXEC.BAT, and it has to be created in the in the top directory of the boot disk (A:). If you used MS-DOS then you already know what it is.

Read more ›

Relearning MSX #9: Setting up the MSX-C environment (part 5)

Posted by in How-to,MSX,Retro | January 6, 2015

In this post we’ll add the MSX-C Library package to our MSX-C environment. Setting it up is trivial because it only involves copying a few files, as was the case of installing MSX-DOS2 TOOLS.

Let’s start.

What’s MSX-C Library?

msx_magazine_1988-08_msx-dos2_ad

MSX-DOS2 and MSX PDT series ad. MSX Magazine (August 1988). Click to enlarge

MSX-C Library is a collection of C source files and libraries that extend the capabilities of MSX-C v1.1/v1.2. It adds support for a lot of stuff:

  • 32-bit and 64-bit numeric types, modifies some of the standard library functions to support them, including the printf() and scanf() groups of functions
  • Support for the MSX graphics processor (VDP) including drawing on the screen, graphic block operatings, data transfer to/from the video memory, and handling sprites
  • Functions to work with joysticks, cursor keys, triggers, mice and printer
  • A subset of the curses library called MSX-CURSES, to create menus and windows in text-based applications

As you can guess, it’s going to be quite useful.

One thing to note is that, unlike the other software packages in the MSX PDT series (MSX-C, MSX-DOS TOOLS, MSX-S BUG), there isn’t a version especific for MSX-DOS2. The same MSX-C Library package works with both MSX-C v1.1 and v1.2.

Read more ›

Relearning MSX #8: Setting up the MSX-C environment (part 4)

Posted by in How-to,MSX,Retro,Technology | January 5, 2015

(This is another looooong post. Be sure to click the “Read more” button if you’re previewing this post from the blog summary.)

By the end of the previous post we had MSX-DOS2 and MSX-DOS2 TOOLS installed on an MSX with a hard drive. So far everything is installed in drive A:, the first partition in the hard drive.

In this post we’ll proceed to install ASCII’s MSX-C v1.2. We’ll copy some utilities to the A: drive for convenience, but we will use the B: drive for all the compile environment.

Let’s get started.

MSX-C versions

msx_magazine_1988-04_msx-c_ad

MSX-C v1.1 ad. MSX Magazine (April 1988). Click to enlarge.

ASCII released two versions of the MSX-C compiler:

  • MSX-C v1.1: runs under either MSX-DOS or MSX-DOS2 and generates code that also works on either operating system, but doesn’t have support for MSX-DOS2 functionality
  • MSX-C v1.2: runs on MSX-DOS2, and generates MSX-DOS2 applications, and has full MSX-DOS2 support

We will be using MSX-C v1.2.

Read more ›

Relearning MSX #3 – User environments

Posted by in Hardware,How-to,MSX,Retro,Technology | December 18, 2014

This article has moved to MSX Center.

Click here to visit the new URL.

Relearning MSX #2 – What’s this “MSX” thing?

Posted by in How-to,MSX,Retro | December 13, 2014

This article has moved to MSX Center.

Click here to visit the new URL.