Clock Problem

Started by Andrew Wiskow, December 21, 2007, 08:53 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andrew Wiskow

I discovered an interesting oddity with the 64 mode on my C128, and I'm wondering if anyone here might be able to explain what's happening.  I decided to set up a sort of "demo BBS" running Ivory BBS software so that people who are interested can see what that software is like (the address is cottonwood.servebbs.com:6400).  I initially set up the BBS on a C128 in 64 mode.  However, after having it up for a day or two, I noticed that the clock on the BBS was going haywire and not keeping correct time.  I switched the setup to run on a C64c, and the problem went away, and the BBS now keeps very accurate time.  Any ideas as to what's causing this?  Is there a method of timekeeping on a 64 that the 64 mode on a C128 doesn't support?

-Andrew
Cottonwood BBS & Cottonwood II
http://cottonwood.servebbs.com

airship

Does it use a CIA timer? Is your C128 6526 'iffy'?
Serving up content-free posts on the Interwebs since 1983.
History of INFO Magazine

Andrew Wiskow

Quote from: airshipDoes it use a CIA timer? Is your C128 6526 'iffy'?
I don't think my 6526 is "iffy"... I mean, I've never noticed any other problems with it...  But I suppose to thoroughly troubleshoot, I ought to test this "issue" on another C128.  Thanks for the tip.  :)

-Andrew
Cottonwood BBS & Cottonwood II
http://cottonwood.servebbs.com

Andrew Wiskow

Okay... Here's the latest...  I swapped the C128's that run the two BBS's that I have set up right now.  The one that runs Cottonwood BBS on All American 128 has always had a good clock.  But when I set up that one to run Ivory in 64 mode, it had the same problem.  And when I set up the other one that was having problems to run All American 128, it worked just fine.  Oh well... It's better off running on the 64c anyway.  ;)

-Andrew
Cottonwood BBS & Cottonwood II
http://cottonwood.servebbs.com

Golan Klinger

Do you have access to a diagnostic cartridge and harness?
Call me Golan; my parents did.

Blacklord

Quote from: wiskowOkay... Here's the latest...  I swapped the C128's that run the two BBS's that I have set up right now.  The one that runs Cottonwood BBS on All American 128 has always had a good clock.  But when I set up that one to run Ivory in 64 mode, it had the same problem.  And when I set up the other one that was having problems to run All American 128, it worked just fine.  Oh well... It's better off running on the 64c anyway.  ;)

-Andrew
That points at Ivory as the problem.

Lance

Andrew Wiskow

Quote from: gklingerDo you have access to a diagnostic cartridge and harness?
No.  I don't even know what that is...  Care to enlighten me?  ;)

Quote from: adminThat points at Ivory as the problem.
Of that I'm certain...  I just wonder what sort of method it is that Ivory uses to keep time that works flawlessly on a 64, but doesn't work on a 128 in 64 mode.  Too bad I've had no luck at tracking down Bill Jackson, the author of Ivory BBS.  Maybe I should try writing a letter to the PO Box address that's listed in the documentation and see if he still owns it.  :)

-Andrew
Cottonwood BBS & Cottonwood II
http://cottonwood.servebbs.com

RobertB

Quote from: wiskowNo.  I don't even know what that is...  Care to enlighten me?  ;)
I have a couple of diagnostic carts and harnesses in storage.  I can bring them to the Commodore-Amiga Network (CAN) meeting in January, and you can try them out.

Truly,
Robert Bernardo
Fresno Commodore User Group
http://videocam.net.au/fcug
The Other Group of Amigoids
http://www.calweb.com/~rabel1/

Golan Klinger

Quote from: wiskow
Quote from: gklingerDo you have access to a diagnostic cartridge and harness?
No.  I don't even know what that is...  Care to enlighten me?  ;)
The cartridge contains a diagnostic program that tests all the various chips in a 64 or a 128 and the harness connects to the all the ports and allows the program to send and receive signals through those ports to make sure everything is operating as intended. Basically it's a quick and easy way to ascertain whether or not your hardware is at fault and if it is, where the fault lies.

Take Robert up on his offer. Hook one up and see what happens. It sounds like your problem is software but it never hurts to be thorough. If nothing else, it's cool to see it go through the diagnostic.
Call me Golan; my parents did.

Andrew Wiskow

Thanks for the explanation, Golan.  That'd be a cool device to have.  :)

A bit off-topic, but there's a simiar sort of device up on eBay right now, only it's for the 1541 disk drive:  http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&rd=1&item=200186111338

-Andrew
Cottonwood BBS & Cottonwood II
http://cottonwood.servebbs.com

Andrew Wiskow

Quote from: RobertBI have a couple of diagnostic carts and harnesses in storage.  I can bring them to the Commodore-Amiga Network (CAN) meeting in January, and you can try them out.
Thanks, Robert.  I'll gladly take you up on that offer.  :)

-Andrew
Cottonwood BBS & Cottonwood II
http://cottonwood.servebbs.com

Golan Klinger

The cartridge with the diagnostic software is dead easy to reproduce. I can send you the ROM dumps and then you can burn the software to an EPROM and swap out the ROM from an old cartridge. Better yet, get one of Mangelore's wicked FB512s and you're set. You can also buy a "reproduction" from one of the eBay cloners.

