John Robertson wrote:
>
> The memory space for the ROMs is defined by the CPU's RESET and NMI
> locations - different MPUs look at different memory locations for the
> RAM and the ROM. As I recall the 68XX series looks for the RESET vector
> somewhere around FFFE and FFFF (two bytes to decode the memory location
> in a 16 bit memory space - 64K. So at least one ROM must have a location
> at the 'top' of the Memory space so the CPU can find the Reset.
>
The processor doesn't know/care what address ends up at the reset/other
vectors at $FFF8-$FFFF (reset is FFFE-FFFF). The chipset in system 6
lives at $6000-$7FFF in the code itself. Because of the chip selection
it gets repeated up to $FFFF (and likely one intermediate location as
well, where the address bits used to select it also select that location
if requested).
System 7 moved the romspace to the 'real' location its romspace is
$D000-$FFFF.
> RAM for the 68xx starts at 0000h, so some RAM must be found there for
> the CPU to have scratchpad RAM available. After that you can locate the
> RAM/ROM anywhere you like, convention has the RAM at the low end, and
> the ROM at the high end, then I/O and anything else is in the space not
> occupied by RAM or ROM.
>
The Ram can live anywhere in memory as well. It does not have to be in
zero page $00-$FF. There is nothing in the processor startup that
requires ram there. Most people designing systems put ram there as
there are shorter (i.e. more efficient) instructions to take advantage
of it, and most software does use page 0 for scratchpad use, but it's
not required there.
You are likely thinking of the 6502 that MUST have some ram in page 1
$100-$1FF as the stack hi byte is hardcoded to page 1. (System 80's
stack ends up in $100-$17F, so you don't need the entire page populated
with ram) Additionally, it's really useful on the 6502 to have zero
page ram as so many instructions assume zero page access.