Help Switching ROM's on EPROM M27C4096 / M27C1024 - Page 1
Forum section: electronics / projects

author: Dipski
author_rank: Contributor
timestamp: February 01, 2015, 02:16:08 am
content: Hi guys, I'm trying to mod a Sega Mega Drive 2 (Mega CD 2) game console by replacing the ROM with an EPROM loaded with three bios versions. I've come unstuck as the EPROMs I have (M27C1024) have a slight difference from the EPROMs used by the original mod that I followed (M27C4096) - the M27C1024 doesn't have the A16 & A17 address lines which are used on the M27C4096 to change ROM version (by applying +5v) as the M27C1024 only has A0 to A15.I'm a little (a lot) out of my depth here as I don't know how applying +5v to A16 / A17 triggers the M27C4096 to change the active bios. I tried hooking up the +5v triggers to A14 & A15 on the M27C1024 at a guess that the last address lines were the key but without success. Reading the data sheets for the chips hasn't given me any clues so just wondering if anyone knows how the +5v trigger works on A16 / A17 on a M27C4096.

author: helius
author_rank: Super Contributor
timestamp: February 01, 2015, 02:52:33 am
content: I assume the reason for three ROM images is to play games made for three different regions (US, JAP, and EU). I don't know the specifics of the Mega CD, but the rom code could check if the disc is from the correct region and refuse to boot if it isn't.I don't know why you expect to be able to use one EPROM as if it was another; the one you said you have is only 128KB, but the instructions you are following use a 512KB EPROM.Do you have a schematic?

author: baljemmett
author_rank: Unknown
timestamp: February 01, 2015, 02:58:03 am
content: Quote from: Dipski on February 01, 2015, 02:16:08 amI fear you may be overcomplicating things - the 5V on A16/A17 doesn't 'trigger' anything, per se, it's just that you tie some combination of those two lines to 5V (a logic 1) to hard-wire the top two bits of the address the M27C4096 sees. So really, in this application the M27C4096 just contains four separate ROM images, one after another - if A16/A17 are 0, then the other address lines will be an address in the first image, if A16 is 1 but A17 is 0 they'll be the same address in the second image, etc.Since the M27C1024 doesn't have these lines, it only physically has space for one of those four ROM images at a time - so you won't be able to change image on the fly using the same trick, I'm afraid. You'll need a bigger ROM, such as the suggested M27C4096 or bigger, if you want to have multiple versions available in the same chip.

author: helius
author_rank: Super Contributor
timestamp: February 01, 2015, 03:01:12 am
content: or use the Enable pins on multiple EPROMs to select which one is used.

author: elgonzo
author_rank: Unknown
timestamp: February 01, 2015, 03:08:29 am
content: Do you have three M27C1024 eproms for 3 BIOS?If so, use the A16 and A17 lines asOutput Enablesignal for each eprom.Remember that the Output Enable signal is low-active - that means when the signal is low then the chip's data lines are enabled, when the signal is high the chips data lines are disabled (i.e., the chip being practically disconnected from the databus, so to speak).You will need a little glue logic to do this. For example:Output Enable for 1st M27C1024 (A16=0, A17=0): OE = A16 OR A17Output Enable for 2nd M27C1024 (A16=1, A17=0): OE = (NOT A16) OR A17Output Enable for 3rd M27C1024 (A16=0, A17=1): OE = A16 OR (NOT A17)If you can ensure that your mod will never set both A16=1 and A17=1 at the same time (which would only be useful for selecting a 4th BIOS), you can simplify a bit:Output Enable for 1st M27C1024 (A16=0, A17=0): OE = A16 OR A17Output Enable for 2nd M27C1024 (A16=1, A17=0): OE = A17Output Enable for 3rd M27C1024 (A16=0, A17=1): OE = A16Note that you can realize "A16 OR A17" either with a logic gate chip or using a simplediode or transistor combo(beware the voltage drop when using diodes!).Also keep the Chip Select/Enable pin tied to the line that has been originally used as chip select/enable signal for the M27C4096.

author: helius
author_rank: Super Contributor
timestamp: February 01, 2015, 03:20:34 am
content: Without the schematic, it's hard to know which enable pins on the EPROM are already used (to select it onto the bus, for example). A M27C1024 has two enable pins that must both be low (logic zero) for it to drive its output.

author: elgonzo
author_rank: Unknown
timestamp: February 01, 2015, 03:28:56 am
content: Quote from: helius on February 01, 2015, 03:20:34 amRight Output Enable should be fed by the decoded A16,A17 lines, and Chip Select/Enable should be tied to whatever line was being used to enable the M27C4096.

author: Dipski
author_rank: Contributor
timestamp: February 01, 2015, 04:12:20 am
content: Quote from: baljemmett on February 01, 2015, 02:58:03 amI see, I must have originally got the EPROM's for a single ROM image and when looking to do the mod thought they would be suitable and assumed that as the ROMs are 128kb each that the three would fit on the M27C1024 with no problems and it would operate equivalent to the M27C4096.Thanks Helius and Elgonzo for the workaround to switch between three chips - that will definitely work and I have a bunch of chips but I want to get my hands on a M27C4096 to make it a bit neater.In terms of the circuit I'm doing Wolfsoft's mod which is based on others and uses a 16F630 PIC to switch regions on the Mega Drive console and send +5v/+0v signals to the M27C4096 in the Mega CD 2 to change Mega CD BIOS according to the region on the Mega Drive;http://wolfsoft.de/wordpress/?p=407My experience in chip programming is pretty much limited to downloading existing ROM's and sending it onto the chip so I've got a bit of learning to understand how the address lines are being used here!

author: elgonzo
author_rank: Unknown
timestamp: February 01, 2015, 04:47:55 am
content: Quote from: Dipski on February 01, 2015, 04:12:20 amThe BIOS ROM images are 128kB, that is 128 Kilobytes. (kB means kilobyte, whereas kb with lower-case b means kilobit. "kb" is sometimes seen in datasheets for memory chips and in specifications for data buses. But since "kb" can easily be confused with "kB" it is generally better to use "kbit" instead of "kb".)128 Kilobyte are 128 x 8 Kilobit = 1024kbit = 1Mbit.And the capacity of the M27C1024 is 1Mbit. So, only one of those BIOS ROMs fit into one M27C1024.

author: Dipski
author_rank: Contributor
timestamp: February 01, 2015, 05:17:43 am
content: Quote from: elgonzo on February 01, 2015, 04:47:55 amAh yes of course bits and bytesThankyou, I had completely missed that!