User`s guide

Page 13
www.commodorefree.com
NEWS
DIAG264
DIAG264 is a system to search for defects in a Commodore
C16, C116 or Plus/4 computer. The system consist of a special
cartridge and several loop back connectors. With this system
you can test the following parts: RAM, ROM, I/O of the CPU
and TED registers. On the DIAG264 web page you can find a
very comprehensive manual how to test your computer
DESCRIPTION FROM THE WEBSITE
The design and operation of Diag264 is modelled closely on
the operation of the cartridges available for the 64/128 and
VIC-20. One of the aspects that I was most keen to copy was
the functionality of the Dead Test Cartridge of the 64. The
primary use of this cartridge was to find RAM issues in a
machine that otherwise appeared dead.
The majority of Commodores 8-bit offerings used DRAM chips
in either a 64k x 1 or 16k x 4 configuration. This usually meant
that any dead RAM chip would make the machine completely
inoperable, as the zero page ($0002-$00FF) and stack ($0100-
$01FF) are rendered practically unusable. The kernal start-up
routines in both the 64 and 264's make extensive use of the ZP
and implicitly rely on the stack upon the first execution of an
RTS instruction! This presents a problem for any normal
cartridge based diagnostic tool because we are dependent on
the kernal to hand over control to the cartridge ROM. The
Dead Test cartridge avoids this problem by making use of the
64's rarely used Ultimax mode, which enables an external
cartridge ROM to replace the Kernal of the host machine and
therefore bypass the normal start-up routines, making it a
superior tool for identifying RAM problems on an otherwise
‘dead’ system.
The 264 architecture does not include any way of auto-booting
into an external ROM without trying to pull some dirty tricks
with the address lines. So it becomes a trade-off between the
conveniences of a cartridge versus the extra benefits of
booting straight into the diagnostic. Not being a fan of
compromise, the Diag264 ROM can be compiled for either
cartridge or kernal.
The kernal option is a simple drop in replacement of the kernal
ROM, which is the 28-pin ROM chip with the identifier
beginning with 318004 (PAL) or 318005 (NTSC.) The cartridge
option involves sacrificing a standard commercial Commodore
C16/Plus cartridge (I used Strange Odyssey) unless you are
lucky enough to have a supply of cartridge blanks. You will
need to remove the ‘low’ ROM and install a 28-pin DIL socket
in its place, as seen in my cartridge in Figure 1.
The TED chip itself supports both NTSC and PAL standards,
controlled by bit 6 of register 7. NTSC and PAL machines
therefore have slightly different kernals to correctly set the
state of this bit, and also some other small modifications to
take into account timing differences. When running from a
cartridge, DIAG264 could query the installed kernal to
determine whether it should be running in NTSC or PAL mode.
This could be done by checking the value of $F33F which
contains the default for TED register 7. As of version 0.2B, this
is not implemented, and it is not possible at all when running
from a kernal replacement. For this reason I have made both
NTSC and PAL versions of DIAG264 available.
http://inchocks.co.uk/commodore/Diag264/HTMLManual/Dia
g264.htm
Figure 1 - Cartridge Mod