The harness is a little harder to come by. :(
Call me Golan; my parents did.

Andrew Wiskow

I did some more troubleshooting with this problem over the past few days.  The C128 that I was running in 64 mode and had clock problems with Ivory BBS has been running AA BBS in 128 mode just fine.  The 128 that was running AA BBS, that I thought had the same problem in 64 mode with Ivory, actually doesn't.  It works just fine...  I think I may have got the 128's mixed up at one point, so I thought I was having the same problem with both...  Anyway, this would seem to point to a bad 6526 in one of my 128's, as Airship suggested.  So my question now is this:  If I only use this 128 with a bad 6526 in 128 mode, will I have any problems?  In other words, does the 128 make any use of the 6526 in 128 mode?  Or is it only used in 64 mode?

-Andrew
Cottonwood BBS & Cottonwood II
http://cottonwood.servebbs.com

airship

Both 6526's are used in both modes for various things. The system uses them for keyboard scanning, user port activity, and such. So do individual programs - for example, your BBS program that uses one for its real-time clock.
Serving up content-free posts on the Interwebs since 1983.
History of INFO Magazine

Mangelore

Hi Andrew,

The CIA chip in location U4 interfaces to the floppy serial port and the User port. The CIA at U1 interfaces to the keyboard. I assume that your keyboard and drive works fine?

Pin 19 on both CIA chips is the TOD (Time Of Day). It receives a 50Hz or 60Hz pulse (depending on the country) from the C128 9V AC power supply. Have you tried swapping power supplies?

Cheers
Fotios

hydrophilic

The baud rate generator is a CIA#2 timer in both modes.  The cassette tape is driven by a CIA#1 timer in both modes.

In 64mode only, a CIA#1 timer is used for system interrupts (the C128 uses VIC).

In 128mode only, a CIA#1 timer is used for burst mode transmission (the C64 doesn't have burst mode).

Edit
The TOD is not used in either CIA in either 64 or 128 mode, by the operating system.  You're BBS software may use a TOD however.

Andrew Wiskow

Thanks to everyone for all the great responses.  I'm always eager to learn new things, even if I may not comprehend everything fully.  ;)

The C128 that was not working in 64 mode with Ivory BBS has been working fine in 128 mode with AA BBS 128 for several days now.  I have not noticed any other problems with it.  I'm going to take Robert Bernardo up on his offer to borrow his diagnostic cartridge and harness, and I'm hoping that will help me to determine once and for all exactly what is wrong with this 128.  If it's simply a matter of a bad CIA chip, then I have several spares that I can swap it out with, so that's no big deal.  For a computer that's 22 years old, it's not surprising that a chip goes bad every now and then.  In fact, I think I've been pretty lucky with the hardware I have that it hasn't failed on me more!  Hopefully saying that out loud doesn't jinx me!  ;)

-Andrew
Cottonwood BBS & Cottonwood II
http://cottonwood.servebbs.com

RobertB

Quote from: wiskowI'm going to take Robert Bernardo up on his offer to borrow his diagnostic cartridge and harness, and I'm hoping that will help me to determine once and for all exactly what is wrong with this 128.
We have plenty of flat C128s in storage, if you need another keyboard, Andrew.

Truly,
Robert Bernardo
Fresno Commodore User Group
http://videocam.net.au/fcug
The Other Group of Amigoids
http://www.calweb.com/~rabel1/

airship

My two flat C128s are both flaky, in ways that make me suspect at least one bad 6526 in each. But like you, I've got a half dozen C64s in the garage, so if I ever get around to running diagnostics, I can probably get them running.

I wish Western Design Group still made 6526s. They still make 6522s.
Serving up content-free posts on the Interwebs since 1983.
History of INFO Magazine

Andrew Wiskow

Quote from: RobertBWe have plenty of flat C128s in storage, if you need another keyboard, Andrew.
PM sent.  :)

-Andrew
Cottonwood BBS & Cottonwood II
http://cottonwood.servebbs.com

maraud

I'd love to learn about the ultimate resolution to this problem as the same behavior happened to my my 64C running Color64 7.37.  After a lightening strike, I took it yo a commie shop back in the day and they replaced the board and moved all of this chips,  Viola, it now powered up but it couldn't keep time.  They swapped a few other chips and gave up...  I washed it as a game only 64 at that point an officially moved to 8088 (after dumping $500 for a CMD40, and over $200 to repair my 64.



Cheers!  -=Maraud=-
Be sure to "call" maraud.dynalias.com (port 6400)
AABBS 128 12.5, RAMLink w/ 16MB (4GB CF-powered CMD-40 currently only backing up the RAMLink)

Hydrophilic

I don't know the resolution to Wiskow's problem (although I tend to think it is software), but I find your situation interesting.  The most accurate way to keep time is with one of the CIA chips.

The CIA does this via "TOD" clock which monitors the AC main volatage, and via software to tell the CIA if the AC frequency is 50 or 60 Hertz in your country.  All versions of the KERNAL ROMs that I have seen check the VIC-IIe chip to see if your country uses 50 or 60 Hertz, during power-up, but the KERNAL does not tell the CIA this!!  So software that uses TOD must do this...

Anyway, I'm guessing that one or both of the CIA's in your C128 had their TOD circuit fried.  Considering that the CIA chips are special to Commodore, it is likely that whoever you hired never tried replacing them.  Of course these can be salvaged from dead C64s, 1571s, and 1581s...  Another possiblity (pretty good considering a lightning strike was involved) is somewhere on the circuit board between the power plug and the CIA(s) is that the line (or component connected to it) has been fried...

Almost makes me wish I had your unit here to diagnose the problem... almost!

BTW, $200 to repair C64 ?  LOL!  I think the shop should buy you a replacment after sucking that much money from you and still failing... misserable failures!  Hydro has a classified solution for misserable failures. :)
I'm kupo for kupo nuts!