hints & tips
Q Orphan Computers
I have a very perplexing problem. Is there such a thing as a conversion table or program to change Commodore 64 programs so that I can use them on my Plus/4? I love my computer, but it's frustrating trying to convert programs myself. I tried to type in one program by leaving out the POKEs. Ha! No way. So what's a Plus/4 owner to do?
Doug R. Lewis
While the Plus/4 had a few interesting features (excellent color control and an advanced BASIC), it was not the runaway success that Commodore had hoped for. One reason it failed is that it lacked the powerful sprite hardware of the 64's VIC-II chip and the great sound of the SID chip. Also, the productivity software included in the machine was less powerful than packages already available for the 64.
The differences in the hardware of the two machines make it difficult to convert programs written for the 64 to run on the Plus/4. Games, and other software that make use of graphics and sound, are especially difficult to transfer.
Your problem hints at the problems that plague all owners of orphans: the difficulty of finding software for your computer, the difficulty of finding friends that can help you with your computer, and the difficulty of finding books, peripherals, and expansion for your computer.
Many orphan computers were born in the explosive period that occurred before the industrywide shakeup in 1983. The Mattel Aquarius, the MSX computers, the Commodore Plus/4 and 16, the Texas Instruments TI-99/4, the Coleco Adam, and the Timex Sinclair are among the dozens of computers that are now called orphans.
Many people enjoy their orphans. Some buy a full orphan system, with plenty of software, as their first system. Needless to say, it's cheaper to buy a used Coleco Adam than a used IBM AT. You can learn a lot by using one of these computers for a while. And if you write your own programs, you may never need another computer.
You may love your Plus/4 now, but someday you may decide that you'd like to buy a new computer. If you do, you may want to ask yourself these questions:
• What software do I want to run? (For example, if you run Lotus 1-2-3 at work, and you want to run it at home, you'll want an IBM-compatible.)
• Do I care about graphics, sound, and games? (If you do, find out how much it will cost to add a joystick to the various computers. Can you add two joysticks? How much will the appropriate monitor cost? Will you need to buy a special graphics board?)
• Do any of my friends have the computer I want? (It can be fun to be a trailblazer, but sometimes it's more practical to be part of the crowd.)
• Do I see peripherals, books, and software for the computer I want advertised in magazines and journals? (If not, your next computer may already be a dying breed.)
Before you buy a computer, read all about it. There are many excellent computer magazines available. For Instance, COMPUTE! Publications publishes a magazine devoted exclusively to each of the following computers: the Apple 11 line, the Atari ST, the IBM PC and compatibles, and the Commodore 64 and 128.
Q Another Language
I am currently learning 6502 machine language and would also like to learn to program in 68000 machine language. Could you tell me some of the differences between these two languages?
The 6502 and the 68000 are close cousins. The 6502 is about two inches long and half an inch wide. It has 40 pins. The 68000 is about four inches long and one inch wide. It has 64 pins. The size difference gives a hint as to the power difference between the 68000 and the 6502.
There are similarities among all microprocessors, and most people find it relatively easy to learn a new assembly language once they know another. Some advantages that the 68000 has over the 6502 are
• More and more useful registers
• More addressing modes
• Multiplication and division commands
Overall, the 68000 is a much more powerful chip, and it is relatively easy to program.
Q Invisible Drawing
I have been programming in BASIC on my 1040ST for almost a year, In every game and utility I own, pictures are displayed on the screen immediately without being drawn. I am wondering if this is possible in ST BASIC.
It may be a good time for you to move on to a new language. While virtually every other language on the ST allows you to do this, ST BASIC does not. Among the languages that make it easy are GFA BASIC, C, Modula-2, and Personal Pascal.
To be able to display screens instantly, you need to take advantage of a feature called screen flipping (also known as double buffering on some other computers). When you're using screen flipping, you draw on one screen while you're displaying another. When you've finished drawing, you flip screens. Then you draw the next screen and flip again. Screens can be flipped very quickly. This is how flicker-free animation is achieved on the ST.
There are many ways to draw images on the screen for screen flipping. One is to use the standard VDI or line -A calls. Another is to copy images from another area of memory directly onto the screen. Yet another is to load DEGAS or NEOchrome images onto the screen from disk.
To be able to screen flip, you need two screens. These need to be allocated with the system call Malloc(). Note that, on the ST, screen memory must start on a 256-byte boundary. You also need to use two system pointers: one that sets the physical base of the screen, and one that sets the logical base of the screen. The physical screen is what you actually see on the monitor. The logical screen is the area in which you draw. A call to the SetScreen() function will set these pointers-just pass the pointer to the logical screen, the pointer to the physical screen, and the resolution (0 for low, 1 for medium, and 2 for high) to the function.
Q Both Sides Now
I just bought a Commodore 128 computer and a 1571 disk drive. I'd like to know how I can write on both sides of my disks.
I have tried everything, but I can use only one side of each disk. Please let me know if it is possible to write on both sides of a formatted doublesided, double-density disk.
If you're using a 128 and 1571, all you need to do to be able to use both sides of a disk is to format it as double-sided, using the HEADER command. After you've done this, DOS will allocate both sides of the disk for use.
Another common way to use both sides of a disk is to flip the disk over and write on the second side, in effect treating the disk as two single-sided disks. In order to do this, you'll need a device, available in most computer stores, called a notcher. Disks used in this way are called flippies.
We should caution you about using flippies, however. With normal disks, the disk only spins in one direction during its lifetime. Dust and contaminants tend to get caught in the disk's protective lining and stay there. Since flipping a disk causes it to spin in two directions, depending on which side is being used, these harmful particles can be continually dislodged and spread over the disk's surface. If you're going to be using a disk often, stay on the safe side and don't make it a flippy.
Q CGA on Hercules
In the January 1988 COMPUTE!, the article "Computer Monitors: Making the Right Choice" mentioned a program called SIMCGA by Chuck Guzis that emulates CGA graphics with a Hercules card.
I am very interested in this program, but I've been unable to locate any information on it. Can you help?
After reading the January issue of COMPUTE!, I was very pleased with the article "Computer Monitors: Making the Right Choices." Your article came at the right time for me because I intend to purchase a color monitor soon, and I was not very informed about monitors. The article also contained some very useful information on graphics cards.
In the article, a program by Chuck Guzis called SIMCGA, which allows a Hercules card to emulate a CGA card, is mentioned. Where can I obtain more information on CGA emulators and about this program in particular?
I read with great interest the article in January's issue, "Computer Monitors: Making the Right Choice." Since I do mostly word processing on my unit, I feel that staying with a monochrome monitor is the best choice for me.
The problem I am having is that when I want to use my system for other things like recreation, my Hercules card isn't compatible with the programs that use IBM's BASICA graphics. I haven't been able to find Chuck Guzis's program SIMCGA.
Evidently, there is more interest in this topic than we suspected. We've had dozens of requests for information on CGA emulators and on SIMCGA in particular.
A Hercules CGA emulator is software (sometimes accompanied by hardware) that produces black-and-white CGA graphics using a Hercules card. The emulator convinces programs that a CGA card is present in the system and translates the CGA's graphics into the Hercules card's graphics. The translation takes time, and for this reason an emulator's screen output is often slower than CGA output. With many applications, however, this isn't a problem.
We know of three CGA emulators for the Hercules card. The first is SIMCGA, which is available in both public domain and commercial versions. The public domain SIMCGA can be obtained from any PC public domain source: a bulletin board, a user's group, or a for-profit distributor of public domain software.
The commercial version of SIMCGA is much more powerful than the public domain one, but it's been difficult to obtain until recently. Now you can get the commercial version of SIMCGA from Excelsior Software (RD #4 Box 265, Sussex, New Jersey 07461, 914-343-5155 or 717-3436632) for $39.95.
The newest commercial version of SIMCGA, 4.2, has a remarkable update policy: If you find any software that SIMCGA fails to work with, Chuck Guzis, SIMCGA's author, will custom-code a special patch for you at no extra charge. This means that SIMCGA can potentially run anything.
Another emulator, ModeMGA, is available from TB.S.P. Software (2265 Westwood Blvd., #793, Los Angeles, California 90064, 213-312-0154) for $79.95. This emulator was originally developed to allow Hercules users to create CGA graphics with QuickBASIC, but the software works with many other programs that require a CGA card.
The last emulator on our list is Athena BIOS, available for $60 from Athena Digital (2351 College Station Rd., #567, Athens, Georgia 30605, 404-354-4522). Unlike SIMCGA and Mode-MGA, Athena BIOS is hardware as well as software. For more information on Athena BIOS, see the MS-DOS section in this issue's "COMPUTE! Specific" department.
Q In the Numbers
I recently purchased a copy of Learning C from COMPUTE! Books. I would like to use my Amiga to solve complex mathematical equations. Precision is very important to me, and I'm becoming concerned about the results I am getting in Amiga Basic. Most floating point numbers are rounded off to six decimal places. Is there a way to get higher precision numbers out of my Amiga?
R. Allen Mansell
Amiga Basic uses two formats to store floating point numbers-single-precision floating point, and double-precision floating point. By default (if you don't specify which format to use), Amiga Basic will use the single-precision format. Calculations with singleprecision numbers are much faster than those using doubleprecision numbers, but less precise. As an example, try running the following short program:
Single = SQR(2): Double#=
SQR(2) : REM the `#' indicates
double precision PRINT Single
As you can see, the number stored in the double-precision floating point format is far more accurate. A single-precision number will have up to 7 digits of precision, while a double-precision number may have up to 15 digits of precision. There are a number of built-in libraries in the Amiga which are designed for performing numeric operations. These libraries can be accessed from assembly language or highlevel languages such as C or Modula-2. These libraries include the mathffp.library, which gives you access to Motorola Fast Floating point operations, and the mathieeedoubbas.library, which.performs IEEE double-precision math. In addition to these, some compilers support Motorola 68881 IEEE double-precision math. See the ROM Kernal Reference Manual for more information.