Main > Software Forum
LED control from Mame--in over my head again?
headkaze:
Using DebugView is another way to output debug data. You just call the Win32 API function OutputDebugString and it will display in the DebugView window.
Eg.
--- Code: ---char buf[256];
sprintf(buf, "Data: 0x%08x\n", data);
OutputDebugString(buf);
--- End code ---
I'm pretty sure there are standard MAME functions present to output to stdout too since it launches from a console window.
I see what you mean about going through each game would take a long time. So perhaps compile a version of Mame that outputs this data and then host it somewhere and ask people to help out.
Howard_Casto:
Well mame's debugger has been pretty useless to me, but that's just my experience. It's problem is it outputs too much data. It seems that in most drivers there are dozens of debug prints still left in the code. To get any useful data you'd have to go in and remove them all only to put them back when you are done.
I didn't realize you could get the debug string externally though. (never found the debug string to be useful personally, I just code with break points)
Personally I still think using mame hooker is the best method. The main reason is that mamehooker shows you the states of the data in real time instead of constantly printing lines of text. This makes mamehooker's data more readable in realtime, which is what you really need to correlate data with different outputs. Also the fact that you can actually hook the data up to something is more useful than you could imagine. I would have never figured out T2/REVX unless I hooked them up to my gamepad because the strobing speed is too fast to make logging useful (I got a 100 mb text file for 15 secs of gameplay) and also because the strobing is so fast I could never actually read the changes on the screen.... I could sure feel them though.
I don't think a custom build of mame would help.... if anything it would make the process slower. Unless there's some automated way of adding the functions it would take forever to figure out where to put the debug calls. And if there is an automated way of doing it you would still have to go in and add more outputs as you go to figure out the data... I've yet to see a game where a full byte of data is used to control an output.
Anyway, I'm out for the day.
Happy easter everyone!
1UP:
Dang, I badly want to play with all the gun stuff, but I've been stuck working weekends. With that and taxes coming up, there might be a new version of Mame with all your changes by the time I get back to this. Which wouldn't be a bad thing, it's just the waiting that sucks! :badmood:
Howard_Casto:
Just a quick update. u2 is out and it looks like they've accepted my changes. This means I don't have to worry about them disapproving of my (ahem) less than standard placement of some of the functions, so I feel confident about working on more games! I'll download the u2 source and go ahead and work on getting the rest of the guns hooked up. Then I'll go on to the dreaded sega games.
1UP:
Just a thought...it would be awesome to have support for the Parallax usb servo controllers. I believe they're based on BASIC stamp. I've used these in my Halloween projects as seen . Imagine animated characters or objects around the room responding to outputs from the game! Sort of like a home version of Chuck-E-Cheese.
Oh yeah, I forgot to mention, this might also be a workable output board for games such as Afterburner or other motion cockpit games.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version