jaybird3rd #1 Posted January 13, 2006 Forgive me if my ignorance of electronics is showing here, but is it possible to add a battery to an existing cartridge PCB (preferrably the C300565) so that the contents of its onboard RAM are not lost while the power is off? I'd like to add a "save game" feature to a project that I have in mind. Quote Share this post Link to post Share on other sites
Bryan #2 Posted January 13, 2006 Forgive me if my ignorance of electronics is showing here, but is it possible to add a battery to an existing cartridge PCB (preferrably the C300565) so that the contents of its onboard RAM are not lost while the power is off? I'd like to add a "save game" feature to a project that I have in mind. 999282[/snapback] It would be easier to make a cart with something like a 93C46 EEPROM to save stuff. Then there's no battery. -Bry Quote Share this post Link to post Share on other sites
Shawn #3 Posted January 13, 2006 Forgive me if my ignorance of electronics is showing here, but is it possible to add a battery to an existing cartridge PCB (preferrably the C300565) so that the contents of its onboard RAM are not lost while the power is off? I'd like to add a "save game" feature to a project that I have in mind. 999282[/snapback] Short answer no. But anything is possible. Quote Share this post Link to post Share on other sites
jaybird3rd #4 Posted January 13, 2006 (edited) It would be easier to make a cart with something like a 93C46 EEPROM to save stuff. Then there's no battery. -Bry 999284[/snapback] Interesting ... I hadn't heard of these before. Can they be added to any of Atari's PCBs (I suspect not), or would a new board have to be developed to support it? I'd like to do this "on the cheap" as much as possible, which is why I thought of simply adding a battery to the RAM I've already got on the '565. I know that Harry's monitor cart had a battery backup, but that might have been something different. Edited January 13, 2006 by jaybird3rd Quote Share this post Link to post Share on other sites
Bryan #5 Posted January 13, 2006 It would be easier to make a cart with something like a 93C46 EEPROM to save stuff. Then there's no battery. -Bry 999284[/snapback] Interesting ... I hadn't heard of these before. Can they be added to any of Atari's PCBs (I suspect not), or would a new board have to be developed to support it? I'd like to do this "on the cheap" as much as possible, which is why I thought of simply adding a battery to the RAM I've already got on the '565. I know that Harry's monitor cart had a battery backup, but that might have been something different. 999297[/snapback] You'd need to add a PAL or something to interface with it, but it has a simple serial interface that's easy to use. These are how the Jaguar keeps scores, btw. -Bry Quote Share this post Link to post Share on other sites
supercat #6 Posted January 13, 2006 You'd need to add a PAL or something to interface with it, but it has a simple serial interface that's easy to use. These are how the Jaguar keeps scores, btw. 999311[/snapback] Or else stick it in the Player 2 joystick port. Not as elegant, but it avoids the requirement for extra hardware. Quote Share this post Link to post Share on other sites
Harry_Dodgson #7 Posted January 13, 2006 (edited) Forgive me if my ignorance of electronics is showing here, but is it possible to add a battery to an existing cartridge PCB (preferrably the C300565) so that the contents of its onboard RAM are not lost while the power is off? I'd like to add a "save game" feature to a project that I have in mind. 999282[/snapback] Been there, done that - It's simple. And a EEPROM could be stuck on a '565 cartridge and used without adding any extra hardware - Bastian just stuck one on a Lynx cartridge, he wrote (and I optimized) the software to access it. Ignore all the people who say it can't be done or takes too much work. -or- perhaps you could use the High Score Cartridge RAM Edited January 13, 2006 by Harry_Dodgson Quote Share this post Link to post Share on other sites
jaybird3rd #8 Posted January 13, 2006 (edited) Been there, done that - It's simple. And a EEPROM could be stuck on a '565 cartridge and used without adding any extra hardware - Bastian just stuck one on a Lynx cartridge, he wrote (and I optimized) the software to access it. Ignore all the people who say it can't be done or takes too much work. -or- perhaps you could use the High Score Cartridge RAM 999549[/snapback] Unfortunately I missed out on getting a HSC, or else I probably would use it. I won't be ready to begin thinking about my "game save" routine (it's actually a save option for a level editor), either for an EEPROM or for a battery-backed RAM, until I actually have a game running. Since this is only my first attempt at coding for the 7800, and since I've only just started it, it may take a while. In the meantime, I'd love to try to add a battery to my '565 if you wouldn't mind sharing the procedure with me. Edited January 13, 2006 by jaybird3rd Quote Share this post Link to post Share on other sites
Bruce Tomlin #9 Posted January 13, 2006 Forgive me if my ignorance of electronics is showing here, but is it possible to add a battery to an existing cartridge PCB (preferrably the C300565) so that the contents of its onboard RAM are not lost while the power is off? I'd like to add a "save game" feature to a project that I have in mind.Sure. You need to disconnect the power trace to the RAM chip, then put a diode across the cut. Then put in another diode on the RAM chip's power pin and put a battery on the other end. A plain old CR2032 should work, but there's no room with a T-bar cartridge board for a battery socket. So when I did this a long time ago, I just wrapped the battery with clear packing tape and crammed it into the cartridge. A serial EEPROM is a much better idea. I've gotten a lot of 93C46 chips in salvage from junk modems. There is also the 24Cxx series, and the main difference between the two types of chips is that the 93C46 uses the Microwire interface, while the 24Cxx uses the I2C interface, and is available in much larger sizes. The memory board that goes into a joystick port that you'll find in some other thread around here uses a 24Cxx chip. Using a serial EEPROM on a joystick port means that you don't need to make a special cartridge board, and people playing your game on RAM/flash cartridges can save games, too. It still sucks for people using emulators, at least until someone implements it in your favorite emulator. Quote Share this post Link to post Share on other sites
~llama #10 Posted January 13, 2006 Why not just add MemCard support? It's the AtariVox without the speech hardware. Quote Share this post Link to post Share on other sites
jaybird3rd #11 Posted January 13, 2006 (edited) Thanks for that information; I'll certainly give it a try! I know that a serial EEPROM would be a much better solution, and I might yet decide to use one depending on how this goes, but my primary concern with going that route (aside for the time and expense of adding one to the '565) was emulator support. I'm guessing that using battery-backed RAM would work within an emulator because support for the RAM is already there, whereas adding an EEPROM might introduce compatibility issues. I'd like to build one program that will work within 7800 emulators and with any stock 7800 console, which is why I'd like to avoid requiring extra hardware (a MemCard, a joystick-based interface, etc.) if at all possible. Edited January 13, 2006 by jaybird3rd Quote Share this post Link to post Share on other sites
supercat #12 Posted January 14, 2006 Sure. You need to disconnect the power trace to the RAM chip, then put a diode across the cut. Then put in another diode on the RAM chip's power pin and put a battery on the other end. A plain old CR2032 should work, but there's no room with a T-bar cartridge board for a battery socket. So when I did this a long time ago, I just wrapped the battery with clear packing tape and crammed it into the cartridge.999660[/snapback] The /CE and /WE pins on the RAM will both go low when the console is turned off. That is a BAD thing. If you do not add circuitry to ensure the chip is disabled when the main power is off, memory corruption is virtually guaranteed. Further, current consumption is likely to be excessive even if you use a generally-low-current RAM. An easier approach might be to use a Dallas Semiconductor NV-SRAM module. These are pin-compatible with normal DIP SRAMs though they're a little bulkier. Each module includes a RAM, a battery, and a controller chip which among other things prevents any data from being written while the main power is disabled. In addition, if you want, you can get a module with a built-in time-of-day clock (also battery-backed). The Dallas modules arne't cheap, but they WORK. And that's worth a lot. Quote Share this post Link to post Share on other sites
PacMan #13 Posted January 14, 2006 The /CE and /WE pins on the RAM will both go low when the console is turned off. That is a BAD thing. If you do not add circuitry to ensure the chip is disabled when the main power is off, memory corruption is virtually guaranteed. Further, current consumption is likely to be excessive even if you use a generally-low-current RAM. 999902[/snapback] This is not necesserily true, most modern SRAM's designed for low power operation contains necessary protection circuitry for this. I have designed several commercial applications using Bruce's or similar method without any hitches. Of course, the EEPROM is a much better solution, in every aspect, if you are only going to save high scores. /PacMan Quote Share this post Link to post Share on other sites
Richard H. #14 Posted January 14, 2006 The DS1210 is a great chip designed for this purpose. DS1210.pdf Quote Share this post Link to post Share on other sites
Bruce Tomlin #15 Posted January 15, 2006 (edited) The /CE and /WE pins on the RAM will both go low when the console is turned off. That is a BAD thing. If you do not add circuitry to ensure the chip is disabled when the main power is off, memory corruption is virtually guaranteed. Further, current consumption is likely to be excessive even if you use a generally-low-current RAM.I know it worked for me. Lots of 6116/6264 type chips will hold memory contents with 3 volts Vcc. Anyhow, it worked for me. For a quick hack it ought to be fine. I suppose a pull-down from /CE1 to ground won't hurt, but the lower Vcc ought to keep the select logic from working.An easier approach might be to use a Dallas Semiconductor NV-SRAM module. These are pin-compatible with normal DIP SRAMs though they're a little bulkier. Each module includes a RAM, a battery, and a controller chip which among other things prevents any data from being written while the main power is disabled. In addition, if you want, you can get a module with a built-in time-of-day clock (also battery-backed).Sure, if money is no object. The real problem, though, is that those things are TALL. The battery is in the top of the module over a regular height DIP chip. They may be fine in computers, but they will definitely not fit into a cartridge case. Edited January 15, 2006 by Bruce Tomlin Quote Share this post Link to post Share on other sites
supercat #16 Posted January 15, 2006 This is not necesserily true, most modern SRAM's designed for low power operation contains necessary protection circuitry for this. I have designed several commercial applications using Bruce's or similar method without any hitches.1000177[/snapback] Do they really? I know that things like the Dallas modules include circuitry, but I don't think most RAMs disable writes when VDD=2.5 volts. If VDD is at 2.5 volts and /CE and /OE are both at 0.7 volts or less (diode clamped to the Atari's VCC which of course will be at zero) why wouldn't the RAM chip write to whatever address happened to be sitting on the bus? Quote Share this post Link to post Share on other sites
EricBall #17 Posted January 15, 2006 Rather than developing a custom cartridge, I'd strongly recommend supporting the two solutions which already exist - the 7800 High Score Cartridge (which is emulated by the CC2), and the AtariVox/MemCard. Quote Share this post Link to post Share on other sites
jaybird3rd #18 Posted January 15, 2006 (edited) Rather than developing a custom cartridge, I'd strongly recommend supporting the two solutions which already exist - the 7800 High Score Cartridge (which is emulated by the CC2), and the AtariVox/MemCard.1000769[/snapback] I'll certainly do that if I can get my hands on one; of the two, I'd probably choose the MemCard because it's a lot cheaper and because the HSC was really designed for high scores. I'd like to support both cartridge RAM and the MemCard, actually, because I don't want to limit the game to too few people (the 7800 audience is small enough as it is and relatively few of them own a MemCard/AtariVox) and I want to make my game playable in an emulator. Edited January 15, 2006 by jaybird3rd Quote Share this post Link to post Share on other sites
Richard H. #19 Posted January 16, 2006 PM me, and I'll send you a complimentary MemCard. (Same goes for anyone else wanting to incorporate it into their games / hacks) Quote Share this post Link to post Share on other sites