Re: "easy" 6510 question

From: Spiro Trikaliotis <ml-cbmhackers_at_trikaliotis.net>
Date: Fri, 7 Feb 2020 22:15:29 +0100
Message-ID: <20200207211529.GA1914_at_hermes.local.trikaliotis.net>
Hello,

just my 2 cents worth of guesswork:

* On Fri, Feb 07, 2020 at 09:20:29PM +0100 silverdr_at_wfmh.org.pl wrote:
 
> Mapping says about D6510 ($00):
> 
> On power-up, this register is
> set to 239 ($EF), which indicates that all bits, except for Bit 4
> (which senses the cassette switch), are set up for Output.

As $EF only has bit 7 unset, this sentence does not make sense. ;)


The KERNAL initializes the DDR to $E7 and the Data register to $2F.

On RESET, I expect the CPU to make sure that the DDR has all (available)
IO as inputs. This way, the C64 ensures that the "hard-coded" memory
configuration is active on power up. And that's the only "defensive" way
to ensure that there are not two sources (CPU and external device)
driving a data port.

So, all "connected" I/O port bits should be input. For the non-existing
ones, I do not know.

The Data register is not important here, and I would not wonder if it
would either be uninitialized on RESET, or if it would get exactly
what was received as input on RESET.

For the used bits of the DDR, I am sure - especially since regardless
what you store into $00 and $01, a hard reset "re-animates" the C64, and
because this is the only way this can be done without the risk of two
devices driving a line.

Regards,
Spiro.

-- 
Spiro R. Trikaliotis
http://www.trikaliotis.net/
Received on 2020-05-30 00:51:14

Archive generated by hypermail 2.3.0.