Hacking AKAIO Slot-2 Save Management

aphirst

Well-Known Member
OP
Member
Joined
Oct 22, 2007
Messages
399
Trophies
1
Location
Hull
Website
aphirst.co.uk
XP
555
Country
United Kingdom
I've got an Acekard 2.1 coming at some point from DealExtreme, and a scenario with the EZ3in1 occurred to me:

Say one flashes a 32MB GBA Game to the NOR. One plays the game, and saves it to the 3in1's SRAM.
One then reboots the DS, and opts to load an 8MB game into the PSRAM. One plays the game, and saves to the 3in1's SRAM.

Now: It's quite possible that I've missed something relatively fundamental about the architecture of the 3in1's SRAM, but surely if one then tries to load the 32MB game which is in the NOR, it will pick up the save from the 8MB game, display an error, and overwrite the SRAM with a save for this game, ultimately clearing your 32MB game's save?
Or is there a routine which, when it backs up the PSRAM game's save, it recognises that there's a game in the NOR, and re-sends the NOR's save? (obviously, on loading the PSRAM game, it would have to backup the NOR game's save)

I tried to search for a similar question in the Acekard board and the EZFlash board, but didn't find anything. Additionally, the AKAIO wiki is currently down. If anyone knows, I'd appreciate any information. It's just been nagging at my mind for a day or so, but it would cause quite a bit of wierdness. And save loss D:

Thanks, and well done with AKAIO, Smiths, Norm and everyone else who contributed! It's what convinced me to get myself an Acekard. XD
 

UltraMagnus

hic sunt dracones
Member
Joined
Aug 2, 2007
Messages
1,964
Trophies
0
Age
35
Location
Portsmouth
Website
Visit site
XP
220
Country
I really wish the standard firmware (or akaio) would check the 3-in-1 at startup and backup the sram save, given the problems that the 3-in-1 seems to have with its sram battery running out. hell, it might even persuade me to use akaio
 

Another World

Emulate the Planet!
Former Staff
Joined
Jan 3, 2008
Messages
10,579
Trophies
2
Age
48
Location
From Where???
Website
wiki.gbatemp.net
XP
5,560
Country
Colombia
the 3-in-1 has received updates thanks to everyone who donated to purchase smiths and norm each a 3-in-1 to test with. smiths has added a pogo-shell like experience. you should check here for more information.

as for saving on start up, it can... but it would do you no good if the sram battery was dead. as soon as you turned off power to the system the sram would clear out. you could attempt to power down and then back up instantly, thus keeping a charge to the kit and the sram. however, i don't think that would work each time. replacing the sram battery is pretty simple.

try the 1.3 public beta for some of the 3-in-1 updates.

-another world
 

aphirst

Well-Known Member
OP
Member
Joined
Oct 22, 2007
Messages
399
Trophies
1
Location
Hull
Website
aphirst.co.uk
XP
555
Country
United Kingdom
Perhaps I'm asking for too esoteric a scenario...
Basically, I'm going to be trying to run, for instance, Pokemon in the PSRAM, while having Fire Emblem in the NOR, and I'm wondering how AKAIO will handle the SRAM. Because the way I *currently* understand it, if Pokemon is loaded into the PSRAM while something is already in the NOR, then the Pokemon save will overwrite the NOR's SRAM save. As a result, even if the NOR's save was backed up before loading Pokemon, would not the NOR game have problems if it were loaded from the DS menu (after all, the NOR game's save hasn't been sent back to the SRAM).

Unless, of course, each startup after a PSRAM load backs up the SRAM, and restores the save of the game it knows (some sort of text file for the loader) is in the NOR.

If someone knows how this works, could they please let me know - as it could potentially be a problem. Thanks
happy.gif


