20

What is a simple way to tell how much RAM an Apple IIe has? The main RAM is fixed, but Aux RAM can vary.

I'd like a solution that can be typed quickly from the keyboard: the context is that I'm asking a Craigslist seller about the machine they're offering.

1
  • 1
    Congratulations! This is the first Hot Network Question we've had for a while.
    – wizzwizz4
    Oct 14, 2016 at 15:39

3 Answers 3

12

Nice answer from bjb. But here are some simple checks to do if the user can't boot ProDOS.

Power on with no disk (or drive) and hit reset. Then (Test #1) type:

PR#3

If it goes into 80-column mode they have an 80-column card installed. Now is it 1k or 64k? (Test #2)

TEXT : REM This is to put the cursor at the bottom of the screen
HGR  : REM This clears the HIRES screen to black
CALL-151
C05E

Vertical white bars in the HIRES area (above the text area) means it's 64k.

Example display after Test #2 from a real Apple //e with 64k RAM card: Vertical dashed stripes in DHIRES on Apple IIe with 64k RAM card

If the HIRES area is still black it's most probably 1k, but you could try the following: (Test #3)

C055:0 N 2000:FF N 2001<2000.3FF8M

If this displays vertical white bars in the HIRES area then it's 64k, otherwise if it's all white it's 1k.

Technical Notes

Test #2 simply clears the HIRES screen in main ram and then tries to enable DHIRES mode by accessing $C05E. The 1k RAM card doesn't support DHIRES so the black HIRES screen will still be displayed, whereas a 64k (or more) RAM card will enable DHIRES. Since main HIRES is cleared, any data in aux HIRES will appear as vertical stripes in DHIRES. What data will be in aux HIRES?

Apple II RAM is not initialized by the firmware at power-on, but it does take on an initialization pattern determined by the physical characteristics of the hardware. There are several different patterns, but each one is a number of 00's followed by a number of FF's repeated throughout memory. The interaction between this memory pattern and the HIRES memory mapping results in either a checker-board or a horizontally or vertically striped initial HIRES image. (This is the origin of the "venetian blind effect" for the first HGR command after power-on.) Vertical stripes are seen in Test #2 when main HIRES is cleared, aux HIRES still has the pattern, and DHIRES is enabled.

Test #3 will not usually be required on real hardware, but is necessary for testing in emulators that do not initialize Apple II memory with the usual patterns. It uses a few monitor tricks to:

  • Combine multiple commands with the N (normal text) command.
  • Write to $C055 to attempt to access aux HIRES. A read would be sufficient, but in this command combination a read would interfere by printing a value - the monitor routines use $C054 and $C055 to print 80-column text.
  • Attempt to fill aux HIRES with FF's. This will only work as expected on a 64k RAM card.
2
  • Are both of those two last snippets really supposed to indicate 64K?
    – user
    Oct 14, 2016 at 11:21
  • I added a few notes. ; - ) Oct 15, 2016 at 9:45
9

There is no easy way to do this from BASIC or another command since the 6502 only sees up to 64KB and the rest beyond that needs bank switching which varies depending on the memory expansion card.

That being said, I can think of one way that you could do this with ProDOS and BASIC.

First, this is assuming that you have 64KB machine which for more recent versions of ProDOS required in the first place (ignoring the recently released 2.4.1). You are mentioning this is for a //e, so you would have base 64KB anyway.

From BASIC, type CATALOG /RAM

Look for the "TOTAL BLOCKS: nnnnn" bit and multiply 'nnnnn' number of blocks by 512 and add an additional 512. In other words, if you see "TOTAL BLOCKS: 127", then:

Memory = (127 * 512) + 512 => 65536 (a.k.a. 64KB of aux RAM).

The idea here is that if ProDOS recognizes your aux RAM and is using it as a /RAM disk, then the total blocks (plus the missing 512 bytes for presumably hidden zero and stack pages?) would be the amount of AUX ram installed in your machine. So add the base 64KB plus the aux 64KB and you've identified it as 128KB. Note that the full-form CATALOG is key here since short-form CAT does not display that value.

Not sure if this helps your Craigslist seller, but if they have a bootable ProDOS image and can drop down to basic, you could at least ask them to tell you the total blocks number.

3

According to folks on IRC, the simplest method is to pop it open, and check the Aux card: apparently the "64k" is clearly stenciled on it.

Unfortunately, the ProDOS approach won't work: a couple of the ebay sellers have what they think is a working IIe, but no disks.

2
  • This is only the case for standard Apple 64k 80-column cards. Clones and 3rd party etc will vary. This one doesn't and neither does the Apple IIe Extended 80-Column RGB Card. Oct 14, 2016 at 2:22
  • Who cares? Show me a Craigslist user in my area with an Apple II available (any variation) and I'm going to snatch it up immediately. Assuming their price is fair. Worry about how much memory it has later. At least that's my opinion. Especially since I own many A2's. :-D
    – cbmeeks
    Nov 7, 2016 at 19:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .