Re: ROM Dump of Amiga Keyboard controller

From: Jim Brain <brain_at_jbrain.com>
Date: Wed, 02 Jul 2014 23:40:36 -0500
Message-ID: <53B4DEC4.7050406@jbrain.com>
On 7/2/2014 9:34 PM, Greg King wrote:
>
> What does read_data() do?  Does it call send_data(); or, is it as 
> simple as send_data()? 
// no snarky comments about code quality.  I wrote for function, not 
form :-)
static inline __attribute__((always_inline)) void read_data(void) {
   TEST_OFF();
   while(!(TIFR & _BV(OCF2))); // went high
   //uart_putc(PINA);
   TIFR |= _BV(OCF2);
   // read data;
   while(!(TIFR & _BV(OCF2))); // went lo
   //uart_putc(PINA);
   TIFR |= _BV(OCF2);
   // read data;
   while(!(TIFR & _BV(OCF2))); // went hi
   //uart_putc(PINA);
   TIFR |= _BV(OCF2);
   // read data;
   while(!(TIFR & _BV(OCF2))); // went lo
   uart_putc(PINA);
   TIFR |= _BV(OCF2);
   // read data;
   TEST_ON();
}
> If it is as simple, then Port D is being read too soon.
I can delay it
> The AVR must send a dummy byte during the 6500's write (to the port) 
> cycle.  And, there is a propagation delay through the ports.  So, the 
> code should be:
>
>    . . .
>    . . .
>    send_data(0xA9);
>    send_data(0x55);
>    send_data(0x85);
>    send_data(0x83);
>    send_data(0x83);
>    send_data(0x02);
>    read_data();
OK...


did, no change...

I'll have some more time over the weekend to try things.  It might help 
if someone else had the test setup or something similar, as I am sure 
I'm doing something wrong at this point.

Jim


       Message was sent through the cbm-hackers mailing list
Received on 2014-07-03 05:00:33

Archive generated by hypermail 2.2.0.