home *** CD-ROM | disk | FTP | other *** search
- NOTE: This is the text of an article that appeared in Amazing Computing. It
- refers to some pictures that were in that article. It can be done
- without the pictures. Also reference is made to 'make512' to get
- around the problem with WB 1.2 & following. See the accompanying
- articles that show better ways around that problem.
- ----------------------------------------------------------------------------
-
- A Megabyte without Megabucks
-
- by Cris Erving
- Copyright 1986, All Rights Reserved
-
- If you have tried to do any serious development work with
- C, or if you have worked with memory-intensive programs like
- Aegis Draw, you have undoubtedly become acquainted with the
- Amiga's biggest limitation... its lack of memory. Although
- 512K seems like a lot at first, it is very easy to use it
- all up, especially if you do a lot of graphics. The
- conventional solution is to go out and buy an external
- memory expansion board. Although these boards are nice,
- they cost about $350 and up, which puts them out of the
- reach of many of us impoverished Amiga users. Fortunately,
- there is a solution. For about $70 and an evening of
- hacking, you can internally expand your 512K Amiga to a full
- megabyte. A word of warning first: this hack is not
- supported by Commodore, and voids your warranty. If you
- aren't comfortable playing around inside your computer, you
- would probably be better off saving up for an external
- board, or finding somebody who can do the upgrade for you...
- ask around at your local users' group. That being said,
- let's start hacking!
-
- First, you will need to get some memory chips from your
- favorite chip supplier. IC Express, Microprocessors
- Unlimited, and JDR Microdevices are good sources of memory
- chips... look them up in 'Byte' or 'Computer Shopper'. You
- need sixteen 4464-type 256K RAM chips, rated 150 ns or
- faster. These are NOT the same 256K RAM chips that the IBM
- PC uses... those are 41256-type RAM chips, and will NOT
- work in the Amiga! You will also need some wire (28-gauge
- wire-wrap wire is nice), eight 18-pin solder-tail sockets
- (NOT 16-pin!), and eight 33 ohm, 1/4 watt resistors. You
- will also need a low-power soldering iron with a very fine
- tip; I recommend that you use one rated under 20 watts.
- Radio Shack sells a decent 15-watt iron with a grounded tip
- for about $6... ask for stock number 64-2051.
-
- OK, disconnect everything from your Amiga, and lay it
- upside-down on a table. Unscrew the phillips-head screws
- that hold the top on; they are inside deep recesses, and
- there are 5 of them. Also remove the two smaller screws
- near the front of the computer, which hold the bezel on.
- (See Photo 1). After you have done this, put a piece of
- tape over the holes to keep the screws from falling out, and
- turn the computer rightside-up. With a flat-blade
- screwdriver, carefully pry the lid off the top of the
- computer; you will hear a pop as each of the four catches
- comes off. Lift the lid off, and you will see a large metal
- shield. (See Photo 2). Remove it; you will have to twist a
- few metal tabs to get it completely off. There are about 15
- screws holding this shield on, so if it won't come off you
- probably missed a screw. Lift off the bezel; you will have
- to pull two small plastic tabs back to remove the two LED's
-
-
-
- from the bezel.
-
- You will now see the main board, with a smaller
- "daughter" board piggybacked upside-down on top of the main
- board. (See Photo 3). This is the Kickstart RAM board.
- Remove the 3 screws holding the daughter board, and
- carefully pry the daughter board out of its sockets by
- gently rocking it back and forth. Use care, as the header
- pins that connect the daughter board bend easily if you
- apply too much force.
-
- If you look at the front and the left side of the Amiga's
- mother board, you will see some letters and numbers
- silkscreened on the board. Chips on the Amiga's PC board
- are located at the intersection of a row number and a column
- letter. For example, a chip located at 1C is in the first
- row, column C. Near the expansion RAM port you will see
- three IC's - two 74F138's and a 74F399. From left to right,
- these IC's are located at position 1H, 1I, and 1J. Also,
- you will see the eight RAM chips on the Amiga's mother
- board, located at 1B-1E and 2B-2E. These RAM chips will be
- marked "4464", "41464" or "50464". (See Photo 4).
-
- Take the eight 18-pin sockets, and clip pin 16 off of
- each one, as close to the socket as possible. Now, solder a
- socket on top of each of the RAM chips on the Amiga's PC
- board, making sure that the socket matches the RAM chips'
- orientation. Don't use any more solder than it takes to get
- a good connection, and let the RAM chips cool down a few
- seconds between each solder joint. A solder bridge here is
- extremely difficult to remove, so be careful and take your
- time. If you did this correctly, you will have soldered all
- 18 pins except for pin 16, which you clipped off of each
- socket. (See Photo 5)
-
- With a pair of fine cutting pliers, CAREFULLY clip pin 3
- of the two 74F138's (at 1H and 1I) as close to the PC board
- as possible, and bend the pins up away from the PC board.
- IC pins are numbered counterclockwise from the notch (or
- dot) at one end of the chip, so pin 3 will the the third pin
- from the front on the right side. Do the same with pins 11
- and 12 of the 74F399 at 1J. Connect a wire between pin 3 of
- both 74F138's and pin 10 of the 74F399. Connect another
- wire between pin 12 of the 74F399 and pin 8 of the 74F399
- (which should still be soldered to the PC board). Cut a
- wire about 8" long, and solder it to pin 11 of the 74F399;
- leave the other end loose for now. Label the loose end of
- this wire "A19" with a small piece of tape; this will make
- life easier later on. (See Photo 6). Check your work
- before you go any further.
-
- Take the sixteen 4464-type RAM chips you bought, and
- CAREFULLY cut the narrow part of pin 16 off of each chip.
- Do NOT cut the pin off entirely... only cut off the narrow
- part! Now comes the tricky part. Solder one of these chips
-
-
-
- on top of another one, being very careful that you have them
- pointed the same direction; you can tell by the notch on one
- side. You will be soldering all pins EXCEPT for pin 16,
- which you clipped short. These chips are static and heat
- sensitive, so it's a good idea to use a grounded soldering
- iron and as little heat and solder as is necessary to get a
- good electrical connection. Be extremely careful not to
- accidentally create any solder bridges between the RAM chip
- pins. It wouldn't hurt to solder them together over a piece
- of aluminum foil to reduce static, either. Repeat the
- process for the other chips. What you will end up with is
- eight "piggybacked" RAM chip pairs, that is, eight sets of
- two RAM chips stacked on top of one another.
-
- Make eight wire jumpers about 1 1/2" long. Take two of
- the piggybacked RAM chip "stacks", and solder a jumper from
- pin 16 of the top RAM chip on one of the stacks to pin 16 of
- the top RAM chip on the other stack. Solder a 6" wire to
- pin 16 on one of the chips; the other end should be left
- free. Do the same for the bottom RAM chips. You should now
- have two stacks with two short wires connecting them, and
- two longer wires attached to them. Repeat this process for
- the other RAM chip stacks. When you are done, you should
- have four sets of two chip stacks, with each set connected
- by two jumpers and each set having two longer free wires.
-
- Insert a set of RAM chip stacks into the RAM sockets on
- the mother board at 1B and 1C, making sure that the
- orientation is correct. The notches on the RAM chips should
- be facing towards the front of the computer. Do the same
- for the other three RAM chip stacks, placing them in the
- sockets at 1D and 1E, 2B and 2C, and 2D and 2E. Now, label
- the eight free wires coming from the RAM chip stacks as
- follows: (See Photo 7)
-
- From the Bottom RAM at 2E/2D : LC4
- From the Top RAM at 2E/2D : LC6
- From the Bottom RAM at 1E/1D : LC5
- From the Top RAM at 1E/1D : LC7
- From the Bottom RAM at 2C/2B : UC4
- From the Top RAM at 2C/2B : UC6
- From the Bottom RAM at 1C/1B : UC5
- From the Top RAM at 1C/1B : UC7
-
- Take the eight 33 ohm resistors, and trim the leads of
- each one to about 1/4". Solder one resistor to pin 7 of the
- 74F138 at 1H. Do the same at pins 9, 10, and 11. Repeat
- the process with the other four resistors and the 74F138 at
- 1I.
-
- Solder the eight wires coming from the RAM chip stacks to
- the free end of the eight resistors as follows: (See Photo
- 8)
-
- UC7 to the resistor at 1H, pin 7
-
-
-
- UC6 to the resistor at 1H, pin 9
- UC5 to the resistor at 1H, pin 10
- UC4 to the resistor at 1H, pin 11
- LC7 to the resistor at 1I, pin 7
- LC6 to the resistor at 1I, pin 9
- LC5 to the resistor at 1I, pin 10
- LC4 to the resistor at 1I, pin 11
-
- Solder the wire marked "A19" to pin 3 of the IC on the
- daughter board marked "DPALCAS". It's located at the rear
- end of the daughter board at location 6K, and the IC has the
- marking "PAL16L8" on it. (Photo 8) Put the daughter board
- back, making sure that all of the header pins fit into the
- header sockets on the daughter board. Finally, replace the
- 256K expansion ram cartridge in its slot.
-
- You are now ready for the moment of truth. With the
- cover off (in case you need to debug this mess!), hook the
- keyboard, monitor, and power to your Amiga. Turn it on. If
- the computer won't boot (i.e. you don't see the Kickstart
- or Workbench screens), you have wired something incorrectly
- or you have a solder bridge somewhere... turn the Amiga off
- and retrace your work. Pay particular attention to the
- order of the wires; this is quite critical. If you got to
- Workbench, you will need to use the AddMem utility to tell
- your Amiga to make the extra memory available. This utility
- came with the developer's package, and is also on Amicus
- Disk 4 (along with the C source!). To add all 512K to free
- memory, type 'AddMem 80000 FFFFF'. You should now have a
- total of 1 megabyte to play with; if something seems wrong,
- turn the computer off and check your wiring. There is
- another utility called Avail on the utility disks, which
- will tell you how much memory you have. To use it, simply
- type 'Avail'; it will tell you how much Chip and Fast RAM
- you have. (The 'Maximum' column should read 1048568). You
- can also use the Gfxmem utility to show you how much memory
- you have; this program appears on several of the Amicus and
- Fish disks. A hint: if AddMem seems to work, but you get
- an AmigaDOS error when you do a DIR, you might have reversed
- the UC and LC wires... go back and check your work. When
- you are satisfied of the memory's operation, replace the RF
- shield, the bezel, and the covers, and you are in business.
-
- OK, time for the technical discussion. The reason this
- works is that Amiga most generously did not fully decode the
- lower 2 megabyte RAM space that the internal 256K and 256K
- expansion RAM fit into. They DID decode 1 megabyte, but
- they only used half of the available memory select lines.
- This makes it fairly easy to add the other 512K, because we
- don't even need to add any decoding IC's, just some jumpers.
- Basically, we take the memory Column Address Strobe (CAS)
- signals that are unused, and connect them to our piggybacked
- memory. The only problem with doing this is that we have to
- restrict the 3 custom chips to the lower 512K. Fortunately
- again, there is already a multiplexer on board which selects
-
-
-
- between Chip and 68000 addresses (the 74F399, which is a
- latched quad 2/1 multiplexer), and it has some unused
- sections. So, we connect input I0C at pin 11 of this IC to
- A19, which is the source for the extra address line from the
- CPU, then we connect input I1C at pin 12 to ground, which
- assures us that the custom chips will always "see" the lower
- 512K. The output of the multiplexer, QC at pin 10, drives
- the upper address bit of the two 74F138 3/8 demultiplexers,
- which are gated with UDS and LDS to produce the extra upper
- and lower CAS signals that the new RAM chips need. The 33
- ohm resistors help reduce ringing on the CAS lines; this is
- especially important with long lengths of fine wire, such as
- we are using. Each pair of 74F138 outputs represents 128K
- of memory; since there are four selection pairs available,
- we can select up to 512K. See the schematic below for all
- the gory details.
-
- What you end up with is your normal 512K of Chip RAM,
- mapped from $000000 to $07FFFF, and another 512K mapped from
- $080000 to $0FFFFF. This 1 megabyte "shadows" over the next
- 1 megabyte, (from $100000 to $1FFFFF) because the next
- highest address bit (A20) is not used for decoding. This 1
- megabyte was "reserved" by Commodore for internal memory
- expansion, and you could theoretically add another megabyte
- of RAM chips (along with a few more decoder and glue chips
- to decode this address space), giving you 2 megabytes of
- RAM. I say theoretically, because you will run out of power
- long before you have reached 2 megabytes. One megabyte,
- however, does not tax the Amiga's power supply, and leaves
- you with enough left over for a few goodies like A-Time and
- Digi-View.
-
- A few other topics before I sign off. First, you may be
- wondering whether this is "Fast" memory or "Chip" memory.
- The answer is that it is neither. Fast memory resides
- directly on the processor buss, with no possibility of
- contention by the custom chips. Chip memory is memory which
- the custom chips can access. What we have here is Chip
- memory which the custom chips cannot access. (Of course,
- AmigaDOS thinks it's Fast RAM...). A better term for this
- memory might be "Synchronous" memory, since it is
- synchronized to the custom chips because it is on their
- memory buss, but it is not available to them. This means
- that it will slow down when heavy DMA activity is going on;
- in practice, however, this seldom happens. Also, because
- this memory is not on the 68000's expansion buss, it cannot
- auto-configure; this is why you need to use AddMem. Of
- course, this also means that it doesn't use up any of your
- auto-config address space, too.
-
- You may also be concerned about compatability with future
- Amiga hardware, namely Sidecar and Zorro expansion boxes.
- Since the lower 2 megabytes of address space "shadows" if it
- is not fully decoded internally, it is not possible to use
- this address space from the expansion port, because both the
-
-
-
- expansion buss and the internal memory would try to be on
- the processor's buss at the same time. Because of this,
- there is no way an external expansion box could conflict
- with your synchronous RAM. Since this RAM does not map into
- the auto-config space, you don't have to worry about
- conflicts with any Zorro boxes you may add later, since
- Zorro boxes only map into auto-config space.
-
- Finally, there is one last question... if it's so easy
- to add the memory, why didn't Amiga do it themselves? I
- don't know why; maybe they thought 512K was plenty of
- memory. Considering the software they had at introduction
- (i.e. Textcraft), that may have been understandable. It
- would have been so easy for Amiga to allow us to expand to 1
- or even 2 megabytes by simply plugging in a RAM cartridge
- that any excuse on their part is unforgivable. Not only are
- the CAS lines already on the board, but the are a whole
- bunch of lines on the expansion RAM cartridge which are
- arbitrarily tied to +5 volts or ground, so there's already
- plenty of room on the connector for the extra RAM select
- lines. The extra power required for 2 megabytes would only
- have been a few amps, so it wouldn't have cost them very
- much to upgrade the power supply.
-
- One final note is in order. If you try to use this
- memory with Workbench 1.2, you will find that Workbench 1.2
- tries to auto-configure the extra memory as Chip RAM. This
- is probably due to the fact that the new "Fat Agnus"
- graphics chip will be able to address 2 megabytes, rather
- than the 512K that the current Agnus chip supports. If
- there was no fix, this would cause serious problems, because
- graphics and other chip data could be loaded into a location
- which the chips could not access, resulting in an almost
- certain visit from the Guru. Fortunately, there is an easy
- way around this. The program listed below, which is a
- Lattice C program called make512k, will automatically turn
- your computer back into a 512K machine. Then you can use
- AddMem to make the extra memory available, just as you would
- with Workbench 1.1. Make sure that make512k and AddMem are
- called at the very beginning of your s/startup-sequence
- file, and you will have no problems. I have been running
- with late beta versions of 1.2 for over 2 months without any
- problems. ( see accompanying articles for better ways to fix
- this problem).
-
- All in all, it's a nice little hack, and I hope a lot of
- you take advantage of this cheap way to double your memory.
- It's amazing how many uses for more memory you can find once
- you have it. You can copy your C: directory to RAM:, do an
- ASSIGN C: RAM:, and your CLI commands will execute almost
- instantaneously. You can use RAM: for all your workfiles,
- then copy them to the disk when your're all through... a
- large Aegis Draw drawing takes much less time to save this
- way. Lattice C compiles speed up enormously when you copy
- the include and library files to RAM:. You can finally take
- full advantage of the Amiga's multi-tasking without worrying
-
-
-
- about the Guru... I like to play Reversi while I'm waiting
- for Aegis Draw to redraw the screen. It sure makes using
- the Amiga a lot more fun. After all, that's what we bought
- an Amiga for!
-
- About the Author
- Cris Erving is the Systems Manager of a Digital Equipment
- VAX 8600 installation at a large California heavy equipment
- dealership. He is very active in the AmigaTech Users Group,
- which is based in the Los Angeles area. His interests are C
- programming, CAD/CAE, hardware hacking, and "taking the
- Amiga apart".
-
-
-
- Photo Captions
- ==============
-
- Photo 1:
- The underside of the Amiga. The arrows point to the 5
- screws holding the case together, and the 2 screws holding
- the bezel on.
-
- Photo 2:
- The Amiga with the top cover removed. The RF shield is the
- large shiny object in the middle. This particular shot is
- with the screws already removed.
-
- Photo 3:
- The Amiga with the RF shield removed. The Kickstart
- daughter board is the S-shaped board sitting on top of the
- main board. The 3 arrows point to the screws holding the
- daughter board on.
-
- Photo 4:
- The Amiga's RAM chips and the two 74F138's and the 74F399
- that we are concerned with. If you look hard you can see
- the notch and the dots on the chips that point to pin 1.
-
- Photo 5:
- The RAM chips with the sockets soldered to them. I can't
- stress enough that you have to be careful when soldering in
- these close quarters, in order to prevent solder bridges.
- The arrows point to the pins on the two 74F138's and the
- 74F399 which are clipped... the extra arrow at pin 7 of the
- 74F399 should be ignored.
-
- Photo 6:
- Closeup of the 3 logic chips and the added jumpers. Note
- that pin 3 of both 74F138's have been cut, as well as pins
- 10 and 11 on the 74F399. The wire marked "A19" is about 8"
- long.
-
- Photo 7:
- The piggybacked RAM chips with their pin 16 wires. Although
- you don't have to mark them, it makes life much easier.
-
- Photo 8:
- The completed upgrade. Although it looks like a plate of
- spaghetti, it's really not THAT bad. You could route the
- wires nicely around the IC's, if you are so inclined.
- Notice the resistors soldered to pins 7,9,10, and 11 of the
- 74F138's, and the "A19" wire soldered to the PAL16L8 at 6K
- of the daughter board.
-
- Photo 9:
- The moment of truth. Does it work?.... you bet!
-