SRAM 622256 vs FeRAM FM18W08 do we need OR GATE?

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Kayumba
Posts: 246
Joined: Sun Mar 01, 2020 2:36 am

SRAM 622256 vs FeRAM FM18W08 do we need OR GATE?

Post by Kayumba »

Hello to everyone.

I would like to remplace my SRAM by FeRAM but I see that some people adding OR GATE / AND GATE, like here:
https://github.com/soniccd123/SNES-FeRAM-Cart

Or here :
Image

Can somebody explain me why we need to use other chips like OR GATE / AND GATE ?
When I see pinouts for both chips it's all the same, so SRAM can be simply remplacer by FeRAM, but some of users using OR GATE 4071 and AND GATE 4081

Image
Image
Image
Image
Last edited by Kayumba on Tue Oct 18, 2022 9:52 am, edited 3 times in total.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: SRAM 622256 vs FeRAM FM18W08 way need OR GATE?

Post by lidnariq »

FM18W08 is a synchronous part, and only cares about the contents of the address change as the /CE signal falls.
Kayumba
Posts: 246
Joined: Sun Mar 01, 2020 2:36 am

Re: SRAM 622256 vs FeRAM FM18W08 way need OR GATE?

Post by Kayumba »

lidnariq wrote: Thu Oct 06, 2022 5:22 pm FM18W08 is a synchronous part, and only cares about the contents of the address change as the /CE signal falls.
Thanks,
That's mean part like 62256 SRAM is an asynchronous ?

When I search on Google, the difference between is Clock signal.
So without that "Clock signal" SNES can not access to FeRAM, yes?

Synchronous SRAM = Happens at the same time. Requires a clock signal to validate its control signals.
Asynchronous SRAM = Doesn't happen at the same time. Is accessed without a clock.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: SRAM 622256 vs FeRAM FM18W08 way need OR GATE?

Post by lidnariq »

Correct. Hence having to construct a clock signal out of the /RD and /WR signals.

That said, it's definitely weird to use separate AND and OR chips for this. You can use three NOR gates (3/4 of 74'02) and deMorgan's law instead.
Kayumba
Posts: 246
Joined: Sun Mar 01, 2020 2:36 am

Re: SRAM 622256 vs FeRAM FM18W08 way need OR GATE?

Post by Kayumba »

lidnariq wrote: Fri Oct 07, 2022 10:55 am Correct. Hence having to construct a clock signal out of the /RD and /WR signals.

That said, it's definitely weird to use separate AND and OR chips for this. You can use three NOR gates (3/4 of 74'02) and deMorgan's law instead.
Thank you lidnariq.
Can you share schematic for NOR GATE 74'02 to make works FeRAM, please ?
Shame on me, but i'am not so smart to do it alone :cry:
Image
Image

And one more thing lidnariq,
I found this shared project of FeRAM adapter with NAND GATE 74HC00D for original cartridge PCB.
Schematic should normally work's with both LoROM and HiROM.
But when I tried to use it with my custom PCB, it's works only for HiROM and not for LoROM games. :roll:
Why?
https://oshpark.com/shared_projects/vxdehsxC
Image
Image
Image
Image
Last edited by Kayumba on Tue Oct 11, 2022 1:54 pm, edited 1 time in total.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: SRAM 622256 vs FeRAM FM18W08 way need OR GATE?

Post by lidnariq »

Kayumba wrote: Mon Oct 10, 2022 4:35 pm Can you share schematic for NOR GATE 74'02 to make works FeRAM, please ?
deMorgan's law says that
NOR(A,B)
is the same as
AND(NOT(A),NOT(B))

you really should be able to figure out what to do with this
But when I tried to use it with my custom PCB, it's works only for HiROM and not for LoROM games.
That schematic is utterly weird and I have no idea why it would work in one place and not another

... For that matter, it's also critically flawed, one really really really shouldn't tie the output of the unused NAND gate to anything
Kayumba
Posts: 246
Joined: Sun Mar 01, 2020 2:36 am

Re: SRAM 622256 vs FeRAM FM18W08 way need OR GATE?

Post by Kayumba »

