#54908 - cory1492 - Fri Sep 23, 2005 3:22 pm
Made a program to backup EEPROM to your SRAM, one is just to copy/restore it (ETool 2.1 - mainly for supercard users, although works on my XG2 turbo 2005 512...) and the other has multi slots to copy to (6x64k and 8x4k)
2mbit are not supported but:
If someone can aim me at some good/simple info or libs (that will work with dkARM) on compression I will see what I can do about adding it to Etool 2.1 to allow backup and restore of 2mbit EEPROMS as well (currently only format is implemented)... (and yes, I have looked, so far as I can see libz may be my best choice?)
note: there is no check to see if you are using a passme/flashme cart so they can potentially overwrite standard gba game SRAM... because of this I did not include a wi-fi version (although there is source, and bins included are only appended using the dkARM loader)
Just want to say again and again "thanks SATA for the fixed code for the EEPROM reads and writes!"
any rate, find them here if you are interested, appreciate any feedback on bugs that you may well find in there.
Cory1492?s DS Dev Corner
#54910 - Chetic - Fri Sep 23, 2005 3:41 pm
Wait, does this mean I can use someone elses save for Mario 64 DS to get all the extra stuff without playing through the entire game again?
Nice job, by the way.
_________________
Packin':
Grey DS with FlashMe v7
1Gbit XG2T 2005 (Neoflash compatible)
GBAMP, Supercard CF, 512Mb Magic Key 3 and EZFA 256Mbit
#55018 - cory1492 - Sat Sep 24, 2005 5:57 pm
Thanks Chetic, gotta fix the keypress though (did not include vblank interrupts at all so...)
Actually, using a hex editor I made a .sav (for supercard, but it should work with anything you can put an sram file to directly/uncompressed) from one of the Max Drive DS online saves, where all mini games are unlocked and and the first slot has 150 stars
http://nds.cmamod.com/files/marioEtool.rar
(copy paste the link to grab it)
#55120 - DsPet - Sun Sep 25, 2005 6:21 pm
> 2mbit are not supported but...
FWIW: If you want to support Nintendogs carts, a simple run-length compression technique is sufficient. The 256KB of data can be compressed to well under 30KB (if you don't have too many dogs). If you want to be smarter, put in a special check if the first 128KB is equal to the second 128KB (true in the case of a non-corrupt Nintendogs cart)
Don't know about other 256KB/2mbit carts.
#55158 - Mithos - Sun Sep 25, 2005 11:41 pm
Can I do it the other way?
I already have a NDS save in my GBA-flashcart SRAM (using generic patcher), and want to move that to the NDS EEPROM when I get the original gamecart i a few days.
Possible or not possible?
#55212 - Maverick - Mon Sep 26, 2005 12:41 pm
Or, for 2mbit, you could have a choice of backing it up in parts
#55334 - BLKGHOST - Tue Sep 27, 2005 8:29 pm
It says in the read me that SATA did a GBAMP version. Is it out?
#55518 - pr0kjayhawk - Thu Sep 29, 2005 12:43 am
Is there any way to copy the backed up savegames from my flashcart to my computer? I have the 256Mbit EZ-FlashII Powerstar and when I got to the save section of EZ Client it says "NOT detect SMS, SMS will occupy 2M of the cart. Use or Not?"
#55519 - cory1492 - Thu Sep 29, 2005 12:43 am
I tried a couple of RLE algos on a save from Ndogs, the smallest I could get a full-up ndogs save extracted from the maxdrive .dss was about 70KBytes... a tad too large for it to work. (although I didnt check to see if the mirror data was the same)
Funny thing being using say, zip compression, even with the added overhead of headers and such compression goes below 50KB - so Im at a loss (heh pun as I need a lossless compression algo). Too bad I dont have enough experience to do a port of zlib directly, or it would be likely be done already... still looking at it scratching my head on how to get that one to compile to a new platform without violating the software agreements.
If you look on my site a link to SATA's GBAMP site can be found there, but for posterity's sake:
http://www.pat.hi-ho.ne.jp/sata68/nds.shtml
is SATA's NDS page. The tool is called "NDS EEPROM TOOL update r7b" and does a bit more than just save copying.
/edit: for the EZ III carts you need to specify a save size BEFORE putting the tool onto it, so its possible that your cart has a similar setting... I didnt put much for flash cart info as there are so many different ways that they save and I dont have every brand of flashcard to try them all...
mithos: use ETool 2.1 (not Etool SMS) and tell it to copy the SRAM to EEPROM and that should do what you are after, at least, it worked for me on a couple 64k games.
#55525 - tepples - Thu Sep 29, 2005 1:17 am
cory1492 wrote: |
I tried a couple of RLE algos on a save from Ndogs |
RLE can be viewed as a specialized form of LZ77 with a window size of 1 byte. Try porting one of the GBA-LZ77 packers.
Quote: |
the smallest I could get a full-up ndogs save extracted from the maxdrive .dss was about 70KBytes... a tad too large for it to work. (although I didnt check to see if the mirror data was the same) |
That would be a good idea: XOR the second copy with the first copy.
Quote: |
Funny thing being using say, zip compression, even with the added overhead of headers and such compression goes below 50KB |
Deflation is LZ77 intermixed with Huffman coding. Another thing to watch for: PKZIP's Deflate algorithm uses a 32 KiB window. It won't pick up the mirrors because they're 128 KiB away from each other.
Quote: |
Too bad I dont have enough experience to do a port of zlib directly, or it would be likely be done already... still looking at it scratching my head on how to get that one to compile to a new platform without violating the software agreements. |
The zlib license is rawther permissive. It falls in the same category as BSD and X11 licenses.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#55620 - cory1492 - Fri Sep 30, 2005 2:28 am
Doesnt DS have hardwired support for some forms of decompression like Huffman? (I only saw some confusing stuff in NDSlib regarding this though, without some working samples as to what goes in to get the right out I am usually lost)
Thanks very much for some direction tepples, before I look into the zlib port (and R16a DKA for that matter, just when I was getting to "know" R15 a little) I will definitely track down the LZ77 stuff done on the GBA... for whatever reason I got the idea that it was only really used in the emulators for ROM deflation wrather than in GBA app coding so I didnt look to far before.
I also see this today at PDRoms:
Yet another opportunity to not have to learn more than the basics of what goes on "behind the scenes" for the time being... guess if it works out well I will owe Infantile Paralysiser some thanks too... gotta do some diffs to see what exactly has changed to understand porting such libraries better myself.
#55621 - tepples - Fri Sep 30, 2005 2:37 am
The GBA BIOS has support for several flavors of data decompression. These were carried over to the Nintendo DS BIOS.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#55915 - Ackman - Tue Oct 04, 2005 10:33 am
hi, i have a g6flash and the program don't work, the two screens put black, can you help me?
thanks
#55939 - Extreme Coder - Tue Oct 04, 2005 7:31 pm
I'm guessing this doesn't work on neoflash,right?
#56209 - cory1492 - Fri Oct 07, 2005 3:40 am
Extreme Coder wrote: |
I'm guessing this doesn't work on neoflash,right? |
Well, it works on an xg2turbo 2005 512 so I dont see why it wouldnt work with a NeoFlash... dont know why its not working on the G6 though, if I had one I would definitely try and find out. (perhaps a "homebrew" cart that isnt so homebrew friendly?)
edit:/ one last bit, I have been contacted by a couple people who are experiencing a problem with SRAM, is it a known problem for some flashcarts to "lose" or NULL the first byte of SRAM? I will be putting a workaround for this problem into EToolSMS, but if there is indeed a known problem with a full solution I would sure like to know about it...
edit2:/ OK, EToolSMS is now updated to 1.07 so that the first 2 bytes of data doesnt really matter any more, and if you have an old save file it will correct the APPID header to 2 bytes farther in so no one else should experience the problem of losing the first byte to the NULL void()
Last edited by cory1492 on Fri Oct 07, 2005 5:53 pm; edited 1 time in total
#56228 - Dark Knight ez - Fri Oct 07, 2005 7:58 am
I believe Tepples once posted that the first couple of bytes (and I believe last couple of bytes too) of the GBAs SRAM are unreliable...
I believe he said so in some sort of "some quick knowledge on programming for the GBA" post. Was interesting to read.
#56270 - cory1492 - Fri Oct 07, 2005 3:37 pm
Dark Knight ez wrote: |
I believe Tepples once posted that the first couple of bytes (and I believe last couple of bytes too) of the GBAs SRAM are unreliable...
I believe he said so in some sort of "some quick knowledge on programming for the GBA" post. Was interesting to read. |
Thanks Dark Knight - figured there would be some knowledge on this, tried searching last night and all I really found was a short thread on how to use the SRAM in GBA programming, and this thread...
but here it be:
http://forum.gbadev.org/viewtopic.php?p=6777&highlight=gba+sram+first+byte#6777
#56293 - Dark Knight ez - Fri Oct 07, 2005 6:42 pm
Yup, that's the one I was refering to.
Glad I could be of some assistence --- or in this case, Tepples. ;)
#56331 - pepsiman - Fri Oct 07, 2005 10:36 pm
Ackman wrote: |
hi, i have a g6flash and the program don't work, the two screens put black, can you help me? |
When you get 2 black screens with a G6 do this:
Press and hold the button on the G6.
Turn the DS off.
Turn the DS on.
Release the button on the G6.
I have this problem on all homebrew that makes assumptions about the initial state of POWER_CR.
I think this should fix it:
Code: |
POWER_CR = POWER_ALL_2D ; |
I think it's a bug in the G6 firmware, if this does fix it then I'll ask them to fix the firmware.
#56487 - cory1492 - Sun Oct 09, 2005 12:38 am
nice, thanks pepsiman, I will get the guy with a G6 to give that a shot and get back to you here in a couple days.
#56500 - Ackman - Sun Oct 09, 2005 2:59 am
hi pepsiman, now the tool starts ;)
but, i have a new problem xD
how can i see the sram saves in my flash?
the soft of the g6 dont show sram saves... can you help me?
bye and thanks
sorry my english
#56539 - pepsiman - Sun Oct 09, 2005 3:38 pm
Ackman wrote: |
how can i see the sram saves in my flash?
|
Connect G6 to computer.
Add EToolSMS using the G6 software.
It will create 3 files on the G6 for saves.
Insert G6 in DS.
Press the icon on the left.
When you select EToolSMS in the G6 menu choose which save file to load.
Do EToolSMS stuff.
Turn off DS.
Turn on DS.
Press the icon on the left
Go to EToolSMS in menu.
Press select.
Choose which save file to save to.
Turn off DS.
Connect G6 to computer.
Use explorer to copy the save file to your computer.
#57082 - cory1492 - Thu Oct 13, 2005 5:02 pm
I just got word back from Ackman, I removed the lcdswap and added the power_cr = power_all_2d ; as you suggested PepsiMan (not sure why that affected the LCD's to cause them to swap, but its working as before - but now on G6's as well).
This definitely solved the problem and the G6 button is no longer needed, thanks again for your help with this issue PepsiMan.
posted to my site as: (with instructions from above post in the info file)
EToolSMS_v1.07G_NDS.zip
#57092 - Ackman - Thu Oct 13, 2005 6:26 pm
thanks to cory and pepsiman :)
bye
#57111 - Ackman - Thu Oct 13, 2005 8:55 pm
pepsiman wrote: |
Ackman wrote: |
how can i see the sram saves in my flash?
|
Connect G6 to computer.
Add EToolSMS using the G6 software.
It will create 3 files on the G6 for saves.
Insert G6 in DS.
Press the icon on the left.
When you select EToolSMS in the G6 menu choose which save file to load.
Do EToolSMS stuff.
Turn off DS.
Turn on DS.
Press the icon on the left
Go to EToolSMS in menu.
Press select.
Choose which save file to save to.
Turn off DS.
Connect G6 to computer.
Use explorer to copy the save file to your computer. |
one question
if i copy the save of wario touched (1 bank of 64kb) to the archive etoolsms.0 this save... can use it with the rom of wario touched? for example rename the archive to wario.0?
thanks and sorry me english
#57121 - Ackman - Thu Oct 13, 2005 9:59 pm
i create this archive http://perso.wanadoo.es/rafapoveda/EtoolSMS.1
i put the save of wario touched in the bank 1 of 64kbs
can use this save with the rom of wario? o this save is only for the original card?
thanks
#57278 - Ackman - Fri Oct 14, 2005 7:09 pm
anyone can help me?
thanks
#57562 - cory1492 - Mon Oct 17, 2005 1:18 am
make a save while playing wario on your G6, and send me that one too, and I will try and tell you, if not make it compatible for you.
edit:/ I can extract the save for you if you like, you can use ETool 3.11 to copy EEPROM/FLASH and the included PC side extractor to make a save that will be compatible @ 256k
ETool 3.11 - out now, backs up and restores current EEPROM (no compresseion) and FLASH (2mbit) saves (with compression) and has a PC side decompressor/extractor with... woohoo, the hardest thing I have figured out recently, drag and drop support... also moved everything in SRAM out of those dangerous bytes, so there should be no lost saves with it.
Thanks for all your help getting over the hump of compression, especially you DSPet, that trainer you made is A1 and seeing it released encouraged me very much. (I did not do any xor to cancel mirrored data, the save is the origional full info from the cart)
#57616 - Ackman - Mon Oct 17, 2005 11:56 am
cory1492 wrote: |
make a save while playing wario on your G6, and send me that one too, and I will try and tell you, if not make it compatible for you.
edit:/ I can extract the save for you if you like, you can use ETool 3.11 to copy EEPROM/FLASH and the included PC side extractor to make a save that will be compatible @ 256k |
i will send the save, thanks
bye
#57828 - AnalogMan - Tue Oct 18, 2005 8:15 pm
So... if I am understanding this correctly I could, say.... transfer a save from one DS cart (say Lunar) to another DS Lunar cart? Is it a swap cart method like DsPet's Nintendog trainer, or does it have to pass to my computer first?
#57960 - Ackman - Wed Oct 19, 2005 4:07 pm
New version
EtoolSMS 2.0
cory1492 wrote: |
cleaned up a lot of behind the scenes stuff, added 2mbit save/restore, now the 6th save in the 64kbit area can be used for either a 64kbit OR a 2mbit compressed save. New version of SRAM storage method, V2.0x, your old 1.0x will update automatically, retaining all data and function, but all slots will claim to be full if you decide to import your old save backups. Slots are numbered always now as well, and you can no longer change empty save names, as they are blank when empty rather than containing dummy save names like ?1 - save empty?. I spit on it, I polished it, and I almost beat my computer because of it? but here it be! Let me know if I messed anything up, although I have tested it I cannot test it for everything that exists. |
http://nds.cmamod.com/
bye
#67436 - unrequited - Wed Jan 18, 2006 12:59 am
What's different in Deivtru's ALT 2MB write version? I backed up AC:WW but could not restore it and was freaking out until I tried the 2MB version which worked flawlessly. What is Deivtru's ALT version missing that you'd keep your original?
_________________
-Unrequited
#67500 - cory1492 - Wed Jan 18, 2006 6:11 pm
nothing as far as I can tell except that it writes 2mbit save in larger 256 byte chunks wrather than the carme's way of using 32 byte chunks. And it does it faster. I dont have many 2mbit save carts to test with (and none that need the T3 fix) so I included both, in case someone such as yourself had problems restoreing the saves. Better also than having to re-release it with both later if there is a problem with the new way (although to my understanding 256 chunks is the way it is supposed to be done anyway).
BTW: the source code is included for both so you can find differences (aka diff util) if you really wanted to see whats different.
#73615 - Kamek - Sun Feb 26, 2006 11:10 pm
I've been using ETool for quite some time now with my EZF-Advance III and it's been working just fine. Today, however, ETool stopped being nice to me. Whenever I pull compressed saves off of my EZF-Advance III and try to extract them with ETxtract, the program says "inflate: incorrect data check" and then crashes. I've tried reformatting my card, wiping the SRAM, and doing all kinds of other things to it to try to get it to work again, but to no avail.
I'm out of ideas, so any help you guys might be able to offer is greatly appreciated.
EDIT: It seems to be working again just fine. The only possible explanation I can come up with was that I was doing a LOT of burning and erasing on the flash cart that day, so perhaps it overheated or something. *shrug*