Blog

Memories from 1993

Posted by in MSX, Personal, Photography, Retro | September 18, 2015

I had these very old photos lying around and scanned them. This was my desk in my room around 1993. The computer on the left is an MSX2 (a Philips NMS 8280). The other one is a Commodore Amiga 500 with a 1084S display.

JaviLM_room_1993_1

On the shelf to the right there were a few boxes of floppy disks containing several hundreds of them. (Click to enlarge)

JaviLM_room_1993_2

Philips NMS 8280 with an FM-PAC clone and Philips’ Music Module. I used the cassette deck to amplify the sound from the MSX2. (Click to enlarge)

How about yours? Do you also have photos of your old computers?

Relearning MSX #25: Printing on the screen in MSX-C

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

The last two posts were very technical: we saw how to write assembler routines and use them in MSX-C and also the opposite, how to write MSX-C code and then use it in assembler programs.

Today we’re going to go back to where we left it in chapter 18 and continue learning the basics of MSX-C. First, we’re going to see how to display text and numbers on the screen.

Displaying characters one at a time: putchar()

We already saw the function putchar() in chapter 18, but we didn’t explain at the time what this function does.

putchar() outputs a single character to the screen. We can pass the character inside single quotes (this is known as a character constant), or we can pass a variable that contains the character we want to output.

Let’s see a very simple example:

25-1

25-1.C (Click to enlarge)

Read more ›

Let me explain with a quick diagram…

Posted by in Culture, Fun, Japan, Pets | September 12, 2015

Today I took Yuki to the vet for her vaccination. I always take her to the Nomura Veterinary Clinic in Nakano because this doctor is especialized in exotic pets. Not just ferrets, but all kind of animals that other doctors wouldn’t even dare to touch. Almost everybody in Tokyo who owns a ferret brings his to this clinic.

doctor_nomura_marmosets

As an example, one day I saw a man come to Dr. Nomura with his 5-6 marmosets on his back . Click to enlarge.

Dr. Nomura’s clinic is a bit far from home, so I can’t just take Yuki and bring her there. I have to put her in her carrier cage and either take the train (inconvenient) or a taxi. We took a taxi today.

yuki_in_carrier_cage

Yuki relaxing in her carrier on the taxi to the vet.

Every time you take your pet to Dr. Nomura he does a checkup to check that your little furry (or scaly, if you’re bringing a snake) is healthy. Usually there are no problems and your pet gets a vaccine or some other medication, and then you pay and go home.

Today it was a bit different…

Read more ›

Relearning MSX #24: Calling MSX-C functions from assembler

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

We saw in the previous post how to run assembler routines from MSX-C. I’m sure you’re about to ask whether it’s possible to do the opposite: Is it possible to write programs in assembler and use the functions from the MSX-C Standard Library or the MSX-C Library disk?

I’m glad you asked. Yes, it’s possible, and it’s actually very easy to do.

Here’s how.

Calling MSX-C library functions from assembler programs

The rules that we saw for how MSX-C passes parameters to assembler functions also apply to MSX-C’s own library functions. This means that we can leave arguments in the CPU registers or in the stack as appropriate and call the function just like that.

As always, let’s see an example:

example

EXAMPLE.MAC (Click to enlarge)

Read more ›

New retro shop opening in Akihabara

Posted by in Gadgets, Hardware, Japan, MSX, Retro, Technology | September 05, 2015

Good news for all retro computer users, including MSX:

A new retro shop will be opening in Akihabara during the next few weeks. The name: BEEP.

According to their still under construction website (http://www.akihabara-beep.com), they’ll deal with retro computers, retro games, arcade games, and fanmade items. In the updates they’re posting on Twitter (@BEEP_akihabara) we can see that they have lots and lots of MSX-related stuff, including several piles of unopened, brand new Pioneer PX-V60 MSX computers that they’re selling for 19,800 yen each (they sell used ones for 8,000 yen).

They’re planning to open during the Japanese silver week, which is the week from September 21st to 25th. Unfortunately, that week I’ll be traveling out of the country, so I really, really hope they get a bit delayed so I can attend during the opening. :-)

Take a look at their Twitter feed: it’s worth it.

URL: http://www.akihabara-beep.com
Twitter: @BEEP_akihabara

Address:

Akihabara BEEP
Nakaei Building (basement)
3-9-8 Sotokanda, Chiyoda-ku
Tokyo 101-0021

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

Posted by in How-to, MSX, Retro, Technology | September 05, 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 02, 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 ›

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 ›