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

Super Mario Advance 4 crashes #208

Open
StariaRose opened this issue Oct 14, 2024 · 15 comments
Open

Super Mario Advance 4 crashes #208

StariaRose opened this issue Oct 14, 2024 · 15 comments

Comments

@StariaRose
Copy link

Apologies if this was already reported or is a known issue, I didn't find anything about it online.

Specs: Nintendo 3DS XL (old, not new). Latest CFW and open_agb_firm release.

Steps to reproduce:

  1. Download SMA4 and put it on the SD card.
  2. Load firmware, run game.
  3. Play for a good bit.

Expected Result: Game should work normally.

Actual result: Game screen goes entirely black after a bit. I've noticed it within 1-2 minutes. The game seems to be working in the background, the audio continues, I tried pausing and moving around and heard appropriate sounds etc..

Other Notes: This happened with SMA4's original release and VC/Switch Online releases with the E-Reader levels in them.

@profi200
Copy link
Owner

Verify the hash against this database and make sure the save file is not corrupted. If it matches you may be one of the unlucky people to have defective hardware. @Dartz150 had 2 of them and was able to fix them by reflowing his FCRAM chips.

@StariaRose
Copy link
Author

Ah yeah, it matched all right. Guess I'm one of the unlucky ones. No clue how to reflow an FCRAM chip lol. Thanks anyways!

@profi200
Copy link
Owner

It's not clear to us how this problem even happens because affected consoles show no signs of RAM failure in 3DS mode. Maybe it just can't keep up with the timings however then a reflow should not make a difference. ¯_(ツ)_/¯

@StariaRose
Copy link
Author

Yeah... most GBA games run just fine, so this felt weird to me.

@profi200
Copy link
Owner

Is it reproducable and is there a specific place in the game where this happens often? I could try this myself on a known good 3DS later.

@vpelletier
Copy link

vpelletier commented Oct 18, 2024

Lurker here, with another idea: there seem to exist several [removed link] either intended to test actual hardware (original GBAs, not DS/3DS backward compatibility) or to test emulator compatibility. Maybe one can be used as a memtest ?

...or maybe a memtest can be somehow implemented ?

@StariaRose
Copy link
Author

StariaRose commented Oct 18, 2024

Is it reproducable and is there a specific place in the game where this happens often? I could try this myself on a known good 3DS later.

It's reproducible across the original release, the Virtual Console release and the Switch release. It happens not in a specific place, but at a specific time, about a few minutes in. At one point, this was in the E-Reader's first level. Another case, it was in the E-Reader castle thingie where I was idling for a bit. Another, in level 1-1 while I was going slow. Finally, in level 1-4 when I was going fast. I noticed around the same time ish for each, though I didn't measure.

Lurker here, with another idea: there seem to exist several [removed link] either intended to test actual hardware (original GBAs, not DS/3DS backward compatibility) or to test emulator compatibility. Maybe one can be used as a memtest ?

...or maybe a memtest can be somehow implemented ?

Actually, that's interesting. I have no idea why/how this is a memory issue at all XD (I'm not super knowledgeable about low level stuffs). No 3DS game has had this issue, I'm trying to remember if I had the issue with Sonic Rush for DS or if I'm misremembering. I'll try it and lyk!

@StariaRose
Copy link
Author

Hey, so I did go ahead and test it across a few games:

  • Sonic Advance 2
  • Mario vs. Donkey Kong
  • Final Fantasy IV Advance
  • And, of course, SMB4 Advance, this time the Wii/Wii U VC version. I had all three ROMs (original, VC and Switch) present on the system.

I also played some DS and 3DS games:

  • Sonic Rush
  • Kingdom Hearts 358/2 Days
  • Kingdom Hearts DDD
  • Fire Emblem Fates

No sign of failure, with similar playtimes for each (though MvDK was a bit shorter). The E-Reader levels were there and I played a few successfully.

I hesitate to close this issue on my own yet, because I'm not sure if it'll show its face again and I just got lucky. I'll continue to test though, and with other games too.

@profi200
Copy link
Owner

Ah, i forgot about this issue because i had too many other things in my head the last few weeks. I will test that game probably this evening. If it does crash however i can't promise a fix because this is extremely hard to debug. But at least there are only few things that could make it crash.

@profi200
Copy link
Owner

profi200 commented Oct 31, 2024

I played through the entire first world with a fresh savegame and no hangs, glitches or blackscreens. So yeah, i can't reproduce this. However i used the european version with language set to german. Sometimes the language setting can influence unstable games.

@cotodevel
Copy link

cotodevel commented Nov 2, 2024

wow, this caught my attention. I had no idea about 3DS VC behaving like that on certain units.

If SMA4 behaves correctly on DS mode through GBARunner2/3 on said O3DS XL, then it's probably got to do with GBA Slot access timing issue interfering between both the DMA engines as well the FCRAM (as GBA's EWRAM). It's almost as if a DMA (3) device takes ownership and interlocks with FCRAM.

Maybe Nintendo knew about this and did patches by adjusting the FCRAM timings on GBA on the fly to overcome the GBA timing issues across different FCRAM vendors.

This is pure conjeture, but maybe intercepting GBA Slot2-EWRAM timing patches on SMA4, & replacing them with the above ones, will fix said game for all 3DS models.

Also the reasoning of the interlocks between FCRAM & DMA, is because the FCRAM itself can't keep up with DMA, and will incorrectly interlock with VRAM's /RD , /WR lines, inducing the DMA (3) bug. Thus, as a workaround, increasing the FCRAM timings will likely fix the issues.

@profi200
Copy link
Owner

profi200 commented Nov 3, 2024

FCRAM is only used for the hardware cart emulator. That means every time the GBA hardware wants to read ROM it will actually read from FCRAM. That RAM is a little wonky in general with people starting to report actual defects like bit flips and the much more common one being broken lines (cracked solder balls ect.).

And there is this mystery of GBA mode breaking in random games at random places. For example i mentioned how Dartz150 had 2 broken units. They both passed RAM testing in 3DS mode but they both had weird bugs in GBA mode. Some Pacman game he had to test for GBARunner3 development had the sound setting stuck at off every time the game is booted. The other one was a background animation being frozen in a Mega Man game. Other than that the games behaved normally. All of these weird bugs did go away after he reflowed the FCRAM chips.

@cotodevel
Copy link

And? FCRAM has different timings for a reason, to provide 3DS/DS/GBA backwards compatibility across different brands.

So my point stands. Adjusting FCRAM timings will fix issues in certain units where the FCRAM hardware may be wearing out or where a game may freeze due to GBA Slot2 timings.

@StariaRose
Copy link
Author

If it's ok to ask, I wasn't able to find much about reflowing the FCRAM online. Would one of you know how to do it?

Either way, open_agb_firm is incredible work thus far. Thanks so much!

@profi200
Copy link
Owner

profi200 commented Nov 4, 2024

I'm not going down the rabbit hole of patching games Supercard style when this will cause issues with games and it's not clear if this will fix the issue. Nintendo intended it to work without any modification to games.


If it's ok to ask, I wasn't able to find much about reflowing the FCRAM online. Would one of you know how to do it?

The short version is you heat up the chip and board until the solder balls melt which is usually used to solve defects like cracked solder balls. If you want a full guide maybe @Dartz150 can help. Keep in mind it's not a beginners job. It's easy to damage your 3DS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants