Re: [stella] Atari memory

Subject: Re: [stella] Atari memory
From: "B. Watson" <atari@xxxxxxxxxxxxxx>
Date: Tue, 1 Mar 2005 12:23:38 -0500
On Tue, 1 Mar 2005, [ISO-8859-1] Andri Wagner wrote:

> I see most games start their execution at 0xF000. Does the 2600 really
> have 64 kB of memory?

No, but it does have 64K of address space. The ROM area is 4K, and is
`mirrored' at multiple locations (as the higher address lines aren't
decoded). This means that multiple addresses in the 64K address space
are wired to the same storage (or I/O, for the TIA and RIOT). I don't
have the full memory map handy (am at work), but it's been posted here
before. Search the archives, you should find it.

Starting at $F000 is just a convention. You could ORG your code at any
of the mirrored addresses and it would work just as well. Using the top
of the address space has the advantage that your assembler can spit out
an error message when you run out of ROM space (you only have 4K, but
your assembler doesn't know that. It *does* know that the 6502/6507 only
has 64K of address space, and will complain if you try to use anything
higher than that).

There's another reason to start at $F000: the start & interrupt vectors
are located at $FFFA through $FFFF, and it's `unnatural' to use one of
the mirror locations for these (though it does work just fine, it's just
confusing to a 6502 programmer who's used to other systems).

--
B.

Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://stella.biglist.com

Current Thread