It is currently Thu Jun 22, 2017 3:18 pm

All times are UTC - 7 hours



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 new topic Reply to topic  [ 30 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Fri Mar 10, 2017 3:22 am 
Offline

Joined: Fri Jul 04, 2014 2:34 pm
Posts: 288
Location: Germany
I've read many topics but in the end I never found a solution.

I'm trying to make my own carts for 27c160/27c322 EPROM at the moment (flash will follow once SRAM works) with battery backup function. While the carts itself work fine, the SRAM doesn't.

I'm trying to use a 74LS139, Capacitors, Diodes, Resistors and of course the CR2032 battery.
This is for LoROM but it doesn't work. Super Metroid for example gives me the Anti Piracy screen cause it can't find the SRAM.

Is there another way to do this? I've read about MAX795/STM795 or even BA6162 but those are nearly impossible to obtain nor would I know how to work with them properly.

Logic attached as an image.


Attachments:
sram.png
sram.png [ 26.62 KiB | Viewed 621 times ]
Top
 Profile  
 
PostPosted: Fri Mar 10, 2017 12:09 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 5822
Location: Seattle
I'm a little confused as to why your SRAM is labeled with pin 26 as /RESET (instead of +CE)

I mean, that's a fine connection.


Is the correct memory region when A15 and /ROMSEL are low, A20 and A21 are high? (I guess that's what nocash says)

Anyway, using a "real" battery controller won't help things if the game can't even find the RAM. A "real" battery controller should only help if you're losing data on power failure.


Top
 Profile  
 
PostPosted: Fri Mar 10, 2017 12:52 pm 
Offline

Joined: Fri Jul 04, 2014 2:34 pm
Posts: 288
Location: Germany
Oh, just disregard the labeling. It is indeed CE2 or +CE as you name it. :P

Usually I never had any problems saving the games (tested Legend of Zelda and various SMW Hacks) when wiring the 74LS139 like this on original boards to allow games up to 32MBit (using 27c322) to be saved on the 64KB SRAM found on SHVC-1A3B-XX boards with just a 32 pin MaskROM.

I will test that tomorrow and see if A20 and A21 are high and A15 and /ROMSEL are low.

Though, the 1A3B board series had a transistor on board. Could that be the problem in my logic?


Top
 Profile  
 
PostPosted: Fri Mar 10, 2017 1:51 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 5822
Location: Seattle
Super Metroid was on BA3M... no transistor there.

Interestingly, the 1A3B-01 doesn't have the BJT, although all the later ones do. Not clear what it's doing without a picture of the back.


I wrote a memory explorer for the SNES some number of months ago. You could use it to make sure that the RAM is where you believe it should be (instead of open bus)
Attachment:
snes-memory-browser.zip [2.08 KiB]
Downloaded 18 times
Use all twelve buttons on controller 1 to change the view window.

Note: this program actually tries to show the SST39 Identification page, by writing the correct unlock sequence to ROM. It shouldn't be a problem if you're either not using Flash, or if you disconnect /WR while using it.


Top
 Profile  
 
PostPosted: Fri Mar 10, 2017 2:03 pm 
Offline

Joined: Fri Jul 04, 2014 2:34 pm
Posts: 288
Location: Germany
I assume the transistors helps with battery backup. I can scan a 1A3B-XX front and back later.
I think I got 1A3B-01 and later revisions here. Have to check.

As for your program, I will test that as well but how would I press all 12 buttons? I mean, how to press all 4 D-Pad buttons at once? :P


Top
 Profile  
 
PostPosted: Fri Mar 10, 2017 2:38 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 5822
Location: Seattle
I meant each of the twelve buttons increases or decreases one of the six hexadecimal digits of the 24-bit address :P


Top
 Profile  
 
PostPosted: Sat Mar 11, 2017 1:37 am 
Offline

Joined: Fri Jul 04, 2014 2:34 pm
Posts: 288
Location: Germany
Got it, lol.

Anyway, I was able to get a SHVC-1A3B-XX board. Sadly I didn't find any 01 revisions without transistor.

My scanner didn't like them so I had to take a picture. Hope this helps with the transistor logic.


Attachments:
IMG_2807.JPG
IMG_2807.JPG [ 343.01 KiB | Viewed 551 times ]
IMG_2806.JPG
IMG_2806.JPG [ 315.91 KiB | Viewed 551 times ]
Top
 Profile  
 
PostPosted: Sat Mar 11, 2017 1:04 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 5822
Location: Seattle
Wait a moment, I have three games (FF2us, LoZ:LttP, SMAS) on 1A3B. I don't need pictures...
The BJT is an NPN (2SC2021) (C=+5V, B=R3, E=R2) in common-collector configuration (voltage buffer/current amplifier)
R2 pulls down RAM pin 26 (+CE).
R3 goes to /RESET (cart pin 26)

In other words, rather than just being
Code:
/RESET ----+--- SRAM +CE
           |
          100k
           |
          gnd

It's instead
Code:
                  +5v
                   |
                 |/
/RESET ---100k---|
                 |↘
                   +-- SRAM +CE
                   |
                  1k
                   |
                  gnd

but I can only guess why the difference. (time constant of the pulldown?)


Top
 Profile  
 
PostPosted: Sat Mar 11, 2017 1:37 pm 
Offline

Joined: Fri Jul 04, 2014 2:34 pm
Posts: 288
Location: Germany
Ah, okay. Didn't know if you had carts so I wanted to make sure.

Hm, interesting. Might give that 2SC2021 a chance and see if it changes anything as well as adjusting the connections properly.

Will report back later how it went.


Top
 Profile  
 
PostPosted: Sun Mar 12, 2017 6:10 am 
Offline

Joined: Fri Jul 04, 2014 2:34 pm
Posts: 288
Location: Germany
Okay, no matter how I solder it, the SRAM won't be recognized. Even tried a new one.

Connected it like an original 1A3B but I must be something missing.
Also added the 10nF capacitor to the 74'139 as it was causing problems without one on other games but still no change.

Here's how I wired it:


Attachments:
ram.png
ram.png [ 9.45 KiB | Viewed 517 times ]
Top
 Profile  
 
PostPosted: Sun Mar 12, 2017 12:04 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 5822
Location: Seattle
For the moment, why don't you try entirely disabling the battery backup circuitry, and just connect the SRAM's Vcc and +CE to +5V directly? There's two variables here, and I'm not certain whether they've been decoupled.


Top
 Profile  
 
PostPosted: Sun Mar 12, 2017 12:11 pm 
Offline

Joined: Fri Jul 04, 2014 2:34 pm
Posts: 288
Location: Germany
Will try that later.


Top
 Profile  
 
PostPosted: Mon Mar 13, 2017 4:29 am 
Offline

Joined: Fri Jul 04, 2014 2:34 pm
Posts: 288
Location: Germany
Alright, connected VCC and CE+ directly to 5V.
Nintendo logo appears, no anti piracy screen, just a black screen. But it doesn't go on.


Top
 Profile  
 
PostPosted: Mon Mar 13, 2017 1:16 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 5822
Location: Seattle
... I think there might be something wrong with your ROM?

In Super Metroid (JU), there's code starting at ROM 0x698 to copy 8K of cart RAM (from 0x700000) to SNES-internal RAM, then clears cart RAM, then fills the cart RAM mirror at at 0x702000 with garbage, then makes sure it can read the same garbage from 0x700000 (and here's when the anti-piracy warning would pop up), and finally copies the backup back to cart RAM.

It then calls a routine at ROM 0x80A0 (5a22 0x8180a0) to calculate the checksum of each of the save slots... and calls a routine at ROM 0x286 to initialize a save slot ... and after that "1994" should appear.


Top
 Profile  
 
PostPosted: Tue Mar 14, 2017 1:56 am 
Offline

Joined: Fri Jul 04, 2014 2:34 pm
Posts: 288
Location: Germany
I dumped the game using a Retrode, checksum matches. Game works fine. No byte differences to the original ROM.
Also dumped the game with an Arduino Cart Dumper from sanni. Same results. No byte differences.

I don't think it's the ROM now. I'm sure I'm missing something but I have yet to find out what.
I will send you pictures of the current PCB. Maybe the error can be found that way.

EDIT: I mean it's unlikely but maybe I got 2 faulty RAMs here? Or can the EPROM still be defective even if I can dump the game just fine?
Either way, I will try a new board as well.

EDIT2: Just noticed I grounded 27c322's /CE line. I added it back to SNES /CE line as well as RAM /OE but still freezes after the Nintendo logo. I'm starting to get lost here but I don't want to give up either. :'(


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 30 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group