[editor : Carl T. Helmers Jr.] [publisher : Virginia Londoner (Virginia Londner), Gordon R Williamson] [art : Ellen Bingham, Wai Chiu Li, Christine Dixon, Holly Carmen LaBossiere, Deborah Porter] [cover : Robert Tinney] #Magazine
#Abstract
About the Cover: The theme for this issue is "Fun and Games", using the personal computer to implement dynamic in teractive forms of enjoyment not otherwise possible. In the cover by Robert Tinney, entitled "The Magic of Computers", we find the essence of an ancient shell game applied with a desk top computer as the missing pea.
One of the quickest ways to gain experience with a processor is to actually program and interface to it . The Intel 8086 16-bit processor is now available for evaluation as the SDK-86 single board computer. Steve Ciarcia evaluates the SDK-86 board. Page 14
The solution of games such as Soma Cubes and polyominoes presents the computer programmer with a nontrivial problem. Although the method of solution may seem quite straightforward, the actual implementation may use up excessive amounts of memory or time. This was one problem facing Douglas Macdonald and Yekta Giirsel when they started Solving Soma Cube and Polyomino Puzzles Using a Microcomputer. Their final program is capable of solving many problems of this sort in reasonable lengths of time on an 8 K byte machine. Page 26
Peter B Maggs takes readers behind the scenes to show how a programmer can design a board-game program using minimax theory, a technqiue used to maximize one's chances of winning a game. Read Programming Strategies in the Game of Reversi, a tutorial article with broad applicability in the field of computer games. Page 66
Implementing the data structures needed to simulate a chess game is a task that the average programmer is quite capable of performing . However, developing an effective method of defining the respective priorities for all the possible moves is a cumbersome task whose solution has eluded many programmers. W D Maurer illustrates the use of the game-tree diagram in a method called Alpha-Beta Pruning, a technique that offers a possible solution to this problem. Page 84
Owners of Commodore PETs often wish to have hard-copy printouts of data appearing on their machine's video displays. P K Govind gives advice on how to obtain hard copy in Interfacing the PET to a Line Printer. Page 98
Escape all your earthly restrictions and go into orbit with A Spacecraft Simulator. Gary Sivak has put together a BASIC program to put your celestial flight skills to the test. Page 104
One type of popular computer-game activity is the simulation of sports events. If you have ever wondered if the best baseball team of today could beat the best team of some long-past season, you may now be able to get at least a theoretical answer. Joseph Roehrig developed a system that uses real statistical data to simulate the play of baseball games, and he now shares it with us in The National Micropastime. Page 113
Using stacks can help to simplify otherwise very complex programming problems. In Stack It Up, Charlton H Allen demonstrates a simple procedure for evaluating mathematical expressions that employ stack control. Page 140
Have your recent endeavors with your personal computer been all work and n o play? Tony Estep discusses some of the basic principles involved in Writing Animated Computer Games. The software was written for the SOL-20, but with minor modifications will run on any VDM-based 8080 computer. Page 152
Even if you own a minimum computer system, you can still do interesting things with it. Charles A Kapps gives Five Useful Programs for the SC/MP which are suitable for minimum systems . The routines can be converted to other systems, such as the COSMAC VIP and KIM. Page 172
Do you need a simple device to show logic signals compared to the system clock? Frank DeCaro can help you to Build a Simple Digital Oscilloscope. Page 222
Where most people are particular about the computer they buy, they don't think twice about the most frequently used component of a system: the keyboard. The Cherry PRO Keyboard is Dan S Parker's choice and he tells us why. Page 232
[author : Carl Helmers] #Edito
Extract : « One of my main tasks each month is reading all the manuscripts which are sent to BYTE by authors, who are often our readers. The number of well-prepared manuscripts which come our way is fantastic, and for obvious reasons of space we can only accept so many in a given interval of time. Thus, when an unsolicited article is received, we look for a certain uniqueness of idea and appropriateness for our readers. The article content of BYTE magazine is approximately 90% the result of unsolicited articles. Of course, exceptions occur, for example, the 6809 series by Joel Boney and Terry Ritter (which required a bit of encouragement in advance of its writing), or several of the articles on LISP in our August 1979 issue, which were solicited explicitly by guest editor John Allen. [...] »
The serious application of computers to game problems
[author : D Macdonald and Y Gürsel] #Algorithm #Listing #BASIC #Assembly #Book
Extract : « The genesis of this article was an inexpensive puzzle consisting of twelve plastic pieces which are supposed to be fitted into a rectangular cardboard box. Despite assurances by experts (see bibliography, Martin Gardner) that there are 2339 separate and distinct ways of solving the puzzle, a year's work by a veritable platoon of people (mainly Yekta) produced only slightly more than 150 solutions.
Introduction
Polyomino puzzles and Soma Cubes are examples of a class of problems which are particularly suited to solution on a small computer. The amount of data needed in each case is relatively small, but the amount of calculation needed to do an exhaustive search for solutions is staggering.
For a set of Pentominoes, for instance, you need only encode the shapes of the twelve pieces and provide an array of sixty spaces into which you try to fit them. For a Soma Cube there are only seven pieces, which fit into an array of twenty- seven spaces. In both cases, all of the necessary data will easily fit into 2 K bytes of memory. However, the number of individual situations that would have to be considered in an unoptimized exhaustive search would be 3.2 X 10^16 for the Pentomino puzzle and 4.7 X 10^11 for the Soma Cube.
In this article, we will present a 6502 assembly language program which will solve a wide variety of puzzles of the sort where a given region, either two or three dimensional, must be filled with a given set of pieces. The program has been written in a general manner so that the shape of the region can be easily changed and certain pieces can be specified as fixed, in order to take advantage of symmetry. The number and shape of the pieces themselves can also be easily changed. [...] »
A tutorial on using the minimax theory in designing a game
[author : Peter B Maggs] #GameBoard #Listing #BASIC #Book
Extract : « Board games such as checkers or chess can be fun and challenging to play, and programs that play these games can be fun and challenging to write. This article covers some of the decisions I made and methods I used in the programming of a board game called Reversi. It examines in turn the choice of a game, the programming language, the data structure and the details of the program structure.
Choosing a Game
There are both legal and practical considerations in choosing a game to program. Since I earn a living teaching law, and program as a hobby, I will start with the legal aspects. Many games present no legal problems. For instance, chess and checkers are in the public domain and anyone is free to write programs for them, but copyrighted games could pose serious legal problems. While writing a program to play a copyrighted game solely for your own amusement at home would probably fall within the fair use exception to the copyright law, any attempt to distribute, publish or sell the program could be made only with the permission or tolerance of the copyright and trademark owner. There is a third category of game wherein the game itself is in the public domain, but playing equipment is sold under a trademark. Thus, while no one has any rights to three-dimensional tic-tac-toe, the manufacturer who sells sets for playing three-dimensional tic-tac-toe under a trademark has the right to prevent you from distributing a computer game with the same name. So, you are free to program and even sell three-dimensional tic-tac-toe, but you will have to make up your own name for it. [...] »
A space-navigation game
[author : Gary Sivak] #Listing #BASIC #Simulation
Extract : « This article describes a BASIC program that enables the user to design and put into orbit a multistage spacecraft launched from Earth-based conditions. By asking for engine throttle settings, thrust angles, and firing times, your computer puts you at the controls of a multistage spacecraft of your own design as you pilot it from the Earth's surface into orbit. Continuous data displays of the user's status after each maneuver are presented, as well as arrays of altitude and range information for possible plotting at the end of the mission. The following is a description of the program operation.
The program first asks for and verifies all ship design parameters, the first being the number of stages. Then the iteration time (dt) in seconds and the height in miles of the desired orbit are required. [...] »
Simulating baseball games using actual statistics
[author : Joseph J Roehrig] #Algorithm #Listing #BASIC #DataAnalysis #Simulation #Sport
Extract : « During the past few years I have spent too many Saturdays soldering integrated-circuit sockets into printed-circuit boards and have not had enough time to enjoy a good baseball game. I fulfill my need to participate in our national pastime by having my personal computer simulate the play of a baseball game. I can be the manager of any team I choose. All I have to do is input a few baseball statistics. Presto! Out comes a baseball simulation (assuming that the system I shall describe is set up).
System Demonstration
The search for baseball statistics is easy. The Sports Encyclopedia: Baseball, published by Grosset and Dunlap, has all that you could want. A program called Input (shown in listing 1) is used to enter the statistics into the computer. Figure 1 shows the program Input working. [...] »
The essentials of producing animated video games
[author : Tony Estep] #Algorithm #Listing #Assembly #Method #Game
Extract : « It has been quite some time since the arrival of memory-mapped I/O (input/output) boards upon the amateur computer scene, but the voluminous home computer literature rarely contains any listings of animated video games. Since it seems to me that there breathes not a hobbyist with soul so dead that he would not play one of these devilish little time wasters if he had one, I concluded that perhaps the lack of video games was due to some lack of information about how to get one up and going. This was certainly the case with me; I just started with a blank piece of paper and began scratching. But as the reader will see, there really is no mystery to it, and the results are well worth the effort.
A video game works just the same as an animated cartoon; there are a series of frames, each of which shows one or more of the objects in the picture in a slightly different position. Since the viewer's visual system has a certain persistence, the effect is one of continuous motion. In the case of a television picture, each frame is a single rewriting of the raster. This is very fast, and the flicker is seldom noticeable. A computer can pop information in and out of screen memory much faster than the monitor can rewrite its screen, so the programmer might think that computer games could represent extremely smooth movement. [...] »
Display waveforms with light-emitting diodes
[author : Frank DeCaro] #Electronic #Build #Diagnostic
Extract : « A digital-logic probe is a convenient device for examining signals. A typical probe has one or more light emitting diodes (LEDs) to indicate logic states. The LED lights to indicate a high (1) logic state, and turns off to indicate a low (0) logic state. It is not possible, however, to compare these signals with the state of the system clock. The system clock is the square wave source from which all other signals are derived. [...] »
Hands-on experience with a system design kit
[author : Steve Ciarcia] #Review #Microprocessor
Extract : « There has been a lot of talk about 16-bit microprocessors lately. You are probably interested in how they work and how they differ from present 8-bit microprocessors. This may seem more important to someone designing systems for a living rather than to the casual computer experimenter; but ultimately personal computing will be affected.
The majority of systems currently available use 8-bit processors primarily because few cost-effective 16-bit processors were available when these systems were designed. As new personal computers are conceived, the designers will have more 16-bit microprocessors to choose from, and in my opinion, the latter will win out. Software development is much more expensive than hardware development. It is much cheaper to write one line of code executing a hardware multiply instruction than to write an algorithm to do the same function on a processor devoid of this direct capability. Reduced cost of development should be reflected in lower retail cost. There are always exceptions to the rule, but once amortized and in volume production, the 16-bit microprocessor should prove to be the logical choice for medium to high-level applications. [...] »
A programmers approach to simulating a chess game
[author : W D Maurer] #Algorithm #Method #HowItWorks
Extract : « Sooner or later, almost everyone with a small system gets the idea of programming it to play chess, checkers, or some other two-person board game. Most of us give up before we start because we have no idea how to determine the best move in any given situation. The other aspects of playing a game are generally no problem.
We can see how to represent 64 squares on a board by 64 bytes in memory, each of which contains a code number which might be 3 for Bishop, 6 for King, or for a blank square, and so on. We can see how to write a program for each piece, determining where it can move in a given situation depending upon the rules of the game. For example, a Bishop can move as far as possible in any of four directions, so we have to write a program to search in one direction until it finds a square that is not blank (ie: the corresponding byte does not contain 0, the code for a blank square). If this square is n squares away from where the Bishop is currently positioned, then there are n — 1 possible moves that the Bishop can make in that direction. This loop is then repeated, once for each of the four directions.
Finally, we can see how to write a program that would find all of the pieces on the board, would determine the type of each piece, and would find all possible moves for each piece, according to its type. In this way we could get a list of all of the moves that could be made by one player in any given situation. But to find the best of these defies the low-level intuition that most of us rely upon.
In this article, I will describe a general procedure for programming board games, relying heavily on chess in my examples, but utilizing procedures that can be applied in any board game where you have to "look ahead." [...] »
Connection through the PET user port plus a screen image-printing program
[author : P K Govind] #Interface #Algorithm #Printer
Extract : « From both software and hardware points of view, this article presents a design example for interfacing the 8-bit user port on the Commodore PET 2001 personal computer to an external device. The design example will show how the user port may be used to develop a handshake interface to a line printer. We shall begin with a brief discussion of the programmable features of the user port. [...] »
Use your microprocessors stack to your best advantage
[author : Charlton H Allen] #Listing #ALGOL #Assembly
Extract : « Most microprocessors currently available employ a stack of some sort. This stack is either a scratch memory in the processor itself or an addressable programmable memory characterized by retrieval of information in the reverse order of storage using a pointer. In the common parlance, a stack is a LIFO (last in first out) mechanism. It is a very useful feature for preserving the proper order of subroutine call and return points with minimal hassle. Experienced programmers using 8080 type machines quickly discover its other uses; for example, a direct register store instruction is three bytes long on the 8080, whereas a register stack instruction is only one byte. As a result, saving registers used by subroutines and restoring them later is cheaper if the stack is used in preference to some directly addressed memory area. More importantly, perhaps, the availablity of such a mechanism greatly simplifies the writing of reentrant routines, ie: ones which do not modify themselves in the process of execution. Note, however, that all the mechanisms provided in microprocessors to date for stack operations are explicitly fixed mode and singular. There is only one stack, and it operates on entities of the same width, in number of bits, as the accumulator(s). Moreover, these entities have no attribute other than their fixed width, in bits. [...] »
Utility programs
[author : Charles A Kapps] #Listing #Assembly
Extract : « Now that you are the proud owner of one of the least expensive microprocessor kits, what can be done with it? Before that question is answered, why do you own the SC/MP to begin with? You may be someone interested in learning about microprocessors or computers, and since you are a cautious person of modest means, you have chosen to begin slowly.
No computer is useful unless it has a means of communicating with the outside world. The SC/MP is no exception. The SC/MP kit by itself provides no such capability. Thus, some sort of I/O (input/output) hardware must be obtained, such as a teletypewriter. This article assumes that you have the minimum of I/O hardware, probably a video display, which is likely to cost three times as much as the computer. (This is an important thing to know about computers. They are worse than automobiles because the accessories really account for most of the cost. This is even true with the big number-crunching computers).
The main limitation of such a system is it is not feasible to attempt to write very large programs. This is not only because of the SC/MP's rather meager amount of memory (256 bytes). It is also due to the fact that, without any means of assembling, editing, and backing up programs, it becomes humanly impossible to do any serious programming endeavors. For this reason, the pro- grams in this article have been kept short and simple. For more ambitious readers, these programs can be combined or added to in order to accomplish more sophisticated tasks. [...] »
A professional keyboard for the hobbyist
[author : Dan S Parker] #Review #Keyboard
Extract : « In the few short years since the birth of the personal computer, the list of peripheral devices has grown tremendously: printers, video displays, mass storage devices, and keyboards. At first, many of these items were overruns from original manufacturers, or were removed from used business or military systems. Documentation was scarce and complete schematics were often nonexistent. Keyboards were available in a myriad of styles, but not with all the features of a professional unit. If they were encoded at all, it was often in half ASCII (upper case ASCII only, as available on the Teletype Model 33).
No more! Enter the PRO, Cherry's new entry into the personal computer keyboard market (Cherry model B70-05AB). Aptly named, it is indeed a professional keyboard that comes fully assembled, tested, and ready for installation in your computer system. Its features rival those of keyboards found in expensive terminals. [...] »
#Book
Extract : « 8080/8085: Assembly Language Programming Lance R Leventhal Osborne and Associates Inc Berkeley, California 1978 467 pages softcover $9.50 [...]
Technical Aspects of Data Communication John E McNamara Digital Press Digital Equipment Corp, Educational Services Dept 12 Crosby Dr Bedford MA 07130 $19.95 [...] »
#Association
[author : Robert Tinney]