Re: 6702 chip

From: William Levak <wlevak_at_SDF.ORG>
Date: Wed, 11 Jul 2012 05:20:17 +0000 (UTC)
Message-ID: <Pine.NEB.4.64.1207110457250.827@sdf.lonestar.org>
I tried a number of variations of the mask register, but none of them 
worked.  They would start out correctly, but after a while would start 
getting errors.

As near as I can see, the 6702 works like this:

When an odd number is written to the 6702, it is exclusive or'd with the 
last odd number that was accepted (implying a last number register to save 
it). This result is then exclusive or'd with the current position of the 
shift registers.  The shift registers are then shifted one position and 
the output is used to toggle flip-flops, which output to the output 
register, and also act as latches for the output register.  Some time 
during the shifting of the registers and the flip-flops operating, the contents 
of the input register is transfered to the last number register.

It may seem that if the input number is the same as the last number, the 
shift registers are shifted without the exclusive or's taking place.  That 
would require another comparator circuit to determine if they were the 
same.  Exclusive or'ing two numbers that are the same produces 0. 
Exclusive or'ing 0 with any number leaves the number unchanged. The same 
result is obtained without the comparison.

I don't see how the chip is initialized.  We know the shift registers 
start with 214 in them.  Also the output register.  Since the shift 
registers shift before they output, I don't see any simple way to 
initialize both, except by directly loading both.

The chip also keeps track of whether an odd or even number has been 
written to it. This is initialized to odd.  I know this because it does 
not accept an odd number that is written to it imediately after it is 
reset.

On Mon, 28 May 2012, Rhialto wrote:

> On Mon 28 May 2012 at 10:36:55 +0000, William Levak wrote:
>>
>> This looks like it could reproduce the output with one addition: a
>> control register for the shift registers that turns individual shift
>> registers on or off.  We know this control register exists because
>> bits 3 and 5 are initially off and are turned on if the correct
>> input is received.
>
> Ah, but the "trick" here is that the shift registers for those output
> bits initially have only zeros in them. So they'll never change the
> output bit until a  1 is put in them. Which is done by providing a
> changed input bit. (It turns out that setting "previous input bits" to
> all zeros works fine.) The bit that is changed if the input changes is
> the leftmost bit in the shift register (before it is shifted).
>
>> In the case where the output for a bit is all 0 or all 1, the shift
>> register is turned off.
>
> because all bits in it are 0.
>
>> This occurs when the corresponding bit of the input is changed and the
>> current output of the shift register is high.
>
> The output of the shift is wrapped around to the left, so if the input
> changes at the right moment, the 1 which was wrapped around will be
> toggled to a 0.
>
> The same method can turn it on again later. And of course there can be
> multiple 1s. If the number is odd, the second cycle of N bits will be
> the inverse of the first one.
>
> I've put the code into VICE and it works with the Waterloo software, so
> I checked it in. As of revision 25635 you can try it out.
> Tarball of the full VICE source:
> http://vice-emu.svn.sourceforge.net/viewvc/vice-emu/trunk/?view=tar
> or
> svn co https://vice-emu.svn.sourceforge.net/svnroot/vice-emu/trunk vice-emu
>
>
> -Olaf.
> -- 
> ___ Olaf 'Rhialto' Seibert  -- There's no point being grown-up if you
> \X/ rhialto/at/xs4all.nl    -- can't be childish sometimes. -The 4th Doctor
>
>       Message was sent through the cbm-hackers mailing list
>

wlevak@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org

       Message was sent through the cbm-hackers mailing list
Received on 2012-07-11 06:00:04

Archive generated by hypermail 2.2.0.