Saturday, December 9, 2023

The Mockingboard 4c - Adding Sound Card Functionality to the Apple IIc


Among the Apple II models, the IIc is undoubtedly the restricted of the bunch. The system integrated just about every necessity for mid-1980s computing, a built in disk drive, serial ports for printing and telecommunications, an external drive and a joystick/mouse port. The Apple II line has been previously well-appreciated for its expandability, with each of the three predecessor models having multiple general-purpose expansion slots. For the compact IIc, there was no capability to upgrade the system internally at first, later IIcs permitted an internal memory expansion. This meant that software that did not use a built in peripheral had to be updated to support similar peripherals which had to be accessed in other ways. Today we are going to look at a product that tried to go a different route and try to answer whether it succeeded!

Introduction to the Mockingboard 4c

The Apple IIc's (and IIc+) support for sound output beyond its internal speaker was, during its original lifespan, limited to serial devices like the Mockingboard D and The Cricket. These devices were accessed in a very different way at the hardware level compared to the internal Mockingboard, Phasor and Echo+ sound cards which were meant for the internal expansion slots of the II, II+, IIe and IIgs. The existing software had to be updated to support the serial based devices and they were not the greatest sellers, nor was the Apple IIc. A very few software titles, most notably Will Harvey's Music Construction Set, were updated to support the serial-based sound cards, but most games supported only the internal options.

So for 30 years or so after the Apple IIc's release in 1984 if you wanted to play Mockingboard-supporting Apple II games, you were not playing them on an Apple IIc. In 2016 a South Korean enthusiast named Ian Kim developed an upgrade that would provide the equivalent of a Mockingboard with two music chips and sold it as the Mockingboard 4c. You can use the Mockingboard 4c in either an original Apple IIc (A2S4000) or a Memory Expansion Apple IIc (A2S4100). I got one for Christmas, installed it in my Apple IIc and played enough games with it that I can give a competent review of the upgrade.

Kim sells the Mockingboard 4cs in batches on eBay. I got one of his last boards from his last batch. The Mockingboard 4c is contained on a single PCB which has a 65C22 VIA (in a PLCC package), a pair of General Instruments AY-3-8910s or Yamaha YM-2149s PSGs and a CPLD. (Prior releases used the smaller AY-3-8913s.) Also included are a pair of small speakers for stereo sound that can be fitted inside the case with a 4-pin connector and a wire with a 2-pin connector.

Installing the Mockingboard 4c

The installation process is easy if you have already opened your IIc before. The reason why the mod is so easy is because the CPU is socketed in the Apple IIs, including the IIc. You only have to remove the CPU from its socket, insert the Mockingboard 4c into the CPU's socket, put the CPU in the socket on the Mockingboard 4c's socket and plug in the speakers. Chris Torrence's video on the product covers the installation quite well. The solder side of the Mockingboard 4c has a pair of 2x20 pin rows to plug into the CPU socket. Additionally, if you have the awful early keyboards which came with the Apple hairpin spring keyswitches, you will need to remove or trim down the plastic reinforcement bracket on the underside of the keyboard PCB.

There is an optional part to the upgrade, the only part of the upgrade which involves soldering. This option will allow you to use the volume wheel to control the volume level of the Mockingboard 4c's audio output. The upgrade package comes with a wire with a 2-pin header which connects to the Mockingboard 4c. The other end of the wire has to be soldered to the middle pin of the hybrid IC found near the volume wheel. The pins on my hybrid were a bit coated with ceramic or epoxy and I needed to scratch off a bit of it with an X-acto knife to get enough metal for the solder and the joint to take. I suggest putting a piece of electrical tape on the surface of the PCB near the pins so you do not nick a trace by accident if you have to scrape. There are a pair of volume control potentiometers on the Mockingboard 4c's PCB which you can use to control the volume of each AY chip, but unless you like to run your IIc without its cover, you are rather stuck to the volume set.

The Apple IIc has indentations in the front middle of its case for its single speaker. It has plenty of room on each side of the front vents to place the Mockingboard 4c's speakers but no way to fix them in place. Hot glue or electrical tape may be used to keep them fixed, but make sure they are not touching any metal on the PCB. There is a 4-pin header on the PCB for a line out jack and Kim used to include an adapter with a 3.5mm mini-jack, but he does not anymore and that adapter would require drilling a hole in the case. The bottom of the case on the right side has a recessed area that would be suitable for a line out jack. There is a 2-pin header on the PCB next to the line out header for muting the Mockingboard 4c.

The fact that Apple socketed its CPUs is the reason why the mod has some popularity. If the user had to desolder the CPU I doubt Kim would be able to justify multiple batches of the Mockingboard 4c. Kim also makes the Mockingboard 4c+ which is the same upgrade for the IIc+ but the two upgrades are not interchangeable. 

The Compatibility Issue

The Apple II's 50-pin expansion bus is mainly an extension of the CPU's bus along with power and ground lines, clock signals and a few helper signals. Because the CPU is socketed and the source of most of those signals, it is possible to "piggyback" an expansion card by connecting a PCB directly to the CPU's socket. The space between the CPU and the keyboard is somewhat limited, so space considerations of the piggybacked expansion card become very important. You cannot use the Mockingboard 4c with a full-fledged memory upgrade like the Applied Engineering Z-RAM Ultra but there are compact versions of the ROMX upgrade which can be fitted underneath the Mockingboard 4c.

Each of the seven general purpose slots in an Apple II, II+ or IIe have full access to the CPU's data and address lines, but Apple decided to allow expansion cards to use assigned memory addresses in a specified range with a minimum of address decoding logic. Each slot has 16 locations assigned to it for input/output and 256 locations for on-board read only memory, but in reality the card can do whatever it wants with its assigned memory address locations.

In other Apple II machines this is not a big issue, the user can choose what card resides in which slot and make his or her choices about the functionality their computer will have. In the Apple IIc, the choices were made for the user when the system was designed and built. Thus for slots 1 and 2 you have the equivalent of Super Serial Cards, slot 3 80-column functionality, slot 4 a mouse interface and slot 6 an advanced Disk II interface.

The Mockingboards can be used in any slot from 1-7 in an Apple II, II+ and IIe, but the convention became to use it in slot 4. The Mockingboard 4c is set to use slot 4. The Mockinboard's 6522 VIA registers reside in the same memory locations ($C400-$C4FF) in slot 4 as the mouse interface firmware. (There is no direct access to the AY chips on a Mockingboard, they are programmed through the VIAs.) This conflict will cause many games to fail to recognize the Mockingboard 4c. 

As the mouse firmware cannot be disabled in hardware, Mockingboard 4c stays dormant when the system boots so the mouse functionality is not lost. Some games just blindly write to the Mockingboard and any write to the slot 4 firmware area will enable the Mockingboard 4c. But if a game tries to detect the Mockingboard and fails, then you must manually turn on the Mockingboard 4c and then boot to the game. This is done either by the BASIC command POKE 50179,255:POKE50180,255 or entering the machine language Monitor with CALL-151 and then C403:FF FF. After that you can boot your game disk using PR#6 in BASIC or C600G in the Monitor. One the Mockingboard is manually enabled, it will stay that way until the system is powered off.

Between selecting a Mockingboard, setting slot 4 in the game or turning Mockingboard 4c on manually, most Mockingboard games will work. However, there are other reasons why they might not work. Some games, Ultima IV in particular, will detect that they are being run on an Apple IIc and will not let you select a Mockingboard with the Activate Mockingboard option in the main menu. Those screens will just not appear. Some early Mockingboard titles may refuse to run on an Apple IIc period. Kim hacked Ultima IV, Zaxxon and the (Not So) Cheap Tunes demo to work with Mockingboard 4c.

I do not own an Apple IIc mouse so I cannot be sure if the Mockingboard 4c presence breaks mouse functionality. I do not believe it should because firmware memory is meant to be read while the Mockingboard VIA and PSG registers are generally written. As long as the $C400-$C4FF memory area is not written, then the Mockingboard 4c should remain dormant and not interfere with the mouse functions. Mouse support in the 8-bit Apple II was not widespread in titles. There are more games that support the mouse than you might think. AppleWorks, Apple II Desktop and MouseWorks support mice. Fortunately only two of them support Mockingboard and neither work with the 4c.

Testing and Using the Mockingboard 4c

I keep a spreadsheet of all known Apple II Mockingboard software, both contemporary and modern titles. I try to keep it as comprehensive as possible with all the important information I see fit to put in it. I update it regularly when new information comes to my attention. I have personally tested every game on the Mockingboard 4c Compatibility tab for compatibility. In order to speed things up with testing, I made a bootable disk image which automatically enters the POKE commands in BASIC to turn on the Mockingboard 4c and nothing else. From there you can swap the disk and then type PR#6 to boot a game disk. 

While most Mockingboard games are compatible with the Mockingboard 4c, the lack of a provision for a speech chip or socket to add one means that some Mockingboard games will not work or will work to a lesser extent than they would with a fully loaded Mockingboard. Some games may work properly on Total Replay but not with their standalone disks. Running Total Replay is possible with all IIcs machines without resort to hardware more exotic than a wDrive or Floppy Emu and a ROM upgrade for the earliest models with the ROM 255 BIOS.

Unfortunately, the installation of the device will break at least one prominent game, Prince of Persia. I tried the original woz images in both 140K and 800K versions and Total Replay and the game will not work with the IIc and a Mockingboard 4c. The Mockingboard 4c must be removed to restore the game's functionality. While Prince of Persia does not use a Mockingboard, it does use vertical blank detection which is tied to the mouse interface on a IIc.

