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

WhatsApp 2.2136.10 - Desktop client for...
WhatsApp is the desktop client for WhatsApp Messenger, a cross-platform mobile messaging app which allows you to exchange messages without having to pay for SMS. WhatsApp Messenger is available for... Read more
Thunderbird 91.1.1 - Email client from M...
As of July 2012, Thunderbird has transitioned to a new governance model, with new features being developed by the broader free software and open source community, and security fixes and improvements... Read more
Direct Mail 5.9.1 - Create and send grea...
Direct Mail is an easy-to-use, fully-featured email marketing app purpose-built for macOS. Create, send, and track great looking email campaigns that get results. Start your newsletter by selecting... Read more
LibreOffice 7.2.1.2 - Free, open-source...
LibreOffice is an office suite (word processor, spreadsheet, presentations, drawing tool) compatible with other major office suites. The Document Foundation is coordinating development and... Read more
Steam 2.0 - Multiplayer and communicatio...
Steam is a digital distribution, digital rights management, multiplayer and communications platform developed by Valve Corporation. It is used to distribute a large number of games and related media... Read more
Adobe Acrobat DC 21.007.20091 - Powerful...
Acrobat DC is available only as a part of Adobe Creative Cloud, and can only be installed and/or updated through Adobe's Creative Cloud app. Adobe Acrobat DC with Adobe Document Cloud services is... Read more
Carbon Copy Cloner 6.0.3 - Easy-to-use b...
Carbon Copy Cloner backups are better than ordinary backups. Suppose the unthinkable happens while you're under deadline to finish a project: your Mac is unresponsive and all you hear is an ominous,... Read more
Adobe Animate 21.0.9 - Animation authori...
Adobe Animate is available as part of Adobe Creative Cloud for as little as $20.99/month (or $9.99/month if you're a previous Flash Professional customer). Adobe Animate (was Flash CC) lets you share... Read more
Vivaldi 4.2.2406.44 - An advanced browse...
Vivaldi is a browser for our friends. We live in our browsers. Choose one that has the features you need, a style that fits and values you can stand by. From the look and feel, to how you interact... Read more
Adobe Acrobat Reader 2021.007.20091 - Vi...
Adobe Acrobat Reader allows users to view PDF documents. You may not know what a PDF file is, but you've probably come across one at some point. PDF files are used by companies and even the IRS to... Read more

Latest Forum Discussions

See All

PUBG New State crosses 40 million pre-re...
PUBG New State has received over 40 million pre-registrations on both Android and iOS, Krafton has recently announced. The futuristic, sci-fi PUBG Mobiletitle is all set to launch later this year, in October. [Read more] | Read more »
A Mere Husk of a Human Being – The Touch...
In this week’s episode of The TouchArcade Show I continue to be more or less out of my mind due to the exhaustion of having a newborn baby. Yes, I’ve been through all this before with our previous child, but somehow this is kicking my ass even worse... | Read more »
TouchArcade Game of the Week: ‘Night in...
I have said this probably dozens of times over the years, but there are tons and tons of cool video games on non-mobile platforms that people gush about all the time, and I always tell myself “I’ll definitely get around to playing that myself on [... | Read more »
SwitchArcade Round-Up: ‘Ni no Kuni II’,...
Hello gentle readers, and welcome to the SwitchArcade Round-Up for September 17th, 2021. In today’s article, we finish our look at the new games of the week with the Friday releases. Some fairly big games in the list today, like Ni no Kuni II:... | Read more »
‘LEGO Star Wars Battles’ from TT Games a...
Last month, LEGO Star Wars Battles () was revealed for Apple Arcade. | Read more »
COD Mobile: The 5 best SMGs in the game
COD Mobile is often lauded for its vast array of weapons and elaborate customization. With every update, the guns get some kind of nerfs or buffs. Regardless of that, SMGs remain popular with players for close to mid-range combat. [Read more] | Read more »
SEGA Will Reveal a New Mobile RPG at Tok...
A few days ago, there was a bit of buzz around the listing of a new RPG under SEGA / Atlus for Tokyo Game Show 2021. Tokyo Game Show 2021 begins later this month and both SEGA and Atlus will have games and updates to showcase. SEGA will be revealing... | Read more »
‘Castlevania: Grimoire of Souls’ and ‘Te...
This week’s Apple Arcade roundup has updates to four amazing games on the service and the addition of two new games. The first new game is Castlevania: Grimoire of Souls () from Konami. | Read more »
‘Indies’ Lies’ is a New Roguelike Deck B...
For several years, as the popularity of MegaCrit’s roguelike deck-building game Slay the Spire grew amongst PC gamers, lots and lots of mobile gamers hoped that the game would one day arrive on their mobile devices, where it seemed like a natural... | Read more »
‘Steam Highwayman: Smog & Ambuscade’...
Cubus Games have released a number of interesting gamebooks on mobile for a number of years now, including titles such as Heavy Metal Thunder and The Frankenstein Wars. Now at the end of this month they’ll be adding another to their catalogue with a... | Read more »

Price Scanner via MacPrices.net

This is the final week for Apple’s 2021 Back...
Apple’s Back to School promotion for 2021 continues through September 27, 2021, making this the final full week to take advantage of these offers. As part of this promotion, Apple will include one... Read more
Verizon offers $100 discount on Apple’s new 8...
Verizon has Apple’s new 8.3-inch iPad mini and 9th-generation iPad on sale for $100 off MSRP with an Unlimited service plan. Discount is for 64GB and 256GB cellular-enabled models. The $100 sale... Read more
Apple’s new 9th generation iPad and 8.3-inch...
Amazon is offering preorder discounts on Apple’s new 9th generation iPad and 8.3″ iPad mini (64GB WiFi models) ranging up to $40 off MSRP. Delivery is expected starting September 24th: iPad: – 10″... Read more
Xfinity Mobile offers new Apple iPhone 13 mod...
Xfinity Mobile has Apple’s new iPhone 13 family of smartphones on sale and available for preorder for $300 off MSRP for customers opening a new line of service. No trade-in is required. Cost of the... Read more
Verizon offers free Apple iPhone 13 and iPhon...
Verizon is offering an $800 discount on Apple’s new iPhone 13 and $700 discount on the iPhone 13 mini for new and existing customers with a qualified trade-in. Price of the iPhone 13 will be spread... Read more
Apple Product Announcements, As Of Late, Have...
COMMENTARY: 09.17.21 – If you were left feeling a little, “meh” following Apple’s latest product launch, you’re not alone. On Tuesday — in a pre-recorded virtual event dubbed, “California Streaming... Read more
Verizon offers 25% discount on Apple MagSafe...
Verizon has Apple MagSafe Chargers on sale for 25% off MSRP from 9/16/21 to 9/30/21. Verizon service is not required to take advantage of these savings. With the discount, Verizon’s sale prices are... Read more
Verizon offers $1000 discount on new Apple iP...
Verizon is offering a $1000 discount on Apple’s new iPhone 13 Pro and iPhone 13 Pro Max for new and existing customers with a qualified trade-in. Price of the iPhone 13 Pro will be spread over 24 or... Read more
New at AT&T: Apple iPhone 13 and 13 mini...
We’ve already told you about AT&T’s $1000 discounts on the Apple iPhone 13 Pro and iPhone 13 Pro Max. AT&T now has Apple’s new iPhone 13 and iPhone 13 mini discounted to $700 off MSRP for new... Read more
‘Mac Potpourri’ Story On Apple And Folding Sm...
FEATURE: 09.16.21 – A certain writer has been seemingly thrust into the limelight thanks to an article published last month on MacPrices. The article — a commentary on how Apple must “‘flip’ the... Read more

Jobs Board

Geek Squad *Apple* Consultation Professiona...
**829606BR** **Job Title:** Geek Squad Apple Consultation Professional **Job Category:** Store Associates **Store Number or Department:** 001422-Tualatin-Store **Job Read more
Geek Squad Advanced Repair *Apple* Professi...
**831864BR** **Job Title:** Geek Squad Advanced Repair Apple Professional **Job Category:** Store Associates **Store Number or Department:** 000011-Northtown-Store Read more
Geek Squad *Apple* Consultation Professiona...
**831828BR** **Job Title:** Geek Squad Apple Consultation Professional **Job Category:** Store Associates **Store Number or Department:** 000028-Green Bay-Store Read more
Sr Infrastructure Engineer - *Apple* MacInt...
**Sr Infrastructure Engineer - Apple MacIntosh** **Description** At Bank of the West, our people are having a positive impact on the world. We're investing where we Read more
Senior Software Developer - *Apple* (iOS/tv...
**SUMMARY** Hulu's Apple team is seeking an experienced Senior Software Engineer with a passion for mobile applications to join our team in Seattle. Our highly Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.