Author Topic: Clock Problem  (Read 3486 times)

0 Members and 1 Guest are viewing this topic.

Offline Andrew Wiskow

  • 128D user
  • *******
  • Posts: 1092
  • Country: us
  • Reputation: 24
  • Gender: Male
    • View Profile
    • Cottonwood BBS Informational Website
Clock Problem
« on: December 21, 2007, 08:53 AM »
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

Offline airship

  • 128D user
  • *******
  • Posts: 1605
  • Country: us
  • Reputation: 114
  • Gender: Male
  • Former Editor, INFO Magazine
    • View Profile
    • Atomic Airship
Clock Problem
« Reply #1 on: December 21, 2007, 09:04 AM »
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

Offline Andrew Wiskow

  • 128D user
  • *******
  • Posts: 1092
  • Country: us
  • Reputation: 24
  • Gender: Male
    • View Profile
    • Cottonwood BBS Informational Website
Clock Problem
« Reply #2 on: December 21, 2007, 10:26 AM »
Quote from: airship
Does 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

Offline Andrew Wiskow

  • 128D user
  • *******
  • Posts: 1092
  • Country: us
  • Reputation: 24
  • Gender: Male
    • View Profile
    • Cottonwood BBS Informational Website
Clock Problem
« Reply #3 on: December 22, 2007, 08:53 AM »
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

gklinger

  • Guest
Clock Problem
« Reply #4 on: December 22, 2007, 09:56 AM »
Do you have access to a diagnostic cartridge and harness?

Offline Blacklord

  • Administrator
  • Forum god
  • *****
  • Posts: 3172
  • Country: au
  • Reputation: 779
  • Gender: Male
    • View Profile
    • http://www.commodore128.org
Clock Problem
« Reply #5 on: December 22, 2007, 10:00 AM »
Quote from: 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

That points at Ivory as the problem.

Lance

Offline Andrew Wiskow

  • 128D user
  • *******
  • Posts: 1092
  • Country: us
  • Reputation: 24
  • Gender: Male
    • View Profile
    • Cottonwood BBS Informational Website
Clock Problem
« Reply #6 on: December 22, 2007, 10:44 AM »
Quote from: gklinger
Do you have access to a diagnostic cartridge and harness?

No.  I don't even know what that is...  Care to enlighten me?  ;)

Quote from: admin
That 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

Offline RobertB

  • Forum god
  • ********
  • Posts: 3085
  • Country: us
  • Reputation: 451
    • View Profile
    • Fresno Commodore User Group
Clock Problem
« Reply #7 on: December 22, 2007, 08:13 PM »
Quote from: wiskow
No.  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/

gklinger

  • Guest
Clock Problem
« Reply #8 on: December 22, 2007, 08:36 PM »
Quote from: wiskow
Quote from: gklinger
Do 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.

Offline Andrew Wiskow

  • 128D user
  • *******
  • Posts: 1092
  • Country: us
  • Reputation: 24
  • Gender: Male
    • View Profile
    • Cottonwood BBS Informational Website
Clock Problem
« Reply #9 on: December 23, 2007, 10:31 AM »
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

Offline Andrew Wiskow

  • 128D user
  • *******
  • Posts: 1092
  • Country: us
  • Reputation: 24
  • Gender: Male
    • View Profile
    • Cottonwood BBS Informational Website
Clock Problem
« Reply #10 on: December 23, 2007, 10:32 AM »
Quote from: RobertB
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.

Thanks, Robert.  I'll gladly take you up on that offer.  :)

-Andrew

gklinger

  • Guest
Clock Problem
« Reply #11 on: December 23, 2007, 11:31 AM »
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. :(

Offline Andrew Wiskow

  • 128D user
  • *******
  • Posts: 1092
  • Country: us
  • Reputation: 24
  • Gender: Male
    • View Profile
    • Cottonwood BBS Informational Website
Clock Problem
« Reply #12 on: December 28, 2007, 08:32 AM »
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

Offline airship

  • 128D user
  • *******
  • Posts: 1605
  • Country: us
  • Reputation: 114
  • Gender: Male
  • Former Editor, INFO Magazine
    • View Profile
    • Atomic Airship
Clock Problem
« Reply #13 on: December 28, 2007, 10:19 AM »
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

  • Guest
Clock Problem
« Reply #14 on: December 28, 2007, 11:48 AM »
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

Offline Hydrophilic

  • 128D user
  • *******
  • Posts: 1429
  • Reputation: 233
  • Gender: Male
    • View Profile
    • H2Obsesson
Clock Problem
« Reply #15 on: December 28, 2007, 11:54 AM »
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.
I'm kupo for kupo nuts!

Offline Andrew Wiskow

  • 128D user
  • *******
  • Posts: 1092
  • Country: us
  • Reputation: 24
  • Gender: Male
    • View Profile
    • Cottonwood BBS Informational Website
Clock Problem
« Reply #16 on: December 28, 2007, 02:38 PM »
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

Offline RobertB

  • Forum god
  • ********
  • Posts: 3085
  • Country: us
  • Reputation: 451
    • View Profile
    • Fresno Commodore User Group
Clock Problem
« Reply #17 on: December 28, 2007, 05:01 PM »
Quote from: wiskow
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.

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/

Offline airship

  • 128D user
  • *******
  • Posts: 1605
  • Country: us
  • Reputation: 114
  • Gender: Male
  • Former Editor, INFO Magazine
    • View Profile
    • Atomic Airship
Clock Problem
« Reply #18 on: December 29, 2007, 12:16 AM »
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

Offline Andrew Wiskow

  • 128D user
  • *******
  • Posts: 1092
  • Country: us
  • Reputation: 24
  • Gender: Male
    • View Profile
    • Cottonwood BBS Informational Website
Clock Problem
« Reply #19 on: December 29, 2007, 08:48 AM »
Quote from: RobertB
We have plenty of flat C128s in storage, if you need another keyboard, Andrew.

PM sent.  :)

-Andrew

Offline maraud

  • VIC 20 user
  • ****
  • Posts: 163
  • Country: 00
  • Reputation: 45
    • View Profile
Re: Clock Problem
« Reply #20 on: July 13, 2010, 04:31 PM »
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.5c, Rear Admiral Hyperdrive (AKA LtK II)

Offline Hydrophilic

  • 128D user
  • *******
  • Posts: 1429
  • Reputation: 233
  • Gender: Male
    • View Profile
    • H2Obsesson
Re: Clock Problem
« Reply #21 on: August 02, 2010, 02:52 AM »
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!