Utility for checking .CAS files

Hardware Hacking, Programming and Game Solutions/Cheats
User avatar
robcfg
Posts: 1532
Joined: Sat Apr 04, 2009 10:16 pm
Location: Stockholm, Sweden
Contact:

Utility for checking .CAS files

Post 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!
zephyr
Posts: 1474
Joined: Mon Jul 21, 2008 1:18 am

Re: Utility for checking .CAS files

Post by zephyr »

Seems like it could be a handy little utility. I'm interested...

Regards,
Steve
User avatar
robcfg
Posts: 1532
Joined: Sat Apr 04, 2009 10:16 pm
Location: Stockholm, Sweden
Contact:

Re: Utility for checking .CAS files

Post 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!
Attachments
DrCasChk.7z
DrCasChk v0.1 by Robcfg
(58.64 KiB) Downloaded 269 times
zephyr
Posts: 1474
Joined: Mon Jul 21, 2008 1:18 am

Re: Utility for checking .CAS files

Post by zephyr »

Thanks Rob. Please post any other useful hints/tips, or utilities you write it the future.

Regards,
Steve
nitrofurano
Posts: 1
Joined: Sun Dec 19, 2010 9:14 pm

Re: Utility for checking .CAS files

Post 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
User avatar
robcfg
Posts: 1532
Joined: Sat Apr 04, 2009 10:16 pm
Location: Stockholm, Sweden
Contact:

Re: Utility for checking .CAS files

Post 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.
admin
Site Admin
Posts: 410
Joined: Thu Jul 17, 2008 10:22 pm

Re: Utility for checking .CAS files

Post 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.....
Simon Hardy
User avatar
robcfg
Posts: 1532
Joined: Sat Apr 04, 2009 10:16 pm
Location: Stockholm, Sweden
Contact:

Re: Utility for checking .CAS files

Post 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:
zephyr
Posts: 1474
Joined: Mon Jul 21, 2008 1:18 am

Re: Utility for checking .CAS files

Post 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
Last edited by zephyr on Mon Jan 10, 2011 1:18 am, edited 1 time in total.
User avatar
robcfg
Posts: 1532
Joined: Sat Apr 04, 2009 10:16 pm
Location: Stockholm, Sweden
Contact:

Re: Utility for checking .CAS files

Post 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
Attachments
DrCasChk_v02.7z
DrCasChk v0.2 by Robcfg
(65 KiB) Downloaded 262 times
Post Reply