Main > Main Forum

Simple Led-wiz helper app W.I.P

Pages: << < (8/9) > >>

Silver:

Yeah if its VB6 or something you are using, you can use MSXML to parse the XML controlsDAT file. Although I strongly suggest using the SAX parser component, not the DOMDocument model. Its much faster, easier and does not use huge amounts of memory. Just a thought anyway...

If its not vb, sorry for butting in!

mahuti:

(Among other things) I'm a Macromedia Flash developer, so I'm using ActionScript & Flash. The Flash is then compiled into a C++ app by NorthCode SWFStudio. ActionScript can parse XML, but it's a bit slow on bigger documents. While I could probably parse Controls.dat with a negligible speed hit, I'd like to plan for the future, so I'll be using an external XML parsing tool (which will be embedded in my app). I had previously planned to modify a small / quick XML parser given to me by PacManFan and incorporate that, but it won't compile correctly (in a newer version of visual studio.) Until I get around to either;

a. updating PacManFan's code,
b. having someone with an older copy of Visual Studio compile my modded app
c. finding a different simple XML reader tool that can accept command line parameters and output to STDout.
or d. removing the errorring portion of PacManFan's code

I won't be able to put in the controls.dat stuff. I already have the code to pull in the nodes & stuff from controls.dat or listxml, I just need a simple / fast XML parsing tool. In tests with the precompiled version of XMLParse that PacManFan built for me I was able to pull out requested info from the 23mb Listxml and use it in less than a second, so I know it'll work. Now that most of the rest of the app is about where it should be, I won't have any further reasons to put off putting in the time to get that portion working, though. So it should happen in the next week or two.

Anyway, my apologies for not being a "real" programmer. I should just go ahead and officially learn C++ or Visual Basic. They're all basically the same as ActionScript and PHP and stuff anyway. Most modern programming languages are fairly similar and everytime I look at something new, I laugh at how I usually "get" most of it. Anyway, I usually don't need C++ since I don't even work on a PC, so therefore have almost no use for it. Too bad the new Macintels don't have support for dual boot, or WINE hasn't been updated to run windows apps natively on the new machines yet. Too bad I'm too cheap to buy an additional PC.

I never really intended that my app should be the end-all... I figured some body else would come out with something better. Until then, though, I'll keep workin on my stuff... I need it for my cab and I don't wanna wait for someone else to get around to it.

mahuti:

I'm finishing up testing this new "reads all controls" version. I'll be uploading it tomorrow.

I'm still thinking about how to best configure the coloring of the leds. Once I upload this new version, any feedback would be great. Most programs suffer from a lack of the programmer's imagination, rather than the lack of a programmers skill. This is no different... I could code it 100 different ways... I'd like to make sure the one I pick is the one that makes the most sense.

mahuti:

The new version has been uploaded. This reads all configged controls for all players, has configurable colors and works with all led types. Still need to add support for controls.dat though... currently working on that in earnest (finally). 

http://mahuti.com/arcade/SetLedWiz.zip

Still trying to think of the best way to set up support for multiple players, etc.... Currently the app just looks down a list and assigns the first control it finds with the first color. I KNOW that's not optimal. Before I get into coding support p1 vs p2 vs p3, etc controls, I've been trying to think of the real-world ways in which this will get used.

KillerArcades:

Hey there, Mahuti,

I've been offline for a bit, but was just getting up to speed with where you're at. Any update?

If you're still looking for a bit of feedback on how to handle p1 vs p2 vs p3 vs p4, etc. Here's a real-world example of what I'm looking to do with my control panel. I'm about a week out on starting all my wiring and configuring. I get my artwork this week, will glue all that down (found a local print-shop that will give it a nice lexan type laminate without much extra cost, so I can skip the night mare of cutting and trimming plexiglass!!! HOORAY!), anyways, here's a jpg of what my color configuration's going to be (attached to this post).

Not sure if that's what you were really looking for, but what I plan on is using single color LED's, but having multiple buttons/diff color LED's for P1 button 1 (upper and lower controls on my layout, in case that's not obvious). I'll have a 8-way P1 joystick and on the top, I have a 4 way P1 joystick. I'd want both button 1's to light up, but with different colors. So, all I really need is an "on/off" signal, not a voltage setting by color, like it sounds like you were hardcoding.

I've got too many LED's and only one LED-WIZ, so I'm not doing RGB LED's, etc..

Anyways, I'd love to get an update of where you app is at. I'll be downloading whatever you've got by the end of next week and let you know where I end up with it.


Pages: << < (8/9) > >>

Go to full version