Which Flash Memory to use for cart conversion

Discussion of hardware and software development for Super NES and Super Famicom.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
lidnariq
Posts: 9383
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Which Flash Memory to use for cart conversion

Post by lidnariq » Wed Mar 18, 2020 11:22 am

snezzdev wrote:
Wed Mar 18, 2020 10:32 am
Does that mean Benn Venn here is wrong ? https://www.youtube.com/watch?v=vv4TeyLcSSw
In addition to what Markfrizb said...
BennVenn wrote:for an average silicon diode [the forward voltage] is 0.6 volts.
[...]
[schematic showing a forward voltage of 0.6V on the overvoltage protection diodes inside a 3.3V part]
No. It depends on context. The overvoltage protection diodes on a lot of parts are rated to exactly 0.3V, and not more, without damage.
One clever trick [bootleg manufacturers] use is to add a diode inline with the supply
Newer releases, yes, after the initial kerfluffle. There were a large number of earlier carts manufactured using explicit 3.3V regulators, or stacks of diodes dropping the voltage down to 3.2-3.8V.

edit: And to be clear, your initial video showed exactly the problematic situation, putting a 3V flash and a 3V regulator on a daughterboard by itself without any care as to how that flash interacted with the outside world.
this drops the five volts down to 4.4 volts, which is just within the safe operating area of the flash chip
The MX29GL256 pictured on that board has an Absolute Maximum Rating of 4.0V for VCC and VI/O. 4.4V is not guaranteed to be safe for the flash chip. Furthermore, diodes make awful voltage "regulators" and the voltage seen by the part will swing from 4.4V to 5V depending on the instantaneous (or average, if there's a capacitor) current drawn by the flash.
Powering the flash at 4.4V means that a 5V input will conduct through this diode and no current will flow into the supply
Only if the diode used externally is matched to the overvoltage diodes on the part.
So, can a cheap bootleg cart put your console at risk? The answer is no.
The answer is "it @%&(!@$* depends" and saying "don't worry" is worse than saying "I'm confident that my design is safe".

In general, if there's no voltage regulator, the 3.3V-rated parts may die at some point in the future, but the console is probably safe. If there is a voltage regulator, and you aren't explicitly using parts that are 5V tolerant or adding 5V translation, it will damage the console.
Last edited by lidnariq on Wed Mar 18, 2020 11:38 am, edited 1 time in total.

Ice Man
Posts: 530
Joined: Fri Jul 04, 2014 2:34 pm

Re: Which Flash Memory to use for cart conversion

Post by Ice Man » Wed Mar 18, 2020 11:27 am

Data lines do not need to be level shifted as they're outputs only. So 4x 74LVC245A should do. A0-A22, /CE and /OE.


Also, there is never any need to convert data lines. D0-D7 is ALWAYS connected to SNES D0-D7 for 8 Bit EPROM/Flash
Just when using a 16 Bit EPROM/Flash e.g. 27C322 you will have to convert from 8 Bit to 16 Bit using 2x74'257 as an example.

Markfrizb
Posts: 520
Joined: Sun Dec 02, 2012 8:17 am
Location: East Texas

Re: Which Flash Memory to use for cart conversion

Post by Markfrizb » Wed Mar 18, 2020 11:28 am

snezzdev wrote:
Wed Mar 18, 2020 11:19 am
BTW since flash works as ROM here data will be directed only one way, which means no need to convert data lines, isnt it ?
The ROM data buss is the same buss as the SRAM and internal RAM also. This means it's all connected.
Addresses are inputs... needing down translating. Data lines are outputs (and inputs) and would need up translating or isolation of just output only.

It's good that you are wanting/learning how to use the low voltage chips the correct way. It is unfortunate that this adds lots of cost and complexity to a pcb, but necessary.

User avatar
poorstudenthobbyist
Posts: 79
Joined: Fri Jun 24, 2016 4:20 pm

Re: Which Flash Memory to use for cart conversion

Post by poorstudenthobbyist » Wed Mar 18, 2020 11:32 am

snezzdev wrote:
Wed Mar 18, 2020 10:32 am
Does that mean Benn Venn here is wrong ? https://www.youtube.com/watch?v=vv4TeyLcSSw
snezzdev wrote:
Wed Mar 18, 2020 10:32 am
Does that mean Benn Venn here is wrong ? https://www.youtube.com/watch?v=vv4TeyLcSSw
He's not right. First of all, I don't know why he's assuming a 0.6V drop across the diode. The voltage drop depends on what current is being drawn through the diode, among other things. The current draw is probably not constant. But ignoring that, 3.3V flash memory usually has a higher tolerance of 3.6V anyway.

If you blow the chip because you're overpowering it, you could short any number of pins on the device. Which in turn can short other components and pins inside the SNES. There's probably protection in place for those pins, but do you really want to chance it? You can't say for sure how a device will fail, so it's better to just put protection into place.

I mean, the question is dodgy itself - "can I use a 3.3V part in a system it wasn't designed to operate in?"

lidnariq
Posts: 9383
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Which Flash Memory to use for cart conversion

Post by lidnariq » Wed Mar 18, 2020 11:44 am

Ice Man wrote:
Wed Mar 18, 2020 11:27 am
Data lines do not need to be level shifted as they're outputs only. So 4x 74LVC245A should do. A0-A22, /CE and /OE.
Data lines have two problems:
1- In a conventional bus like all these legacy consoles, there are multiple devices off the same bus, and the overvoltage protection diodes will be relevant if anything else is driving the data bus. For example, in the SNES, the same data bus is used to read data from the cart, write data to the RAM on the cart, read data from the SNES's W-RAM, or read data from the S-PPUs. When anything else drives the data bus, the overvoltage diodes of a this lower-voltage part will stress the drivers of whatever's driving at that time.

So protection is still necessary.

1b- There are a very few contexts where the data bus is genuinely unidirectional, such as the SA-1. In this specific narrow case, you don't need protection, because nothing drives the data bus except the ROM.

2- The SNES and DMG use 5VCMOS thresholds, not 5VTTL thresholds, so a 3.3V signal from the part will not be reliably read as logic 1 by the other parts in the console. This does seem to randomly cause a crash in some SNES games.

So up-translation is still necessary in these two consoles. (In contrast, the NES, Genesis, and a bunch of other consoles use TTL thresholds. There you can just use protection, not translation, on the data lines)

tepples
Posts: 21973
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Which Flash Memory to use for cart conversion

Post by tepples » Wed Mar 18, 2020 11:46 am

The cartridge can see the CPU's writes to RAM at up to 5 V. It can also see the enable signals (M2, PRG /CE, and R/W) at up to 5 V. The flash memory's data bus needs to be protected from this voltage.

In a game larger than NROM, writable mapper registers' addresses often overlay CPU addresses commonly allocated to PRG ROM. The flash memory's data bus needs to be protected from 5 V pulses during mapper writes.

Several newer homebrew games with a campaign longer than one play session use self-flashable memory. The program alternates between two or among more sectors of the flash that the program has reserved for saved campaign state. When the user chooses to save, it erases the older or oldest sector and writes the campaign's state to that sector. This saves the cost of extra RAM at $6000 or, if the game already needed that space for work RAM, the cost of battery backup for that RAM.
At least one new post has been made to this topic. You may wish to review your post in light of this.
I apologize for the duplication.

Post Reply