Main > Software Forum
Need advice from programmers that deal with memory sniping.
Howard_Casto:
--- Quote from: nobbo on June 27, 2006, 04:44:35 am ---hey guys,
i had a crazy idea and i was going to make a topic for it but i have a feeling that this thread confirms that my idea is crazy indeed, so apologies if you think i'm going slightly off topic ;)
anyway, i am starting to think about the setup of my cab, and i want to have a second monitor displaying controls via j5 or the like, but what i was thinking was for fighting games such as street fighter etc, how cool it would be if rather than display the generic controls for the game if there would be some programming hack that would allow you to capture the character that the player/s are using and then display the relevant combos and special for that character only........whacked i know >:D
the reason i posted this in here was that, by the way i read it anyway, that capturing the memory and interpreting it would be the way to pull it off...
by the way, if i am completely wrong on this, i would be more than interested to hear some alternative thoughts on this
cheers
--- End quote ---
J5 supports the command.dat which has character moves in it.
When I get my dual screen manager finished it'll allow you to navigate through j5 while mame is operating (assuming of course you make some dedicated controls just for it).
youki:
The problem is that i don't want generic control, for the game he wants only the control of the players he selected....
--- Quote ---if rather than display the generic controls for the game if there would be some programming hack that would allow you to capture the character that the player/s are using
--- End quote ---
Howard_Casto:
Yes I know but that is totally and completely improbable. Even the method you posted would never work. (Not to mention nobody would be crazy enough to spend that much time on such a minor annoyance).
Emulation doesn't work in that way.... none of the programmers know the values of anything in a particular game, they just know what processors and circuits need to be emulated and run a rom through it. Now things like inputs/outputs can be detected as they are a physical part of the board and thus their data is seperated and sent to addresses.
Game data, however, can't be determined unless you use a memory sniper or a cheat system and TONS of spare time to figure it out. This is how mame cheats are created, but it isn't a practical thing to do universally.
youki:
--- Quote ---Even the method you posted would never work.
--- End quote ---
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!
--- Quote --- (Not to mention nobody would be crazy enough to spend that much time on such a minor annoyance).
--- End quote ---
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.
--- Quote ---Emulation doesn't work in that way.... none of the programmers know the values of anything in a particular game
--- End quote ---
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.
nobbo:
sorry guys for opening up a can of worms :P
seriously though this has the potential to be a good discussion as there has been some very good points brought up...
working in the document imaging business, i deal with OCR software quite frequently, and i would say that although youki's method is technically possible, the sheer overhead of doing it would make it a very unlikely option as far as capturing a screenshot and then reading the character name (thats how i read it anyway).
in saying that though, the point about the key sequence got me thinking....(prepare for crazy thought number 2)
using the original street fighter 2 for example, where on the fighter selection screen, there are 2 rows of characters with 4 in each row. if you were to give each one an ID number of 1-4 on the first row, and then 5-8 on the second row, by capturing the joystick movements you would be able to determine which fighter the player has chosen. this would be done by assigning left a value of -1, right +1, up -4, and down +4.
by capturing the joystick movements from the time the player pressed start to when the player presses a button to select the character, you would be able to tell what their final choice was and then go from there...
the only problem i could see in this method would be if the player moved the joystick before the selection screen came up, because then of course it would stuff the whole sequence up...
let me know what you think
cheers
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version