Re: ROM Dump of Amiga Keyboard controller

From: Jim Brain <brain_at_jbrain.com>
Date: Fri, 18 Jul 2014 19:03:19 -0500
Message-ID: <53C9B5C7.7020604@jbrain.com>
On 7/18/2014 9:25 AM, Gerrit Heitsch wrote:
> On 07/18/2014 05:33 AM, Jim Brain wrote:
>>
> What do you use $82 for? Handshake to show that the next byte is ready?
Yep.  Otherwise, how do you know (without counting cycles on the host), 
when the next byte is ready to be read on PORTA?
>
> The code could be optimized further, not that it's necessary for this 
> purpose, but it just jumped out at me when looking at your code and I 
> noticed you didn't use the Y register. Simply add
>
> LDY #$10
>
> at the beginning and then instead of
>
> LDA $08
> CMP #$10
>
> use
>
> CPY $08
I'm curious how that is "optimized"  :-)  Doesn't it also need an INY in 
there?  With that added, it takes more cycles and more codespace...  
Ithink it has some additional 6502 "aesthetics", so maybe that's a plus.

In any case, I wrote it this way as a defensive programming measure, to 
ensure that I did not read more than the required ROM addresses.
>
> And also start reading at $0800 and not $0100.
I actually do 0800 -> 0fff, but I wrote the code in one window, and 
patched it up a bit in the C source.
>
> I see you took out the sync code... That means you have total control 
> now and no longer have to guess in what cycle you are.
Yep.


       Message was sent through the cbm-hackers mailing list
Received on 2014-07-19 01:00:02

Archive generated by hypermail 2.2.0.