Sega Master System / Mark III / Game Gear
This page explains how to create a 256K (Two Megabit) rewritable cartridge for the Sega Master System. It involves modifying an existing cartridge with 315-5235 mapper chip.
Here's a parts list - prices (UK Pounds) and part numbers given are Maplin's.
|Component||Qty.||Maplin Code||Maplin Price (ea.)||Total Price|
|Harris/ICL 7673 (battery backup watchdog chip)||1||*||1.51||1.51|
|2.2kohm micro-miniature resistor||1||U2K2||0.06||0.06|
|4001 quad 2-input CMOS NOR gate IC||1||QX01B||0.33||0.33|
|CR2032 3 volt lithium battery||1||ZB74R||1.69||1.69|
|Ultra-miniature panel mounting SPDT toggle switch||1||FH98G||0.93||0.93|
|NEC 431000 32 pin, 1MBit, 8 bit, low power CMOS SRAM chip||2||UM72P||3.40||6.80|
|Total (excluding VAT)||11.32|
|Total (including VAT)||13.30|
* This part is no longer stocked by Maplin. It's available from Farnell, order code 408657. Farnell also stock Varta CR2032 batteries with built-in solder tabs; the order code is 249877, price 1.77.
Suitable equivalents for the 431000 are the 628128 (made by Hitachi) and the K6T1008C2E (made by Samsung). The pin configuration is identical to the 431000, and for this purpose they can be regarded as being exactly the same chip.
You'll also need:
(Don't worry about the ROM chip markings - it's the board itself which is important, and the fact that the mapper chip is a 315-5235.)
Below is a schematic of the circuit. Pin numbers are shown.
The logic implemented by the 4001 IC is seen here:
The 7673 serves the function of switching seamlessly between the main +5v and backup +3v (battery) supplies when required. The logic output, PBAR, is low (0v) when the main +5 volt supply is present, and high (+3v) when the backup supply is present.
A 4001 CMOS quad NOR gate IC is used to implement the logic seen in the above diagram. Its function is to generate the appropriate Chip Enable outputs for the two SRAM chips, based on the state of address line A17 and that of PBAR.
The "low" SRAM chip (hex 0x00000 - 0x1FFFF) is enabled only when A17 is low and PBAR is low.
The "high" SRAM chip (hex 0x20000 - 0x3FFFF) is enabled only when A17 is high and PBAR is low.
The SRAM chips can only be written when WE (Write Enable) is low. A physical switch is used to implement a "write protect" mode which keeps WE high at all times, preventing accidental overwriting of data. In normal ("write enable") mode, the WE line is connected to the cartridge WR line, allowing the SRAM to be written as well as read.
Open up the cartridge, and desolder the original ROM as follows. Place the free end of the desolder braid on the solder joint, and press the hot bit of your soldering iron on top of the braid. Apply gentle pressure and the solder will be "soaked up" by the braid. Cut off the solder-impregnated end of the braid, and repeat for the remaining 31 pins of the ROM.
When you've desoldered all of the pins, wiggle each pin gently and it should break free. (If it doesn't, repeat the desoldering process). You should then be able to lift the ROM clean out of the board - use a flat screwdriver to lever it up gently at each end, then pull it out with your fingers (or use IC tweezers).
If capacitors C7 and/or C4 are present, desolder them as well. (Do not desolder any of the other three capacitors, or the 315-5235 mapper!) The board should now look like this:
Now, you need to cut six board traces exactly as shown in the photograph below. The red lines indicate the cuts you have to make. Use a sharp knife to make the cuts, then use your multimeter to verify that the cut has broken the connection in each case.
The next step is to solder on the two 431000 (or equivalent) SRAM chips. Since there is only one space for a ROM on the board, we have to solder one SRAM chip on the front side of the board in the usual way, and the other chip upside down on the reverse side of the board. (I call this the RAM sandwich - thanks to Vic_Viper for the idea!)
Remove the first SRAM chip from its box. Bend up pin 30 so it is at right angles to the other pins, then snip off the leg so only the wider part of the pin remains:
Remember that IC pins are numbered anticlockwise from the notch when looking at the top side of the chip. Pin 30 is therefore the 3rd pin from the left on the top row in the above photograph (indicated by the red arrow).
Insert this SRAM chip into the front side of the board, pins 1 through 29, 31 and 32 going into the corresponding holes vacated by the ROM. Solder these 31 pins in place on the reverse side of the board in the normal way.
Now remove the second SRAM chip from its box. This time, leave pin 30 unbent, but bend up pins 1 through 29, 31 and 32 so that they are sticking out. Cut each pin so that only about 3mm remains of each one (except for pin 30; leave 5mm on this). Finally, bend pins 1 through 29, 31 and 32 further still, so that they are flush with the chip body and pointing upwards with respect to the top face of the chip:
Place the chip upside down on the reverse side of the board. Solder pins 1 through 29, 31 and 32
to the corresponding ROM holes. Do not solder pin 30 to anything; leave it sticking out.
This is what the board should look like now. To summarize, the first SRAM chip is placed on the front side of the board and soldered on the reverse side in the usual fashion:
The second SRAM chip, with its pins inverted and snipped, is turned upside down and soldered directly onto the reverse side of the board:
All of the pin connections (except pin 30) are thus common to both SRAM chips. If you've been paying attention so far, pin 30 (on both chips) should not be soldered to anything yet - these connections will be made later!
The next stage is to add the 7673 battery backup watchdog chip, an 8 pin IC. Bend up pins 1 and 3 so they are sticking out, as shown in the photo:
Then, solder pins 2 and 4 respectively into the lower and upper holes intended for C4, like below:
Make sure the 7673 itself is as close to the board as possible (preferably touching it) - if components are too high off the board, then the board may not fit back into the cartridge shell. It's a good idea, after each step, to place the board back in the cartridge casing to make sure it will fit.
Now solder the 2.2kohm pull-up resistor between pins 6 and 1 of the 7673. The one shown is a micro-miniature type - a standard resistor is fine, but is a tighter squeeze!
Remove the 4001 IC from its box. Lift all of the pins so they are parallel with the chip body, and cut each of them to a length of 3mm or so. Now using some wire, connect the following four sets of pins together:
Then solder pin 7 of the 4001 to the upper hole of C4 on the reverse side of the board; i.e. the same hole that '''pin 4 of the 7673''' is soldered into. Orient the 4001 so that none of its pins are touching the pins of the 315-5235:
Now make some links using lengths of insulated (preferably solid core) wire:
The above two links are shown below (orange and purple wires, respectively):
The above two links are shown below (brown and blue wires, respectively):
The above two links are shown below (grey and black wires, respectively):
This link is shown below (bare wire):
This link is shown below (purple wire):
This link is shown below (red wire):
The penultimate step is to add the Write Protect switch. This is a single-pole, double-throw (SPDT) switch which toggles the Write Enable pins of the 431000 SRAM chips between the cartridge WR line (write enabled) and the Power line ("always off", i.e. write protected).
Connect the centre pin of this switch to pin 29 of the 431000 SRAM chips. Connect one of the other pins to pin 1 of the 7673 (or, more conveniently, the upper terminal of capacitor C2), and the remaining pin of the switch to pin 31 of the 315-5235.
See the above picture for an illustration of the switch connections. Ensure that the wires you use are long enough to reach the side of the cartridge case (or wherever you plan to mount the switch).
The picture below shows the switch wired in place and mounted in a hole drilled in the side of the cartridge case:
WARNING - soldering wires directly to lithium batteries is very dangerous. The battery could explode if you heat it up too much. Unless you're incredibly stupid (like me), you may prefer to use a battery holder, or buy special CR2032s which have solder tabs already built into them. For now, though, I'll describe the procedure for soldering directly to the battery. Just remember - I warned you of the risks, so don't blame me if you hurt yourself!
CR2032 batteries look like small coins - the side with the manufacturer's name is positive (and should be connected to pin 2 of the 7673), while the other (blank) side is negative (and should be connected to a ground point, such as pin 25 of the 315-5235).
You should gently roughen a small area of the battery surface (with dry wet-and-dry paper) before soldering - the solder seems to "take" better if you do. Just make sure you clean up the metal filings - they could cause a short circuit.
Solder the negative terminal first. Mount the battery in Blu-Tack and set the wire in position - do the soldering, then remove the iron very quickly. Let it cool before soldering the positive terminal. This picture gives an example of a solder connection on the positive terminal:
Here's the completed cartridge with battery in place:
Use your multimeter to test for appropriate voltages. In particular, check that pin 30 on both 431000 SRAM chips is at 0 volts, and that pin 14 of the 4001, pin 1 of the 7673, and pin 32 of the SRAM chips are all at +3 volts. Place the switch in the Write Protect position and make sure that pin 29 of the SRAM chips is at +3 volts. Then, place the switch in the Write Enable position and check continuity between pin 29 of the SRAM chips and pin 2 (WR) of the cartridge connector.
Finally, screw the two halves of the cartridge case back together, and test your new rewritable cartridge using the SMSReader!