[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Memory Map for IIe (64K & 128K versions?)
Wraithe writes ...
>
> Does anyone have, or know of, a memory map for the various incarnations of
> the IIe? I'm specifically interested in where screen memory starts (text &
> graphics), keyboard, joystick, serial port, etc. I used to have all this
> stuff 15 years ago, on carefully noted handwritten sheets--I was in high
> school & too poor to afford the manuals, so I copied down anything I could
> find. I don't really need a hardcopy--actually, an electronic copy or
> web-site with the info would be great!
>
> I've searched the net for anything along these lines, but have come up
> empty. And I've seen various books for sale, but haven't a clue as to which
> one has the information I'm looking for.
>
....
Below is a nice listing posted by kburtch@pts.mot.com ...
>>
Most of the names (assembler "equate" names) are listed in pairs, and
the comment on the first one often represents what the second actually
does, but refers to with what function the softswitch pair are
associated.
SOFTSWITCHES
KEYBOARD = $C000 ;keyboard data (latched) (RD-only)
CLR80COL = $C000 ;use 80-column memory mapping (WR-only)
SET80COL = $C001
CLRAUXRD = $C002 ;read from auxilliary 48K
SETAUXRD = $C003
CLRAUXWR = $C004 ;write to auxilliary 48K
SETAUXWR = $C005
CLRCXROM = $C006 ;use external slot ROM
SETCXROM = $C007
CLRAUXZP = $C008 ;use auxilliary ZP, stack, & LC
SETAUXZP = $C009
CLRC3ROM = $C00A ;use external slot C3 ROM
SETC3ROM = $C00B
CLR80VID = $C00C ;use 80-column display mode
SET80VID = $C00D
CLRALTCH = $C00E ;use alternate character set ROM
SETALTCH = $C00F
STROBE = $C010 ;strobe (unlatch) keyboard data
Bit seven of these "RD..." locations is 1 if the condition is true
RDLCBNK2 = $C011 ;reading from LC bank $Dx 2
RDLCRAM = $C012 ;reading from LC RAM
RDRAMRD = $C013 ;reading from auxilliary 48K
RDRAMWR = $C014 ;writing to auxilliary 48K
RDCXROM = $C015 ;using external slot ROM
RDAUXZP = $C016 ;using auxilliary ZP, stack, & LC
RDC3ROM = $C017 ;using external slot C3 ROM
RD80COL = $C018 ;using 80-column memory mapping
RDVBLBAR = $C019 ;not VBL (VBL signal low)
RDTEXT = $C01A ;using text mode
RDMIXED = $C01B ;using mixed mode
RDPAGE2 = $C01C ;using text/graphics page2
RDHIRES = $C01D ;using Hi-res graphics mode
RDALTCH = $C01E ;using alternate character set ROM
RD80VID = $C01F ;using 80-column display mode
SPEAKER = $C030 ;toggle speaker diaphragm
CLRTEXT = $C050 ;enable text-only mode
SETTEXT = $C051
CLRMIXED = $C052 ;enable graphics/text mixed mode
SETMIXED = $C053
TXTPAGE1 = $C054 ;select page1/2 (or page1/1x)
TXTPAGE2 = $C055
CLRHIRES = $C056 ;enable Hi-res graphics
SETHIRES = $C057
SETAN0 = $C058 ;4-bit annunciator inputs
CLRAN0 = $C059
SETAN1 = $C05A
CLRAN1 = $C05B
SETAN2 = $C05C
CLRAN2 = $C05D
SETAN3 = $C05E
CLRAN3 = $C05F
OPNAPPLE = $C061 ;open apple (command) key data
CLSAPPLE = $C062 ;closed apple (option) key data
PDLTRIG = $C070 ;trigger paddles
For WR-enable LC RAM, the softswitch REQUIRES two successive reads
$C080 ;RD LC RAM bank2, WR-protect LC RAM
ROMIN = $C081 ;RD ROM, WR-enable LC RAM
$C082 ;RD ROM, WR-protect LC RAM
LCBANK2 = $C083 ;RD LC RAM bank2, WR-enable LC RAM
$C084 ;RD LC RAM bank2, WR-protect LC RAM
$C085 ;RD ROM, WR-enable LC RAM
$C086 ;RD ROM, WR-protect LC RAM
$C087 ;RD LC RAM bank2, WR-enable LC RAM
$C088 ;RD LC RAM bank1, WR-protect LC RAM
$C089 ;RD ROM, WR-enable LC RAM
$C08A ;RD ROM, WR-protect LC RAM
LCBANK1 = $C08B ;RD LC RAM bank1, WR-enable LC RAM
$C08C ;RD LC RAM bank1, WR-protect LC RAM
$C08D ;RD ROM, WR-enable LC RAM
$C08E ;RD ROM, WR-protect LC RAM
$C08F ;RD LC RAM bank1, WR-enable LC RAM
CLRC8ROM = $CFFF ;switch out slot C8 ROM
--------------------------------------------------------------------
Example: To enable double Hi-res graphics, the following code will
accomplish this:
STA SETHIRES
STA SETAN3
STA CLRMIXED
STA CLRTEXT
JSR $C300
<<
You can find listings of Apple II soft switches and popular monitor
routines in a manual for your computer-- e.g. the Apple II Reference
Manual (for II and II+), the IIe Technical Reference Manual, the Apple
IIgs Firmware Reference Manual, etc..
An excellent guide to many PEEKs & POKEs and monitor routines is
the famous "Peeks, Pokes, and Pointers" poster from Beagle Bros (early
1980's). A fairly exhaustive guide to important memory locations in the
Apple II is What's Where in the Apple II: An Atlas to the Apple Computer
by William Luebbert (1981).
With very few exceptions, soft switches, monitor routines, and
important vectors have remained stable since early Apple II models. So,
although an old chart or listing may be missing some which are available
on a newer Apple II, the ones shown will almost always work.
So far, I have yet to come across a good II+ or enhanced IIe or
IIgs memory map chart on the net. The manuals mentioned earlier plus
manuals for DOS 3.3 and ProDOS will contain this information.
Below is a quickie memory map for a typical 64k Apple II which is,
also, the Main Bank of a 128k Apple II.
$0000 ---------------
ZERO Page area-- used for holding many system parameters, a few
system routines and variables, DOS & ProDOS parms, ... . Also,
this area has a number of 'open' addresses the user can employ.
$0100 ---------------
STACK page-- place where JSR return addresses, etc. gets PUSHed.
$0200 ---------------
Commands buffer area-- e.g. place where typed-in stuff usually gets
put first
$0300 ---------------
Mainly Open area-- a nice place to load in short machine language
routines (like sound routines, etc.) Roughly the upper 32 bytes
are used for holding Reset, IRQ, ... vectors and some DOS vectors.
$0400 ---------------
Text "Page" 1 (or LoRes "Page" 1)-- Place where most TEXT you see on
a 40-col display is located (40 chars x 24 lines). If in Graphics
mode, you see a 16-color LoRes display (40 x 48). If in Graphics
mode with Full Graphics set, you see just LoRes. If in Graphics
mode with Mixed set, you get 40 lines of Lores with 4 lines of
TEXT at the bottom. (On a 128k Apple II, this can be used as half of
the 80-col. Text "Page" 1 or half of the Double-LoRes "Page" 1.)
$0800 ---------------
BASIC program area-- place where a BASIC program resides. This space
can be used for non-BASIC programs and routines, too (like stuff
you BRUN or large machine language routines you BLOAD to use along
with a BASIC program.
The space actually available for a BASIC program or ML routines or
whatever depends upon what other parts of the $0800-$BFFF space are
used.
$0800-$0BFF can be used as Text "Page" 2 (or LoRes "Page" 2).
This is rarely done; but, if it is, then a BASIC program must start
after $0BFF. (On a 128k Apple II, this can be used as half of
the 80-col. Text "Page" 2 or half of the Double-LoRes "Page" 2.)
$2000-$3FFF can be used as HiRes "Page" 1-- i.e. the place Hires
pics load in to be displayed. This is a fairly common use.
As long as a BASIC program, etc. is small enough, it can load
in at $0800 (actually $0801 for BASIC) as long as the space is not
being used as a second Text or Lores "Page". A large BASIC program
would usually load in after the HiRes area, at $4001. (On a 128k
Apple II, this can be used as half of the Double-HiRes "Page" 1.)
$4000-$5FFF can be used as HiRes "Page" 2-- i.e. another place
Hires pics load in to be displayed. This is a good place to load
in/display Hires pics for moderate size BASIC programs. Such
Programs will, then have $0801-$3FFF available (assuming no
Text or LoRes "Page" 2 is active and HiRes "Page" 1 is not used
for graphics. Sometimes, both HiRes "Pages" are used in order to
do speedier animations or for some other reason. If this is done,
you must start your BASIC program before the Hires areas or after.
(On a 128k Apple II, this can be used as half of the Double-HiRes
"Page" 2.)
$8000 --- (Approximately)--- This is the typical 'safe' upper limit
for the BASIC program area (i.e. for Program + variables) when
DOS or ProDOS are also present. DOS 3.3 usually allows going a
bit higher.
$9000 --- (Approximately)----
DOS or ProDOS plus buffers use up most of this space.
$BFFF --------------- End of 'Program Space'
$C000 ---------------
Area usually employed for I/O, Soft-Switches, memory address space
for use by Slot cards, etc.
$D000 ---------------
Usually employed for BASIC in-ROM or for one of two 4kB "Language
Card" banks of RAM.
$E000 ---------------
Usually employed for BASIC in-ROM (continued) and the Monitor in-ROM or
for one 8kB "Language Card" bank.
In-ROM BASIC runs from $D000-$F7FF
The In-ROM Monitor runs from $F800-$FFFF
$FFFF --------------- End of 64kB "Main Bank" memory
Rubywand