Page 1 of 2

Utility for checking .CAS files

Posted: Thu Dec 02, 2010 2:01 pm
by robcfg
Hi, everybody!

A couple of nights ago I was trying to recover a damaged .cas file, and I had to check the blocks of data against its crc, so I wrote a small program that checks the .CAS file structure and integrity of the data blocks.

Not that the error correction algorithm of the Dragon tapes is something wonderful, but it may help to detect errors.

I've kept it super simple as a command line tool and the source code compiles unmodified under Windows and Linux (and maybe MacOSX, but In havent't tried yet). It lists the blocks in the .CAS file along with the block type, length and CRC value. In case of an error, the actual CRC value is calculated (along with the CRC value stored on the block), so you can try to fix the damaged block(s).

If anybody is interested, I'll upload tonight the source code and compiled Win32 and Linux x86 32 bit versions.

Have a nice day!

Re: Utility for checking .CAS files

Posted: Thu Dec 02, 2010 5:18 pm
by zephyr
Seems like it could be a handy little utility. I'm interested...

Regards,
Steve

Re: Utility for checking .CAS files

Posted: Thu Dec 02, 2010 11:00 pm
by robcfg
Hi,

Here you have! I included the source code and the Win32, Linux32 and MacOS X 10.4 (i386 and PPC) binaries.

If you change something, send me the updated file, or if you feel like something is missing, tell me and I'll update the program.

Here's a screenshot of the Win32 version:

Image

Hope you like it!

Re: Utility for checking .CAS files

Posted: Fri Dec 03, 2010 10:36 am
by zephyr
Thanks Rob. Please post any other useful hints/tips, or utilities you write it the future.

Regards,
Steve

Re: Utility for checking .CAS files

Posted: Sun Dec 19, 2010 9:21 pm
by nitrofurano
i'm needing one to convert a binary file (any kind) into a .cas one - i can imagine part of the sources used on this tool can be used for this?
the first purpose of this converter is for a picture converter, which creates a 6kb file to a 128x192 4c or 256x192 2c CoCo2 display
thanks in advance

Re: Utility for checking .CAS files

Posted: Sun Dec 19, 2010 10:41 pm
by robcfg
I think that wouldn't be too difficult, only thing I need to know is where to store the loading/execing address.

The .cas file structure is far from complicated. I can take a look tomorrow before going on holiday.

Re: Utility for checking .CAS files

Posted: Tue Dec 21, 2010 8:11 pm
by admin
I'm sure I have seen one around... maybe an option on an existing tool like DC ??

Will have a look if I get the chance.....

Re: Utility for checking .CAS files

Posted: Tue Dec 21, 2010 9:03 pm
by robcfg
I did have some time to code such program anyway, it's here.

If you try it, please tell me if it works ok, I just had to write it in a few hours and didn't have time to test it so well. :mrgreen:

Re: Utility for checking .CAS files

Posted: Sun Jan 09, 2011 5:19 pm
by zephyr
Hi Rob,

I would like you to add an option (something like drcaschk -u file.cas) to update the .cas file with the current checksum bytes.

Regards,
Steve

Re: Utility for checking .CAS files

Posted: Sun Jan 09, 2011 11:37 pm
by robcfg
Wish granted! :o

I just changed a bit the code to make it better and easier to read, and added the functionality you requested.

As usual, you'll find the source code and the Linux32, Win32 and MacOSX 10.4 (i386 and PPC) binaries.

Please tell me if you find any error or if you need more functionality.

Best regards,
Rob