Blog

Category Archives: Retro


Relearning MSX #23: Calling assembler routines from MSX-C

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

In the previous post we learnt a couple things about how MSX-DOS manages files and runs programs.

This post is more technical: we’ll see how to use assembler routines from MSX-C.

This subject is a bit more advanced that what we’ve seen so far. Feel free to skip this chapter for the time being if you don’t need to mix C and assembler yet. The reason why we’re going to see this now is that there are advanced users playing around with MSX-C who have asked how to do this.

Standard types in MSX-C

First of all we need to understand how the standard MSX-C data types are stored in memory.

16-bit values are always stored in memory with the low order byte first (little endian), and the high order byte in the memory address after it.

There’s also a couple things we have to keep in mind:

  • In MSX-C pointers are always 16-bit values, the same as integer values
  • The numeric types short and int are exactly the same thing
TypeLength (bits)Range
char80 to 255
short16-32768 to 32767
int16-32768 to 32767
unsigned160 to 65535
Read more ›

Relearning MSX #22: Programming for MSX-DOS (part 2)

Posted by in How-to,MSX,Retro,Technology | September 2, 2015

The previous post ended with the description of the first of the three MSX-DOS functions: I/O. This time we will see an introduction to the other two: file management and program execution.

File management

Without doubt, the most useful peripheral in a computer system is the storage device, whether it’s a floppy disk drive, a hard disk, optical media, or some kind of flash storage attached via a generic interface.

Early MSX computers supported only cassette tape as storage media. It was slow and somewhat unreliable, but it was very cheap.

msx_magazine_1985_05_p152_aiwa_dr-2_data_recorder

A cassette data recorder used in personal computers during the mid-80s. This model supported reading tapes at 2400 bps, twice the normal speed (MSX Magazine, May 1985) (Click to enlarge)

Besides the low speed, the big drawback of tapes was that the only way to access the data on them was sequentially: in order to access a program in a tape, you had to either read all other data stored before it, or manually rewind the tape to the location of the program you wanted to load. Needless to say, this wasn’t very fun.

msx_loading_file_from_tape_sequential_search

Typical gaming session when loading games from cassette tape during the 80s.

Read more ›

Relearning MSX #21: Programming for MSX-DOS (part 1)

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

In the previous post we learnt about mnemonics and pseudoinstructions, symbols and labels. This is a good start, but learning assembler won’t be any use at all if we don’t also learn the environment where our programs will run. In our case this environment is going to be MSX-DOS, the MSX Disk Operating System. Let’s see what this means.

Functions of the operating system

The most basic functions of any operating system are:

  • Input and output of data from/to peripherals (keyboard, screen, printer, etc)
  • File management
  • Running programs

MSX-DOS is able to handle all these, plus a few other tasks. let’s look at them in more detail:

Read more ›

Relearning MSX #20: Assembly language overview

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

In the previous post we learnt what an assembler does and also the differences between assembly language and two high-level programming languages: BASIC and C.

This time we’ll see an actual assembly language program and compare it with a BASIC program that does the same function.  We’ll learn about pseudoinstructions and labels, and we’ll see an example of an assemble list for our first assembly language program.

Note: so far I’ve been using the terms assembly language and assembler, the first one when talking about the programming language we use to write programs, and the second one to refer to the program that handles the task of converting the source code into a file we can run. However, many people often use the term assembler to refer to the assembly language as well. I’m one of these people. Because of this, keep the following in mind:

  • Assembly language (or just assembly) always refers to the programming language
  • Assembler may refer to either the programming language, or to the program used to assemble the source code

The context in the sentence should always make it clear to see which one we’re talking about.

Let’s start:

Read more ›

A rarely seen MSX computer

Posted by in Fun,Hardware,MSX,Retro,Technology | May 27, 2015

This is an interesting find. Let me give you some background first:

In order to get your driver’s license in Spain you need to pass a test called psicotécnico. This test is designed to ensure that your hand-eye coordination and response times are normal. When I took the test many years ago, it consisted on a computer attached to a couple of foot switches and a couple of handles. On the screen there were a couple of bars that you could move horizontally independently from each other using the handles. The screen kept scrolling down simulating a couple of roads, and your mission was to keep both bars inside the road at all times.

The Spanish government ordered these systems exclusively from a company called ASDE (and they still do).

What’s interesting is that the computer they used was an MSX2. When I took the test they had a Philips NMS8245, but it seems that they also used computers from Sony. Everybody who got a driver’s license in Spain in the 80-90s had to go and play with this MSX.

