PET prog. Conversions to Fat-40 models.

From: Larry Anderson (
Date: 1999-10-25 02:10:02

This request was posted in another maillist but since Etahn and I subscribe to
this one (which is more appropriate), I am posting it here:

Ethan Dicks Wrote:
> --- Larry Anderson <> wrote:
> > I found an article on one of my COMPUTE!s from ebay about conversion to fat
> > forty telling of the no-no locations in the map (the article stated as of the
> > fat 40 the 2nd cassette is no longer functional.)
> Cool.  I could really use a copy (but it's not a big hurry... I've got bugs
> to fix on the MDL port of Zork before I can justify spending time on the
> CBM port of Zork I.)

"Converting To Fat-40"

Joe Ferran Commodore Canada 
>From COMPUTE! October 1981

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. 

Level 1
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: 

1) get the program into memory (don't execute)
2) SYS to the monitor (SYS 4)
3) display hex $03E9-03F9
4) 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]
5) 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. 

Decimal location 151 of ten 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. 

 @   15   64
 C   31   67
 F   39   70
 I   53   73
 L   44   76
 O   60   79
 R   55   82
 U   61   85
 X   24   88
 1   26   49
 4   42   52
 7   58   55
 0   10   48 
 A   48   65
 D   47   68
 G   46   71
 J   45   74
 M   29   77
 P   52   80
 S   40   83
 V   23   86
 Y   54   89
 2   18   50
 5   34   53
 8   50   56 
 B   30   66
 E   63   69
 H   38   72
 K   37   75
 N   22   78
 Q   64   81
 T   62   84
 W   56   87
 Z   32   90
 3   25   51
 6   41   54
 9   57   57 

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

Level 2
BASIC Programs With Machine Language Utilitles
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. 

Level 3 Machine Language Programs

This will be the most dif'ficult 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: 

1) Use Supermon or Extramon to locate any absolute occurrences of memory
addresses from $03E9-$03f9 and reassign new values.
2) Check hi-low tables for references to the same address locations and, if
any, reassign new values.
3) Seek all immediate operations involving hex $03 and $E9-F9...if any, look
at code where occurrence takes place and evaluate.
4) 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. 

01000011 01001111 01001101 01001101 01001111 01000100 01001111 01010010 01000101
  Larry Anderson - Sysop of Silicon Realms BBS  (209) 754-1363  300-2400 baud
      Commodore 8-bit page at:
01000011 01001111 01001101 01010000 01010101 01010100 01000101 01010010 01010011
This message was sent through the cbm-hackers mailing list.
To unsubscribe: echo unsubscribe | mail

Archive generated by hypermail 2.1.1.