Re: PET / cbm2 timing questions...

From: André Fachat <afachat_at_gmx.de>
Date: Mon, 20 Dec 2010 21:50:01 +0100
Message-ID: <20101220205001.23740@gmx.net>
> i am trying to fix some timing related stuff in vice, and some related 
> questions popped up :) bear with me, i don't know the pet (let alone cbm2 
> machines) much =)

Hm, what exactly is wrong there? I did the VICE PET and CBM-II emulations after all ;-)

> - whats the exact cpu clock? is it really 1.0MHz ? i realise that
> according to 
> the schematics it is, however when i lower the clock to 0.999600Mhz,
> suddenly 
> the "8296d diagnostics" program no more reports the 50Hz interrupt as bad

The PET CPU clock is exactly (within chip tolerances) 1MHz. The screen's "50Hz" or "60Hz" are actually derived from this clock by counting cycles in the CRTC. The 50Hz machines (at least some) have a ROM with 313 lines with 64 cycles each, which result in about 20ms screen time - thus 50Hz.

If you reduce the CPU clock frequency, the "50Hz" frequency values gets  lower as well in the same ratio.

However, I don't actually know the "8296d diagnostics". What does it measure? Is this symptom a VICE symptom or do you see it on an actual machine?

> (if 
> editor rom 901474-04 (50Hz) is used) - which seems odd :)

> - what exactly is the difference between a 50Hz and a 60Hz PET? as far as
> i 
> understood, the difference is only the editor rom, which would set up the
> crtc 
> for either 50 or 60 Hz. or in other words, a 50hz PET can be converted to
> a 
> 60Hz PET just by changing the editor rom. correct? 

As far as I understand yes. I haven't seen any different schematics even for the PET monitors (i.e. the CRT displays) for either 50 or 60Hz.
My assumption is that these frequencies are only chosen to be in sync with the line frequencies in the respective countries, so that simple light bulb light (which oscillates with the line frequency of either 50 or 60 Hz) would not interfere with the screen frequency.

> this would also mean
> that 
> above mentioned "8296d diagnostics" program must fail on a 60Hz machine,
> since 
> the irq will be 60Hz there, correct? (infact it will also report the
> editor 
> rom as bad if not the above mentioned one is used)

As I said, I don't know this program.

> - said irq is (more or less) directly triggered by the power line
> frequency, 
> thus always 50 or 60 hz on the respective machines, no matter of crtc
> setup - 
> correct? (not sure on this one =))

No. The 50 resp. 60Hz interrupt is triggered by the vertical sync signal. Which in turn is derived from the CPU clock by the CRTC counting an appropriate number of cycles.

> as a side node, above makes me wonder a bit on how accurate the timing of
> the 
> 50Hz interrupt really is (or could be even, since the power line frequency
> isnt exactly stable) - ie why that diagnostic test can work properly (on a
> real machine) without considering a certain error, which would be well
> within 
> the same that vice exposes for 1Mhz cpu clock (crtc setup ends up at sth
> like 
> 50.025Hz or so). any ideas? :)

If you do the numbers as shown in http://www.6502.org/users/andre/petindex/crtc.html you can compute the number of CPU cycles per screen, which gives you the interrupt rate (the numbers on the page are admittedly rounded somewhat). 
 
> similar questions on cbm2 modells:

These questions have mostly already been answered.

> - for 6x0/7x0 machines, is the exact cpu clock really 2Mhz? a comment in
> the 

Yes.

> vice source suggests it is, but actually a lower clock is used to work
> around 
> some ieee timing problem. again a bit odd :)

What do you refer to here? A VICE problem or a real machine problem. I can't remember any hack I did for the IEEE stuff, but it's been a while. 

Anyone can say if the I/O chips are accessed with 1MHz instead of 2MHz? I don't remember... But on the other hand I think I remember that the CBM-II's SID is write-only due to the 2MHz access...

André

-- 
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!  
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail

       Message was sent through the cbm-hackers mailing list
Received on 2010-12-20 21:00:33

Archive generated by hypermail 2.2.0.