<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Sat, 16 Feb 2008 10:31:10 +1100
From   : richard@... (Richard Wilson)
Subject: BBC FPGA Boots to BASIC... almost...

 
> > > They need to return &FE instead. ie. the high part of the address.
> 
> > Ummm, OK, but can you explain why that's the case?
> 
> Because there's no device there, nothing gets put on the data 
> bus, so the
> 6502 reads what was last there, which is almost always the 
> high byte of the address.

Actually, the 6502 will read anything placed on the bus by any device which
responds to the read. The usual case is there's nothing responding and
driving the bus at this time (unless you've got some faulty or badly
designed hardware), so the bus will return &FF (all high), not the previous
value placed there.

If the address is within the valid address range of some hardware device but
not a valid port/register, it will be up to the device itself what gets
placed on the bus. (eg. most CRTC's will return 0 for out of range
registers).

&FE never gets placed on the data bus anyway, it gets placed on the upper 8
address lines of the CPU.

Richard
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>