TIC-80 icon indicating copy to clipboard operation
TIC-80 copied to clipboard

LibRetro: Add RetroAchievements support

Open TheFetishMachine opened this issue 3 years ago • 3 comments

As requested, here's the issue for achievement support. The two most important aspects for achievement support are savestates and exposed memory. Currently achievements do not work correctly and only 96 KB of memory are exposed (probably the "hardware"?).

TheFetishMachine avatar May 03 '22 16:05 TheFetishMachine

Thanks for making this. The memory hooks are implemented. Not sure what would be required on the RetroAchiements side tho.

RobLoach avatar May 03 '22 16:05 RobLoach

Hello! I'm a dev on RA

I was poking around with the current libretro core. When using our memory inspector, I wasn't able to find values such as high-scores and lives in some cartridges. I tried "Dino Run" and with "Cavern Run" no luck though.

Reading up on the RAM map, I noticed that "persistent memory" might have what developers need to create achievements. This might be a part that's not readily available? https://github.com/nesbox/TIC-80/wiki/ram

I'm uncertain of the state of the core as @TheFetishMachine just brought this to my attention. Thanks for your work so far!

pinguupinguu avatar May 04 '22 20:05 pinguupinguu

Correct. Since many of the games use their own scripting language, it can be difficult to grab memory information from the games. If the applications use the persistent memory thgouh pmem(), we can query against that.

For Super Meat Boy Tic-80 Demake, for instance, I was able to find the values within pmem to toggle which levels were avialable for cheats: https://github.com/libretro/libretro-database/blob/master/cht/TIC-80/Super%20Meat%20Boy%20TIC-80%20Demake.cht

RobLoach avatar May 04 '22 20:05 RobLoach