Today somebody on Facebook found this: there’s one of these units for sale, complete with the controllers and software (a cartridge screwed into the top slot):

22397178_1.jpg

22397178_2.jpg
22397178_3.jpg

22397178_3-1.jpg

Nowadays these machines aren’t in use anymore. They’ve been replaced with a newer system, but it seems that the controllers are basically still the same:

equipo-psicotecnico-asde-driver-test-n845-general-asde-1

The new Driver-Test set. Probably running on a custom-built PC.

Here’s a video of a test in progress. The MSX version was exactly the same:

Seeing this machine brought back some nice memories. :-)

Update: a friend on Facebook reports that these MSX are still in use in some examination centers.

Japanese books for retro computer fans

Posted by in Hardware,Japan,MSX,Retro,Technology | May 25, 2015

During a conversation on Facebook earlier today I mentioned a couple of books by Japanese author Hiroyuki Maeda, and I promised to post more information later. These books are for retro computer fans, even those who can’t understand Japanese. Mr. Maeda has published several books about retro computers and game consoles, but in this post I’ll talk about two of them:

  • 懐かしのホビーパソコンガイドブック (The Nostalgic Hobby PC Guidebook, ISBN 978-4-7755-2339-1)
  • 海外のゲーム&パソコンガイドブック (The Oversea’s Game & PC Guidebook, ISBN 978-4-7755-2419-0)
hiroyuki_maeda_books_1

Left: The Oversea’s Game & PC Guidebook. Right: The Nostalgic Hobby PC Guidebook.

These books contain lots of information about hundreds of computer systems and consoles from the late 70s to the early 90s. Keep reading for a taste of what’s inside

Read more ›

Sony Design exhibition in Ginza: MAKING MODERN

Posted by in Culture,Design,Japan,MSX,Retro,Technology | May 6, 2015

If you’re following me on Facebook or Twitter then you already learnt about this earlier today:

This morning we went to Ginza for some important shopping, and afterwards we headed for the Sony Building. The reason: an exhibition opened there last week about the design of Sony products, and they have on display one of the coolest-looking MSX computers ever produced: a red HIT-BIT HB-101.

Sony Design: MAKING MODERN
Place: Sony Building (8th floor), Ginza
Admission fee: Free
Companion book: Sony Design: Making Modern
Held from April 29th to June 14th, 2015

Sony HIT-BIT HB-101 (Red)

Sony HIT-BIT HB-101 (Red). Click to enlarge.

Read more ›

Relearning MSX #18: Structure of an MSX-C program

Posted by in MSX,Retro,Technology,Uncategorized | March 20, 2015

In the last post we saw a very brief example of command line parameters, and we learnt about input/output redirection and pipes.

This week we’re going to see the structure of a program written in C. This post is intended as an introduction for users who haven’t programmed in the C language before. If you have coded anything in C before then you can completely skip it.

A few characteristics of C programs

If you’ve been an MSX user for a long time then it’s likely that you’ve seen lots of MSX BASIC programs. If that’s the case, then you’ll immediately notice several differences:

msx-c_vs_basic

C program (left) and MSX BASIC program (right). Click to enlarge.

Read more ›

Relearning MSX #17: Command line parameters, redirection and pipes

Posted by in MSX,Retro,Technology | March 13, 2015

msx_magazine_1990-02_msx-pdt_ad

We now have a working installation of the MSX-C compiler. We saw a very simple test program in chapter 12, and this week we’ll compile a program that actually does something.

We’re going to learn about:

  • Command line parameters
  • Input/output redirection
  • Pipes

Along the way we’re also going to see some common compile-time errors and how to resolve them. This post doesn’t require or assume any previous programming experience. The content and example programs are based on chapter 4 of the book MSX-C入門上巻 (“Introduction to MSX-C, first part”) edited by ASCII Corporation in 1989.

Before we start go get something to drink. This is a long post.

Read more ›

Index of technical articles on MSX Magazine

Posted by in MSX,Retro,Technology | March 12, 2015

For my own reference I’ve compiled a list of all the technical articles that appeared in the Japanese MSX Magazine published by ASCII between 1983 and 1992. These articles are a fantastic source of information on the MSX architecture and how to develop software and hardware for it, even without previous knowledge of programming or electronics.

I have entered the article titles as they are, because this index won’t be very useful to you anyway if you can’t read Japanese.

Download it here:

All of the MSX Magazine issues have been available for some time at the Internet Archive. This search will find most of them.