[Comp.Sci.Dept, Utrecht] Note from archiver<at>cs.uu.nl: This page is part of a big collection of Usenet postings, archived here for your convenience. For matters concerning the content of this page, please contact its author(s); use the source, if all else fails. For matters concerning the archive as a whole, please refer to the archive description or contact the archiver.

Subject: COMP.SYS.CBM: General FAQ, v3.1 Part 7/9

This article was archived around: 5 Apr 1998 00:01:13 -0800

All FAQs in Directory: commodore/main-faq
All FAQs posted in: comp.sys.cbm
Source: Usenet Version

Archive-name: cbm-main-faq.3.1.p7 Comp-answers-archive-name: commodore/main-faq/part7 News-answers-archive-name: commodore/main-faq/part7 Comp-sys-cbm-archive-name: main-faq/part7 Version: 3.1 Last-modified: 1996/01/25
--------------------------------------------------------------------------- Table of Contents (for this file) --------------------------------- 10. Emulators 10.1. What is an emulator? 10.2. What platforms do 64 emulators exist on? 10.3. What platforms do 128 emulators exist on? 10.4. Are any other Commodore computers emulated? 11. Troubleshooting 11.1. What do I do for my ill disk drive? 11.2. What do I do for my ill computer? 11.2.1. What do I do for my ill Commodore 64? 11.2.2. What do I do for my ill Commodore 128? 11.3. What do I do for my ill keyboard? 12. Modifications and Cabling 12.1. How can you alter which side a 1571 reads from? 12.2. How do I open a C128 power supply? 12.3. How do I make a cable to hook my CBM 1902A to my 64 or 128? 12.4. How do I build a simple RS-232 interface cable? 12.5. How do I build a 2400/9600 bps RS-232 interface cable? 12.6. How can I determine how much VDC video memory is in my C128? 12.7. How do I build a GEOCable interface? + 12.8. How do I connect my Commodore printer to an IBM PC? --------------------------------------------------------------------------- 10. Emulators As time moves on, people move to other computer systems, for business resons or otherwise. However, many still long to play Commodore games, use Commodore software, and enjoy Commodore demos. Thus, emulators were born to bring the non-Commodore computer owner the enjoyment of owning a Commodore. 10.1. What is an emulator? An emulator is a piece of software that runs on a given platform and emulates, or mimics, the operation of another machine. When the emulator loads up a program, the programs runs as though it were running on the emulated platform. | For more information on emulators and their use, please see The Commodore | emulator FAQ, maintained by Ken Gifford (tsrken@voicenet.com). It | can also be found on Jim Brain's MAILSERV server (See Section 6.5.2 for more | information). For those with WWW browsers, the CBM Emulation FAQ is at: | http://www.hut.fi/~msmakela/cbm/faq/ 10.2. What platforms do 64 emulators exist on? 64 emulators exist on the following machines: Amiga IBM Atari ST Macintosh UNIX 10.3. What platforms do 128 emulators exist on? There is a very basic Commodore 128 emulator bundled available for the UNIX platform under X. It is bundled with X64. 10.4. Are any other Commodore computers emulated? There is a commodore product called the PET emulator that remaps a Commodore 64 to emulate a PET 40 column unit (i.e. PET 4032). You can run this program on a C64 to emulate a PET, or you can run this program | on a 64 emulator to emulate a PET on an IBM, for example. + As for VIC-20 emulators, one exists for the Amiga, and there is a program + similar to the PET Emulator that allows a C64 to emulate a VIC-20. For the + UNIX OS, one called VICE is available for machines with X Windows. Contact + Andre Fachat (a.fachat@physik.tu-chemnitz.de) for more information. The + emulator is at: http://www.tu-chemnitz.de/~fachat/ + For the MS-DOS platform, a program called V20 is available at: + http://shell.ihug.co.nz/~be/vic.htm + For more information on this emulator contact Bryce Ewing at + be@ihug.co.nz. Although not necessarily a different Commodore computer, there is a GEOS emulator in the works. It is called GEOS Warp v1.0 and information is available at http://stud1.tuwien.ac.at/~e9426444/geoswarp/index.html. A version for the Apple PowerMac is in the alpha stage, and support for a PC version. Plans for a UNIX/X11 version are still unclear. The author is Andreas Varga, and can be contacted at e9426444@stud1.tuwien.ac.at. + VIC-20 Emulator for DOS + Paul Robson (Author) + autismuk@aol.com (Internet Contact) + http://users.aol.com/autismuk/vic20.zip (WWW URL) 11. Troubleshooting 11.1. What do I do for my ill disk drive? If the drive spins and the LEDs are off: At the back of the 1541 circuit board are two bridge rectifiers - stout epoxy packages with 4 leads each. The innermost one is defective If both LEDs are dim: The 5VDC regulator is bad. If both LEDS are on: Drive did not make it through the power-on reset sequence. Kernal ROM (901229-05) is susepct, as is (in order of expectation): VIA (6522), CPU (6502), RAM (6116 or equivalent), or a "glue" chip in the reset logic If your drive won't even accept input from the computer, and the drive light is making some blinking pattern, then the drive may be telling you what is wrong. No Blink Kernal (E000-FFFF) ROM or 6522 VIA Failure One Blink 6116 RAM Failure Two Blinks Possible Zero Page RAM Failure Three Blinks DOS (C000-CFFF) ROM Failure Four Blinks DOS (C000-CFFF) ROM Failure Five Blinks 6116 RAM Failure Six Blinks 6116 RAM Failure | Six Blinks 2114 RAM Failure at c4 or c5 (8050) Seven Blinks 6116 RAM Failure Eight Blinks 6116 RAM Failure 1541 The most common problem facing the 1541 disk drive is alignment. If your 1541 has trouble reading commercial disks, or reading disks written some time ago, but has less trouble reading recently written disks, chances are that your 1541 is out of alignment. C= service centers will typically align a 1541 for anywhere from $20 to $45. There are also 1541 alignment programs, (e.g. Free Spirit's "1541/71 Alignment System") which allow you to align a 1541 yourself. There are those who claim that this does not produce good results, but there are others who claim to have had satisfactory results with these programs. There were a couple of articles in COMPUTE Gazette and I think RUN on how to do this. The real problem is mechanical in nature and can be over come. Other products are PHYSICAL EXAM 1541 and 1571 versions. + All but the very earliest 1541 units can accomodate either a 1541 ALPS + mechanism or a newer Newtronics mechanism. Keep that in mind when + swammping mechanisms. 1571 The C=1571 drive is normally a double sided drive. However, it can also emulate a 1541 and read single sided disks. Some of the earlier 1571's had older system chips (ROMs) which caused a couple of problems. One, these older drives were typically very slow when writing to the back side of a disk. Two, it would take these drives ~30 seconds to go into single sided mode. To check your ROM version, read the error channel of the disk drive right after startup. On the 128, just PRINT DS$. On the 64, use: 10 open15,8,15:input#15,a,a$,b,c:close15:printa,a$,b,c | Run the program; if the message says v3.1, you have the newer ROM. | If it has a version 3.0 or older, you have the older ROM. One problem that might occur is not having the head close enough to the disk as required because of the light tension of the spring that pulls the head down. Somewhere I remember that there was supposed to be a replacement part. However, one of the alignment programs suggesting using pennies to weight it down and lo and behold it started working. 1581 The C=1581 drive is a 3.5" drive that uses DSDD 800K disks. It is compatible with both the C64 and C128, although some programs will not work correctly with the 1581. A small number of 1581's were shipped with an early version of a controller chip which has problems with some software. 11.2. What do I do for my ill computer? At times, every computer must be serviced. As the parts supply of Commodore equipment dwindles, servicing becomes harder. However, there are many sources in Section 16.2 that can service your Commodore machine, and here are some things you can do to service it yourself. If the screen is garbled, but BASIC seems to be limping along, and any command is met by an error, RAM could be bad. You can look at bit patterns on the screen by determining screen codes for garbage characters. only bit 4 (32) should be on. After you determine which bits, here is the bit->IC mapping: Bit 7 (128) : U12 Bit 6 (64) : U24 Bit 5 (32) : U11 Bit 4 (16) : U23 Bit 3 (8) : U10 Bit 2 (4) : U22 Bit 1 (2) : U9 Bit 0 (1) : U21 A common problem with the C-64 is it's power supply. The C64 power supplies are not especially powerful, and have this disturbing tendency to fail. If your computer stops working, first check the power supply. Replacement power supplies can be obtained from a number of mail order places (e.g. Tenex, Parsec, Inc.). Additionally, several places advertise "heavy-duty" power supplies that come with warranties, and give the C64 enough power to run a REU. If your power supply goes, it can sometimes take other parts of the computer with it. If your power supply has died, but the C64 continues to fail with a known working power supply, it is likely that a few of your chips got fried. Also, another common problem with the C64 is the fuse inside the computer. If the system power on light comes on, but you get a blank screen, suspect the fuse. It is usually blown by misinsertion of devices into the computer. + According to the official Commodore Diagnostician II Reference Chart + released September 1989: + " intermittent blank screen or graphics " are caused by: + Bad power supply + Failed 6510 Microprocessor Chip + Failed 6567 VIC NTSC (6569 PAL) Chip + Failed 82s100 Programmable Logic Array Chip (PLA) + Failed 901226 Basic ROM Chip + Failed 4164 Memory RAM + The PLA chip is 40% responsible for all full screen failures. 11.2.2. What do I do for my ill Commodore 128? Like the 1571, the C-128 has an older ROM and a newer ROM. The differences between the two are less serious than is the case with a 1571. The easiest way to tell the difference is to click down the CAPS LOCK key and hit Q while in BASIC direct mode. If you see a lower case q, then you have an older ROM. If you see an upper case Q, then you have a newer ROM. New ROMs | can be ordered from (e.g. Paxtron Corporation) for about $25. The ROM | chips in the 128 are all socketed, so replacing the chips is relatively | easy. 11.3. What do I do for my ill keyboard? Clean it: Materials you will need: Denatured (rubbing) alcohol, a clean pencil eraser, cotton swabs, a small Phillips head screwdriver, a jewellers size Phillips screwdriver, a solder iron of some type, and a Commodore 64 computer keyboard. Procedure: 1. FIRST AND FOREMOST. Make certain that you have discharged any static electricity in your body by grounding yourself to something like a cold water pipe. Otherwise, you could blow chips in your computer if you were to touch the wrong things. 2. Turn off your computer and unplug any and all cords and connectors, fast-loaders, modems, etc. (just have yourself a naked (if you will excuse the expression) computer). 3. Thoroughly clean all external connectors and ports with the swabs and alcohol. Also, clean all plugs that go into those ports. If the problem you had persists, proceed with the following: 4. On a clean surface, turn your key-board upside-down. Remove the screws in the bottom. 5. CAREFULLY, separate the two halves about an inch. Unplug the connector to the "power" LED on the top of the C-64. 6. Place the two halves flat so that the keyboard is facing you. The two halves will be connected by a wire harness. This harness may be held down by tape that must be removed in order to place the unit flat. 7. Remove the 15 or so brass screws that hold the circuit board under the keyboard. 7a.Unsolder the wires going to the shift-lock key. 8. Turn the circuit board over. You will see the bottom of the keyboard with a rubber "U" under each key, which makes contact with the board. You will also see on the circuit board, a pair of gold contacts for each key on the C-64. 9. CAREFULLY wash ALL the rubber "U"'s and the gold contacts with the swabs and rubbing alcohol. Allow the alcohol to DRY. 10.Gently, clean each gold contact with the eraser. BRUSH AWAY THE ERASER CRUMBS (I use a small hand-held, battery-powered vacuum cleaner). 11.Re-clean the gold contacts with the swabs and alcohol to ensure that you have removed ALL traces of the eraser. 12.Reassemble the C-64 in the reverse order of disassembly. 12. Modifications and Cabling As time wears on, many Commodore owners are turning to themselves to manufacture small interfaces, modify their systems, and perform other enhancements. Here are some common things the user can construct himself or herself. 12.1. How can you alter which side a 1571 reads from? On a 128, you can force the 1571 to go into single sided mode with the drive command "u0>m0". (Issue such a command with open15,8,15,"u0>m0":close15.) On the 64, a 1571 defaults to single sided mode, but you can convert it to double sided mode (and read full double sided disk in 64 mode) with the drive command "u0>m1". While in single sided mode, you can actually format both sides of the disk as separate file systems. The command "u0>h0" selects the regular side of the disk, and "u0>h1" selects the flip side of the disk. Note that the flip side, when formatted this way, cannot be read by a 1541; neither side will be readable by a 1571 when the disk is inserted upside-down. 12.2. How do I open a C128 power supply? First, unplug both leads running from the power supply and turn it upside down. Locate four (4) small circles in the bottom; two are in the corners and two in the other end a bit nearer each other. Find some sharp tool, e.g. pin or nail. In turn, poke it inside each of the cirles, firmly, and pull the caps off gently. They'll come out easily. Breaking the caps should not matter, but there is no need to destroy the casing in process. Unsrew the 4 Phillips headed srews with an appropriate tool. Notes: This does not apply to the C64 brick! Some 128 power supplies do not have rubber feet; rather, they have "L"- shaped extensions on the casing. The caps on these extensions are not made of rubber, but can be removed. 12.3. How do I make a cable to hook my CBM 1902A to my 64 or 128? Here is the diagram used to make a replacement Chroma / Luminence 40 column cable, that the 1902A uses, to connect to the 64 or 128. _______ ________ / 3 \ 1. Not Used / 2 \ *1. Luminance / 2 4 \ *2. Audio / 4 5 \ *2. Ground ! ! *3. Ground ! ! *3. Audio out ! 6 ! *4. Chroma ! 1 6 3 ! 4. Video out ! ! 5. Not Used ! ! 5. Audio in \ 1 5 / *6. Luminance \ 7 8 / *6. Chroma \____n____/ \____n____/ 7. Not used 8. Not used 1902A 64/128 * Actually used 12.4. How do I build a simple RS-232 interface cable? Here are a couple of different interface ideas, and another can be found at ftp://ftp.funet.fi/pub/CBM/documents/rs232.txt Using MAX-232 IC: Userport C64 C64 RS232 _________ | | PA2 M-----------11-| |-14------------------- TXD (2) PB1 D-----------10-| |--7------------------- RTS (4) PB6 K-----------12-| MAX 232 |-13------------------- CTS (5) FLAG2 B---X--------9-| |--8------------------- RXD (3) PB0 C---| | |--3--|+-| VCC 2-----------16-| |--1-----| DB25-connector GND N------X----15-| | X--|+-2-| |--5--|+-| X--+|-6-|_________|--4-----| | |---------------------------------------- GND (7) -|+- capacitor 22uF/16V - + Using Transistors: RS-232 interface <Transistors are 2n2222> <24 pin edge connector> N <-----------------------+-----------+ / ! 22k !-!>+ ! M <----/\/\/--------! ! !---+ ! 1k \ ! <male db25 connector> 2 <----/\/\/--------------+------------>-------------------> 2 ! +-----------------+ \ +<!-! 22k !---------------/\/\/------------> 8 +---! / H <-----------------+ E <--------------------------------------------------------> 20 C <---+ ! B <---+-------------+ \ +---! 22k !---------------/\/\/------------> 3 +<!-! / A <-----------------+--------------------------------+-----> 7 ! +-----> 4 ! +-----> 1 If you are having problems with this circuit as it stands, you may wish to modify it in this way to reverse the clock signal: Disconnect the emitter and collector on the middle transistor of the diagram (the one that goes to the H line on the computer side) Connect the collector to pin 2 on the 24 pin edge connector (the 5v Vcc line), connect the emitter to pin H on the same connector, then connect a 1k ohm resistor to the same pin H and the other end of the resistor to pin N or A. 12.5. How do I build a 2400/9600 bps RS-232 interface cable? A new programming technique makes it possible to acheive 9600 bps on an | unexpanded Commodore 64 without the use of a Swiftlink cartridge. Daniel Dallmann of Germany is the originator of this technique and is currently writing modem drivers for some of the popular C64 terminal emulation programs to take advantage of this new technique. The interface described below is a little more complex than the one in Section 12.4, but has many advantages: * The interface generates proper EIA232 (RS-232) voltage levels. The one in Section 12.4 relies on the ability of most newer RS232 equipment to handle lower voltages. * The following interface can be used as a direct replacement for the | interface in Section 12.4, and will work will all most telecommunications programs at up to 2400 bps, while providing the necessary interfacing to allow suitably equipped applications to | operate at up to 9600 bps. (Some programs needing DCD and DTR lines | may have problems.) * if you currently own a normal RS232 interface, that interface can be modified to incorporate the new interfacing for 9600 bps operation. (in some cases one line of the old interface has to be disconnected, see note **1 ) 9600 bps is the maximum limit this type of technique due to the timing limitations of the C64. The delay between the activation of the NMI-handler and the falling edge of rxd is too long. The handler must be called in less than 100 cycles. That's no problem at 9600 bps, but for 19200 baud (the next higher baud rate), you have only 50 cycles, and that's impossoble (because of VIC-DMA ). On a C128 in fast mode 38400 baud may be possible, but I don't have a C128, so someone else has to try it out. Schematic of a very simple RS232-Interface: userport MAX232 rs232 9pin 25pin +----------+ ! ! (C) pb0--+ ! ! ! ! /! ! (B) flag2--*--------------------O< !--------- rxd 2 3 ! 9! \! !8 *7* sp2--+ ! ! ! ! *6* cnt2--+ ! ! ! ! ! *L* pb7--+ <NOTE **1!> ! ! ! !\ ! (M) pa2--*--------------------! >O--------- txd 3 2 ! 11! !/ !14 *5* sp1--+ ! ! 74ls00 ! ! +-----+ ! ! ! ! ! !\ ! (D) pb1-*------>O-------------! >O--------- rts 7 4 ! 1! !3 10! !/ !7 +----! ! ! ! 2! ! ! /! ! (K) pb6--------O<-----*-------O< !--------- cts 8 5 6! !4 ! 12! \! !13 ! !--+ ! ! (1) gnd------! !5 ! !--- gnd 5 7 7! ! ! !15 (2) +5V------! ! ! ! (dsr 6 6) 14+-----+ ! ! ! ! (dcd 1 8) ! ! ! ! (dtr 4 20) c2 ! !+ ! ! | (2) +5v------------! !-----! ! (ri 9 22) ! ! 2! ! ! ! c4 +! ! ! ! (1) gnd------------! !-----! ! ! ! 6! ! ! ! c1 ! !+ ! ! +-! !-----! ! ! ! ! 1! ! ! ! ! +---------! ! 3! ! c3 ! !+ ! ! +-! !-----! ! ! ! ! 4! ! ! ! ! +---------! ! 5! ! ! ! (1) gnd--------------------! ! 15! ! ! ! (2) +5V--------------------! ! 16+----------+ (x) - connections required for a normal RS232-Interface. *x* - additional connections to go up to 9600 baud. | remark: The MAX232 needs 4 capacitors to generate +/- 10 volts to | drive the RS-232 unit. The values are as such: (in uF) | IC C1 C2 C3 C4 | ------- --- --- --- --- | MAX232 1.0 1.0 1.0 1.0 | MAX232A 0.1 0.1 0.1 0.1 | MAX232E 1.0 1.0 1.0 1.0 notes : **1 Some other interfaces use this pin. In that case you have to cut the connection and change it to new way. PB7 is normally used to receive the DSR (Data Set Ready) signal from the modem, but this signal isn't supported by all terminal programs. Because of the new wiring DSR will seem to be active to all 'old' programs, so that there won't be any troubles. Top view of the used ICs: 74 LS 00 MAX232 +------+ +------+ inA -!1 \/14!- vcc +cap1 -!1 \/16!- Vcc inA -! !- inC +cap2 -! !- GND outA -! !- inC -cap1 -! !- RS232/txd inB -! !- outC +cap3 -! !- RS232/cts inB -! !- inD -cap3 -! !- TTL/^cts outB -! !- inD -cap4 -! !- TTL/txd gnd -!7 8!- outD RS232/rts -! !- TTL/^rts +------+ RS232/rxd -!8 9!- TTL/rxd +------+ 4 X NAND 2 X RS232 transmitter 2 X RS232 receiver user port (view on C64s backside) 1 2 3 4 5 6 7 8 9 10 11 12 (top) ------------------------------------ A B C D E F H J K L M N (bottom) 1 - GND A - GND 2 - +5V B - ^flag2 3 - ^reset C - pb0 4 - cnt1 D - pb1 5 - sp1 E - pb2 6 - cnt2 F - pb3 7 - sp2 H - pb4 8 - ^pc2 J - pb5 9 - atn in K - pb6 10- 9V AC L - pb7 11- 9V AC M - pa2 12- GND N - GND 12.6. How can I determine how much VDC video memory is in my C128? Here are two ways to detect whether the C128 VDC chip has 16kB or 64kB of RAM. 1 rem fred's nifty program to determine size of 8563 dram 5 w=dec("cdcc"):r=dec("cdda") 10 bank15: ad=dec("d600"): da=ad+1 :rem setup ml 20 pokead,28: s=peek(da): pokeda,63 :rem select 64k 30 i=16896: sysw,i/256,18:sysw,iand255,19:sysw,85,31 :rem write $55 40 i=16896: sysw,i/256,18:sysw,iand255,19:sysr,,31:rregc1 :rem read here 50 i=17152: sysw,i/256,18:sysw,iand255,19:sysr,,31:rregc2 :rem and here 60 i=16896: sysw,i/256,18:sysw,iand255,19:sysw,170,31 :rem write $aa 70 i=16896: sysw,i/256,18:sysw,iand255,19:sysr,,31:rregc3 :rem read here 80 i=17152: sysw,i/256,18:sysw,iand255,19:sysr,,31:rregc4 :rem and here 90 pokead,28: pokeda,s:sysdec("ff62") :rem restore 16/64k 95 print chr$(14)chr$(147) 100 if c1=c2 and c3=c4 then print "16K": else print"64K" :rem did it echo? 110 end or: POKE DEC("D600"),28:POKE DEC("D601"),63:SYS DEC("FF62"):SCNCLR If you have 16k the screen will fill with zeros; 64k will give you a ready prompt. 12.7. How can I convert my C64 to run on battery power? The July, 1990 issue of 73 Amateur Radio has an article on converting the C64 and 1541 to run on DC power. I'll summarize the C64 portion: DC Power Conversion for the C64 1. Locate component CR4 on the circuit board. Mark the positive hole on the board. Desolder and remove the component. 2. Rest :-) 3. Connect the marked hole to +12V. 4. Desolder and remove VR1. Looking down at the component side of the board, connect a wire from the vacant right hand hole and run it to +12V. 5. Locate L5. It will probably be in one of two locations. On the older version, desolder the right hand leg and lift. On the newer version, desolder the top leg and lift. 6. Connect +5V to the empty L5 hole. 7. Locate the R37 and R100 pads. Use a continuity meter to find the pads that are connected. Desolder and lift these legs. You will insert a 60 Hz clock here. 8. You could generate this clock using a variety of methods. Here's one: +12V __________________________| | | | C1 R1 ______|_______ |-)|-+-/\/\/-+-----|6 8 | | | \ | | | XTAL1 / R2 | MM5369 | | | \ | | |-)|-+-------+-----|5 1|---> 60 Hz (to R37 pad) C2 | 2 | --------------- | GND C1 = 30 pF C2 = 3-15 pF (variable) XTAL1 = 3.57 MHz crystal R1 = 1k R2 = 10M It is suggested that you use a short length of shielded coax cable to connect the 60 Hz output to the R37/R100 pad. Also, it is suggested that you use a frequency counter to tune the above circuit to exactly 60 Hz. This conversion would work well if you wanted to use the C64 in a car or powered by a solar set-up. 12.7. How do I build a GEOCable interface? The interface is simply a cable between the printer and the user port. The pinout is as follows: pin on 64 pin on printer a Ground 33 Grond b Flag 2 11 Busy c PB0 2 Data 1 d PB1 3 Data 2 e PB2 4 Data 3 f PB3 5 Data 4 h PB4 6 Data 5 j PB5 7 Data 6 k PB6 8 Data 7 l PB7 9 Data 8 m PA2 1 Strobe n Ground 16 Ground Superscript uses the same cable, but has the following change: b Flag 2 10 Acknowledge Either wiring will work with either program, but the GEOCable wiring is preferred. + 12.8. How do I connect my Commodore printer to an IBM PC? + Look for the plans for the interface at: + http://www.coast.net/simtel/msdos/info/c64topc.zip -- Jim Brain, Embedded System Designer, Brain Innovations, Inc. (BII) (online sig) bii@mail.jbrain.com "Above views DO reflect my employer, since I'm my employer" Dabbling in WWW, Embedded Systems, Old CBM computers, and Good Times! -Me- BII Home: http://www.jbrain.com CBM Info: http://www.jbrain.com/vicug/