Translated by Brian Clark from the article that ran in Oh! MZ in September 1984. Found here on the Internet Archive:

One Thousand and One Nights of PCs: Night Nine

The Birth of PC Games and Star Trek

Junji Minegishi

We’ve reached the ninth night of one thousand one nights.

Ten years ago I was nothing but an amateur when it came to computers. But yet here I am writing about my journeys with PCs, the wonderful people that I’ve met, and the events in my own life ever since I encountered my first computer: The HP-65 magnetic card-programmable calculator.

How are you liking these articles? Any feedback would be greatly appreciated.

Tonight we’ll be looking in on the roots of PC gaming, with Star Trek games being our representatives for that history. One included in this article called Microtrek, was written by University of Tokyo professor Haruhisa Ishida. It’s only 114 lines of code, so please try keying it in yourself sometime.

The Dawn of Computer Games

These days everyone has their own personal computer, and what’s more they play games on them. How many people would have even imagined such a future only ten years ago?

PC games are booming in popularity, there are entire magazines devoted to them, and people seem to be having their fill of action and adventure games. But tonight we’re going to probe deeper into the question of just who was the first to make these, by unraveling the mysteries of PC games.

The dawn of computing was in 1955, just a mere quarter of a century ago: CPUs in corners of deep, climate controlled clean rooms, they were still nothing but mythical machines to your average person. 

In any case, people began thinking of ways to have fun with them: Anglo-Saxons in particular seem to have a strong sense of fun. It’s said that the game Spacewar! was written by Steve Russell on a PDP-1 minicomputer in a laboratory in MIT, back in 1962.

This was what’s known as a real-time game: There’s a much deeper discussion to be had here about the programming techniques behind it, but suffice to say it’s one of the oldest ideas in terms of computer games.

Fast forwarding a bit to 1966, the NBC broadcast space opera known as Star Trek gave birth to the passionate group of fans known as Trekkies, but at the same time had themes that lended themselves quite well to computer games as well.

Space that spreads out infinitely within computers, warping from galaxy to galaxy. It was the birth of the simulation game.

The third movie, Star Trek III: The Search for Spock, was even released simultaneously in Japan and America. I’ve attempted to put together a timeline of the early history of Star Trek, as well as the computer games bearing the name.

The Birth of Star Trek

Star Trek was first broadcast on 09/08/1966 on NBC. It ran for 79 episodes, ending on 10/12/1974. Written by sci-fi writers such as Theodore Sturgeon and Harlan Ellison, it began broadcasting in Japan starting in 1969.

Attracting fans of all ages, A NASA space shuttle was even given the name Enterprise.

The starship USS Enterprise (NCC-1701) travels throughout the galaxy fighting against Klingons and Romulans, or encountering magnetic storms, space diseases, and spaceship malfunctions. It’s a space opera in which the crew proceeds along their course, conquering these challenges as they go. I’ve included a chart below which gives statistics on the ship’s size, functions, and weapons.

Diagram 1 below shows the Enterprise’s gallant form. Output in CG from a bit image printer in 160 x 100 pixels on a PC-8001, in a time before there was a command line, this is the work of Seiji Shimamura (a member of FORESIGHT).

Diagram 1.

The series was also made into a movie (shown in diagram 2 below). The second movie, Star Trek II: The Wrath of Khan, was broadcast on TV on 01/29 of this year. A meeting of the Shibukawa Microcomputer Club was scheduled for that day, so they let out earlier than usual given that the broadcast started at 9 PM. The club members then enjoyed the world of Star Trek from the comfort of their own homes.

Diagram 2

Porting to Microcomputers

It seems Star Trek games began appearing on computers around 1967, but the first person to really nail the formula was Mike Mayfield on 10/20/1972. He did the programming on a Hewlett-Packard HP-2000C, and was the first official entry in HP’s public domain software library. 

It quickly gained popularity when it was ported to the MITS Altair in 1975. It was also ported to Palo Alto Tiny BASIC with a 2 KB interpreter, by Li-Chen Wang. The Tiny version ran on just 6KB of memory, so it attracted a lot of fans.

It was developed to run as efficiently as possible, and is only 113 lines of code:

60 IF M THEN FOR J = 1 TO M

85 J=100* (C = 0) – 5 * C

145 FOR I=X – (X>1) TO X+(X<8)

Making free use of tricky techniques such as this, and analysis of this program a few years ago even acted as an indispensable route for improving the efficiency of BASIC. The program reference list is shown in chart 2, with the Tiny version being number 2 on the list.

Chart 2.

