Main > Software Forum

Need advice from programmers that deal with memory sniping.

<< < (2/5) > >>

u_rebelscum:

--- Quote from: headkaze on June 23, 2006, 10:08:23 pm ---I guess there are also other questions about the Force Feedback data itself, does Mame even interpret the data from the ROM and place it in memory? Is it ignored, and what else? How is it stored in the ROM etc. Although it's a long shot, but it would be a good learning process to figure it out, and I don't doubt you have the skills to pull it off.

--- End quote ---

Mame doesn't do anything with FF; that's what Howard is trying to address.

The original game did do the FF, though.  Mame emulates the game, and the original game had a place(s) in it's memory handling the FF.  So somewhere in the emulated memory, there is a location that can be watched for the FF.  IOW, we're looking at the PC memory in the mame app in the "game memory" area, not the OSD directInput part of mame, for the FF signals.

The location in the game memory of course will vary from driver to driver (hopefully FF games with the same hardware will do FF in the same area).  The signal will also vary, as well as the original FF. 

And do we know where in the games' memories the FF is?  Besides Outrun and qbert's knocker, I guess.  As long as a driver that's not being worked on is picked, I think the location in the game memory will be consistant.  There still is the different compile ==> different locations in mame app problem, though.

I like the ability to work on part of the "FF whole" that using an external app would give.  Smaller, more manageable chunks at a time.  Different FF translation models could be tested without editing mame itself.  Hopefully a favorite generic FF could be built from the test results, and as part of the process of finding the FF memory locations, the areas mame would map to FF would be found.  This way mame FF could be researched in parts, and let mame app skip much of the WIP stage.

That said, I know nothing about watching external apps' memory, so my view shouldn't count much. ;)  From the sound of you guys, it wouldn't be easy to find the "game memory" loaction inside mame.

Howard_Casto:
Well I don't know if the mame driver developers knew they hooked up the ff memory address (as it's seldom labeled in the comments)  but it is almost always there. 

It's there for afterburner games and the games from that system.  It's used in gorf to control the artwork, and games that just had one too many lights to hook up in mame are also hooked up (terminator 2 and others).  And of course start button and coin slot lights are hooked up and used with the keyboard leds. 


Of course the real challenge would be to do something with that data.  With lights it's simple enough as it's a simple 0=off 1=on or a bit array that controls multiple lights, similar to how the parallel port works.  The force feedback of afterburner and the like would be rather complicated.  Afterburner had ff in the joystick as well as a motor for rolling the cockpit.  Galaxy force is even worse.  Games like terminator 2 would be easy enough to figure out though.  Also rail chase and rail chase 2 had a pair of hydrolic rams in the seat, I think that'd be farily easy to do something with as well. 


But since there isn't an easy way to access the memory externally, we are screwed.  :(

headkaze:

--- Quote from: u_rebelscum on June 24, 2006, 07:35:12 am ---Mame doesn't do anything with FF; that's what Howard is trying to address.
--- End quote ---

Why are you stating the obvious here? Are you confused about what I was trying to say? Obviously Mame dosn't do anything with the data, my question was about whether or not Mame processed the data in some way, stored it in memory etc.


--- Quote ---Well I don't know if the mame driver developers knew they hooked up the ff memory address (as it's seldom labeled in the comments)  but it is almost always there.
--- End quote ---

This seems to answer the question... there is a reference to the ff memory address, so it can be accessed and applied in some way via Mame or an external process. The easiest method would be to modify the Mame source to process this ff data through the DirectInput API, but it's not what Howard wanted to do.

My comments about DirectInput were not about getting the ff data, but demonstrating a method of intercepting (or hijacking) the DirectInput API's. Which in this case would not help if there is no ff data being fed into it in the first place. But it's the method of hijacking the API's which I wanted to make a point about, which is related to reading an external processes memory.

As Howard points out there is a reference to the ff memory, so I don't see why you couldn't read that data externally.


--- Quote ---But since there isn't an easy way to access the memory externally, we are screwed.
--- End quote ---

I disagree, it is easy to read memory externally (see the API functions I posted above), the hard part is locating the memory area to read. Judging by what you've said about there being a reference to the ff memory being present in the driver, then it would be a matter of reading that location (which I assume is a pointer to another address in memory to the actual ff data). But overall, as the other coders have pointed out in this thread, it's not an easy thing to do, but there would be plenty of people out there that could do it.

nobbo:
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

youki:
To do that i would rather go to the way of Graphic recognition.

i didn't really think about that, but it could be something like that.

A FE  run mame and the game.

If the game is SF2  (or another fighting game in a predefined list)

-the FE (in background) try to detect the validation of charactere selection screen  and make a screencapture.  (i should be possible , but could required some specific "code" for each different game or set of game)

-Then the FE in background analyze the screencapture  ( like a OCR would do with text) identifie the character and display information on the other screen.    It would require  surely an characters image data bank , but it should work.

But we can surely think to other solution.






Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version