CIA TOD Alarm Bug

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

CIA TOD Alarm Bug

Groepaz
hy fellow hackers!

i am investigating differences in the CIA behaviours (NMOS vs HMOS versions,
ie 6526 vs 8521) at the moment. one thing that is pretty unclear to me, is a
supposed bug in the TOD alarm behaviour. i can find some references to it on
the web, which somehow look like one copied from the other to me - without
ever mentioning the exact details:

wikipedia:
"Due to a bug in many 6526s the alarm IRQ would not always occur when the
 seconds component of the alarm time is exactly zero. The workaround is to set
 the alarm's tenths value to 0.1 seconds."

http://forum.6502.org/viewtopic.php?p=9837#p9837 
"There was also a problem with the Time of Day clock alarm interrupt, which
 would not occur if the alarm time tenths-of-seconds was set to zero. The
 solution was to set the tenths to anything other than zero."

... "we" have created a bunch of test programs [1] in the past already, and
they indeed show some odd behaviour under certain conditions (including the
alarm not triggering when it should) - but so far these tests behave exactly
the same on "old" and "new" CIAs.

so i am asking you guys a) if you have heard about the above mentioned
problem, and can tell details on the condition needed to reproduce it (so i
can make it test program - or perhaps even you can provide one) and b) if this
is really a problem that should only show on one of the two CIA variants
(probably the older one). also if you know and references/documents that
mention this problem, please tell!

[1] https://sourceforge.net/p/vice-emu/code/HEAD/tree/testprogs/CIA/tod/

--

http://www.hitmen-console.org    http://magicdisk.untergrund.net
http://www.pokefinder.org        http://ar.pokefinder.org

Wer im Glashaus sitzt hat immer frische Gurken.



       Message was sent through the cbm-hackers mailing list
Reply | Threaded
Open this post in threaded view
|

Re: CIA TOD Alarm Bug

Segher Boessenkool
On Wed, Mar 08, 2017 at 06:45:01PM +0100, [hidden email] wrote:
> i am investigating differences in the CIA behaviours (NMOS vs HMOS versions,
> ie 6526 vs 8521) at the moment. one thing that is pretty unclear to me, is a
> supposed bug in the TOD alarm behaviour. i can find some references to it on
> the web, which somehow look like one copied from the other to me - without
> ever mentioning the exact details:

There also is 8520.  I haven't yet seen good pictures of the 8521, but
the pictures that are there show that 8520 and 8521 are nothing alike
(and neither is like the 6526, either -- in the physical layout anyway).

> wikipedia:
> "Due to a bug in many 6526s the alarm IRQ would not always occur when the
>  seconds component of the alarm time is exactly zero. The workaround is to set
>  the alarm's tenths value to 0.1 seconds."
>
> http://forum.6502.org/viewtopic.php?p=9837#p9837 
> "There was also a problem with the Time of Day clock alarm interrupt, which
>  would not occur if the alarm time tenths-of-seconds was set to zero. The
>  solution was to set the tenths to anything other than zero."
>
> ... "we" have created a bunch of test programs [1] in the past already, and
> they indeed show some odd behaviour under certain conditions (including the
> alarm not triggering when it should) - but so far these tests behave exactly
> the same on "old" and "new" CIAs.
>
> so i am asking you guys a) if you have heard about the above mentioned
> problem, and can tell details on the condition needed to reproduce it (so i
> can make it test program - or perhaps even you can provide one) and b) if this
> is really a problem that should only show on one of the two CIA variants
> (probably the older one). also if you know and references/documents that
> mention this problem, please tell!

I'll have a look at the die pics again, this weekend I hope.


Segher

       Message was sent through the cbm-hackers mailing list
Reply | Threaded
Open this post in threaded view
|

Re: CIA TOD Alarm Bug

Groepaz
On Thursday 09 March 2017, 16:12:46 Segher Boessenkool
<[hidden email]> wrote:

> On Wed, Mar 08, 2017 at 06:45:01PM +0100, [hidden email] wrote:
> > i am investigating differences in the CIA behaviours (NMOS vs HMOS
> > versions, ie 6526 vs 8521) at the moment. one thing that is pretty
> > unclear to me, is a supposed bug in the TOD alarm behaviour. i can find
> > some references to it on the web, which somehow look like one copied from
> > the other to me - without
> > ever mentioning the exact details:
> There also is 8520.  I haven't yet seen good pictures of the 8521, but
> the pictures that are there show that 8520 and 8521 are nothing alike
> (and neither is like the 6526, either -- in the physical layout anyway).

8520 is irrelevant in this context - the "TOD" is completely different
afterall :)

--

http://www.hitmen-console.org    http://magicdisk.untergrund.net
http://www.pokefinder.org        http://ar.pokefinder.org

There is no difference between someone who eats too little and sees Heaven and
someone who drinks too much and sees snakes.
<Bertrand Russell>



       Message was sent through the cbm-hackers mailing list
Reply | Threaded
Open this post in threaded view
|

Re: CIA TOD Alarm Bug

Segher Boessenkool
On Thu, Mar 09, 2017 at 11:37:31PM +0100, [hidden email] wrote:

> On Thursday 09 March 2017, 16:12:46 Segher Boessenkool
> <[hidden email]> wrote:
> > On Wed, Mar 08, 2017 at 06:45:01PM +0100, [hidden email] wrote:
> > > i am investigating differences in the CIA behaviours (NMOS vs HMOS
> > > versions, ie 6526 vs 8521) at the moment. one thing that is pretty
> > > unclear to me, is a supposed bug in the TOD alarm behaviour. i can find
> > > some references to it on the web, which somehow look like one copied from
> > > the other to me - without
> > > ever mentioning the exact details:
> > There also is 8520.  I haven't yet seen good pictures of the 8521, but
> > the pictures that are there show that 8520 and 8521 are nothing alike
> > (and neither is like the 6526, either -- in the physical layout anyway).
>
> 8520 is irrelevant in this context - the "TOD" is completely different
> afterall :)

It is relevant in that until a few weeks ago  I (like most people)
believed that 8520 and 8521 are very similar.  They are not, making
the analysis of the 8520 (for which we do have good pictures) pretty
useless for deriving 8521 behaviour.


Segher

       Message was sent through the cbm-hackers mailing list