Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Xeuphoric hardware tape file format

38 views
Skip to first unread message

Evangelos R

unread,
Nov 20, 2011, 6:14:16 AM11/20/11
to
Hi guys,

Euphoric is using wav files for the hardware tape. This doesn't seem
to be the case for Xeuphoric. Does anyone have any idea what file
format Xeuphoric is using for the hardware tape?

Thanks,

Vangelis

Andre Majorel

unread,
Nov 20, 2011, 4:46:03 PM11/20/11
to
On 2011-11-20, Evangelos R <ero...@googlemail.com> wrote:

> Euphoric is using wav files for the hardware tape. This doesn't seem
> to be the case for Xeuphoric. Does anyone have any idea what file
> format Xeuphoric is using for the hardware tape?

Same format Euphoric 0.99b used. Looks like a sample of PB7 at
208 µs intervals. One bit per sample, packed 8 per byte, left to
right.

Try these and let me know.

#!/usr/bin/perl -w
#
# xht2pcm8u - convert Xeuphoric hardware tape to raw PCM (unsigned 8 BPS)
# AYM 2011-11-20
#

use open IN => ':raw';
binmode STDOUT;
local $/ = undef;
print map chr 0xff * $_, split //, unpack "B*", <>;

#!/bin/sh
#
# xht2wav - convert Xeuphoric hardware tape to WAV
# AYM 2011-11-20
#

xht2pcm8u "$@" |
sox -t raw -u -b 8 -c 1 -r 4808 - xht2wav.wav

--
André Majorel http://www.teaser.fr/~amajorel/
J'ai des droits. Les autres ont des devoirs.

Evangelos R

unread,
Nov 20, 2011, 5:39:41 PM11/20/11
to
>
> Try these and let me know.
>

Thank you for your reply Andre.

I used xht2wav on zorgons.tap. This generated the following:
Input File : 'xht2wav.wav'
Channels : 1
Sample Rate : 4808
Precision : 8-bit
Duration : 00:01:02.22 = 299176 samples ~ 4666.85 CDDA sectors
File Size : 299k
Bit Rate : 38.5k
Sample Encoding: 8-bit Unsigned Integer PCM

However tap2wav on zorgons.tap generated the following:
Input File : 'tapes/zorgons.wav'
Channels : 1
Sample Rate : 4800
Precision : 8-bit
Duration : 00:04:31.96 = 1305392 samples ~ 20396.8 CDDA sectors
File Size : 1.31M
Bit Rate : 38.4k
Sample Encoding: 8-bit Unsigned Integer PCM

There is a difference between these two files but in any case this is
not what
I am after. Basicaly, what I am trying to do is to to connect a
digital
recorder to my Oric (say Olympus Voice Recorder VN-7600 1GB). I am
planning to
use tape2cd to generate turbo wavs (e.g. Author, Zorgons), copy them
to the
recorder and cload them from Oric. It would be nice to have somehow
the wav
files generated from Oric's Author into the xeuphoric's Author so I
will be
able to "print" them in a file.

Thanks again.

V.

Andre Majorel

unread,
Nov 21, 2011, 7:09:59 AM11/21/11
to
On 2011-11-20, Evangelos R <ero...@googlemail.com> wrote:

> I used xht2wav on zorgons.tap. This generated the following:
> Input File : 'xht2wav.wav'
> Channels : 1
> Sample Rate : 4808
> Precision : 8-bit
> Duration : 00:01:02.22 = 299176 samples ~ 4666.85 CDDA sectors
> File Size : 299k
> Bit Rate : 38.5k
> Sample Encoding: 8-bit Unsigned Integer PCM
>
> However tap2wav on zorgons.tap generated the following:
> Input File : 'tapes/zorgons.wav'
> Channels : 1
> Sample Rate : 4800
> Precision : 8-bit
> Duration : 00:04:31.96 = 1305392 samples ~ 20396.8 CDDA sectors
> File Size : 1.31M
> Bit Rate : 38.4k
> Sample Encoding: 8-bit Unsigned Integer PCM

xht2wav is for processing *hardware* tape files, not .tap files.