lidnariq wrote: Mon Oct 10, 2022 5:36 pm deMorgan's law says that
NOR(A,B)
is the same as
AND(NOT(A),NOT(B))

you really should be able to figure out what to do with this
Is it right ?
Image
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: SRAM 622256 vs FeRAM FM18W08 way need OR GATE?

Post by lidnariq »

You changed the topology - why? The original was
AND(OR(/RD,/CE),OR(/WR,/CE))

what you have here (wouldn't work) could either be thought of as
AND(NOT(/CE),OR(/RD,/WR) (only deMorgan-ing the "1" NOR), or
NOR(/CE,AND(NOT(/RD),NOT(/WR)) (only deMorgan-ing the "2" NOR)
Kayumba
Posts: 246
Joined: Sun Mar 01, 2020 2:36 am

Re: SRAM 622256 vs FeRAM FM18W08 way need OR GATE?

Post by Kayumba »

lidnariq wrote: Tue Oct 11, 2022 6:25 pm You changed the topology - why? The original was
AND(OR(/RD,/CE),OR(/WR,/CE))

what you have here (wouldn't work) could either be thought of as
AND(NOT(/CE),OR(/RD,/WR) (only deMorgan-ing the "1" NOR), or
NOR(/CE,AND(NOT(/RD),NOT(/WR)) (only deMorgan-ing the "2" NOR)
Image
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: SRAM 622256 vs FeRAM FM18W08 way need OR GATE?

Post by lidnariq »

great!
Kayumba
Posts: 246
Joined: Sun Mar 01, 2020 2:36 am

Re: SRAM 622256 vs FeRAM FM18W08 way need OR GATE?

Post by Kayumba »

lidnariq wrote: Wed Oct 12, 2022 10:20 amgreat!
Thank you very much lidnariq
:beer: :beer: :beer:
:D :D :D

Now I have to wait to get my order of 74HC02 at home, then only I can test it...
Kayumba
Posts: 246
Joined: Sun Mar 01, 2020 2:36 am

Re: SRAM 622256 vs FeRAM FM18W08 way need OR GATE?

Post by Kayumba »

lidnariq wrote: Wed Oct 12, 2022 10:20 amgreat!
One more thing lidnariq.

About Decoder/Demultiplexer 74'139.
When I look at schema of Decoder 74HC139 that sonicd123 made, I see that for LoROM HiROM pin 1(Enable 1G) are tied to nothing.
Maybe it's better to tied this pin to GND?
Image
Image
Last edited by Kayumba on Thu Oct 13, 2022 12:26 pm, edited 1 time in total.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: SRAM 622256 vs FeRAM FM18W08 way need OR GATE?

Post by lidnariq »

It shouldn't be tied to ground, but you're right it shouldn't be floating. But the image you shared doesn't match what you said...
Kayumba
Posts: 246
Joined: Sun Mar 01, 2020 2:36 am

Re: SRAM 622256 vs FeRAM FM18W08 way need OR GATE?

Post by Kayumba »

lidnariq wrote: Thu Oct 13, 2022 10:19 am It shouldn't be tied to ground, but you're right it shouldn't be floating. But the image you shared doesn't match what you said...
Sorry I was talking about HiROM.
Image
If It shouldn't be tied to ground and it shouldn't be floating. And it's need to be 0 (ACTIVE LOW).
How to do ?

If I understand right that schematic for 74'139...
For HiROM example :
To select inputs from pin 2 (A13) and pin 3 (A14), pin 1 (Enable) have to be "Active LOW' (means that a 0 V).
For LoROM example :
To select inputs from pin 2 (A14) and pin 3 (A13), pin 1 are tied to A15
That's the only difference.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: SRAM 622256 vs FeRAM FM18W08 way need OR GATE?

Post by lidnariq »

The MAD-1 decodes HiROM RAM ( https://problemkaputt.de/fullsnes.htm#s ... tsmadchips ) where

Code: Select all

   A13   A14   A21  A22 /ROMSEL 
  HIGH  HIGH  HIGH  LOW   HIGH   --> /SRAM.CS=LOW
but A22 ("BA6") is already connected to the other half-'139, which seems wrong. And if I look at the github repository linked above it does something else altogether...
Post Reply