TweetFollow Us on Twitter

Memory Examined
Volume Number:1
Issue Number:9
Column Tag:The Electrical Mac

"Mac Memory Examined"

By Jeff Mitchell, President, Digital Solutions, MacTutor Contributing Editor

The Macintosh has been unique among personal computers in that it was the first computer introduced with a minimum of 128K Bytes of RAM that was immediately criticized for not having enough. The Fat Mac has quieted that criticism somewhat, and there are rumors of even more memory upgrades coming. [Experience has now shown that the Mac design required a minimum of 512K RAM and 800K dual floppy drives to be really practical and friendly to the user. We have the memory now but the disk bound nature of the new application packages is making disk juggling a full time Mac occupation! Say, didn't the old "Flippy" Lisa drives support 800K? That early Mac design was right-on capacity wise. -Ed.]

In this article I will describe the basic internal architecture of dynamic RAM, explore the design tradeoffs that have led to the memory configuration and the data access techniques employed in the Macintosh, and describe the memory map with its various screen, sound, and disk speed buffers.

More dynamic RAMs are sold than any other type of semiconductor device in the world. This is due to two major factors. First, the demand by computer manufacturers for inexpensive, high density memory. Secondly, semiconductor manufacturers use dynamic RAMs as a testbed for their IC process technology. The very regular structure of one memory cell repeated thousands of times, plus the very high demand for these devices allow the manufacturers to develop new, smaller device geometries with reasonably low risk and then use the large demand to speed the improvement of production yields. Once the technology has been refined, it is used to develop other products. Semiconductor manufacturers have admitted to being in the dynamic RAM market not necessarily to make money, but only to break even, in order to have this development vehicle available to them.

Each bit in a dynamic RAM consists of a transistor and a capacitor. This is why such very high densities can be attained, since each individual cell is so small. In contrast, each bit in a static RAM consists of four or six transistors, arranged to form a latch. Since each cell in a static RAM is about 4 times as large as in a dynamic RAM, static RAMs lag about one generation behind dynamic RAMs in density (e.g. 64K static RAMs became available about the time 256K dynami Q-and-Ath dynamic RAMs, the capacitor used as the memory element is not perfectly insulated, allowing the charge to leak off over time. Thus it may at some point actually change state unless the charge is restored. The charge can be restored by performing either a read or write operation on the cell. This process is called refreshing and must be performed on all cells every 2 milliseconds with most 64K RAMs, or every 4 milliseconds with 265K RAMs.

Internally, the memory cells are arranged in a matrix of rows and columns. The intersection of a row address and a column address selects a single cell. Dynamic RAMs are usually packaged in a 16 pin package, which means the addresses must be multiplexed due to pin limitations. First the row addresses are presented along with the row address strobe (RAS), then the column addresses and the column address strobe (CAS) some time later. A very important advantage to the matrix configuration is that when a particular row is accessed, all the cells on that row are refreshed; each cell does not have to be refreshed individually.

The RAM in the Macintosh is shared between the processor and the screen, rather than the screen having a separate RAM area of its own. This is both a blessing and a curse. The blessing is that the screen accesses are frequent enough that there is no need for special circuitry to keep the RAM refreshed. The curse is that the processor is denied access to the RAM about 34% of the time while the screen is being refreshed.

The display RAM is bit-mapped, meaning that for each pixel on the screen there is a corresponding bit in memory. As the electron beam sweeps across the CRT, it is turned on or off depending upon the state of the bit assigned to that pixel (1 = off, or black; 0 = on, or white).

How can both the screen and the processor use the same RAM? The Macintosh memory design uses a standard technique called interleaving, where the screen and the processor alternate having access to the memory. Since the screen cannot be denied access, the processor must wait if there is a potential memory conflict (Figure 1). This type of RAM configuration is known as dual-port, where there are two independent and (seemingly) non-conflicting paths into the same memory area.

There are actually two screen buffers in RAM. The main buffer located at $7A700 ($1A700 in a 128K Mac), and an alternate buffer located at $72700 ($12700). Port A bit 6 of the 6522 VIA (Versatile Interface Adapter) is factored into the address decoding logic for the screen RAM and determines which buffer will be displayed. Figure 2 graphically describes the memory map and Figure 3 is a table showing the address location and effect on the memory map of VIA Port A.

In addition to the screen memory, the RAM also has a dedicated area set aside for the sound/disk speed buffer. This is accessed at the end of every horizontal retrace period and supplies an 8 bit value to the sound generator PWM (pulse width modulator) and a 6 bit value which is used to control disk motor speed. Again, as with the screen RAM, there is a main and alternate buffer at $7FD00 ($1FD00) and $7A100 ($1A100) respectively.

The memory access scheme for the ROM is much simpler than that of the RAM, since only the processor needs access to it. It is located at $400000 in both 512K and 128K Macs, and extends to $40FFFF (64K Bytes). ROM accesses always occur at full speed, with no wait states.

The ROM upgrade, rumored to be out this fall, expands the size of the ROM to 128K. It is interesting to note that the two ROMs are the only chips that are in sockets, suggesting that Apple foresaw this eventual need to revise and expand the ROMs. Unfortunately, any additional upgrades beyond 128K can only enhance and/or debug the ROM code unless there is (once again, as with the 256K RAMs) a new circuit board, since the ROM sockets cannot accommodate devices larger than 64K x 8 (there are two ROMs, making 128K total).

As with the screen and sound/disk speed buffers, there is a bit which affects the mapping of the entire RAM and ROM. The overlay bit (Figure 3) remaps the ROM to $000000 and the RAM to $600000 on reset. This is because the first four bus cycles after a reset, the 68000 fetches the supervisor stack pointer and the program counter from memory location $000000. This is where the RAM resides, but it contains invalid data at reset, so the ROM is placed there temporarily. After the exception tables are initialized and everything is set up, the overlay bit is cleared and the memory map returns to its normal configuration.

The electrical design of the Macintosh is elegant, although following in Apple tradition, is somewhat simplistic. For example, the address decoding for write operations to the 8530 SCC (Serial Communications Controller) relies on the 68000 to place the 8 bits of data on the high byte of the data bus when it is actually doing a write to the low byte. This it does, but Motorola warns that this is "a result of current implementation and may not appear on future devices." Apple is obviously gambling that Motorola won't change the implementation and that any parts they may buy from another source will perform identically. The benefit here is that the fewer the number of parts, the less there is to break and the cheaper the product is to manufacture.

Stay tuned for more Mac hardware, including future Apple Bus construction projects! If you have questions are ideas for future hardware topics, please share them with us. Write "The Electrical Mac" care of MacTutor.

Write for Mactutor

Earn while you learn!

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

The secrets of Penacony might soon come...
Version 2.2 of Honkai: Star Rail is on the horizon and brings the culmination of the Penacony adventure after quite the escalation in the latest story quests. To help you through this new expansion is the introduction of two powerful new... | Read more »
The Legend of Heroes: Trails of Cold Ste...
I adore game series that have connecting lore and stories, which of course means the Legend of Heroes is very dear to me, Trails lore has been building for two decades. Excitedly, the next stage is upon us as Userjoy has announced the upcoming... | Read more »
Go from lowly lizard to wicked Wyvern in...
Do you like questing, and do you like dragons? If not then boy is this not the announcement for you, as Loongcheer Game has unveiled Quest Dragon: Idle Mobile Game. Yes, it is amazing Square Enix hasn’t sued them for copyright infringement, but... | Read more »
Aether Gazer unveils Chapter 16 of its m...
After a bit of maintenance, Aether Gazer has released Chapter 16 of its main storyline, titled Night Parade of the Beasts. This big update brings a new character, a special outfit, some special limited-time events, and, of course, an engaging... | Read more »
Challenge those pesky wyverns to a dance...
After recently having you do battle against your foes by wildly flailing Hello Kitty and friends at them, GungHo Online has whipped out another surprising collaboration for Puzzle & Dragons. It is now time to beat your opponents by cha-cha... | Read more »
Pack a magnifying glass and practice you...
Somehow it has already been a year since Torchlight: Infinite launched, and XD Games is celebrating by blending in what sounds like a truly fantastic new update. Fans of Cthulhu rejoice, as Whispering Mist brings some horror elements, and tests... | Read more »
Summon your guild and prepare for war in...
Netmarble is making some pretty big moves with their latest update for Seven Knights Idle Adventure, with a bunch of interesting additions. Two new heroes enter the battle, there are events and bosses abound, and perhaps most interesting, a huge... | Read more »
Make the passage of time your plaything...
While some of us are still waiting for a chance to get our hands on Ash Prime - yes, don’t remind me I could currently buy him this month I’m barely hanging on - Digital Extremes has announced its next anticipated Prime Form for Warframe. Starting... | Read more »
If you can find it and fit through the d...
The holy trinity of amazing company names have come together, to release their equally amazing and adorable mobile game, Hamster Inn. Published by HyperBeard Games, and co-developed by Mum Not Proud and Little Sasquatch Studios, it's time to... | Read more »
Amikin Survival opens for pre-orders on...
Join me on the wonderful trip down the inspiration rabbit hole; much as Palworld seemingly “borrowed” many aspects from the hit Pokemon franchise, it is time for the heavily armed animal survival to also spawn some illegitimate children as Helio... | Read more »

Price Scanner via MacPrices.net

Apple’s 13-inch M2 MacBook Airs return to rec...
Apple retailers have 13″ MacBook Airs with M2 CPUs in stock and on sale this weekend starting at only $849 in Space Gray, Silver, Starlight, and Midnight colors. These are the lowest prices currently... Read more
Best Buy is clearing out iPad Airs for up to...
In advance of next week’s probably release of new and updated iPad Airs, Best Buy has 10.9″ M1 WiFi iPad Airs on record-low sale prices for up to $200 off Apple’s MSRP, starting at $399. Sale prices... Read more
Every version of Apple Pencil is on sale toda...
Best Buy has all Apple Pencils on sale today for $79, ranging up to 39% off MSRP for some models. Sale prices for online orders only, in-store prices may vary. Order online and choose free shipping... Read more
Sunday Sale: Apple Studio Display with Standa...
Amazon has the standard-glass Apple Studio Display on sale for $300 off MSRP for a limited time. Shipping is free: – Studio Display (Standard glass): $1299.97 $300 off MSRP For the latest prices and... Read more
Apple is offering significant discounts on 16...
Apple has a full line of 16″ M3 Pro and M3 Max MacBook Pros available, Certified Refurbished, starting at $2119 and ranging up to $600 off MSRP. Each model features a new outer case, shipping is free... Read more
Apple HomePods on sale for $30-$50 off MSRP t...
Best Buy is offering a $30-$50 discount on Apple HomePods this weekend on their online store. The HomePod mini is on sale for $69.99, $30 off MSRP, while Best Buy has the full-size HomePod on sale... Read more
Limited-time sale: 13-inch M3 MacBook Airs fo...
Amazon has the base 13″ M3 MacBook Air (8GB/256GB) in stock and on sale for a limited time for $989 shipped. That’s $110 off MSRP, and it’s the lowest price we’ve seen so far for an M3-powered... Read more
13-inch M2 MacBook Airs in stock today at App...
Apple has 13″ M2 MacBook Airs available for only $849 today in their Certified Refurbished store. These are the cheapest M2-powered MacBooks for sale at Apple. Apple’s one-year warranty is included,... Read more
New today at Apple: Series 9 Watches availabl...
Apple is now offering Certified Refurbished Apple Watch Series 9 models on their online store for up to $80 off MSRP, starting at $339. Each Watch includes Apple’s standard one-year warranty, a new... Read more
The latest Apple iPhone deals from wireless c...
We’ve updated our iPhone Price Tracker with the latest carrier deals on Apple’s iPhone 15 family of smartphones as well as previous models including the iPhone 14, 13, 12, 11, and SE. Use our price... Read more

Jobs Board

Licensed Practical Nurse - Womens Imaging *A...
Licensed Practical Nurse - Womens Imaging Apple Hill - PRN Location: York Hospital, York, PA Schedule: PRN/Per Diem Sign-On Bonus Eligible Remote/Hybrid Regular Read more
DMR Technician - *Apple* /iOS Systems - Haml...
…relevant point-of-need technology self-help aids are available as appropriate. ** Apple Systems Administration** **:** Develops solutions for supporting, deploying, Read more
Operating Room Assistant - *Apple* Hill Sur...
Operating Room Assistant - Apple Hill Surgical Center - Day Location: WellSpan Health, York, PA Schedule: Full Time Sign-On Bonus Eligible Remote/Hybrid Regular Read more
Solutions Engineer - *Apple* - SHI (United...
**Job Summary** An Apple Solution Engineer's primary role is tosupport SHI customers in their efforts to select, deploy, and manage Apple operating systems and Read more
DMR Technician - *Apple* /iOS Systems - Haml...
…relevant point-of-need technology self-help aids are available as appropriate. ** Apple Systems Administration** **:** Develops solutions for supporting, deploying, Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.