> There is a difference between these two files but in any case
> this is not what I am after. Basicaly, what I am trying to do
> is to to connect a digital recorder to my Oric (say Olympus
> Voice Recorder VN-7600 1GB). I am planning to use tape2cd to
> generate turbo wavs (e.g. Author, Zorgons), copy them to the
> recorder and cload them from Oric. It would be nice to have
> somehow the wav files generated from Oric's Author into the
> xeuphoric's Author so I will be able to "print" them in a
> file.

So you want to be able to CLOAD into Xeuphoric an audio
recording of a regular Oric CSAVE ? And the recording will be in
WAV format and probably 16-bit signed 44.1 kHz mono or something
like that ?

Evangelos R

unread,
Nov 22, 2011, 1:11:37 AM11/22/11
to
On Nov 21, 2:09 pm, Andre Majorel <che...@halliburton.com> wrote:

>
> So you want to be able to CLOAD into Xeuphoric an audio
> recording of a regular Oric CSAVE ? And the recording will be in
> WAV format and probably 16-bit signed 44.1 kHz mono or something
> like that ?
>

Yes, something like that. So the recording should be 16-bit signed,
44.1kHz mono to be processable by tapetools, isn't it?

V.

Andre Majorel

unread,
Nov 23, 2011, 3:17:17 AM11/23/11
to
On 2011-11-22, Evangelos R <ero...@googlemail.com> wrote:
> On Nov 21, 2:09 pm, Andre Majorel <che...@halliburton.com> wrote:
>
>> So you want to be able to CLOAD into Xeuphoric an audio
>> recording of a regular Oric CSAVE ? And the recording will be in
>> WAV format and probably 16-bit signed 44.1 kHz mono or something
>> like that ?
>
> Yes, something like that.

Then try this. If your WAV isn't already 4.8 kHz, I think you'll
have to use the -s option. E.G.

wav2xht -s 4808 fromoric.wav >toxeuphoric.xht

#!/usr/bin/perl -w
#
# wav2xht - convert WAV to Xeuphoric hardware tape
# AYM 2011-11-21
#

use strict;
use Getopt::Long;


my $mode = 'convert';
my $srate = undef;


Getopt::Long::Configure 'bundling', 'noignorecase';
if (! GetOptions
'help' => sub { $mode = 'help' },
's=s' => \$srate,
)
{
exit 1;
}

if ($mode eq 'help')
{
print <<EOF;
wav2xht - convert WAV to Xeuphoric hardware tape
Usage:
wav2xht --help
wav2xht [-s str] [file ...]
Options:
--help Write usage summary to standard output and exit successfully
-s str Sample rate in any format sox understands
EOF
exit 0;
}

die "wav2xht: standard output is a terminal\n" if -t STDOUT;
binmode STDOUT;
@ARGV = map "\"$_\"", @ARGV ? @ARGV : ('-');
my $opt_srate = defined $srate ? "-r \"$srate\"" : '';
local $/ = undef;
my $data = `sox @ARGV -t raw -u -b 8 -c 1 $opt_srate -`;
die "wav2xht: sox error ($!)\n" if ! defined $data;
die "wav2xht: sox error (killed by signal $?)\n" if ($? & 0x7f) != 0;
my $status = $? >> 8;
die "wav2xht: sox error (exited with status $status)\n" if $status != 0;
print pack 'B*', $data;

> So the recording should be 16-bit signed, 44.1kHz mono to be
> processable by tapetools, isn't it?

Dunno what tapetools requires. I asked because I wanted to know
what I was up against.

Evangelos R

unread,
Nov 24, 2011, 7:25:18 AM11/24/11
to
Thanks Andre,

Right now I am trying the cload into my real Oric. My last attempt was
to connect
the Ear of my Oric with the headphones' output of a nokia 2760.
Not much of success, only "Errors found". Oric complains were not
unjustifiable since a lot of noise was coming from my nokia along with
the wav.
The wav was 11kHz, 8-bit, mono. I don't know what is the problem.
Maybe
nokia is not ideal for that job at all. I will do some more
experiments and
then I will go for the solution of CD.

