SNES repro help: 74LS139 wiring for 16mbit games with no MAD-1?

Discussion in 'Modding and Hacking - Consoles and Electronics' started by dexus, Apr 23, 2016.

  1. dexus

    dexus Member

    Joined:
    Apr 23, 2016
    Messages:
    10
    Likes Received:
    0
    I have been researching repro's and want to make myself a Zelda Paralell Worlds remodel cart.
    I tried searching the forums and others for this info, but can't seem to find a definite answer.
    I have some soldering experience, but not so much electronics like these snes carts. But it sure is fun to learn!

    I have searched this and other forums for an answer to this question, but haven't been able to solve it, if it is possible.

    I made one with a donor cart that had mad-1 and room for 2 27C801's and that worked fine.. Now I'm trying to make another using a donor with room for 2 roms, 64kb sram and battery, but only a 74LS139 decoder, no mad-1.

    How would I rewire the 74LS139 to work with 27C801 eeproms? I tried just dropping them in, just rewiring the 24 and 31 pins as usual, but it won't work. I am sure the 27C801's have been programmed correctly, as I have verified them several times, and it's the same files I used for the mad-1 repro.

    Any help would be much appreciated.
     
  2. Pikmin

    Pikmin Resolute Member

    Joined:
    Dec 23, 2009
    Messages:
    935
    Likes Received:
    95
    While we are waiting for someone to respond I have read on nesdev that 74LS139 can only handle:
    1) One mask ROM and SRAM
    OR
    2) Two mask ROMs and no SRAM
    * ROM size up to 16 MBit
     
  3. l_oliveira

    l_oliveira Officer at Arms

    Joined:
    Nov 24, 2007
    Messages:
    3,879
    Likes Received:
    245
    Actually, it depends on how knowledgeable you are...

    74LS139 is a dual 1 to 4 multiplexer. It takes the value on two inputs (binary) and take to an circuit where 1 input connect to one out of four outputs based on the binary number at the input. It means you can connect up to four unique things to it. Since it's a dual device you can do it twice.

    So you could use half of it to make up to four EPROMs look like a single ROM and the other to create the ROM/SRAM selection circuit... So come boldly and claim it can only do a certain thing (well that is correct if you follow how the chip is connected on Nintendo boards) is quite "bold". lol
     
  4. l_oliveira

    l_oliveira Officer at Arms

    Joined:
    Nov 24, 2007
    Messages:
    3,879
    Likes Received:
    245
    Now, for the OP:

    Assuming you're building a "mode21"(HI-ROM) cart with four 27C801 chips and no SRAM:

    Each 27C801 has 20 address lines marked A0 through A19. You connect everything together through to the cart slot and take the /CS of each EPROM chip in sequence to each of the four 74LS139 outputs.

    The two selection inputs for the 74LS139 you connect to A20 and A21 at the cart slot. The enable input (the pin which get sent to the outputs) connects to the ROM enable pin on the cart slot. The state of A20 and A21 address lines will decide which of the four EPROMs will get enabled at any given time.

    For "mode20" (LO-ROM) games, the A15 pin from cart slot is skipped (left unconnected) so you shift address lines 1 bit around...

    I don't have any information about how to rig the SRAM circuitry but I suppose it can be inferred from any programming documentation.
     
  5. dexus

    dexus Member

    Joined:
    Apr 23, 2016
    Messages:
    10
    Likes Received:
    0
    Thank's for the replies, guys.
    The solution L_oliveira suggests is the one I am after. I have looked at numerous schematics for the 74LS139, and there are many, but much of the information available on forums and other sites contradict each other, and some are plain wrong.

    I actually thought that the board I am using (2A5B-01) which has 2 maskroms (32pin), 256k sram, battery, and a 74LS139 would be wired to use 2 roms, and doing the regular swapbin trick on each of the 27C801's would be all it took, but alas, there must be some more rewiring here. And I'm guessing it has to do with the decoder.

    So.. How would one re-wire the 74LS139 on a lorom board with room for 2 maskrom, sram and battery?
     
  6. l_oliveira

    l_oliveira Officer at Arms

    Joined:
    Nov 24, 2007
    Messages:
    3,879
    Likes Received:
    245
    I was looking at the super mario world schematic on the other thread and it looks like if you use it as is, connect the second chip to pin 5 of the 74LS139 it will work. Each pin makes for a 8MBIT window, which matches nicely the size of EPROM you want to use.
     
  7. dexus

    dexus Member

    Joined:
    Apr 23, 2016
    Messages:
    10
    Likes Received:
    0
    Well. I checked, and on the 2A5B-01 the second chip (/OE pin 24 on the swapbinned eeprom) is already connected to pin 5 of the 74LS139. It still won't properly work. I get the first screen (eg. euclid) and then it hangs with a sound like the sword-action of zelda).

    I have re-checked the soldering and no bad solder joints. even tried another board I have, and soldered in some eeprom holders to easily check for bad burns, but here nothing comes up at all.

    The cart itself work if I put a single 8mbit game in.

    Strange.
     
  8. l_oliveira

    l_oliveira Officer at Arms

    Joined:
    Nov 24, 2007
    Messages:
    3,879
    Likes Received:
    245
    Try pin 06 then I just noticed that A21 and A20 are backwards.
     
  9. l_oliveira

    l_oliveira Officer at Arms

    Joined:
    Nov 24, 2007
    Messages:
    3,879
    Likes Received:
    245
    I think I have a idea for you:

    http://s37.photobucket.com/user/skarstoker/media/Snes/SNES.jpg.html

    Look this schematics. It suggests that the A15 line is being used to signal the cartridge that the game want to use the SRAM.

    So we can "convince" the 1st half of the 74LS139 chip to also split the ROM space in half for us, if we take the pin 3, disconnect from A15 and connect to A20...

    That will cause pin 6 to become a valid enable. If that disturbs the SRAM behavior we can try to rewire the circuit in a way to avoid problems...

    I wasn't fully aware of how this worked until I saw this schematics. 1st half of 139 splits the address space in ROM/SRAM area and 2nd half sets the address space used by the SRAM.
     
  10. Pikmin

    Pikmin Resolute Member

    Joined:
    Dec 23, 2009
    Messages:
    935
    Likes Received:
    95
    I wasn't claiming anything myself just something I read, don't know enough about it. Thanks for the explanation
     
  11. dexus

    dexus Member

    Joined:
    Apr 23, 2016
    Messages:
    10
    Likes Received:
    0
    Ok.. Thats interesting.. My board is not wired at all like the schematic.. The schematic does say it's for a Hi-rom game tho. Mine is Lo-rom but that should just skew the connection 1 pin, right?

    on my board pin 4 and 5 of the 139 is connected oe (pin 4 to rom 1 and pin 5 to rom 2)
    Using romlabs pinout for lo-roms, I took my multimeter and this is how my 139 is wired.
    http://romlaboratory.dbwbp.com/romlab/lorom.htm

    /CS -------- 1 16 -- 5v
    A20 -------- 2 15 -- 5v
    A21 -------- 3 14 -- NC (cart pin 40)
    /OE rom 1 -- 4 13 -- A19
    /OE rom 2 -- 5 12 -- 5v
    NC --------- 6 11 -- 5v
    139 pin 15 - 7 10 -- 5v
    GND -------- 8 9 -- 5v


    Does the sram have to be 64kb for ZPW? If so, I could wire the two upper pins of the sram to vcc to disable them, tricking the game to think it only has 64k?
     
  12. dexus

    dexus Member

    Joined:
    Apr 23, 2016
    Messages:
    10
    Likes Received:
    0
    Anyone have any experience with these boards? It's a 2A5B-01 board..
     
  13. l_oliveira

    l_oliveira Officer at Arms

    Joined:
    Nov 24, 2007
    Messages:
    3,879
    Likes Received:
    245
    When I made my own repros I used bootlegs and that required full rewiring so I used my own design.
     
  14. dexus

    dexus Member

    Joined:
    Apr 23, 2016
    Messages:
    10
    Likes Received:
    0
    Own design pcb? Wow.. thats cool.. I as thinking about maybe trying to design a pcb that could use 27C801's and maybe some of the larger chips.. That may require some 16bit to 8bit magic.. Or maybe just make them use either 27C801's or TSOP's directly on the board..

    How was your design? Care to share it?
     
  15. l_oliveira

    l_oliveira Officer at Arms

    Joined:
    Nov 24, 2007
    Messages:
    3,879
    Likes Received:
    245
    It was for Tales of Phantasia, which is a weird game (has both hi and lo-rom banks).

    Well for your problem I have a simpler solution:
    Add a new 74LS139 to split the bank in two... What you think?
     
  16. dexus

    dexus Member

    Joined:
    Apr 23, 2016
    Messages:
    10
    Likes Received:
    0
    That would be a solution I think.. I have a bunch of 74LS139's laying around.. Adding one more in the cart should probably do it.. If I can figure out how to wire it up. I'm self-learned with this stuff :)

    Would love to make a Tales of Phantasia one day, but for now I think it's above my current abilities!
     
  17. mmz16x

    mmz16x Spirited Member

    Joined:
    Apr 29, 2010
    Messages:
    145
    Likes Received:
    3
    any chance you can share that TOP design @ l_oliveira ?
     
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page