Title: Map pack to XDF converter Post by: prj on January 26, 2012, 05:30:43 AM I wrote a map pack -> xdf converter.
Doesn't support the newer map packs (yet), but possibly will be added in the future. Usage is: java -jar xdf-generator.jar <mappack file> This will print out the XDF definition to stdout. If you would like it in a file, redirect the output, like so: java -jar xdf-generator.jar mymappack.kp > mydefinition.xdf xdf-generator.jar is attached. One of the shortcomings I am aware of, is that you will have to set "image size" manually in XDF header properties for now. For 1mb files, that'll be 100000. ---- For developers: The source is located here: https://github.com/prj/me7-tools (https://github.com/prj/me7-tools) You will need java6 and maven to build it. The source has two modules right now - ols-parser, which parses the map pack to java objects, and xdf-generator, which uses the first module to actually emit the XDF. ols-parser is very similar to nyet's. xdf-generator is completely different, as it emits XML based TunerPro definitions and uses JAXB and annotations for XML output. Feel free to use, re-use and contribute. Title: Re: Map pack to XDF converter Post by: julex on January 26, 2012, 08:11:35 AM awesome!
now if we had a full m-box OLS file, it would complete the quest. Title: Re: Map pack to XDF converter Post by: professor on January 26, 2012, 12:03:50 PM Thank you for sharing this!
I see that NMAX, NMAXDV, TEMIN and many others conversion shows wrong values. kp file was created from WinOls 1.226. Title: Re: Map pack to XDF converter Post by: carlossus on January 26, 2012, 12:08:39 PM Thank you!
I assume this... "Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.simontuffs.onejar.Boot.run(Boot.java:340) at com.simontuffs.onejar.Boot.main(Boot.java:166) Caused by: java.lang.IllegalStateException: Tried to read string of length 52428 8 at 614 at com.prj.tuning.mappack.util.BinaryUtil.readString(BinaryUtil.java:15) at com.prj.tuning.mappack.map.PMap.fromBuffer(PMap.java:27) at com.prj.tuning.mappack.Project.parse(Project.java:42) at com.prj.tuning.xdf.KpToXdf.main(KpToXdf.java:15) ... 6 more" ...is because it doesn't like v1.5 map packs? Title: Re: Map pack to XDF converter Post by: prj on January 26, 2012, 12:43:08 PM Thank you for sharing this! Thanks, I will take a look at what is wrong.I see that NMAX, NMAXDV, TEMIN and many others conversion shows wrong values. kp file was created from WinOls 1.226. Thank you! I assume this... "Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.simontuffs.onejar.Boot.run(Boot.java:340) at com.simontuffs.onejar.Boot.main(Boot.java:166) Caused by: java.lang.IllegalStateException: Tried to read string of length 52428 8 at 614 at com.prj.tuning.mappack.util.BinaryUtil.readString(BinaryUtil.java:15) at com.prj.tuning.mappack.map.PMap.fromBuffer(PMap.java:27) at com.prj.tuning.mappack.Project.parse(Project.java:42) at com.prj.tuning.xdf.KpToXdf.main(KpToXdf.java:15) ... 6 more" ...is because it doesn't like v1.5 map packs? Yeah, that's the reason, I haven't added support for 1.5 yet. Title: Re: Map pack to XDF converter Post by: prj on January 26, 2012, 04:39:57 PM I see that NMAX, NMAXDV, TEMIN and many others conversion shows wrong values. kp file was created from WinOls 1.226. Found the problem. I was doing the LSB/MSB code and verifying it on the LAMFA table axis. However, LAMFA table axis has incorrect definition in 551G map pack. It's LoHi, while it should be HiLo. So my logic was inverse. I have fixed it now. Find attached the new file. Will update 1st post as well. Title: Re: Map pack to XDF converter Post by: Tony@NefMoto on January 26, 2012, 06:23:14 PM ;D Thanks for contributing.
Title: Re: Map pack to XDF converter Post by: professor on January 27, 2012, 12:48:06 AM prj as far i as i see it its ok now.
Very nice work and thank you :) edit: So far KRKTE is wrong. FKKVS too. If i found something else i ll post it. Title: Re: Map pack to XDF converter Post by: prj on January 27, 2012, 02:32:17 AM ;D Thanks for contributing. Just getting started ;)prj as far i as i see it its ok now. This was because floats were printed out wrong and because precision data was not parsed.Very nice work and thank you :) edit: So far KRKTE is wrong. FKKVS too. If i found something else i ll post it. I have corrected both problems. Find attached the new binary, first post will be updated as well. Title: Re: Map pack to XDF converter Post by: professor on January 27, 2012, 02:50:42 AM Nice fixed.
Title: Re: Map pack to XDF converter Post by: prj on January 27, 2012, 03:21:50 AM Nice fixed. Cool, if there's anything else you find, let me know.And thanks for testing :) Title: Re: Map pack to XDF converter Post by: prj on January 29, 2012, 09:16:53 PM Fixed:
* Map rotation for large maps, single axis maps * Missing axes for single axis maps * Duplicate axes. If axis maps are already present in map pack, do not generate new ones * Capped precision to two decimal places, as TunerPro gets lots of visualization problems otherwise Binary attached... Title: Re: Map pack to XDF converter Post by: tobz on January 30, 2012, 12:13:28 PM I tried using your converter with a map pack released by Argdub for 06A906032HS. It errored out on reading, and when I checked the headers, it has a string in there for WinOls 5.00... which doesn't make sense since, as far as I know, there is no version 5.0 for WinOls.
How do I, or how do you, definitively determine what version of WinOls a map pack is from? The map pack in question is attached. Title: Re: Map pack to XDF converter Post by: prj on January 30, 2012, 12:25:52 PM I saw you fork my repo.
I have no idea how to determine the version... My .kp's also say that it's WinOls 5.0, yet it reads them fine. I think they changed the format in a newer version. I think all the classes that represent objects within the .kp need to be made abstract with an abstract method "fromBuffer". Then "fromBuffer" should be implemented in various onese And I guess just try them in succession, until one is successful at parsing... Have to analyze the binary format of the newer map packs. Probably a good idea to create a simple map pack (or import nyet's sample map pack), then export it from a newer OLS version and check for differences. Title: Re: Map pack to XDF converter Post by: nyet on January 30, 2012, 01:19:48 PM FWIW, my attempts at finding a foolproof way to detect .kp version all failed :(
EVC is made up of a bunch of asshats. What do you expect? They want to make using anything but EVC tools impossible. Gee, i love proprietary software. Title: Re: Map pack to XDF converter Post by: prj on January 30, 2012, 01:21:45 PM FWIW, my attempts at finding a foolproof way to detect .kp version all failed :( EVC is made up of a bunch of asshats. What do you expect? They want to make using anything but EVC tools impossible. Gee, i love proprietary software. I think my method of "parse until it succeeds" will work quite well ;) Someone just needs to work on the newer mappack format. I need to tune my RS4 first, and I already generated a good enough .xdf for myself to work off, so that stuff will have to wait a bit :) Title: Re: Map pack to XDF converter Post by: nyet on January 30, 2012, 01:26:06 PM I think my method of "parse until it succeeds" will work quite well ;) Yup. thats where I started as well, but the code got so messy for any other versions that I gave up. Title: Re: Map pack to XDF converter Post by: prj on January 30, 2012, 01:28:25 PM Yup. thats where I started as well, but the code got so messy for any other versions that I gave up. Hehe, I'll help with that.Want me to add support for this kind of stuff in my ols-parser module without making a mess of the code? I can do that, but I don't have time now to sit and reverse engineer the newer map pack format right now... Title: Re: Map pack to XDF converter Post by: tobz on February 05, 2012, 07:13:09 AM Rah, I just want an XDF for this map pack already... or a CSV from ArgDub for easy conversion. :P
Maybe I'll take a pass at trying to whip up something / reverse engineer the format I have. Title: Re: Map pack to XDF converter Post by: kenmac on February 05, 2012, 02:36:00 PM What version of WinOLS is a prerequisite for the map pack? I haven't been able to get this to work with map packs created with WinOLS 1.5 and 1.7.
C:\Utilities>java -jar xdf-generator-20120130.jar "..\Definitions\06A906032LP(PL) - 01.19.2012.kp" <?xml version="1.0" encoding="ISO-8859-15" standalone="yes"?> <XDFFORMAT version="1.30"> <XDFHEADER> <CATEGORY name="Axes" index="0xFF"/> <deftitle>06A906032LP(PL) - 01.19.2012.kp</deftitle> </XDFHEADER> </XDFFORMAT> Title: Re: Map pack to XDF converter Post by: prj on February 05, 2012, 02:38:22 PM I believe it's pre-1.5...
It can parse the 2.7 ones floating around. Title: Re: Map pack to XDF converter Post by: teobolo on June 01, 2017, 11:35:38 PM i m retrieving this old thread...
Is there a way to create from an xdf - a winols mappack ? |