Even the method you posted would never work.
No, i 'm sure it could work , but as i said you need to have a kind of data bank to store specific information on recognition for each game you want make it work. But that 's sure it is a crazy job!
(Not to mention nobody would be crazy enough to spend that much time on such a minor annoyance).
I won't bet on that. I saw so many guys doing so crazy things with such a minor annoyance. Just for the challenge for instance.
Emulation doesn't work in that way.... none of the programmers know the values of anything in a particular game
I know how emulator works , i have already made a limited one for C64 few years ago , and i have a work in progress on a tiny arcade one.
In the case of "character choosed detection" you don't need to know game data. Here how i would proceed :
-Install a global Hook for keyboard input in the FE
-The FE load the game and load "Detection data" for the game in his memory.
Detection data contains a key sequence that indicate the keys sequence the user uses to reach the character selection page of the game.
(ex : key 5 (insert coin) , key 1 (player1 start) , (here the user is on the character selection screen) , CTRL key (for player 1 button 1) to valide the choice.
- The FE using the hook and the "dectection sequence loaded (specific to each game)" , detect the validation of the character selection screen , and make a screencapture at this moment.
-The FE in background , extract from the captured screen the image of the selected personnage. (depending on the game, can be for instance a rectange up left the screen, or we can detect a higlighted rectangle around a character somewhere. Of cource it is specific to each game and require "Graphic detection data" and a more or less complex algorthime , but doable for sure)
-Once the FE extracted the image , it compares to his graphic detection data to determine which one it is. And then display combo information, or what you want on the second screen.
But i agree it is not simple , and it is lot of work for something just "fun". I won't start something like that now.