If I solve this I will go for the cload into xeuphoric. I will let you
know when I
test your script.

Apparently I have to dive into the mystical world of sound
engineering, which
in any case this is what 8-bits was all about: experimenting and
learning.


Vangelis

Andre Majorel

unread,
Nov 24, 2011, 9:28:13 AM11/24/11
to
On 2011-11-24, Evangelos R <ero...@googlemail.com> wrote:

> Right now I am trying the cload into my real Oric. My last
> attempt was to connect the Ear of my Oric with the headphones'
> output of a nokia 2760. Not much of success, only "Errors
> found". Oric complains were not unjustifiable since a lot of
> noise was coming from my nokia along with the wav. The wav was
> 11kHz, 8-bit, mono. I don't know what is the problem. Maybe
> nokia is not ideal for that job at all. I will do some more
> experiments and then I will go for the solution of CD.

Headphones outputs sometimes include a bass boost circuit or
some kind of equaliser. This is generally not desirable. Use a
line out if you can.

Also try different volume settings. If you have access to an
oscilloscope you can adjust the volume until you see nice clean
edges on the 6522 input port (CB1 off the top of my head).

Maybe a higher sampling rate wouldn't hurt.

> Apparently I have to dive into the mystical world of sound
> engineering, which in any case this is what 8-bits was all
> about: experimenting and learning.

And being unable to CLOAD what you CSAVEd yesterday !

Evangelos R

unread,
Dec 4, 2011, 12:06:38 PM12/4/11
to
Hi Andre,

I just did some experiments with you scripts. This is what I did:

./wav2xht -s 4808 storm.wav >storm.xht
./xht2wav storm.xht
mv xht2wav.wav storm_back.wav

The produced storm_back.wav is pure noise. The storm.wav
specifications is:

Input File : 'storm.wav'
Channels : 1
Sample Rate : 11025
Precision : 8-bit
Duration : 00:05:26.78 = 3602735 samples ~ 24508.4 CDDA sectors
File Size : 3.60M
Bit Rate : 88.2k
Sample Encoding: 8-bit Unsigned Integer PCM

I don't know if it is xht2wav or wav2xht or me that is causing the
problem.

Thanks

Vangelis

Andre Majorel

unread,
Dec 5, 2011, 6:40:22 PM12/5/11
to
On 2011-12-04, Evangelos R <ero...@googlemail.com> wrote:

> The produced storm_back.wav is pure noise.

Odd. Could you put storm.wav online somewhere ?

Evangelos R

unread,
Dec 7, 2011, 8:30:21 AM12/7/11
to
Hi André,

Thank you for your reply. I repeated the experiment with a track
recorded from my Oric to a tape. I used audacity to digitize it and
wavclean to get a nice 8bit, 4800 hz wav file called 2text_cl.wav.
Then

wav2xht 2text_cl.wav> 2text_cl.xht
xht2wav 2text_cl.xht

The resulting xht2wav.wav has the same duration and file-size with the
2text_cl.wav but no sound can be heard when playing it.

2text_cl.wav can be obtained here:
http://itia.ntua.gr/~rozos/tmp/2text_cl.wav

Thank you,

Vangelis

Andre Majorel

unread,
Dec 18, 2011, 3:27:16 PM12/18/11
to
On 2011-12-07, Evangelos R <ero...@googlemail.com> wrote:

> http://itia.ntua.gr/~rozos/tmp/2text_cl.wav

I got your file, Evangelos. It might take me a while to delve
into it, though -- the next few weeks will be pretty busy here.

Andre Majorel

unread,
Apr 10, 2012, 5:14:07 AM4/10/12
to
On 2011-12-18, Andre Majorel <che...@halliburton.com> wrote:
> On 2011-12-07, Evangelos R <ero...@googlemail.com> wrote:
>
>> http://itia.ntua.gr/~rozos/tmp/2text_cl.wav
>
> I got your file, Evangelos. It might take me a while to delve
> into it, though -- the next few weeks will be pretty busy here.

Make that the next few months. :-(
0 new messages