File Formats

Hardware Hacking, Programming and Game Solutions/Cheats
User avatar
Bosco
Posts: 330
Joined: Tue Mar 04, 2014 11:49 pm
Location: Nottingham, UK

File Formats

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

Re: File Formats

Post 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
User avatar
Bosco
Posts: 330
Joined: Tue Mar 04, 2014 11:49 pm
Location: Nottingham, UK

Re: File Formats

Post 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?
Attachments
CAS_Test.rar
(397 Bytes) Downloaded 279 times
zephyr
Posts: 1474
Joined: Mon Jul 21, 2008 1:18 am

Re: File Formats

Post 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?
User avatar
Bosco
Posts: 330
Joined: Tue Mar 04, 2014 11:49 pm
Location: Nottingham, UK

Re: File Formats

Post by Bosco »

Yes, sorry about that.

0x4000 for both.
zephyr
Posts: 1474
Joined: Mon Jul 21, 2008 1:18 am

Re: File Formats

Post 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
Attachments
raw2cas_test1.zip
(650 Bytes) Downloaded 298 times
User avatar
tormod
Posts: 416
Joined: Sat Apr 27, 2013 12:06 pm
Location: Switzerland
Contact:

Re: File Formats

Post 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.
User avatar
Bosco
Posts: 330
Joined: Tue Mar 04, 2014 11:49 pm
Location: Nottingham, UK

Re: File Formats

Post 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?
User avatar
tormod
Posts: 416
Joined: Sat Apr 27, 2013 12:06 pm
Location: Switzerland
Contact:

Re: File Formats

Post 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
User avatar
Bosco
Posts: 330
Joined: Tue Mar 04, 2014 11:49 pm
Location: Nottingham, UK

Re: File Formats

Post 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.
Post Reply