Page 3 of 4

Re: Utility for converting a binary file to a .CAS file

Posted: Mon Dec 09, 2013 11:01 am
by robcfg
Good morning!

@Zephyr:
I think the problem is that you may not have vs2010 runtime installed. I've compiled a version with vs2008, please check it.

@KenH:
Sure, would it be better to have a separate tool or integrate the new functionality into the current one?

@Tormod:
Thanks mate! I will integrate your changes in the next version.

Have a nice day!

Re: Utility for converting a binary file to a .CAS file

Posted: Mon Dec 09, 2013 11:54 am
by Rink
@Ken + Rob,

I think I've asked the same thing at one point and mentioned that I had to knock up a quick "DrCasBin" tool for something I was working on. I'd love to see the functionality built in to DrBinCas though. It doesn't make sense to me to have a separate tool.

I've never uploaded my crappy .exe file because I felt the functionality should be in DrBinCas, but if you need something right now to do that job then I can try to find my files on my subversion dumping ground.

Re: Utility for converting a binary file to a .CAS file

Posted: Mon Dec 09, 2013 1:11 pm
by zephyr
robcfg wrote:Good morning!

@Zephyr:
I think the problem is that you may not have vs2010 runtime installed. I've compiled a version with vs2008, please check it.
No. It still crashes.
DrBinCas v0.4 wrote: DrBinCas v0.4 | Program for converting binary files to .CAS files by Robcfg
----------------------------------------------------------------------------


This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
tormod wrote: Did I ever send you this patch (Allow hexadecimal load/exec address)?
This is a good idea. I don't like to use decimal.

Re: Utility for converting a binary file to a .CAS file

Posted: Mon Dec 09, 2013 2:30 pm
by zephyr
I compiled it myself with gcc. Although its still not working correctly, the following more useful information is returned.
DrBinCas v0.4 | Program for converting binary files to .CAS files by Robcfg
----------------------------------------------------------------------------

terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::substr

This application has requested the Runtime to terminate it in an unusual way
Please contact the application's support team for more information.

Re: Utility for converting a binary file to a .CAS file

Posted: Mon Dec 09, 2013 2:46 pm
by robcfg
Can you post the exact parameters you're using?

Most probably I'm trying to compare something with an invalid iterator, should be easy to fix once we spot it.

Re: Utility for converting a binary file to a .CAS file

Posted: Mon Dec 09, 2013 3:57 pm
by zephyr
drbincas test.bin test 16128 16128

Re: Utility for converting a binary file to a .CAS file

Posted: Mon Dec 09, 2013 4:55 pm
by robcfg
Ok, got it!

The code for changing only the extension was done assuming you'll be giving a full path, but now I've fixed it.

Take a look at the attached version. Tell me if you have any other problem.

Re: Utility for converting a binary file to a .CAS file

Posted: Mon Dec 09, 2013 6:10 pm
by zephyr
robcfg wrote:Ok, got it!

The code for changing only the extension was done assuming you'll be giving a full path, but now I've fixed it.

Take a look at the attached version. Tell me if you have any other problem.
It seems to be working correctly now. I will test it properly later tonight.

Re: Utility for converting a binary file to a .CAS file

Posted: Tue Dec 10, 2013 2:38 am
by zephyr
Its working perfectly now. Thanks, Rob. :D

I modified the source code with Tormod's strtoul patch, and compiled with gcc. Its much better having the choice of using hexadecimal or decimal for the load/exec addresses. Thanks, Tormod. 8-)

Re: Utility for converting a binary file to a .CAS file

Posted: Tue Dec 10, 2013 8:53 am
by robcfg
That's great news!

I'll be adding Tormod's patch and endian support to the next version.

Thank you very much, guys!