Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Datel AGP save commands for SRAM/FRAM. Improve EEPROM. #2045

Merged
merged 1 commit into from Feb 15, 2015

Conversation

greyrogue
Copy link
Contributor

This adds initial support for the 0xAE04 and 0xAE07 commands of the AGP (doesn't include Flash ROM).

@greyrogue
Copy link
Contributor Author

Yeah. Whoops.
Thanks.

@JMC47
Copy link
Contributor

JMC47 commented Feb 13, 2015

This PR fixes my GBA games in the Advance Game Port as I said on the forums. I guess flash memory is pretty rare compared to eeprom?

@@ -191,7 +206,7 @@ u32 CEXIAgp::ImmRead(u32 _uSize)

void CEXIAgp::ImmWrite(u32 _uData, u32 _uSize)
{
if ((_uSize == 1) && ((_uData & 0xFF000000) == 0))
if ((_uSize == 1) && ((_uData & 0xFF000000) == 0)) // Execute current command?

This comment was marked as off-topic.

@skidau
Copy link
Contributor

skidau commented Feb 14, 2015

Would you please squash the commits down to one commit?

@greyrogue greyrogue changed the title Add save commands for SRAM/FRAM. Improve EEPROM. Add Datel AGP save commands for SRAM/FRAM. Improve EEPROM. Feb 14, 2015
{
// Handle endian write - could be done with byte access in 0xAE commands instead
std::vector<u8> temp_eeprom;
temp_eeprom.resize(m_eeprom_size);

This comment was marked as off-topic.

@JMC47
Copy link
Contributor

JMC47 commented Feb 14, 2015

I've seen someone on IRC say that with Fire Emblem (not sure which one?) it's not saving properly and zeroes out, but I'm not able to reproduce save problems right now.

I did some pretty thorough testing, using the PR build instead of my custom build with the hanging fix.

Test 1:

  1. I loaded Minish Cap with a blank save file
  2. I saved the game.
  3. Hit Z, exited the game from within the AGP
  4. Reloaded the game and observed the savefile was correctly there.

Test 2:

  1. I did the first two steps of test 1
  2. Close out the game window.
  3. Reload the AGP
  4. Observed that the savefile still worked

Test 3:

  1. Did the first two steps of Test 1 again
  2. Closed Dolphin out entirely.
  3. Reloaded Dolphin and tried out the AGP.
  4. Successfully loaded the savefile.

@skidau
Copy link
Contributor

skidau commented Feb 15, 2015

Sorry to be picky, but would you please squash the two commits?

Handle possible endian file read issues at file access time instead of
using Swap64 on every access.
Code comments and clean up.
@skidau
Copy link
Contributor

skidau commented Feb 15, 2015

@dolphin-emu-bot rebuild

skidau added a commit that referenced this pull request Feb 15, 2015
Add Datel AGP save commands for SRAM/FRAM.  Improve EEPROM.
@skidau skidau merged commit d601657 into dolphin-emu:master Feb 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants