It is currently Sat Sep 21, 2019 10:07 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 14 posts ] 
Author Message
PostPosted: Mon Dec 31, 2018 6:18 pm 
Offline
User avatar

Joined: Sat Jul 04, 2015 9:58 am
Posts: 960
Location: -29.794229 -55.795374
Hello and happy new year!
A while ago, I've got a "thrashed" Sonic 3 cartridge and with some help I could put it back to work.
So far so good. The cartridge has been played locked with Sonic & Knuckles and saves fine with it.
The problem is that if I play the cartridge alone, it also don't saves but corrupts the old saves too.
This seems really weird!
Would the resistor I used to fix the boot problem be causing some interference with the saves?
If so, what can I do? Put an pull up resistor with the same value or trying to add a buffer on this pin (D7) be the most apropriated solution?
Thanks in advance.


Top
 Profile  
 
PostPosted: Wed Jan 02, 2019 4:10 am 
Offline
User avatar

Joined: Sat Jul 04, 2015 9:58 am
Posts: 960
Location: -29.794229 -55.795374
I know this seems silly, but the resistor interfering with the SRAM writes is the only thing I can think of.
I tested the SRAM enable circuit and it seems just fine.
I removed th SRAM and put it as a PRG RAM on a NES clone I have and it worked fine.
Heck! It functions fine when locked on, so I don't know whrere to look for answers...

Testing the FeRAM as suggested to test the ROM on the other thread gave me similar results on the IC's pin D7.
Strangelly, when the FeRAM was on the circuit it didn't save even with the resistor mod.
Maybe it's a completelly different history, since the pin is not only an output, but an input too.

I could find an SMD DM7407, but its datasheet says the output when in high level is 30v!
I don't think my MD will survive to this...
Maybe if I use 2 NOT gates of a 74HC04?
If I could do a transistor based circuit, it will probably be easier to solder on th PCB and save some space.

Could this circuit possibly work fine as a digital buffer?
Code:
ROM D7--------E      C --------Cart PCB
               \____/         
         1K      | B  NPN
 5V-----\/\/\----+

I'm thinking in use a BC548, but I'm not sure if it will be fast enough.
Maybe a BF494 should be better suited for that?


Top
 Profile  
 
PostPosted: Wed Jan 02, 2019 5:23 am 
Offline

Joined: Fri Feb 24, 2012 12:09 pm
Posts: 1008
Going by the other thread, you have repaired megadrive cartridge, by soldering a 1k pulldown resistor to a broken pin on an unspecified chip? No idea which pin on which chip... but 1k sounds violent... if it's working with 3k..33k then better use that, the bigger the better, ie. less risk to damage your unspecified chip, and less risk to disturb your ram chip (if that's also connected to your unspecified pin).

Not sure what you want to use 7407 what for, but it's open collector, that means that it doesn't output anything when "high", certainly not 30v, and certainly nothing higher than you power supply anyways. The 30v in the datasheet just means that it won't die when attaching an external 30v pullip to the output.

Hmmmm, as far as I understand you want to compensate problems caused by your pulldown resistor by attaching a conditionally switched pullup resistor to it? Whilst that might work, it isn't actually a suitable straightforward solution for the problem. A bit like using a hearing aid to compensate ear plugs.


Top
 Profile  
 
PostPosted: Wed Jan 02, 2019 6:42 am 
Offline
User avatar

Joined: Sat Jul 04, 2015 9:58 am
Posts: 960
Location: -29.794229 -55.795374
nocash wrote:
No idea which pin on which chip... but 1k sounds violent...

It's the pin D7 of the ROM chip.
I followed TmEE's advice and searched for a pin wich reacted different for the diode test and that was the pin.
Since that was the value of the resistor used on the MegaKey adapter, I've stick with that.
I'll try your tip and put a bigger resistor, thanks. :-)

nocash wrote:
Not sure what you want to use 7407 what for

The objective is to make the resistor to not cause interference with the other part of the circuit.
I think an open collector buffer would do the job, just putting it after the resistor.
Am I correct?
I also found pretty weird to have an output with a higher tension than my power supply, but...