It should also be noted that a soft reset of the Apple IIc with Ctrl + Open Apple + Reset will not work properly once the Mockingboard 4c has been activated. You'll be booted to the monitor somewhere in the C4xx range, as if the mouse firmware is trying to execute itself and comes into conflict with the Mockingboard's registers at this point. Trying to boot software thereafter will generally be unsuccessful. Your only option is to power cycle the system like an Apple II+.

The speakers which come with the Mockingboard 4c provide adequate sound, but stereo separation is a bit difficult to place given how close the speakers are to each other. The Mockingboard 4c does not have the heavy low pass filtering of the original Mockingboard and (especially) Phasor, so you may hear "machine thinking sounds" at higher volumes.

Ultima V can support more than the two music chips found on the Mockingboard 4c. The difference between a 2 chip and a 3 or 4 chip solution is not immediately noticeable outside the music for "Lord Blackthorn" and possibly "Ultima Theme".

I did not test the demos (except for the ones identified in the manual or tested by YouTubers), demakes and most of the demonstration software. I have not even run most of those software titles on my Apple IIe. As testing most games requires at least two power cycles (with and without manual enable), the testing process can be a hard on hardware.

In my spreadsheet, the Special Requirements column does not give the regular requirements to run the game, look to the other tabs for those. Obviously Slot 4 must be selected for any title that has a slot selection. For Ultima IV, you only need a special version of the Program disk, the other three disk sides must be taken from a regular release of the game. The titles that Kim modified can be difficult to find and download, so I have gathered them and other less than easy to find versions into an archive. I also included the boot disk I made that enters the POKE commands to manually enable the Mockingboard 4c. Finally I included the English-language version of the Mockingboard 4c's manual. Ultima IV for Apple II, Remastered also indicates supports for the Mockingboard 4c.

Final Thoughts

Is the Mockingboard 4c a good upgrade for your Apple IIc? Right now it is not available but Kim was selling them on eBay for $144 + $24 shipping recently. Supplies of vintage chips and demand for the product will play large roles in whether he makes another batch. In terms of upgrades for a new Apple IIc user I would highly recommend a Floppy Emu as your first upgrade and a MacEffects IIc Replacement Keyboard for your second (if you have the hairpin spring keyboard). I might even suggest replacing the keyboard first if you have a good disk drive in your IIc and money is tight, get an ADTPro serial cable to write disk images.

It cannot be stressed enough that the Mockingboard 4c is trying to do something the Apple IIc was never intended to do, run a sound card in "Slot 4" whose memory locations are already reserved for the mouse firmware. Compatibility will never be 100% with Mockingboard supporting software. I have personally been able to get 42 software titles working one way or another. Others may be able to speak to software titles I was unable or unwilling to test. The Mockingboard 4c is not just a "portable Ultima upgrade."

I anticipate someday that there will be a version of this upgrade, maybe from Kim, maybe from someone else, which will be fully FPGA based. That should reduce the board's footprint considerably and probably be able to support more music chips, a second VIA, slot remapping (slot 5 has no conflicts in the IIc) and possibly speech chips. Until then hopefully he makes more of these Mockingboard IIcs. If you really want your IIc to play Mockingboard music and sound effects, then by all means try to buy one.

Addendum: The Monitor Crash Fix

Since I obtained my Mockingboard 4c I read that in Apple IIc ROM versions 3 & 4, the Mouse firmware routines were moved from "Slot 4" to "Slot 7." Having hypothesized that those firmware routines were conflicting with Mockingboard writes as they both occupied Slot 4, I decided to try a later firmware revision to see if that would help with games crashing to the monitor after a soft reset. I decided to go with the custom rom4x firmware and had ReactiveMicro burn me an EPROM containing that firmware. Fortunately firmware ROM chips are socketed on the Apple IIc and use a standard EPROM-friendly pinout. Now the Mockingboard 4c will not crash the system to the monitor after a Ctrl + Open Apple + Reset. This means you can play multiple Mockingboard games without having to power down the system and manually enabling the Mockingboard for the many games that require it. It will not get games like Prince of Persia working when the Mockingboard 4c is installed.

2 comments:

  1. as the author of many of those demakes/demos I apologize for making life difficult. Most of my code attempts to activate the Mockingboard 4c properly and so should run. I've recently been testing under MAME with IIc support so as long as MAME is emulating things properly my more recent releases should run with proper audio.

    ReplyDelete
    Replies
    1. Awesome, I would very much like to try them out and hope to do so soon. I hear Santa's elves are working on a clicky little gift for me which will make my Apple IIc's usage so much easier.

      Delete