| Main > Main Forum |
| My serial LCD for displaying directions |
| << < (31/39) > >> |
| JoeB:
Folks, why are you writing your own XML parsers, when there are so many free great ones out there? Check out the XERCES parser (www.apache.org) just as an example. It supports java, perl and C/C++.. so many other free ones out there. No need to re-invent the wheel! |
| Silver:
Hoho, thanks for the advice but I think you are overestimating my abilities. I'm not talking about having written my own XML parser - I'm using the MS DOMDocument and IXMLDOMDocument parser for VB. It works well - I've now ironed out the bugs and have successfully generated files for a complete 82 romset. I was just surprised that it 1)takes around 170megs ram to run 2)is pretty slow - several minutes worth of processing on a high end athlonxp. I'm new to VB and XML so I'm sure my code could be improved, but theres not much there. It seems the entire XML files must be loaded into memory to recall data from them, and that is not massively fast. Howver, I will tweak the code - and am also going to try a more direct text scan approach which seems to work fine for various FE's and other progs out there..... |
| opcode:
Silver... If you use SAX instead of dom to parse the xml files you will use WAYYYY less memory. The method you are using is called DOM which loads the whole XML tree into memory, then you grab the nodes out of memory. With SAX (supported by the MS XML parse 4.0) you don't load all the xml into memory, instead the nodes are fed to you as its being parsed, then you grab the parts you need, WAY less memory usage, but a little trickier to understand. Here is a good developers guide on it: http://www.nedcomp.nl/support/origdocs/xml4/extracted/sax_devgd_overview_0jef.aspx. Hope that helps ;) |
| Silver:
And to think this was going to be easy.... ;-) Cheers for that - I will take a look. I'm away for a bit but I'll come back to it and see if I can spruce things up. I would also like to add a few facilities - such as allowing the postion of the text tobe moved to reflect an individual cp to make it nice and clear. On a more general note, this great LCD has made me realise how completely superb the controls.dat project is. The majority of games come back with "unknown" as there keys as they are pulled from the mame listinfo. I can only recommend that people contribute and add some info over on there site.... |
| dvdapex:
Are the LCDs you guys are getting for ~ $20 still available from anyone? If so, please PM me with info. Thanks. |
| Navigation |
| Message Index |
| Next page |
| Previous page |