Non volatil game boy saves (done on Pokemon Yellow, but problem on Pokemon Gold)

Discussion in 'Other Handhelds' started by yafeee, Apr 14, 2013.

  1. wadeVillines

    wadeVillines Member

    Newcomer
    2
    Oct 17, 2017
    United States
    Yes, if you are using an MBC5, you should be able to just remove the RAM chip and place your FRAM. Removing the power-down chip is optional, but you can do it if you connect one end of a 10k resistor to the VCC pin of your FRAM and the other to the CE pin of FRAM. The resistor trick is totally optional, so you don't have to do it unless your power-down chip is dead or something. Honestly, it's only really useful if you're building a flash cartridge from scratch.
     
    Last edited by wadeVillines, Mar 5, 2018
    gonzaloj likes this.
  2. wadeVillines

    wadeVillines Member

    Newcomer
    2
    Oct 17, 2017
    United States
    Hey all, hopefully this is it. Figured out how to get the FM18W08 chip to work on both Gameboy DMG and Gameboy Color, which means it should theoretically work on the GBA as well.

    For this to work, you will need to OR together these signals:
    -/RAMCS from the MBC3
    -CLK from the cartridge slot

    The output of this OR should go to the /CE of your FRAM. Basically, if any one of these signals goes high, then /CE should also go high (inactive).

    Originally, I was using a 3-input OR (RAMCS, CS, CLK), but it's a little bit overkill I think. CLK is already rising and falling every cycle, so CS isn't really needed as far as I know.

    EDIT: use a 2-input OR instead of 3 (RAMCS and CLK), use that output as your FRAM /CE signal.
     
    Last edited by wadeVillines, Mar 7, 2018
    migles likes this.
  3. JS7777

    JS7777 Advanced Member

    Newcomer
    2
    Aug 2, 2017
    France
    Great.

    I made a post a while ago about that, and bennvenn told me to use with a nand gate.

    By using a OR gate it will probably fix my glitch issue with Wario Land cartridge.

    My post :

     
    Last edited by JS7777, Mar 7, 2018
  4. gonzaloj

    gonzaloj Newbie

    Newcomer
    1
    Feb 19, 2018
    Spain
    But you say before that you only hace to put the Fram fm18w08 in the Game, in What games i have to do It? Works with all mbc?
     
  5. wadeVillines

    wadeVillines Member

    Newcomer
    2
    Oct 17, 2017
    United States
    In MBC5, you only have to place your FM18w08. In MBC3, you will have to OR those signals together and send the output to your FRAM /CE pin.

    — Posts automatically merged - Please don't double post! —

    Wow, that post takes me back. I think I remember reading over that a looong time ago, back when I was doing my initial research and knew almost nothing.
    I believe you are right, I'm 99% sure that Wario game has the same issue as Super Mario Land 2, using part of RAM as system RAM.

    I need to edit my post, but I think this solution can be simplified to match what you have there. A 3-input OR doesn't seem necessary, and a 2-input OR using only CLK and RAMCS seemed to do the trick for me.
    And because using an OR on those signals fixed the sprites in SML2, I'm hoping it will work for you as well.
     
    Last edited by wadeVillines, Mar 7, 2018
    gonzaloj likes this.
  6. gonzaloj

    gonzaloj Newbie

    Newcomer
    1
    Feb 19, 2018
    Spain
    you can upload some photos of the mbc 3 method?
    P.D: thanks for all your discoveries, you are a amazing gamer!!!
     
  7. wadeVillines

    wadeVillines Member

    Newcomer
    2
    Oct 17, 2017
    United States
    Just tested with Pokemon Prism. You will need to OR together CS, RAMCS, and CLK for this game to completely work. Without CS, the save file will corrupt and all in game sprites will have issues. Without RAMCS, the clock data on the continue screen does not update (it is supposed to update every second). There are probably more issues caused by not including RAMCS, but that is all I have found with my short tests. So, to be safe for full compatibility, I would OR together all 3 signals.

    Also, I added a quick doodle of the setup. I will get around to a more detailed explanation later on. I hope to start up a blog after I design and assemble a working cartridge.
     

    Attached Files:

    Last edited by wadeVillines, Mar 9, 2018
    gonzaloj likes this.
  8. JS7777

    JS7777 Advanced Member

    Newcomer
    2
    Aug 2, 2017
    France
    What Or gate you recommend ? (number ?)

    Thanks
     
  9. wadeVillines

    wadeVillines Member

    Newcomer
    2
    Oct 17, 2017
    United States
    I haven't tried out any of them (I just used some diodes to rig an OR gate), but I just bought these:
    https://www.digikey.com/product-detail/en/texas-instruments/SN74LVC1G332DCKR/296-15943-6-ND/1849509

    It will take a few days for them to arrive, but I don't see any issues with them. They had the shortest delay I could find at only 4.5ns and accept anywhere from 1.7V to 5V.

    Using the 2-input one seemed to work for every game besides Pokemon Prism, which is doing something differently. I don't know why adding the CS line fixes it, because the RAMCS signal is specifically there for signaling the RAM. If I was more ambitious, I would dig into it and try to find out. It might be possible to patch the game to not need that extra signal, but I wouldn't know for sure. Probably more work than it's worth anyway.
     
    Last edited by wadeVillines, Mar 9, 2018
  10. gonzaloj

    gonzaloj Newbie

    Newcomer
    1
    Feb 19, 2018
    Spain
    Hi! I I send a picture of Pkmn crystal structure todo a cypresssemiconductors worker, he say that a Fram memory FM1808B-SG in theory works with Pokemon crystal And maybe with other mbc3
     
    Last edited by gonzaloj, Mar 28, 2018
  11. Teki5

    Teki5 Member

    Newcomer
    1
    Oct 20, 2016
    Unfortunately, according to that chip's datasheet, it has the same problem as the FM18W08. "Unlike an SRAM, changing address values will have no effect on the memory operation after the address is latched."
     
  12. gonzaloj

    gonzaloj Newbie

    Newcomer
    1
    Feb 19, 2018
    Spain
  13. wadeVillines

    wadeVillines Member

    Newcomer
    2
    Oct 17, 2017
    United States
    Just a small update: I completed my PCB and have been enjoying playing Pokemon Prism on it. Turns out the OR gate only needs two inputs: Clock and RAM_CS. Every game I've played on it works like a charm. Been playing it on Pokemon Stadium as well. By changing the header file of the ROM to a Pokemon ROM header, any game can be played on Pokemon Stadium's GB Tower (using the Transfer Pak).
     
    JS7777 likes this.
  14. JS7777

    JS7777 Advanced Member

    Newcomer
    2
    Aug 2, 2017
    France
    Great to hear that it worked !
     
  15. wadeVillines

    wadeVillines Member

    Newcomer
    2
    Oct 17, 2017
    United States
    Something interesting, however. I made 2 versions of this cartridge: 1 uses 3 inputs for its OR gate (CLK, RAM_CS, CS) and the other uses only 2 (CLK and RAM_CS). Commercial cartridge programmers, such as the one from J. Rodrigo, cannot program my RAM chip if it is using 2-input OR. This made me realize that these programmers don't use the CLK pin for anything at all. So, without the CS pin, the FRAM isn't getting toggled correctly. This can be fixed one of two ways: using the 3-input OR gate, or connecting the CLK pin to the CS pin on the programmer.

    Note that this won't matter for MBC5 carts, since they don't use the CLK pin, either. This ONLY applies to MBC3. After this modification to the programmer, it will still work for both types, though.

    One MORE thing! I didn't understand why Pokemon Red/Blue used MBC3 if they have no RTC (I thought maybe MBC5 just wasn't developed yet). However, the MBC3 has a clock input pin (system clock, not RTC clock) while the MBC5 does not. I believe this chip was used so these games could be run in double or triple speed mode when playing on Pokemon Stadium, using Doduo and Dodrio mode, respectively. Just an interesting tidbit.
     
    Last edited by wadeVillines, Apr 28, 2018
    JS7777 likes this.
  16. Teki5

    Teki5 Member

    Newcomer
    1
    Oct 20, 2016
    I'm assuming this is with all the cathodes going to the F-RAM, do I need any pullup/pulldown resistor when doing it with diodes? And will this mod still allow the RTC to work correctly (from the battery)?
     
  17. wadeVillines

    wadeVillines Member

    Newcomer
    2
    Oct 17, 2017
    United States
    Yes, it has been a while since I did this, but I remember using a 10K pulldown resistor between the diode output and ground.
     
  18. Fishaman P

    Fishaman P Speedrunner

    Member
    7
    Jan 2, 2010
    United States
    Wisconsin
    Very interested in a writeup/blog post with pictures!
     
  19. JS7777

    JS7777 Advanced Member

    Newcomer
    2
    Aug 2, 2017
    France
    I would be able to do it when I get the parts and time.
     
  20. Teki5

    Teki5 Member

    Newcomer
    1
    Oct 20, 2016
    Alright, I'll try that! I just soldered it up without the pulldown and I get dark striped square sprites.
    UPDATE: It works perfectly, however... My intention here is to still have a battery, for the clock, and when that runs out I can replace it without worrying about my save. With the 10K pulldown, and a standby output from the diodes of about 2.2v... That's drawing 220μA. Not a lot for a running console, but the battery I'm using (80mAh) will only last about two weeks. And that's before I even consider the F-RAM standby current. Looks like I'm better off getting one of those OR-gates after all :P
     
    Last edited by Teki5, May 20, 2018
Loading...