[Coco] Re: Technical: PIA Help

Brad Grier bradgrier at cox.net
Mon Dec 5 23:58:43 EST 2005


I added a few println calls to Mocha at the memory locations in 
question. This is what happens at those addresses during a Tetris 
interrupt.

I'm guessing some of the peek return values aren't right but I'm 
displaying what Mocha thinks the result should be.

The big question: What's going on with the peek and pokes at $ff03?

fire interrupt
poke ff02: ff
peek ff00= ff
poke ff02: 0
peek ff03= b5
poke ff03: b1 (ff02 data direction bit=0)
poke ff02: ff
peek ff00= ff
poke ff02: ff
peek ff03= 31
poke ff03: 35 (ff02 data direction bit=1)
poke ff02: ff
peek ff02= resets field sync IRQ flag
fire interrupt
etc, etc, etc, etc

Maybe I need to hook up my coco and figure out how to use EDTASM again.

Brad


Torsten Dittel wrote:
> Hi Brad,
> 
> just some thoughts produced by a blurry remembrance (might be pure
> nonsense): I guess before writing and reading the keyboard you have to
> programm the corresponding PIA registers as inputs or outputs. I guess
> it's possible to "inverse" the input/output configuration. Maybe one
> even could mix it and make some PIA lines read and others write (no idea
> what this would be good for).
> 
> I remember darkly on first Motorola "CoCo" board designs (using two PIAS
> 6821) it was even possible to programm both PIAS as outputs and "burn"
> the PIA lines by pressing the corresponding keys (kind of short
> circuit). Those lines would work only in one direction after being
> killed that way. Some software would still work (e.g. BASIC) but other
> using the "inverse" PIA setting wouldn't recognize the keys any longer).
> AFAIR this was a know problem and Motorola replaced the 6821 by the 6822
> which had kind of protection against this (I wonder if it's possible to
> kill PIAs in one of the CoCo1 emulators, it would win a price for
> accurate emulation... ;-)).
> 
> I'd enjoy some comments by all you gurus out there! :-)
> 
> Best regards,
> Torsten
> 
> 




More information about the Coco mailing list