Safe level shifting for SNES cartridges

A place that you can discuss reproduction of classic titles or "licensed-for-reproduction" homebrew for personal use.

Moderators: B00daW, Moderators

Forum rules
1. NO BLATANT PIRACY. This includes reproducing homebrew less than 10 years old, with the exception of free software.
2. No advertising your reproductions, with the exception of free software.
3. Be nice. See RFC 1855 if you aren't sure what this means.
Post Reply
soniccd123
Posts: 24
Joined: Sat Jun 27, 2020 12:01 pm

Safe level shifting for SNES cartridges

Post by soniccd123 » Tue Oct 06, 2020 12:04 am

Hello,

It's been some time that i've made another topic here and was told that, although 3.3V MX29 series chips work with the 5V SNES I/O in short-term, this can cause damage both to chip (which is quite obvious) and SNES (not so obvious) in the long run. Since then i've been thinking and researching about how to design a safe way to convert these levels safely and would like to ask you guys what you think.

As for the data bus, which in the SNES case just output data, i thought about using a simple 74HC245 bus transceiver shift the 3.3V signals to 5V. This transceiver has 8 lines which is suficient to SNES data bus.

As for the address bus, which is input only and has 21 lines, using 3x 74HC245 bus transceivers is simple and obvious choice, but i was thinking if its safe to use simple 2 resistor voltage dividers on each of the 21 lines of the address bus. I know it is possible because i've used this kind of solution in other cheap equipment that i designed (aka fast prototypes with cheap parts), but i don't know if it is a good and safe solution to use with something more valuable like a SNES console.

Thanks,

Soniccd123.

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

Re: Safe level shifting for SNES cartridges

Post by lidnariq » Tue Oct 06, 2020 11:55 am

soniccd123 wrote:
Tue Oct 06, 2020 12:04 am
As for the data bus, which in the SNES case just output data, i thought about using a simple 74HC245 bus transceiver shift the 3.3V signals to 5V. This transceiver has 8 lines which is suficient to SNES data bus.
Be careful that you use the correct part to use the correct part to up-translate. The HC parts use CMOS thresholds, not TTL thresholds, and may not reliably receive 3.3V out of the ROM as logic high. You may have to explicitly use an HCT part (or ACT, or other options) instead.
i was thinking if its safe to use simple 2 resistor voltage dividers on each of the 21 lines of the address bus. I know it is possible because i've used this kind of solution in other cheap equipment that i designed (aka fast prototypes with cheap parts), but i don't know if it is a good and safe solution to use with something more valuable like a SNES console.
Voltage dividers do work, but there's three problems with them:

1- They draw static power from the drivers on the corresponding parts, and in the case of the SNES, we don't know how much current is safe to draw from its address bus drivers.
2- They take up a lot of PCB area with somewhat messy routing
3- They delay signals, although probably by a small enough amount for the SNES to not matter.

soniccd123
Posts: 24
Joined: Sat Jun 27, 2020 12:01 pm

Re: Safe level shifting for SNES cartridges

Post by soniccd123 » Tue Oct 06, 2020 12:14 pm

lidnariq wrote:
Tue Oct 06, 2020 11:55 am
soniccd123 wrote:
Tue Oct 06, 2020 12:04 am
As for the data bus, which in the SNES case just output data, i thought about using a simple 74HC245 bus transceiver shift the 3.3V signals to 5V. This transceiver has 8 lines which is suficient to SNES data bus.
Be careful that you use the correct part to use the correct part to up-translate. The HC parts use CMOS thresholds, not TTL thresholds, and may not reliably receive 3.3V out of the ROM as logic high. You may have to explicitly use an HCT part (or ACT, or other options) instead.
i was thinking if its safe to use simple 2 resistor voltage dividers on each of the 21 lines of the address bus. I know it is possible because i've used this kind of solution in other cheap equipment that i designed (aka fast prototypes with cheap parts), but i don't know if it is a good and safe solution to use with something more valuable like a SNES console.
Voltage dividers do work, but there's three problems with them:

1- They draw static power from the drivers on the corresponding parts, and in the case of the SNES, we don't know how much current is safe to draw from its address bus drivers.
2- They take up a lot of PCB area with somewhat messy routing
3- They delay signals, although probably by a small enough amount for the SNES to not matter.
My biggest concern is the static power one, in my tests with other systems the delay was very very small. I may use the 74XX245 of HCT or LVC type then for safety.

Thanks!

User avatar
Ziggy587
Posts: 126
Joined: Fri Oct 08, 2010 6:08 pm
Location: NY, USA

Re: Safe level shifting for SNES cartridges

Post by Ziggy587 » Tue Oct 06, 2020 5:15 pm

Out of curiosity, why not just use a level shifting IC? I know the 74 logic and resistors are very cheap, but wouldn't you need 46 resistors to cover all of the address lines? A level shifting IC would cost about the same, I think. And like lidnariq said, it would definitely be easier to route for and take up less space.

I was curious about the solution retro-bit went with on their SNES PCBs. They are using an Altera programmable logic, which has something called "MultiVolt". It looks like the outputs can be set to 3.3v, and the inputs are 5v tolerant. I'm assuming they are using it for level shifting as well as the logic that handles the SRAM. Although the SRAM was unpopulated on the board I had.

Image

https://www.intel.com/content/dam/www/p ... m7000a.pdf

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

Re: Safe level shifting for SNES cartridges

Post by lidnariq » Tue Oct 06, 2020 5:30 pm

Unfortunately in that picture, they're still using 3V flash without protection on it, and the EPM7032 doesn't have enough pins (36 I/O) to be protecting all of the flash I/O lines (8 data + 22 address (4MB flash) + 3 control).

soniccd123
Posts: 24
Joined: Sat Jun 27, 2020 12:01 pm

Re: Safe level shifting for SNES cartridges

Post by soniccd123 » Tue Oct 06, 2020 6:59 pm

Ziggy587 wrote:
Tue Oct 06, 2020 5:15 pm
Out of curiosity, why not just use a level shifting IC? I know the 74 logic and resistors are very cheap, but wouldn't you need 46 resistors to cover all of the address lines? A level shifting IC would cost about the same, I think. And like lidnariq said, it would definitely be easier to route for and take up less space.

I was curious about the solution retro-bit went with on their SNES PCBs. They are using an Altera programmable logic, which has something called "MultiVolt". It looks like the outputs can be set to 3.3v, and the inputs are 5v tolerant. I'm assuming they are using it for level shifting as well as the logic that handles the SRAM. Although the SRAM was unpopulated on the board I had.

Image

https://www.intel.com/content/dam/www/p ... m7000a.pdf
Hey! Ziggy587 from Racketboy?

More of a question of availability, i live in a third world country that has lots of peculiarities about what kinds of ICs that are available, there are some rare ICs that i would never think that would be available but are, and some that should be common and easy to find that a pain to buy. I normally buy from China but if there is someway to buy local, i end doing it because of shipping time and not so diferent prices. Besides that, big IC distributor like Mouser ou Digikey are not estabilished down here and their shipping services cost a little fortune (considering my country economy and current dolar conversion rates). There are some very nice ICs from Texas Instruments (TXB0108 and other from this series i think) that do bidirectional level shifting that are very versatile and comes in 4, 8 or 16 bits packages, but i've never manage find them.

User avatar
Ziggy587
Posts: 126
Joined: Fri Oct 08, 2010 6:08 pm
Location: NY, USA

Re: Safe level shifting for SNES cartridges

Post by Ziggy587 » Wed Oct 07, 2020 8:02 am

lidnariq wrote:
Tue Oct 06, 2020 5:30 pm
Unfortunately in that picture, they're still using 3V flash without protection on it, and the EPM7032 doesn't have enough pins (36 I/O) to be protecting all of the flash I/O lines (8 data + 22 address (4MB flash) + 3 control).
I can't believe how many carts are being sold at retail that don't use 3.3v parts correctly. Pirate carts are understandable, but for something that's trying to be a legitimate retail cart (like this one or other indie games that I've seen that only use series resistors) it's kind of baffling.
soniccd123 wrote:
Tue Oct 06, 2020 6:59 pm
Hey! Ziggy587 from Racketboy?
Yep, that's me!
soniccd123 wrote:
Tue Oct 06, 2020 6:59 pm
More of a question of availability
Oh, I see. Well I didn't know the 74'245 could be used in this way, so I'd be interested to see that design.

Post Reply