Converting To Fat-40
The addition of some new features to the 40 column PET has brought about some problems with program compatibility between the 4032 ten inch and 4032 twelve inch CRT display machines. In some cases, the program changes required for proper operation on the "Fat Forty" may be trivial and in other cases the conversion may be next to impossible. I will attempt to cover areas where failure can occur and what changes need implementing.
Programs Loading Below BASIC ($0400)
Standard BASIC programs should work without any modification, unless they employ PEEKs and POKEs or if the program loads into memory below BASIC. The latter problem can be a bit tricky to spot unless you know specifically what to look for. If the program does load below BASIC (say $033A), but does not use locations $03E9-03f9, one method that will correct the problem is:
- get the program into memory (don't execute)
- SYS to the monitor (SYS 4)
- display hex $03E9-03F9
- modify these registers with the following values
[$03E9: 10, 10, 09, 10, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00]
- resave the program via the monitor
Tape Unit #2
Another area where the standard BASIC program can fail is in the utilization of the second cassette unit for sequential file access. If any program calls files from tape unit #2, unpredictable effects can result depending on the data coming into the buffer. In this case, nothing can be done to resolve the problem. The 12 inch 4032 has rendered the operation of the second tape unit virtually useless.
PEEKs And POKEs
Decimal location 151, often used to check if a particular key has been pressed, is still the same on the 12 inch, but the value of the keys has changed and therefore expected values for certain keys will return false information. The following table will assist in the conversion of a program with this problem.
When POKEs to this problem area are used for saving byte variables (whatever purpose), they must be moved to a free spot elsewhere in memory. If a space is free just below $03E9, this could be a good area for relocating the byte variables.
BASIC Programs With Machine Language Utilities
BASIC programs using machine language utilities that reside in the second cassette buffer can work properly provided they don't use the taboo area of the buffer (namely decimal 1001-1017). Again, if the utility uses this area, the space must be relinquished to the PET operating system in order to obtain successful execution of the program. Usually, in the case of small machine language utilities, it shouldn't be too difficult to understand and relocate it to an area of memory that is free.
Machine Language Programs
This will be the most difficult area to troubleshoot. If you are going to attempt to modify this type of program, be prepared to spend a good deal of time. Making the necessary changes to get the program working will most likely require a considerable amount of effort — which I personally don't recommend.
If you are really desperate, here are a few helpful hints that may assist you:
- Use Supermon or Extramon to locate any absolute occurrences of memory addresses from $03E9-$03f9 and reassign new values.
- Check hi-low tables for references to the same address locations and, if any, reassign new values.
- Seek all immediate operations involving hex $03 and $e9-f9...if any, look at code where occurrence takes place and evaluate.
- Check all JSR & JMP occurrences into the E block ROM. All other ROMs can be ignored since they are identical.
Factory CRT Setup (Size)
One other problem that may or may not be encountered is screen setup. If the user decides on entering screen text mode via "PRINT CHR$(14)", the top line of screen may run off the upper edge and not be visible. To restore screen to normal graphics mode enter "PRINT CHR$(142)". One easy solution to this problem is to use "POKE 59468,14". This will turn the PET to text mode without opening up pixel lines between text.
The changes required to existing software may be a problem now, but, at the same time, these changes bring the 4032 to a closer compatibility with the 8032 model. Features such as repeat keys, scroll up and down, bell, and more are available.