How to access 27C322 with 2 74xx257 and only one 74LS139 ?

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
How to access 27C322 with 2 74xx257 and only one 74LS139 ?
by on (#112288)
Hi,

I am trying to build a SNES card based on 1 27C322, 2 74xx257 and only one 74LS139.

Here's a picture:
http://imageshack.us/photo/my-images/11/61748144.jpg/

I have an 1J3B-01 4MB Hirom board with an 74ls139 as Sram decoder and 64k Sram.
This is how its connected by Nintendo.

Code:
A15    1    16   VCC      
A13    2    15   Pin 7 of 74LS139      
A14    3    14   A21      
NC     4    13   A22      
NC     5    12    NC      
NC     6    11   SRAM Pin 20=/CE      
Pin15  7    10    NC      
GND    8    09   GND 


How do I have to connect the 74LS139 when using 27C322 with 2 74xx257?
I really don't want to use an Mad-1 or a second 74ls139 as decoder.

Regards,
Michael
Re: How to access 27C322 with 2 74xx257 and only one 74LS139
by on (#112390)
I suppose you saw my HiROM and LoROM cards on the web; I designed the cartridges so you can use both MAD-1 and 74LS139/74LS138 as ROM and RAM decoders. These are the photos for those who haven't seen them yet

HiROM with MAD-1:
Image

HiROM with 74LS139:
Image

LoROM with MAD-1:
Image

LoROM with 74LS139
Image

I used 74LS139 for both ROM and RAM decoder, so maybe my solution is not what you need, but anyway I'll explain how I did:

For HiROM, you must map SRAM from $3X:6000 to $3X:7FFF for 64Kbit games (it also works for 16Kbit games). In this part of SNES' memory map, /ROMSEL (a.k.a. /CART) is always '1' (not active) and the condition to enable the SRAM is A23 = '0', A22 = '0', A14 = '1' and A13 = '1'. You don't need both A23 and A22 at the same time, so you may choose to use one of them.

For LoROM, you must map SRAM from $7X:0000 to $7X:1FFF for 64Kbit games (it also works for 16Kbit games). In this part of SNES' memory map, /ROMSEL is always '0' (active) and the condition to enable the SRAM is A21 = '1', A20 = '1', A15 = '0' and /ROMSEL = '0'. You must use all those signals to enable the SRAM.

Hope this helps you.