15

I'm learning more and more on how the original Macintosh series worked. I can't, however, find information in my research on how the Mac's video generator accessed the video RAM.

My assumption is that it used some sort of DMA transfer in correlation with the CPU. Much like the original Apple ][ did.

Of course, I don't think that is true DMA in the strictest term.

Anyway, did the original Mac do something similar? Did it halt the CPU while it fetched video data? Or, did it have its own dedicated video RAM that the CPU passed information into?

  • 1
    The Wikipedia page states "...128 KB RAM shared by the processor and the display controller..." and "The 68000 and video controller took turns accessing DRAM every four CPU cycles during display of the frame buffer, while the 68000 had unrestricted access to DRAM during vertical and horizontal blanking intervals" There is some un-annotated information here: en.wikipedia.org/wiki/Macintosh_128K/512K_technical_details – Joe Nov 21 '16 at 21:42
  • 1
    This article lowendmac.com/2014/inside-the-original-macintosh references a Byte article from 1984 that goes into a bit more detail (from Burrell Smith, the motherboard designer for the original Mac.) – Joe Nov 21 '16 at 21:45
  • 1
    BTW, you wouldn't call what the Apple II did "DMA" - the DRAM refresh and video RAM access were combined into one, and happened "between" each CPU bus access. The Apple II also had "real" DMA for peripheral cards. – dirkt Nov 21 '16 at 21:46
  • 1
    @dirkt: In the case of the Apple II, the accesses were transparent to the CPU. In the case of the Macintosh or Commodore 64, some video cycles were transparent to the CPU but some required the CPU to wait. – supercat Nov 22 '16 at 15:34
  • In case anyone's looking for even more detail than the above links, bigmessowires.com/2011/08/25/… is an article giving precise details of the implementation for a clone of the Mac Plus (which apparently used an identical approach to the original Mac). – Jules Oct 21 '17 at 2:35
9

Access to the memory is toggled between the CPU and the video controller every four CPU cycles (the length of a word access[2#p32]) during display of the frame buffer.[1§2] The processor is a Motorola 68000 @7.8836 MHz, meaning that this lock / unlock happens approximately every 0.5 microseconds. During blanking intervals, the CPU has exclusive access to the DRAM,[1§2] except during the last word access where the sound generator has access.[2#p32]

Access to RAM is divided into synchronous time slots, with the 68000 and video circuits sharing alternate word accesses during the live portion of the horizontal video-display line and the sound circuits using the video time slot during the last memory bus cycle of the horizontal line. Although the access to RAM is divided three ways, the 68000's share is maximized by giving it access to unused cycles during horizontal and vertical blanking. This way, 68000 access to RAM averages to a speed of about 6 MHz.[2#p32]

From this information I conclude that the Macintosh Classic does in fact use a form DMA to display video: more specifically, cycle-stealing mode. It is not clear that there is a DMA controller as such - there may only be the blanking interrupts and the assumption that the code's memory reads and writes will be spaced appropriately.

  • I read that entire article and it was very informative. Exactly the kind of information I was looking for. – cbmeeks Dec 5 '16 at 18:43
  • 3
    If I remember right (it's been a while), the SE had a slight performance improvement over the Plus, due to the fact that the video bus was wider than in the Plus, so it had to steal fewer cycles. (25% as opposed to 50%) – mschaef Mar 2 '17 at 14:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.