Accomplishments / Trophies In Emulators


AireTamStorm

Unix Addict
Joined
Nov 13, 2005
Messages
971
Age
39
Website
Visit site
I've had an idea for getting an accomplishments system to work with emulators, I'd like to know the feasibility of this...

At the core, an emulator would read a configuration text file for a specific ROM and check to see if certain areas of memory match specific values. For instance, if you possess a certain item or pass a certain point in the game (such as reaching a normally unaccessible area). These configuration files would be generated by a player "prepping" for the event to happen, and setting the emulator to record the delta in memory. The player would then "record" the action (such as picking up an item) and when finished, filter out irrelevant data out of the configuration file (such as movement on screen, which direction the character is facing, etc).

Checking memory against a configuration file would be quite taxing, I would imagine. How often this is checked would also have to be defined by these "trophy configuration files" to specific changes in memory (when certain addresses are read from or written to).

These files would then be uploaded to a "Trophy Tracker" (perhaps running alongside POND :) ) along with the hash of the ROM, and so the emulator could retrieve relevant trophies upon the start of the game.

Unfortunately, this may not however work with different "versions" of ROMs ( eg. Zelda 64's variants ), the emulator would have to be coded to use these files, and the same ROM's Trophy Configs may not work across emulators.

Comments, ideas?
 
Last edited by a moderator:
Do you know how many games that would take up? Alone, the SNES has 785, the NES has 782. Who would input all that data?

For actual homebrew games, that would be cool, like an achievement API or somethng...
 
'PSyMastR' said:
Do you know how many games that would take up? Alone, the SNES has 785, the NES has 782. Who would input all that data?

For actual homebrew games, that would be cool, like an achievement API or somethng...
Of course, this would be a community-sized task. If we had the tools available, and it was technically possible, I think it would be kind of cool to upload your own trophies for others to try for.
 
Last edited by a moderator:
Although I agree this is a project that's beyond actual implementation, I think it's a really neat idea and I'm curious to see if it could even be done as you describe for just one game.

It would be interesting to see if someone was willing to do a proof of concept for one game just to see if it worked, but the sort of people who'd be doing this would need quite a deep understanding of programming to map out these points in a game so that would reduce the size of the community creating the accomplishment data.

It would push the Pandora like nothing else if there was a unified system that published your accomplishments in whatever game on whatever emulator against your friends just like xbox live.

Still, nice concept though - lets keep it in a box with time travel, perpetual motion and faster than light travel. That's not to try to make it sound like it's a stupid idea, but it's a nice idea that probably won't happen for a loooong time.
 
Last edited by a moderator:
'AireTamStorm' said:
'PSyMastR' said:
Do you know how many games that would take up? Alone, the SNES has 785, the NES has 782. Who would input all that data?

For actual homebrew games, that would be cool, like an achievement API or somethng...
Of course, this would be a community-sized task. If we had the tools available, and it was technically possible, I think it would be kind of cool to upload your own trophies for others to try for.


Sure, its technically feasible, but it is also impractical.

First of all - let us say you beat level 1-1 of Super Mario Bros. 3 for the original NES. How would you know that you are on the finishing screen?

Okay, that *potentially* isn't so bad - looking at a memory dump for the "end of level state", you could potentially identify what composes the individual elements of the game (IE memory 0x0EF.. to 0x0FF could represent the number of points recieved at the end of the level) to data mine the memory dump and determine the stats needed.

But then there could potentially be some major overhead as you constantly process the game's state to determine these statistics (as well as actually determining if you are at the end of level, playing, moving from screen to screen, sitting on the menu, etc). Considering that the memory locations for this information don't have to be static, and that this would vary widely game-to-game, we are dealing with a very big challenge and a heavily modified emulator with a large (and growing) lookup library as more games are included.

It will be much easier for games that are explicitly coded for the Pandora or have existing source modified (perhaps through external libraries).
 
Last edited by a moderator:
I like the idea, but I can see the problem to detect achievements in real-time as you play. It would be much easier to just monitor savegames. There are already many documented hacks for those, so triggering accomplishments based on points/inventory should be a piece of cake. Just run your code whenever a game is saved.

There should be some sort of quality control for community created achievement-configs though, otherwise a game could end like this: CODE
http://armorgames.com/play/2893/achievement-unlocked
 
What about global achievements?

played online with 10 people for 30 minutes each session.
Played NES for a total of 1/10/100/1000 hours

etc.

This would really need to be a separate website that maintained these lists. Also this should be a Live/PSN type of community and also serve to maintain friends lists and such.

I think the idea is awesome, but it would have to use approved emulators and have ways to prevent cheating. As stupid as it is, people do cheat to inflate gamerscore.

Gamerscore/trophies are a means to show that someone has played a game to a certain extent. Sometimes people go to far with achievements.

I approve of this, but I don't think it should be Pandora specific. It would be awesome if a coalition could be formed of some sort to start this.
 
Last edited by a moderator:
hand on,
the problem isnt knowing when to trigger a trophy

the problem is jackasses who will simple make a game and give themselves plenty of trophies,

sony/microsoft stops this by
1. the people are professionals representing a company, they wont make a havoc of the trophy system and make it to easy
2. its most likely also regulated by sony

if we can get some sort of ticket sort of system working, where people like craig etc can approve, give us a valid ticket or something similar which would then activate trophies, but this is all very much open to being hacked
 
You would really need to have approved emulators that wouldn't allow you to make use of save states or speed augmentation or game genie codes.

Also one way that you could potentially stop cheaters is have it when the person unlocks the achievement/trophy it takes a screen grab of that instance and brands his unlocked achievement with that image.

But than we would also need a server up and running to act a s a database. Its a good bit of work, I wonder if it would be possible to make it happen.

We also need to have a achievement/trophy approval system which would require the emulator to record the gameplay and than the submitter could flag an instance within the recording of when the trigger is supposed to happen. They would also be allowed to name the achievement/trophy
 
Last edited by a moderator:
As for legitimacy - That is a concern even if these are coded into the game. I'd suggest uploading trophies to an external server where they are rated and revised by the community. Another would store which trophies you have earned. A server can be fairly easily coded to pick up cheaters who rapid fire game state load a bunch of trophies into their repertoire- the problem is those who are persistently doing it over a long period of time.

There are several means of preventing, but no way of stopping cheaters, so I'd like to limit the scope of security in this thread to "how to prevent circumvention" rather than "(how) they can circumvent".

As for performance - you could have the emulator check only when there are writes or reads to non-volatile memory, or writes to particular addresses in memory. This would still generally increase the overhead but you wouldn't be checking the entire memory state all at once. Any other suggestions for techniques on making this possible?

Another good question, is, if possible, and if easy, how practical, and how would such a feature be received by the community?

As for a proof-of-concept, I would love to see one, but there is no way I can code an emulator. We would need a willing developer to come forward on this.

I mention this at all because - this is a possible path for real innovation. Finding a way to make this possible, followed by a way to make this easy, would put the community ahead of the corporate competition.
 
Last edited by a moderator:
From a technical standpoint, I'm pretty sure this is possible with the emulator's creators support.
[Everything below is what I'm pretty sure about, but not certain. Other people here can and should correct/slap me]
Games will run a certain part of their code at the end of every level, or the beginning of a new one (ie; clearing the map from memory, loading the next map etc) which shouldn't be too had to figure out with some step-by-step debugging.
I *think* emulators should be able to (at a decent speed) check to see if that piece of code is being ran, and look at what the memory is like to determine what level they've just begun/completed.
(I guess another way is using romhacks that write to a special emulated memory address, but this would be a lot of work from a few angles and very different for each game)
From a practical standpoint; just look at the number of cheats available for DS homebrew carts. I'm pretty sure they're all community submitted, so I imagine really popular games will get trophies fairly quickly.
That is, of course, if you make it easy enough to make these trophies.
So, possible yes, but practical maybe not without a lot of work from a few different parties.

Tobs

Excuse me if this post doesn't make sense. It's 2am and I'm more than a little full of sugar and tired.
 
Last edited by a moderator:
I think the way microsoft runs their achievement system is that they give developers a certain amount of points which can be placed throughout the game to be earned as achievements. It's something that both the developers and the xbox live server has a hand in so that people can never accumulate absurd amounts of points without doing anything.
 
Last edited by a moderator:
Achievements could created the same way they added rumble to NES games for the Xbox NES emulator
 
I would imagine this sort of thing would be pretty simple to do if you know your way around a system - looking at a disassembly, at least, and there are disassembler/debuggers for most of the common consoles at least - NES, SNES, Genesis, etc.

I know very little about that kind of thing myself, but there are a few games with commented disassembly (for NES, at least) like SMB, Final Fantasy, and Metroid. For example, something to check from Super Mario Bros:

CODE
PlayerEndWorld:
lda WorldEndTimer ;check to see if world end timer expired
bne EndExitOne ;branch to leave if not
ldy WorldNumber ;check world number
cpy #World8 ;if on world 8, player is done with game,
bcs EndChkBButton ;thus branch to read controller
lda #$00
sta AreaNumber ;otherwise initialize area number used as offset
sta LevelNumber ;and level number control to start at area 1
sta OperMode_Task ;initialize secondary mode of operation
inc WorldNumber ;increment world number to move onto the next world
jsr LoadAreaPointer ;get area address offset for the next area
inc FetchNewGameTimerFlag ;set flag to load game timer from header
lda #GameModeValue
sta OperMode ;set mode of operation to game mode
EndExitOne: rts ;and leave


So you could probably check the WorldNumber and assign the corresponding trophy. Some equivalent of that would probably exist for most games.
 
This isn't plausible. Homebrew, yeah, but theres no way this is technically and practically feasible
 
Last edited by a moderator:
'PoisonedV' said:
This isn't plausible. Homebrew, yeah, but theres no way this is technically and practically feasible
Why not? It would take a bit of knowledge of the system, and a good debugger, but for an experienced hacker I do not think it would be difficult at all. You would have to do it on a per-game basis, of course, so doing ALL games will obviously not be possible without armies of knowledgeable people with unlimited time, but you could do a good number quite quickly.
 
Last edited by a moderator:
'PoisonedV' said:
This isn't plausible. Homebrew, yeah, but theres no way this is technically and practically feasible
It wouldn't be very hard at all. All you really need to do is load up a rom and use one of those gameshark cheat finder tools to check what memory addresses changed from what they were before doing whatever you are trying to make an achievement for. It'd take some time and a bit of trial and error in some cases, but it would actually be relatively easy to do. Then you just make the emulator check that if that memory address matches the required result and you have exactly what is needed for a basic achievements system.

Even a non-programmer would have a relatively easy time finding memory address changes to apply achievements to.

I don't expect there would be achievements for every game if an idea like this was used, but I'd think it would be fairly easy for people to make a few achievements for the more popular games like Super Mario World.
 
Last edited by a moderator:
'Hollenderster' said:
There should be some sort of quality control for community created achievement-configs though, otherwise a game could end like this: CODE
http://armorgames.com/play/2893/achievement-unlocked
I tried that and had quite a lot of fun trying to unlock the achievements - a bit like finding secrets in Mario world.
Well worth a few minutes for a quick play of a tongue in cheek game.

I wonder if the developer would allow it to be ported to Pandora, it could be just the ticket!
 
Last edited by a moderator:
That game is designed to be an achievement-unlocking game. The purpose of the game itself is to unlock all of the achievements - you don't get any "gamerscore" points or anything for each one. I don't really see how it relates to what we're talking about here.

I'd love to see this in action for games that are very popular. It would take time to build up a decent game library, but I think it would be worth it. Since GameShark and other cheating systems probably already have a bunch of the memory registers documented, we could use some of that already mined data to start building up an achievement system.
 
Last edited by a moderator:
Actually implementing it into an emu would not be that bad, perhaps. ie: An emu is normally intercepting all memory reads and writes (thats its job), and special handling them. Normally this is hardcoded though .. ie: if a write to this range X -> Y, then do some function to handle it. Pulling that range in from a config means it'd have to have a generic handler which would impact performance, but would not be overly difficult to add.

The trick is its not save-ram (which has no performance impact to monitor due ot infrequent hits) .. monitoring main ram for state changes. Hmm.

A lot of emus wil be throttled had on Pandora (and desktops), so should be looked into. Crazy cool idea.

Shoudlbring it up on the desktop emus forums, like MAME etc.

Woudl be a huge job to discover things to set as achievements, but a big group like MAME could pull it together.

jeff
 
Last edited by a moderator:
Back
Top