Project

General

Profile

Actions

Emulator Issues #11324

open

Datel titles (Advance Game Port, MaxPlay, Action Replay) that save to memory cards do not work with GCI Folders

Added by JMC4789 over 5 years ago. Updated over 1 year ago.

Status:
Accepted
Priority:
Low
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

Game Name?

Advance Game Port (2004 Datel) - GNHE5d
Mario Golf - Advance Tour - AGB-BMGE-USA

This feature it not present in the 2003 Advance Game Port

MD5 Hash? (right click the game in the game list, properties, info tab, MD5 Hash: Compute)

hahahahahahhahahahaha

What's the problem? Describe what went wrong. Also turn it into a sarcastic story.

Let's say you had a build of Dolphin that sorta-properly-but-maybe-not emulated GPU timings to the point where the Advance Game Port could run games again. Basically, imagine the Advance Game Port was functional and didn't randomly crash all the time. Okay, now that you did that, you need DSP-LLE and a GameCube BIOS of any region. Once you have that, load up the Advance Game Port, set the Advance Game Port to SlotB and make sure you dumped a GBA rom that works in the Advance Game Port. I used Mario Golf in my test but any game works.

Anyway, if you happen to be using GCI Folders in Slot A, things seem to be working fine. The game runs at a crisp 14 - 20 FPS on the Advance Game Port with the audio constantly stuttering. It's beautiful, really. Hell, the 2004 version of the Advance Game Port at least emulates the game's mirrored sprites correctly, unlike the 2003 version. So really you can't ask for a better way to play Mario Golf: Advance Tour on the big screen.

But in the 2004 version of the Advance Game Port is this fancy new "snapshot" feature which lets you save your progress even in games that don't have saves. Why you'd need to use this over Dolphin's savestates, I don't exactly know but for some reason I decided to try it out and BOOM. Dolphin crashed.

Using regular memory cards works fine, but that's no fun. Dolphin definitely shouldn't crash at the very least, even if this feature for some reason can't be supported with a fix.

Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.

This issue isn't actually present in any version of Dolphin as they'll hang very early in the boot process. It only theoretically exists in the sense that if the AGP were to boot, it'd definitely happen.

Is the issue present in the latest stable version?

The above also applies to stable versions.

If the issue isn't present in the latest stable version, which is the first broken version? (You can find the first broken version by bisecting. Windows users can use the tool https://forums.dolphin-emu.org/Thread-green-notice-development-thread-unofficial-dolphin-bisection-tool-for-finding-broken-builds and anyone who is building Dolphin on their own can use git bisect.)

I guess the first broken revision would be the one that added GCI folders?

If your issue is a graphical issue, please attach screenshots and record a three frame fifolog of the issue if possible. Screenshots showing what it is supposed to look like from either console or older builds of Dolphin will help too. For more information on how to use the fifoplayer, please check here: https://wiki.dolphin-emu.org/index.php?title=FifoPlayer

If we had a fifolog for memory card writes I would oblige.

What are your PC specifications? (CPU, GPU, Operating System, more)

CPU ARM7TDMI @ 16.78 MHz, Zilog Z80 @ 8 or 4 MHz
Memory 32 KB internal, 256 KB external, 96 KB VRAM
Display TFT LCD, 240×160 pixels, 40.8×61.2 mm[5]

Is there anything else that can help developers narrow down the issue? (e.g. logs, screenshots,
configuration files, savefiles, savestates)

I spent way too long searching for GBA gameIDs...


Files

GCIFolderAGP.jpg (36.5 KB) GCIFolderAGP.jpg JMC4789, 08/05/2018 06:56 AM
AGPTest.JAP.7z (36.5 KB) AGPTest.JAP.7z JMC4789, 08/14/2018 03:20 AM
Actions #1

Updated by Helios over 5 years ago

  • Priority changed from Normal to Low

JMC this was critical so I'm triaging as requested.

Actions #2

Updated by lpfaint99 over 5 years ago

Fun times. I don't have this disc, but it makes sense that an unlicensed game wouldn't use the normal writes.

GCI Folders relies on the fact that the official games write the header and allocate blocks prior to writing to the block.
so only the first 5 blocks are automatically created (header, directory,directorybackup, bat, batbackup).
after that the only blocks are ones that have been allocated by a game,
directory listing points to first block in BAT, which points to the next block up until the end (-1).

Actions #3

Updated by JMC4789 over 5 years ago

Is there any way to fix this or should the warning be changed or something?

Actions #4

Updated by lpfaint99 over 5 years ago

The analytics weren't in place when I wrote the feature, so I figured dolphin closing would get it to actually be reported

https://github.com/dolphin-emu/dolphin/blob/master/Source/Core/Core/HW/GCMemcard/GCMemcardDirectory.cpp#L373

If you replace that exit(0) with

  l.unlock();
  return length + extra;

It should "skip" writing that block, but not crash (at least not deliberately)

Almost certainly fixable, but rather challenging without the disc. If you could provide raw memory card files I could potentially get some details worked out.

  • Brand new memory card with exactly one snapshot
  • Copy of that same card with an additional snapshot
  • Copy of the original card with a snapshot from a different game.

If I were writing that feature today I'd have better logging in place so you could just provide me with a log, so maybe it'd be worthwhile for me to add some now :shrug:

Actions #5

Updated by JMC4789 over 5 years ago

How the snapshots work are a bit a mystery. You definitely can't have two snapshots from the same game. I'm not sure if you can have snapshots from two different games even.

I'll get some memory cards though.

Actions #6

Updated by JMC4789 over 5 years ago

It definitely seems to only let me keep one snapshot on a memory card. The game's region is apparently japanese (even on console, though it'll boot on any region.)

Actions #7

Updated by lpfaint99 over 5 years ago

I was afraid that it would be one per memory card, which hits another case that isn't well defined, depending on exactly how it does the writes, only the first time might work

The good news is, it doesn't look like it is doing anything super crazy, I'll see if I can find some time this week to throw together a first pass at supporting it, with some logging that can help finalize the details

Actions #8

Updated by JMC4789 over 5 years ago

  • Status changed from New to Accepted
Actions #9

Updated by pokechu22 almost 2 years ago

This same exit() call also affects MaxPlay, which saves high scores when exiting some games (e.g. Bounty Hunter X, and I think another one) by pressing Z and then Start.

Actions #10

Updated by pokechu22 almost 2 years ago

  • Subject changed from Advance Game Port (v2) Savestate Feature Does Not Work with GCI Folders to Datel titles (Advance Game Port, MaxPlay, Action Replay) that save to memory cards do not work with GCI Folders

This also affects Action Replay Max (and presumably any other version of Action Replay that uses a memory card to store codes, but not the Wii-compatible version (compare #8176)). In action replay, select "Options" -> "Update hardware" and Dolphin will exit. I'm pretty sure this affects all Datel titles as such.

Note that in the GameCube IPL with a raw memory card, you can see an icon for the save files (including the Action Replay one), so they're not doing anything too odd. (The CodeJunkies support site says that there is a version of the Action Replay memory card that isn't detected as a memory card by the GameCube, but there's also one that is detected as a normal memory card (and that's presumably the case Dolphin is hitting when using a raw memory card).)

Actions #11

Updated by pokechu22 over 1 year ago

This also affects Bonus Powersaves. Given that Bonus Powersaves's only purpose is to transfer save games to a memory card, this is a bit of a problem. (It works fine with raw memory cards, though, although I don't own any of the games it supports.) Max Drive/Max Drive Pro is not affected (or at least, with the lack of implementation of Max Drive specific behavior, doesn't attempt to write to memory cards).

Actions

Also available in: Atom PDF