nocash wrote:
Hmmmm, as far as I understand you want to compensate problems caused by your pulldown resistor by attaching a conditionally switched pullup resistor to it? Whilst that might work, it isn't actually a suitable straightforward solution for the problem. A bit like using a hearing aid to compensate ear plugs.

Exactly! Mostly like a workaround to fix a problem caused by other workaround. :roll:
I think the best solution would be to write a new EPROM with the game data and substitute it's ROM.
But that unfortunatelly is out of my reach.
I'll try your tips as soon as I can.
Thanks! :wink:


Top
 Profile  
 
PostPosted: Wed Jan 02, 2019 2:00 pm 
Online

Joined: Sun Apr 13, 2008 11:12 am
Posts: 8564
Location: Seattle
Fisher wrote:
I could find an SMD DM7407, but its datasheet says the output when in high level is 30v!
It doesn't generate 30V from scratch! It's just an open-collector inverter.

It's basically identical to this:
Code:
           OUTPUT
          _|
INPUT --||_
           |
          gnd
The 30V is the maximum voltage it can be exposed to without itself taking damage.

Quote:
Could this circuit possibly work fine as a digital buffer?
Code:
ROM D7--------E      C --------Cart PCB
               \____/         
         1K      | B  NPN
 5V-----\/\/\----+
No, that tries to use a BJT as a transmission gate. It "works" but not very well. It doesn't buffer anything at all.


Top
 Profile  
 
PostPosted: Thu Jan 03, 2019 1:07 pm 
Online
User avatar

Joined: Wed Feb 13, 2008 9:10 am
Posts: 703
Location: Estonia, Rapla city (50 and 60Hz compatible :P)
It is more likely that the FeRAM bank you're using is damaged. You should tie the unused address line to different state to use the fresh FeRAM bank on the chip. The game uses early type of FeRAM with much more limited write cycle capability than modern chips and it isn't the first time I see a damaged FeRAM in Sonic3 carts.

_________________
http://www.tmeeco.eu


Top
 Profile  
 
PostPosted: Fri Jan 04, 2019 6:17 am 
Offline
User avatar

Joined: Sat Jul 04, 2015 9:58 am
Posts: 960
Location: -29.794229 -55.795374
TmEE wrote:
It is more likely that the FeRAM bank you're using is damaged.

That makes a lot more sense.
By the way, I'm not using the original FeRAM, I'm using a SRAM I got from an old famiclone.

I didn't have time to try to solve this issue yet. :cry:
But maybe when I tried it as a NES clone PRG RAM it could have used only part of it and worked fine.
I'll try to alternate the address pins that are grounded first, since when locked on the game saves fine.


Top
 Profile  
 
PostPosted: Fri Jan 04, 2019 10:45 am 
Online
User avatar

Joined: Wed Feb 13, 2008 9:10 am
Posts: 703
Location: Estonia, Rapla city (50 and 60Hz compatible :P)
Do you have a proper battery management circuit there ? The 8 pin chip that most carts have rather than some diodes and resistors arrangement ?

_________________
http://www.tmeeco.eu


Top
 Profile  
 
PostPosted: Fri Jan 04, 2019 3:07 pm 
Offline
User avatar

Joined: Sat Jul 04, 2015 9:58 am
Posts: 960
Location: -29.794229 -55.795374
I'm using this circuit as power management:
Code:

                 10K
              +--/\/\------SRAM /CS
              |   1K
 -Batt+--->|--+--/\/\---+--SRAM Vcc
 |      1N4148          |
GND                     |
       Console's --->|--+
          Vcc     1N4148

It's working fine on a pirate Mario Kart I have.
How good (or bad) is it?


Top
 Profile  
 
PostPosted: Fri Jan 04, 2019 11:57 pm 
Online
User avatar

Joined: Wed Feb 13, 2008 9:10 am
Posts: 703
Location: Estonia, Rapla city (50 and 60Hz compatible :P)
I have found similar circuits to be completely unreliable when you remove the cartridge or otherwise handle it, more often than not the SRAM gets corrupted.

_________________
http://www.tmeeco.eu


Top
 Profile  
 
PostPosted: Sat Jan 05, 2019 6:10 am 
Offline
User avatar

Joined: Sat Jul 04, 2015 9:58 am
Posts: 960
Location: -29.794229 -55.795374
Interesting.
This can sure be one of the reasons that this corruption happens.
Can you please suggest a good circuit?
Maybe I should use a transistor on the /CE or /WE pin?
Looks like I'll finally have time to try to fix this tonight, so any suggestions are welcome.


Top
 Profile  
 
PostPosted: Sat Jan 05, 2019 3:01 pm 
Online

Joined: Sun Apr 13, 2008 11:12 am
Posts: 8564
Location: Seattle
The discretes battery switchover-and-protection circuit I've seen used looks like ( picture instead of ascii art in viewtopic.php?p=110357#p110357 )
Code:
 +5V
  |
  +-----+
  |     |   
 1k     |   
  |   |↙   
  +---|     
  |   |\   
 8.5k   +--- +PowerGood
  |     |   
 gnd   100k
        |
       gnd
                Vups
                 |
               _____
+PowerGood ---o\    \   ← must be CMOS, not TTL
                )    >--- /RAMCE
/RAMEN     ----/____/
                 |
                gnd

Vbat ---|>|---1k---+---- Vups
+5V  ---|>|--------+
Use schottky diodes with a low forward voltage.

If you're using a RAM with a separate +CE input, you can connect +PowerGood to it instead of using a demultiplexer / inverter and OR gate.


Top
 Profile  
 
PostPosted: Sun Jan 06, 2019 2:06 pm 
Offline
User avatar

Joined: Sat Jul 04, 2015 9:58 am
Posts: 960
Location: -29.794229 -55.795374
Thanks!
Shifting an address pin (I think it's A9) from GND to VCC did the trick. The game is saving fine now.
I don't think the FeRAM can be reused because of that anomaly in pin D7.
I don't know why the NES game booted with this bad RAM. Maybe the failed addresses were not used or not critical for the 2 games I tried...

@lidnariq for the diodes would 1N4148 do the trick?
I have a couple of them at hand with some BC558 bjt. Do they fit the needs?
For the OR gate, I think I saw some 74HC32 on the junk pile. If they fit I can "harvest" a couple of them.
Thanks for the schematics. :-)

If I was going to use a rechargeable battery, I would need to just omit the battery's diode?
Wich would work best, a rechargeable or a not rechargeable battery?


Top
 Profile  
 
PostPosted: Sun Jan 06, 2019 2:25 pm 
Online

Joined: Sun Apr 13, 2008 11:12 am
Posts: 8564
Location: Seattle
Fisher wrote:
@lidnariq for the diodes would 1N4148 do the trick?
It depends on the specific RAM you're using.

You need to check out the minimum retention voltage for the RAM, the current drawn in standby mode, the forward voltage of the diode you're using at that current, and make sure that's something that could operate off the battery.
Similarly, you need to check the minimum active voltage for the RAM, the current drawn in active mode, the forward voltage of the diode you're using at that current, and make sure that's something that could operate off +5V.

Whether a 1N4148 would work depends on lot of the other specifics.

Quote:
I have a couple of them at hand with some BC558 bjt. Do they fit the needs?
Yeah, any old PNP transistor will do. You might need to adjust the 8.5k resistor: just make sure that PowerGood transitions from +5V at some appropriately high voltage.

Quote:
For the OR gate, I think I saw some 74HC32 on the junk pile. If they fit I can "harvest" a couple of them.
Note one of the inputs on that OR gate was inverted. A 74HC139 or 74HC138 might be easier.

Quote:
If I was going to use a rechargeable battery, I would need to just omit the battery's diode?
Depends on the battery. Every secondary cell needs a different charging circuit, and you need to pick the correct thing for it.

Quote:
Which would work best, a rechargeable or a not rechargeable battery?
Secondary (rechargeable) cells usually have substantially higher self-discharge rates than primary (non-rechargeable) cells. It's not rare to hear of CR2032s (Lithium primary cells) that still retain the contents of RAM two decades later; rechargeables certainly won't last that long.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: TmEE and 3 guests


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