Let's check it out!
RetroAchievements
RetroAchievements is an online service which provides users with fan-made achievement sets for many retro gaming platforms such as the Sega Master System. Navigate to RetroAchievements website. Choose Sign up Create an account. Download RALibretro emulator which facilitates achievements integration to retro games!
Launch RALibretro emulator | Choose RetroAchievements menu | Login | Enter RetroAchievements site info:
Cores
RetroAchievements cores are a special version of emulator cores. Essentially a core is a plug-in or emulator that runs platform specific games. Choose Settings menu | Manage Cores... | Master System and Download
Simpsons Trivia
Download Simpsons Trivia v1.02. Choose RALibretro File menu | Select Core | Master System | Genesis Plus GX ensures audio support. Choose File menu | Load Game | SimpsonsTrivia-v1.02.sms. Game ready to play:
IMPORTANT: Simpsons Trivia v1.02 must be selected as this has the correct Retro Achievements game hash! Choose arrow keys for Left, Right, Up, Down movement. Choose Z for Fire1, X for Fire2, P or Enter to Pause.
Implementation
Simpsons Trivia game has 4x difficulty categories: Easy, Normal, Hard and Pro! plus 4x questions rounds: 5, 10, 25, and 50. Thus 20x achievements setup: Perfect win for 4x categories * 4x rounds plus "Get between 80-100%" for 4x categories. Shout out to Bl4h8L4hBl4h setting up 20x achievements as per documentation!
Also, shout out to BenGhazi explaining how RALibretro emulator processes achievements e.g. Achievement has 4x important pieces of data stored in RAM: Difficulty [0x00], Selected Rounds [0x05], Correct Answers [0x05] and ScreenID [0x0C]. When all values are aligned on Game Over screen then the achievement is set!
IMPORTANT: here is Tag 1.02 source code excerpt which corroborates Game Over screen definition [0x0C]:
// Screen type. #define SCREEN_TYPE_NONE 0 #define SCREEN_TYPE_SPLASH 1 #define SCREEN_TYPE_TITLE 2 #define SCREEN_TYPE_INTRO 3 #define SCREEN_TYPE_DIFF 4 #define SCREEN_TYPE_LONG 5 |
#define SCREEN_TYPE_READY 6 #define SCREEN_TYPE_LEVEL 7 #define SCREEN_TYPE_NUMBER 8 #define SCREEN_TYPE_PLAY 9 #define SCREEN_TYPE_QUIZ 10 #define SCREEN_TYPE_SCORE 11 #define SCREEN_TYPE_OVER 12 |
GitHub
RetroAchievements GitHub includes the following source code repositories for game achievement integration:
| rcheevos | Library to parse and evaluate achievements and leaderboards for RetroAchievements |
| RAInterface | Enables RetroAchievements emulators to interact with the server via RA_Integration.dll |
| RAIntegration | The DLL responsible to integrate emulators with RetroAchievements.org | RALibretro | RALibretro is the multi-emulator used to develop RetroAchievements |
Clone
On Windows, launch Terminal. Create C:\GitHub\RetroAchievements directory. Git clone the following repos:
mkdir -p C:\GitHub\RetroAchievements cd C:\GitHub\RetroAchievements git clone --quiet https://github.com/RetroAchievements/rcheevos.git git clone --quiet https://github.com/RetroAchievements/RAInterface.git git clone --recursive --depth 1 -q https://github.com/RetroAchievements/RAIntegration.git git clone --recursive --depth 1 -q https://github.com/RetroAchievements/RALibretro.git |
IMPORTANT: use the --quiet [or -q] flag in order to suppress all the superfluous submodule logging output!
rcheevos
rcheevos is a C library that makes it easier to process Retro Achievements data. Launch Visual Studio 2022. Open rcheevos-test.sln. Choose Debug | x64. Rebuild Solution. Open test/test.c. Press F5 to Debug source:
RAInterface
RAInterface is a submodule which provides emulator hooks to integrate with RA server via RA_Integration.dll
RAIntegration
RAIntegration is the main DLL used for interfacing with retroachievements.org. Launch Visual Studio 2022. Open RA_Integration.sln. Choose Debug | x64. Rebuild Solution. Install CppUnitTest Test Adapter to run all Interface + Integration tests: Extensions menu | Manage Extensions | Test Adapter CppUnitTest Framework
Launch Test Explorer | Test menu | Test Explorer | Right click specific test e.g. RA_Interface.Tests | Debug:
RALibretro
RALibretro is the multi-emulator used to develop RetroAchievements and earn them. RALibretro uses libretro cores to do the actual emulation with RAIntegration DLL to connect with the site. Launch Visual Studio 2022. Open RALibretro.sln. Choose Debug | x64. Rebuild Solution. Open src/main.cpp. Press F5 to Debug source:
Overview
Here is an overview of the 1x C project rcheevos and 3x C++ projects to interface + integrate + emulate:
| Project | Role | Dependencies |
| rcheevos | Core engine: parse + evaluate achievements / leaderboards | None |
| RAInterface | Interface library for emulators to interact with the RA stack | rcheevos |
| RAIntegration | Full DLL integration [login/server/achievement submission] | RAInterface + rcheevos | RALibretro | Multi-emulator that uses RA stack to support achievements | RAIntegration |
libretro
libretro is an API designed for retro games and emulators to be compiled as DLLs which can be used in front ends like RALibretro that implement the libretro API. This is reminiscent of the OpenAI Retro work we did in 2024 which also uses libretro cores but exposes them in Python with Reinforcement Learning environments.
Similar to RetroAchievements OpenAI Retro uses its own Game Integration tool to inspect memory for points of interest e.g. starting state, reward function + done condition whereas RALibretro uses Memory Inspector:
Summary
To summarize, the RetroAchievements integration into Simpsons Trivia game has been awesome as gamers continue to play this game and top the achievements more than seven years after it was published! In fact, many hard core gamers have published YouTube videos showcasing their achievements for others to follow:
The next step would be reseach the documentation fully and create some RetroAchievements sets myself J
