Re: [cc65] Apple 2 Memory Layout

From: Joseph Rose <rose.joseph121yahoo.com>
Date: 2011-05-21 13:22:10
Thank you, and I'm sorry for being stupid.  :(  I just looked at the apple2enh-dos33.cfg file in the source, and I can use the Language Card RAM at $D000 to store literal text.  I just need to know how to make more RAM available to my text adventure game in normal RAM.  So far, the C64 version requires 13.0k of normal RAM and 5.40k of hidden RAM.  On the Apple 2, I calculate 51.5k usable RAM without aux RAM.  I have to build a version of Hidden64 for the Apple 2's aux RAM, but MemBank128 (56k code/data + Bank 1 access for the C128) is more important.  Thank you for your information.
------------------------
Joseph Rose, a.k.a. Harry Potter
Working magic in the computer community
From: Oliver Schmidt <ol.sc@web.de>
To: cc65@musoftware.de
Sent: Saturday, May 21, 2011 4:17 AM
Subject: Re: [cc65] Apple 2 Memory Layout

Hi,

> BTW, what's the location of the Apple 2's Language Card,

The docs I pointed you to say:

"Enabling the Language Card allows to use it as additional memory for
cc65 generated code. However code is never automatically placed there.
Rather code needs to be explicitly placed in the Language Card either
per file by compiling with --code-name HIGHCODE or per function by
enclosing in #pragma codeseg (push, "HIGHCODE") and #pragma codeseg
(pop)."

You see - there's no need to know it as the runtime system takes care
of abstracting it by providing you with the segment HIGHCODE for
using.

If you want to know the location anyway you can check out the Apple II
linker configs for the attributes of the memory area the segment
HIGHCODE is placed in.

> and how do I use it
> for data and load information into it from disk?

The docs I pointed you to say:

"In either case the cc65 runtime system takes care of actually moving
the code into the Language Card."

I don't see anything to be added in general.

The docs I pointer you to say:

"While running main() the Language Card bank 2 is enabled for read access."

So you see you can't use for data as it is read-only.

The bottom line is: You don't use it explicitly but you move parts of
your code into it as documented. This frees up "ordinary" RAM you can
then use in all "usual" ways. This approach is much easier and much
more portable.

Regards,
Oliver
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sat May 21 13:22:26 2011

This archive was generated by hypermail 2.1.8 : 2011-05-21 13:22:29 CEST