Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2015-12-20 02:29:06

supershadow64ds
Member
Registered: 2014-07-13
Post 10/11

Multiple Save File + Dual Access?

Now, this is not a request nor something I plan on doing, but a question.
Theoretically, would it be possible to have two save files on Pokemon Red through ASM on the disassembly? Perhaps something similar to what the Game Boy Advance games had, but not a backup for savefiles, but two independently accessible save files entirely separate from each other? I suppose something of the sort could be created through ASM but I was unsure if SRAM was something that was extremely finite and unalterable or if it's defined by the ROM itself or through emulation/hardware restrictions.

Secondly, ignore this if the previous is not possible, but would it be possible to load data from the save file not chosen into the save file that was? I'm not speaking of the entirety of the save file, but just name, party Pokemon, badges, current Map and X/Y position on said map. I ask this mostly for a hypothetical addition to a personal ASM build in which the two save files can somewhat interact with each other, such as if one save file were to save one tile right to the door of a Pokemon Center in Vermilion City after defeating Surge, if the player were to load the other file, upon reaching Vermilion, an NPC would spawn in place of where the other save file had saved (One tile right of the Pokemon Center), and upon asking Yes or No if the currently playing player would like to battle, the game would load the current party Pokemon of the not currently playing save file. In addition to this, the player would also be able to see on the Gym Statues if the other save file had also defeating the Gym Leader.

Without going off entirely on a tangent, would this be possible though the power of ASM?

Offline

#2 2015-12-20 10:46:55

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 349/437
Website

Re: Multiple Save File + Dual Access?

Yes, technically it would be possible to save the same information in two different parts of the save file, and access one or the other memory area for reading/writing depending on which game you're playing. I think Pokemon TCG had something like this where you could load one of three different games.

The problem is that the current save data of Pokemon Red already uses more than half of the 8K SRAM space available. Box Pokemon data alone uses two of the 2K banks almost entirely. Seeing how most of the data of a Pokemon struct can take almost any value I don't think any kind of compression would help since you can only afford a loseless compression. Maybe you could try cutting down the amount of boxes or of pokemon per box as well as removing the two redundant type bytes and generate them based on the species instead. Kinda cheap, but you could ignore some of the least significant bits of the stat experience or rewrite the way it's handled altogether so that each stat exp only requires a single byte.

I think if you managed to fit two games of box data in two sram banks, then you would be able to split the HoF data plus main save data of each game in each of the other two banks by putting hof data after the main data (after b500-ish of the ram memory map).

Last edited by Crystal_ (2015-12-20 10:47:52)

Offline

Board footer

Powered by FluxBB