The first one of these games to be brought into Japan was the one by Haruhisa Ishida (University of Tokyo professor). He came to know of it from being in the US at Bell Labs in 1975, then registered it at the Tokyo University Computer Center as “//GAME STAR TREK” the following year.

With such a detailed story established for a fictional world, there are an expansive amount of reference books about everything from the structure of the Enterprise, the United Federation of Planets, Klingons, structures of the Romulan kingdom, etc.

My PC Database

Here’s a question for everyone who subscribes to Maicom Magazine: How do you organize the game programs and techniques that you find in each issue, and the information about new products and peripherals? The image you see here shows the Star Trek related issues from my PC magazine collection, but it’s a huge pain to go through the table of contents of every single issue to find what I want. So now I’ll open up about how I organize my PC information.

Chart 3.

I don’t use a computer to do it at all: Instead I use 35 x 90 mm index cards. I sort them primarily A~Z, then by codes 01~99, type of information, magazine name, and applicable equipment. An example of this part of the card, along with the section for games, can be seen in chart 3 to the right.

The amount of cards I have has grown enormously to 5,500, but I fit them all in a small 3×3 parts case (shown in the previous photo). If I looked for cards in the O-06 section, I’d find the 33 items listed on the previous list of Star Trek games.

I have a piece of software that would be great for this called dBASEII, so why don’t I use my PC for this? I have several reasons.

For starters, I started using this system of index cards before dBASEII was even available, and I feel that it’s easier to maintain without using a computer. Mr. Yamane even explained in RAM magazine that it’s more convenient to put your information into an A4 sized envelope and have a database of 2,600,000,000 characters on your bookshelf than stored on a PC. He absolutely will not say that a PC is better to use for this.

Star Trek Game

Diagram 3.

The galaxy’s 16 star systems are further divided into four quadrants, making for an 8×8 grid of quadrants. The 3rd diagram to the right shows the names of them that I suspect most fans would know: Antares, Sirius, Aldebaran, etc. The values in parentheses are their distances from Earth, in light years. Each of these systems is divided up further into 8×8 sectors, each of which contains randomly placed Klingons (K), stars (S), space stations (B), and the Enterprise (E).

At the start of the game your orders from the Federation, number of Klingons, space almanac, and number of bases are all generated. You cruise through the galaxy and fight battles with a limited amount of energy. Your ship is repaired when you land at a base, and your photon torpedos and energy are replenished. The general commands you can issue are shown in diagram 4.

Diagram 4.

Diagram 4 is an example of the display you see in front of you as you’re progressing through the game. The obstacles you must overcome are accidents that can occur, resulting in space diseases and engine or sensor failures. By entering commands into the on-board computer (diagram 5) you can sort through various pieces of information, in order to make the most appropriate move.

Diagram 5.

Captain Kirk, Lieutenant Sulu, half-Vulcan half-Earthling Spock, Dr. McCoy, Russian Commander Chekov, and Chief Engineer Scotty all make appearances. Thoughtful conversations present throughout really add to the charm of the game.

Microtrek

As you can see from chart 2, each of these Star Trek games range from between 100 to 1000 lines of code. However tonight we’ll be focusing on Professor Haruhisa Ishida’s Microtrek, ported to the MZ. The only commands in this version are Warp, Photon Torpedo, and SRS. (Shown on Diagram 6, List 1)

List 1.

It was described in SP-5030, and can be keyed in and playable in about 30 minutes. So please give that a try if you can, and please please study the algorithms found here. They’re quite easy to comprehend, so I’m sure you can all do it.

Furthermore, those interested in tonight’s conversation should key in the code for the official Star Trek game, and experience for themselves the clever conversations and vastness of space as experienced through a micro LSI. Analyzing the programming found there will certainly level-up your BASIC programming abilities.

For All MZ Fans

I believe that all of the readers of Oh! MZ are maniacs who have a lot of love for the MZ line of computers, and we get all sorts of different requests when it comes to the MZ: You’ll get a good idea of this if you take a look at Studio MZ.

It’s because you’re MZ maniacs that you support us through primarily using Sharp computers, and Sharp’s image broadens whether this mania is created by many or even just a single person. Sharp machines are not only powerful enough for business applications, but also are gaining a greater market share in PPC and OA equipment. NEC provides a good example in moving from the TK-80 to the PC: They recklessly drove away some of their fans with the “1,000,000 units” advertising campaign.

Tomorrow night I’d like to discuss the recovery of the MZ market share, and the road to the MZ machines which inspire so much passion. I’ll introduce “Tamushi Game“, a variation of Conway’s Game of Life, and will look at porting the code written in VTL (Very Tiny Language) to the MZ.