Skip to content

Conversation

@PanMenel
Copy link

Bringing RetroAchievements (RA) support to melonDS.

I saw that the community really wanted RA support, so I decided to take on the challenge. This is a rough, beta implementation that I’ve tested extensively over the last week. I am a huge fan of RetroAchievements and very proud of this project.

Important: This is currently unofficial, so Hardcore mode does not yet provide official Hardcore points.

✅ Current Features
Full backend integration.
Core frontend implementation.
Basic connectivity and achievement unlocking.
Achievements and their info is shown when getting them.
Basic Login in EmuSettings under new tab.

🛠️ Known Issues & Planned Features
Leaderboards: Not yet implemented.
Overlay: Missing in-game achievement list.
Progress Indicators: Achievement progress is not currently tracked visually, there is only notification on getting achievement.
Hardcore Approval: Still fixing stuff, so when it will be more than a beta then it could be possible.
Memory Access: VRAM and ARM9 IO memory reading is missing (may affect specific achievements, but i wouldn't worry about that).
Offline Caching: Session recovery works, but the emulator does not cache achievement data to local files yet.
Player Profile: Visible points and profile integration (optional).

Full Disclosure: This feature also was developed using "vibecoding" (this time mainly ChatGpt and Gemini). I really put my heart into that implementation, and I hope people will actually think of it as nice thing, so I don't consider my time as wasted.

@PanMenel
Copy link
Author

Its still very early, I need to clean up more code for it to be at least torelable for pull request

if(DEFINED ENV{MSYSTEM_PREFIX})
set(CURL_LDIR "$ENV{MSYSTEM_PREFIX}/lib")
else()
set(CURL_LDIR "C:/msys64/ucrt64/lib")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this path hardcoded?

It appears that this code won't find cURL and SSL libraries on non-Windows (non-MSYS2, even) platforms as it stands.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it should be resolved, or at least better, I had my fair share of problems with implementing curl and making it work in a static build. I still have it "hardcoded" but only for Windows, because every time I try to link it automatically, the exe still says it requires some dlls. No idea if Linux/Mac will work, but now there is a chance at least.

SPI.Reset();
RTC.Reset();
Wifi.Reset();
memset(MainRAM, 0, MainRAMMask + 1);
Copy link
Contributor

@asiekierka asiekierka Dec 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the memset() done here? It is already done in SetupDirectBoot, which makes sense as that path skips BIOS/firmware, and I'm not sure if the console RAM is actually zero on cold boot on real hardware. Did you verify this or do you have a source for this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did implement this because I got a random achievement on starting a new game without fully restarting the emulator. I didn't really verify it, but it requires further testing if needed.

@PanMenel
Copy link
Author

I understand że shit ale po poprawkach by przeszło, XD. Implementacja totalnie podstawowa buildowałem aż do sukcesu, dopiero teraz usuwam nieużywany kod i błędy.

@asiekierka
Copy link
Contributor

Leave it alone for now... As much as I respect your half of the effort, I'm not sure @Arisotura will be keen on merging "vibe-coded" contributions regardless.

@PanMenel
Copy link
Author

This is just for testing and not intended for merging. It's a draft to track changes from melonDS main and help me refine the code. And I don't think it will ever be as refined as normal integrations, but it is something.

@PanMenel
Copy link
Author

PanMenel commented Jan 6, 2026

Update 1. Changed it to support instances. Now you can play with your friends and earn achievements separately. Tidied and deleted files that were not used so it should be better to build and run. Still not sure if Linux and Mac are supported, but if I had some feedback i am sure it would be fixable. Also added your pfp on logging into RA, and changed the menu location from inside emusettings to its own RA settings under Config dropdown.

@PanMenel
Copy link
Author

PanMenel commented Jan 6, 2026

Also, I am now opening it for a review because the core code is now at least pretty clean. I am sure some useless code could have snuck in, but now i am positive it is better than before.

Here are instructions for building your own RA build

  1. git clone -b Retro-Achievements-Implementation https://github.com/PanMenel/melonDS-Menel-Forks.git
  2. cd melonDS-Menel-Forks
  3. for static use: cmake -B build -G Ninja -DENABLE_RETROACHIEVEMENTS=ON -DBUILD_STATIC=ON -DUSE_QT6=OFF -DCMAKE_PREFIX_PATH=$MSYSTEM_PREFIX/qt5-static
  4. for dynamic use: cmake -B build -DENABLE_RETROACHIEVEMENTS=ON
  5. cmake --build build

@PanMenel PanMenel marked this pull request as ready for review January 6, 2026 13:11
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

Successfully merging this pull request may close these issues.

2 participants