PSRAM FLASH cart

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
PSRAM FLASH cart
by on (#211205)
Hello!

I am trying to make a cartridge where a PSRAM memory is written by an STM32 and released to the snes hardware.
The voltage transition of the address and control pins is made by 74AHC245 (uni) and the date pins through a 74LVC4245 3,3 <-> 5 . I made a cartridge reader with arduino and 74HC595, I can read cartridges in a normal way even with crc check, and the hardware I did described above works on the reader but in the snes only black screen.
I'm testing with SMW.smc on a smw cartridge just remove the maskrom, I put the maskrom off on prothoboard and it works but my recorded PSRAM does not.
Do you have any idea what's going on?
One last question: When I release the PSRAM line to the snes does it turn on even with the power off, I believe that across the lines of communication is draining voltage, Is there any way to release the lines of communication without the snes having its shape line released?
in the controller I am putting the pins in INPUT NOPULL, and the addressing pins not used in LOW and without connection with the snes.

Thank you!!!
Re: PSRAM FLASH cart
by on (#211206)
I'm not entirely certain what you mean by "shape line"... (What words would you have used in your native language?)

The SNES is a 5V CMOS device, and it does not have the ability to stop driving its outputs (i.e. control and address lines). Without any better data, I'd arbitrarily guess that you're back-powering the SNES through its overvoltage protection diodes.
Re: PSRAM FLASH cart
by on (#211207)
I believe yes, that is it.
But i just free the OE on buffs and level shift to inter-conect PSRAM <-> SNES, so PSRAM and buffs(74LVC and LVC4245) are powered by 3,3 and 5v.
STM32 pin are input no pull. How can i free PSRAM without any floating voltage appearing on the pins? Can keep snes on /reset from cart? this help?

Note.: SNES turn on only when i put low OE levelshift on. Understand turn on FRONT LED.
Re: PSRAM FLASH cart
by on (#211209)
I believe you can pull /RESET low from the cart. In other words, have the STM32 drive /OE to 0 while you write to PSRAM. I do not know if this releases the address lines, so you should still keep your level translators to not only translate voltages but also to control bus isolation.

Also, if you have "smw.smc" remember that it may have a header you must remove.
Re: PSRAM FLASH cart
by on (#211210)
I checked now, the 74AHC245 is driving floting(~1,7v) voltage when i put his OE low, i think is the pull up 3,3v on CE, but not is this, the chip got a floting when put OE low ><.
Ill try put /RESET low.
But if one soft reset solve the problem, why hard reset not? Hard reset dont make work at now!
Yes i removed the header. and i can check crc on my arduino phisic read cart.

Did u see any problem using 74AHC245 on leveldown? I tried TX0108 but got a crazy signal on logic analyzer.
And why me cart reader can read ok but snes no?
Re: PSRAM FLASH cart
by on (#211213)
mikejmoffitt wrote:
I do not know if [driving /RESET low] releases the address lines
It does not.
Re: PSRAM FLASH cart
by on (#211219)
That is correct for MX23C4001?
A17 |01\/32| +5V
A18 |02 31| /OE
A15 |03 30| A19
A12 |04 29| A14
A7 |05 28| A13
A6 |06 27| A8
A5 |07 26| A9
A4 |08 25| A11
A3 |09 24| A16
A2 |10 23| A10
A1 |11 22| /CE
A0 |12 21| D7
D0 |13 20| D6
D1 |14 19| D5
D2 |15 18| D4
GND |16 17| D3

I'm using a SHVC-1A5M-01, This rom work pin-to-pin on slot. SWM graved.
Re: PSRAM FLASH cart
by on (#211300)
Quote:
The SNES is a 5V CMOS device, and it does not have the ability to stop driving its outputs (i.e. control and address lines). Without any better data, I'd arbitrarily guess that you're back-powering the SNES through its overvoltage protection diodes.

I solve this problem using a 74LS00 and /RESET from snes.
So i can put MCU_PIN in HIGH(to switch PSRAM to SNES) who Levelshift need snes on to put OE levelshift in LOW.
Quote:
Typically, that will be tied to the /RESET line, pulling up to Vcc. That way, /RESET will be tied to Vcc, which means that it starts out low, then slowly pulls up as the Vcc line stabilizes, so that it will be low when you start up (which holds the chip in its reset state), then when the Vcc line stabilizes, the reset line is released, and the chip is allowed to function.

https://www.cs.umb.edu/~bazz/snes/cartridges/electronics/simple_components.html
Solve one problem, but still not work!
Also tryed some other roms like Top Gear, FF mystic quest, same result. All without header

The PSRAM is a EM7644SU16AxP-70LFx, unused addr pins in LOW, WR in HIGH, LB = 0, UB = 1.

SO no understand why arduino https://forum.arduino.cc/index.php?topic=158974.0 read and check crc ok in smw is 0xb19ed489 and snes hardware not.

Anyone have any idea what's going on?
Re: PSRAM FLASH cart
by on (#211325)
From your block diagram, my only guesses are:

* STM32 isn't getting out of the way (enabling 74'245s and setting its own pins to high impedance )
* Power supply circuitry is doing "something" wrong

Do you have a schematic that you'd be willing to share? I might maybe notice something if so.
Re: PSRAM FLASH cart
by on (#211357)
In anexo files, thank you for try help!

Image
Re: PSRAM FLASH cart
by on (#211360)
Are you handling memory map $20 ("LoROM") vs $21 ("HiROM") correctly?
How do you handle the difference in bus width between the RAM and the SNES?

You could try something smaller than SMW, such as Magic Floor, spadtest, my PPU mode demonstration, or my memory browser.
Re: PSRAM FLASH cart
by on (#211383)
I remove the maskrom from a Old smw cart for test. Only after this work ill make me own decoder for hi and low rom.

1º If i put a true maskrom on this cart this work good. i tested with smw mask i own.
2º If i put this cart mod with PSRAM on arduino cart reader, it reader ok.

Now, why snes read mask wired on cart and wired PSRAM no, i dont know.

What are the visible differences between an arduino and snes? speed only? It's possible 74ahc245(5 to 3,3v addr line) or LJ245A(3,3 to 5v data line) no
fast enough?

The VCC is about 4,8v but if snes can read some cart with flash 3,3(lol) i believe it's no problem.
Vcc from snes and vcc from PSRAM are separated.

Now i unmounted the cart, will remove the MAD and wire entire bus to PSRAM without sram from original cart and try run a small rom like u say.

If i put a 4MB CHIP on snes bus with a small rom writed snes keep unused address(high address like A19, A20, A21 and A22) pins in low??? So I dont need set LOW on stm32.

So many questions sorry!
Re: PSRAM FLASH cart
by on (#211395)
This is the decoder i want to do. The MAD-1 Lo/Hi config i take from http://problemkaputt.de/fullsnes.htm and adapt a 74HC157, same o pin swap from ROM(this case PSRAM).
STM32 read file from sdcard identifies if LO or HI and set muxs up for it.
But I just want to do it once I can successfully run something on PSRAM.
I'm a hobbyist, collect old consoles and spend my spare time breaking my head with these things ^^
Re: PSRAM FLASH cart
by on (#211405)
squall926 wrote:
What are the visible differences between an arduino and snes? speed only? It's possible 74ahc245(5 to 3,3v addr line) or LJ245A(3,3 to 5v data line) no
fast enough?
The big differences that occur to me are:
* Yes, that; the speed through the 5->3 downtranslation, the PSRAM itself, and the 3->5 uptranslation
* Voltage thresholds (I think the arduino uses 5VTTL levels, while the SNES uses 5VCMOS levels)

Quote:
The VCC is about 4,8v but if snes can read some cart with flash 3,3(lol) i believe it's no problem.
If the signals actually get all the way up to 4.8V, that's fine.

The SNES does not run reliably on 3.3VCMOS levels. There are reports of random crashes due to a nonzero error rate (1e-6? 1e-9?) incorrectly receiving a 0 instead of a 1.

Quote:
Now i unmounted the cart, will remove the MAD and wire entire bus to PSRAM without sram from original cart and try run a small rom like u say.
I was just thinking that you could try putting one of the small ROMs in the PSRAM. The small ones should let you figure out if it's a problem with the higher address lines or not.

Quote:
If i put a 4MB CHIP on snes bus with a small rom writed snes keep unused address(high address like A19, A20, A21 and A22) pins in low?
The SNES boots by reading a 16-bit address from $00FFFC. That code then usually switches into 65816 "native" mode and does a little more. Variations in boards change how ROM A15 and up are wired, which is why I was suggesting something tiny.
Re: PSRAM FLASH cart
by on (#211406)
Quote:
The SNES boots by reading a 16-bit address from $00FFFC. That code then usually switches into 65816 "native" mode and does a little more. Variations in boards change how ROM A15 and up are wired, which is why I was suggesting something tiny

With a Small rom file ill need set unused Address pin low or bus do this.
256k into 4MB chip