EDIT: This is of course assuming that Pokemon would work from the PSRAM with a game already in the NOR (this doesn't work on the EZ5+ because of the way they allocate SRAM space...) - it's large save type could pose a problem.
 

Smiths

AKAIO Person of Interest TAGS ARE THE BEST
Developer
Joined
Feb 24, 2003
Messages
1,461
Trophies
2
Location
The land of Dairy Queen
Website
www.gamergeddon.com
XP
2,179
Country
United States
Your scenario describes just one of the 10^6 combos I had to consider in how to handle 3in1 saving in the latest build.

Bottom line is there is it will try its damndest to back up previous SRAM before anything else loads that is slot-2 related. There is also a manual "SRAM DUMP" button on the 3in1 options window to pull the sram at any time.

There's no way to totally determine what is being run when and how the user will interact; you're going to have to have some personal responsibility when using the 3in1.

QUOTE said:
Basically, I'm going to be trying to run, for instance, Pokemon in the PSRAM, while having Fire Emblem in the NOR, and I'm wondering how AKAIO will handle the SRAM. Because the way I *currently* understand it, if Pokemon is loaded into the PSRAM while something is already in the NOR, then the Pokemon save will overwrite the NOR's SRAM save. As a result, even if the NOR's save was backed up before loading Pokemon, would not the NOR game have problems if it were loaded from the DS menu (after all, the NOR game's save hasn't been sent back to the SRAM).

Of course it would have some god damn problems! You've just said you would be overwriting the SRAM.

1 SRAM bank. 1. Uno. That's it. Use it or lose it. You load one game, it'll have that game's SRAM going to that bank.
You're going to have to have some consistency and some damn brainpower when using the 3in1; it's not our responsibility to work miracles.

Posts merged

UltraMagnus said:
I really wish the standard firmware (or akaio) would check the 3-in-1 at startup and backup the sram save, given the problems that the 3-in-1 seems to have with its sram battery running out. hell, it might even persuade me to use akaio


Hell, if you paid attention to anything you'd know I put that in already. Way to be on top.
 

aphirst

Well-Known Member
OP
Member
Joined
Oct 22, 2007
Messages
399
Trophies
1
Location
Hull
Website
aphirst.co.uk
XP
555
Country
United Kingdom
Aha! I think I get it now.
Basically, because there are so many esoteric combinations of SRAM pratting, the solution is basically to manage the SRAM yourself, presumably with manual SRAM load/save options which either are or will be in AKAIO. As long as there's a way to send a save to the SRAM as well (without having to send the entire game), I think I could work something out.
biggrin.gif
Now that the site is behaving a little more, I'll give the Wiki a thorough read.

Thanks for that, Smiths. I know that you're one of the guys working on AKAIO, so I very much appreciate the info and the explanations. I know that you can't program for every scenario, and it's good to know that you've tried to work something out. I eagerly await playing around with this, when my Acekard finally does arrive.
biggrin.gif

Cheers a lot! ^___^
 

Another World

Emulate the Planet!
Former Staff
Joined
Jan 3, 2008
Messages
10,579
Trophies
2
Age
48
Location
From Where???
Website
wiki.gbatemp.net
XP
5,560
Country
Colombia
aphirst said:
Aha! I think I get it now.
Basically, because there are so many esoteric combinations of SRAM pratting, the solution is basically to manage the SRAM yourself, presumably with manual SRAM load/save options which either are or will be in AKAIO.

actually what he is saying, in a sober way, is that akaio will dump your sram on boot up/load sram when you flash over a game. if you don't flash anything the sram save will still be there thanks to the battery. if you run your games in that way you won't run into a problem. as soon as you start flashing randomly and not paying attention to what you are doing you will probably lose a save.

the sram button as i remember it was for a complete dump of info which was something bliss had for 3-in-1 support and useless for the avg user but good for debugging. now, smiths just said you can use that so i guess it presently works differently. my point (right now until i research this a bit with my own kits) is to just manage your saves by paying attention to the order of operations and not to rely on the dump button.

there is no way to code for every expectation, trying becomes a waste of time.

-another world
 

aphirst

Well-Known Member
OP
Member
Joined
Oct 22, 2007
Messages
399
Trophies
1
Location
Hull
Website
aphirst.co.uk
XP
555
Country
United Kingdom
Thanks an awful lot guys
wub.gif


The moment I get my AK2 I'll do some serious checking, and if I can devise a reasonable stable way for doing what I'm after, I'll post up what I did here. It might be a while (DealEx ran out of "stock" just hours after I ordered D: , so a few weeks maybe), but I will.

Thanks!
toot.gif
 

Smiths

AKAIO Person of Interest TAGS ARE THE BEST
Developer
Joined
Feb 24, 2003
Messages
1,461
Trophies
2
Location
The land of Dairy Queen
Website
www.gamergeddon.com
XP
2,179
Country
United States
Yeah, and i was sober when i wrote that dammit!

(I was groggy though, as it was before heading into work).

The SRAM button it seems dumps the PSRam with a date/time filename. It's like having the save file for the game, but just without a proper name. In redoing the 3in1 options window, I had to investigate just what the hell the old buttons actually were.

I prefer to set the "prompt before save/load" in 3in1 options to Enabled, as that's how I used PogoShell back in the GBA days. I like to know if it's saving/loading, and sometimes I don't want it to save the file.
 

aphirst

Well-Known Member
OP
Member
Joined
Oct 22, 2007
Messages
399
Trophies
1
Location
Hull
Website
aphirst.co.uk
XP
555
Country
United Kingdom
So right, hang on; would you be able to send just a save file back to the SRAM so you could continue a game in the NOR (after playing something in the PSRAM) ?
 

aphirst

Well-Known Member
OP
Member
Joined
Oct 22, 2007
Messages
399
Trophies
1
Location
Hull
Website
aphirst.co.uk
XP
555
Country
United Kingdom
Or I could have taken this entire thing the complete wrong way:
The Readme file that comes with GBA_ExpLoader says:
CODE

1. 256Mbit(32MByte) NORfalshÂÂÂÂpage size is 1Mbits(128KB)

2. 128Mbit(16MByte) PSRAMÂÂÂÂpage size is 1Mbits(128KB)

3. 4Mbit(512KByte)ÂÂSRAMÂÂÂÂpage size is 64Kbits(8KB)
Now, with 512KB of SRAM, I would have thought that since the largest save is 128KB, the GBA Loader would allocate portions of the SRAM as needed, in the save-patching routine.
Or maybe, since the SRAM is 4 times larger than the largest save, implement the patching system so that is uses the first 2 megabits for the PSRAM, and the last 2 Megabits for the NOR. Or something. (The EZ5+ did something similar, but because they allocated too much for their "NOR multiROM" feature [which I never liked, and never used], it borked 1 Megabit Save games from working in PSRAM - curse them for only allowing 64KB for the PSRAM!
tongue.gif
)

Or, at least, that's a thought that just occured to me. And, if it actually did work that way, one would never have any SRAM related problems XD

Please, do scold me if that's silly (it makes sense to me at the moment, I'm sure it's possible to patch a PSRAM/NOR game to use SRAM from some point other than the beginning, and to be able to back that up next bootup), because I'm drifting into unconsciousness. Tiredness can sometimes enlighten, but most often just confuses.

Thanks, and good night.
smile.gif


EDIT: I knew I'd read something like this before. I put a link in as a sort of source. I hope that this could potentially be done with AKAIO, if it hasn't been already in a recent testing build.
biggrin.gif
 

HipShooter

Member
Newcomer
Joined
May 2, 2008
Messages
8
Trophies
0
XP
49
Country
United States
Actually could Smith or someone help me out...I had my Mother 3 in NOR, booted to EZ 3 in 1.

I updated to AKAIO 1.3 and was "whoa more features" but I used the "Sram Dump" in the menu options.

Now I got a 512 kb file named with a time and date. But I also lost my save in my NOR!

How could I salvage my save file using this 512 kb?
 

aphirst

Well-Known Member
OP
Member
Joined
Oct 22, 2007
Messages
399
Trophies
1
Location
Hull
Website
aphirst.co.uk
XP
555
Country
United Kingdom
Right - I think I know how to ask this question now. I was beating around the bush it seems.

I found this on the CycloDS' site:

QUOTE said:
There are separate locations for save data for PSRAM and NOR. If you play a game in NOR, then play one in PSRAM, the save for the NOR game will still be there when you return to NOR mode again.

This is to do with usind different parts of the SRAM for the saves. Is this how it works in AKAIO or the official firmware?
 

Smiths

AKAIO Person of Interest TAGS ARE THE BEST
Developer
Joined
Feb 24, 2003
Messages
1,461
Trophies
2
Location
The land of Dairy Queen
Website
www.gamergeddon.com
XP
2,179
Country
United States
i always thought the saves were separate. but when i got my 3in1 and began testing it seems they both were using the same slot.

hooray for user-provided documentation. EZ and Acekard should team up to create the "anyone knows how it works?" line of products.
 

aphirst

Well-Known Member
OP
Member
Joined
Oct 22, 2007
Messages
399
Trophies
1
Location
Hull
Website
aphirst.co.uk
XP
555
Country
United Kingdom
Just to say, I submitted a bug report on the fact that with my older 3in1 none of the Pokemon or Advance Wars games seem to "keep" their saves, whether run from PSRAM or NOR - other games like Mario and Castlevania save fine. All combinations of Clean/Trimmed/SRAM Patched have been tried with no success (the functional games are all Trimmed with no Patching). All the games are the (E) versions, as they are dumped from my own cartridges.
I'll squeal in happiness if Smiths or Normatt or someone gets to the bottom of this.
tongue.gif


Ironic that I spent so long asking, seeing if games with larger saves work in PSRAM, and here I am with my Pokemans not saving. *passes the time revising for exams, and replaying Apollo Justice*
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    bassviolet @ bassviolet: uwu