Page 1 of 3

File Formats

Posted: Sat Jun 07, 2014 12:35 pm
by Bosco
Hi.

Can anyone run through what's required to make CAS and WAV files?

I'm currently using LWASM which outputs DECB, OS9 and raw binaries but I haven't succeeded in turning any of these into a working CAS/WAV.

Many thanks.

Re: File Formats

Posted: Sat Jun 07, 2014 12:49 pm
by zephyr
You can convert raw binaries to CAS files with robcfg's DrBinCas utility.
viewtopic.php?f=8&t=348&hilit=drbincas

Convert CAS files to Wave files with Ciaran's (sixxie) cas2wav utility.
viewtopic.php?f=7&t=354

Re: File Formats

Posted: Sat Jun 07, 2014 1:54 pm
by Bosco
Hi zephyr.

Had a play with DrBinCas (v0.4b) a while back but couldn't get a CAS file that ran properly from LWASM raw files.

Just tried another test. I've attached copies of the raw binary output from LWASM along with the CAS file I made. There's also a DECB file made from the same source that demonstrates what `Test' does (clears screen to yellow).

Can you make a working CAS from my raw file?

Re: File Formats

Posted: Sat Jun 07, 2014 2:28 pm
by zephyr
Bosco wrote:Can you make a working CAS from my raw file?
What are the START and EXEC addresses of your Dragon program?

Re: File Formats

Posted: Sat Jun 07, 2014 2:34 pm
by Bosco
Yes, sorry about that.

0x4000 for both.

Re: File Formats

Posted: Sat Jun 07, 2014 2:44 pm
by zephyr
Done it...

Code: Select all

drbincas testraw.bin testraw 16384 16384

DrBinCas v0.4b | Program for converting binary files to .CAS files by Robcfg
----------------------------------------------------------------------------

Code: Select all

cas2wav testraw.cas testraw.wav

Re: File Formats

Posted: Sat Jun 07, 2014 3:46 pm
by tormod
Hi Bosco,

Please try makewav from the Toolshed utilities http://toolshed.sourceforge.net/ There are binaries under "Files". makewav can produce WAV or CAS from DECB or raw binaries. It is very handy in combination with DECB since the start and exec addresses are automatically detected.

The Toolshed utilities are written in C and run on all platforms. They are actively maintained, and also used for building NitrOS-9.

Re: File Formats

Posted: Sat Jun 07, 2014 5:04 pm
by Bosco
Hi zephyr.

I'm getting mixed results converting LWASM raw binaries to CAS. The little test program I attached does seem ok but other larger programs can look garbled, albeit still running.

Equivalent raw binaries from `asm6809' appear to convert perfectly though, so hat's off to Ciaran. :)


Hi tormod.

I haven't dabbled with Toolshed yet. I'll take a look.

Is the makewav command line to convert DECBs to CAS/WAVs straightforward?

Re: File Formats

Posted: Sat Jun 07, 2014 5:12 pm
by tormod
Relatively straightforward. makewav by itself will list all options.

Code: Select all

makewav -r -c -nFILENAME -ofilename.wav filename.bin
makewav -r -c -nFILENAME -k -ofilename.cas filename.bin

Re: File Formats

Posted: Sat Jun 07, 2014 9:13 pm
by Bosco
Had a go at using makewav with a DECB output from LWASM. Similar issue to before.

Converted my small test program to CAS and WAV without issues but the second program threw this error; `Error: Wrong DECB block length'.

I should add both DECBs work perfectly in XRoar.

If LWASM is the problem I should probably change assemblers. Shame, I like auto branch length and alphanumeric local symbols.