stenstorp
Posts: 21
Joined: Thu Jan 09, 2014 4:32 am

BBC BASIC Raspberry Pi port. Loading from tape.

Mon Aug 11, 2014 12:30 pm

Not long ago, I found an official port of BBC BASIC for the Pi (not running in a program but rather it's own operating system) which can be found here http://www.google.com.au/url?sa=t&sourc ... 9eYxxsjmCg and I was wondering if you would be able to plug in a tape recorder/player and be able to load programs off the tape. If so, what would I need to connect an' all that. If anyone could shed some light on this, it would be greatly appreciated.

User avatar
r3d4
Posts: 967
Joined: Sat Jul 30, 2011 8:21 am
Location: ./

Re: BBC BASIC Raspberry Pi port. Loading from tape.

Mon Aug 11, 2014 12:40 pm

stenstorp wrote:Not long ago, I found an official port of BBC BASIC for the Pi (not running in a program but rather it's own operating system) which can be found here http://www.raspberrypi.org/celebrating- ... -of-basic/ and I was wondering if you would be able to plug in a tape recorder/player and be able to load programs off the tape. If so, what would I need to connect an' all that. If anyone could shed some light on this, it would be greatly appreciated.
Realy i was hopeing you link [ http://www.raspberrypi.org/celebrating- ... -of-basic/ ] was going to be explaining exactly How "to plug in a tape recorder/player and be able to load programs off the tape" ;P
Real life is, to most, a long second-best, a perpetual compromise between the ideal and the possible.
-
Meanwhile, the sysadmin who accidentally nuked the data reckons "its best not run anything more with sudo today"
-
what about spike milligan?

fruitoftheloom
Posts: 20930
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: BBC BASIC Raspberry Pi port. Loading from tape.

Mon Aug 11, 2014 12:45 pm

https://www.riscosopen.org/content/sales/risc-os-pico

The OP via convulation was refering to the Risc-OS Pico operating system
RISC OS Pico is a minimal version of RISC OS for the Raspberry Pi, with some related goodies. We created this distro to celebrate the 50th birthday of the original BASIC programming language - we also believe it may also be of general interest to Raspberry Pi hackers and modders.

Rather than going down this route, there is a whole selection of software already available for Risc-OS

https://www.riscosopen.org/wiki/documen ... ity%20list
Retired disgracefully.....

User avatar
rpdom
Posts: 15428
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: BBC BASIC Raspberry Pi port. Loading from tape.

Mon Aug 11, 2014 3:08 pm

Many years back I wanted to get some BASIC programs off a BBC tape and store them as text files. I managed to achieve this by:

1. Use audio software to capture the tape sounds to a .wav file
2. Use a program (in PC BBC BASIC) to scan the file and convert the frequencies to bits and bytes
3. Use another program to decode the BASIC tokens to plain text listings with line numbers

I also wrote another program that would take a BASIC program (or any file really) and convert it to a .wav file that I then wrote to a CD and could then be played into the cassette port on a BBC micro to load the program.
I even started working on something where the BBC would control the CD player and be able to seek to the right track to load a program based on an index file and program on the first audio track.

I only did it for amusement, as I'd already had hard disk storage on some of my Beebs for a long time by then :)

It was funny when I bought the CD player for this specific purpose though. The conversation with the Dixons sales drone went something like this:

Rpdom: I'd like to buy that portable CD player please.
Sales: Certainly. But this (slightly more expensive model) has anti-shock so it won't jump when you're out jogging.
R: I'm not going jogging with it. I'm going to leave it sitting on a solid wooden table where it won't get knocked at all.
S: How about some batteries?
R: It's going to be running off the mains adaptor at all times.
S: Oh, ok. (thinks for a bit)....
S: How about buying some accidental damage cover for it. It's only $foo and you'll get a new one if it gets damaged.
R: Well, when I get it home I'm going to rip off the covers and disconnect the circuit boards. Does that count as accidental damage?
S: (speechless)
:lol:

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: BBC BASIC Raspberry Pi port. Loading from tape.

Mon Aug 11, 2014 4:11 pm

I also wrote another program that would take a BASIC program (or any file really) and convert it to a .wav file that I then wrote to a CD and could then be played into the cassette port on a BBC micro to load the program.
I did that with my Commodore 64 except I used an mp3 player to load games instead of using a CD player. :D

I'm not familiar with BBC BASIC tapes but I would imagine there are already tools for converting audio recordings into emulator tape files.

Richard S.

stenstorp
Posts: 21
Joined: Thu Jan 09, 2014 4:32 am

Re: BBC BASIC Raspberry Pi port. Loading from tape.

Mon Aug 11, 2014 9:47 pm

Soo... Any thoughts on connecting a tape recoder to the Pi?

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: BBC BASIC Raspberry Pi port. Loading from tape.

Mon Aug 11, 2014 10:38 pm

stenstorp wrote:Soo... Any thoughts on connecting a tape recoder to the Pi?
Well there's nothing stopping you connecting a tape recorder to a sound capture device but without software to decode BBC BASIC programs I'm not quite sure how this is going to help.

Richard S.

stenstorp
Posts: 21
Joined: Thu Jan 09, 2014 4:32 am

Re: BBC BASIC Raspberry Pi port. Loading from tape.

Tue Aug 12, 2014 6:33 am

Ah well. I do have the OS on an 8GB SD card (The pi wouln't read my 16MB one) so I'll just have to save them on there.

User avatar
Shawty
Posts: 59
Joined: Fri Nov 16, 2012 1:22 am
Location: North East UK
Contact: Website

Re: BBC BASIC Raspberry Pi port. Loading from tape.

Tue Sep 09, 2014 3:12 pm

Why did I not spot this before? :-)

You'll find everything you need (and more) here:

http://archive.retro-kit.co.uk/bbc.nvg. ... .php3.html

and before anyone proclaims "But that's all BBC stuff", yes some of it is, but there are a lot of tools there for other platforms too, specifically in the file transfer section is an application or two written for Linux that can sample a tape played in via a sound card and convert it into usable data.

Since I believe the source code is also available, then it wouldn't be difficult to compile/build it for another platform.

I'd happily do this, I just don't have time at the moment.

Shawty
still crazy (Even since the days of my BBC Model B) BEST and only way to be ;-)

IM: @shawty_ds on twitter
if you remember the Acorn and BBC days then I was "!Shawty! of DSPD" (Author of the BBC B Sound Tracker suite, and the Dreamscape demo)

stenstorp
Posts: 21
Joined: Thu Jan 09, 2014 4:32 am

Re: BBC BASIC Raspberry Pi port. Loading from tape.

Wed Sep 10, 2014 9:14 am

Hmm... well, I can now get the programs onto a computer but, does anybody know of a way to trasfer this data to the pi (without taking out the SD card, copying the files over and rebooting). To be honest, I've never actually used any of those retro computers with tape recorders (I'm only 16! give me a break!) but, from research I assume that I would just plug in a tape player, type 'load', start the tape and get transferring. I don't actually have a tape player so, I was thinking that, since somebody else said that they made a program to turn the code into a WAV file or something, copy the WAV file onto an old school MP3 player (that also plays WAV) and use that to replace the tape player. (I assume that I would connect it via a male to male 3.5mm headphone jack). Would any of you retro masters know if something like that would work? Or will I just have to keep transferring them directly to the SD card?
If anybody knows, It would be greatly appreciated!

- Stenstorp

stenstorp
Posts: 21
Joined: Thu Jan 09, 2014 4:32 am

Re: BBC BASIC Raspberry Pi port. Loading from tape.

Wed Sep 10, 2014 9:17 am

rpdom wrote:Many years back I wanted to get some BASIC programs off a BBC tape and store them as text files. I managed to achieve this by:

1. Use audio software to capture the tape sounds to a .wav file
2. Use a program (in PC BBC BASIC) to scan the file and convert the frequencies to bits and bytes
3. Use another program to decode the BASIC tokens to plain text listings with line numbers

I also wrote another program that would take a BASIC program (or any file really) and convert it to a .wav file that I then wrote to a CD and could then be played into the cassette port on a BBC micro to load the program.
I even started working on something where the BBC would control the CD player and be able to seek to the right track to load a program based on an index file and program on the first audio track.

I only did it for amusement, as I'd already had hard disk storage on some of my Beebs for a long time by then :)

It was funny when I bought the CD player for this specific purpose though. The conversation with the Dixons sales drone went something like this:

Rpdom: I'd like to buy that portable CD player please.
Sales: Certainly. But this (slightly more expensive model) has anti-shock so it won't jump when you're out jogging.
R: I'm not going jogging with it. I'm going to leave it sitting on a solid wooden table where it won't get knocked at all.
S: How about some batteries?
R: It's going to be running off the mains adaptor at all times.
S: Oh, ok. (thinks for a bit)....
S: How about buying some accidental damage cover for it. It's only $foo and you'll get a new one if it gets damaged.
R: Well, when I get it home I'm going to rip off the covers and disconnect the circuit boards. Does that count as accidental damage?
S: (speechless)
:lol:
OoOh.. a copy of that program would be really cool! (if you still have it)

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: BBC BASIC Raspberry Pi port. Loading from tape.

Wed Sep 10, 2014 10:23 am

Does anyone know where I can get a sample of a BBC BASIC saved program in audio format??

Richard S.

User avatar
rpdom
Posts: 15428
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: BBC BASIC Raspberry Pi port. Loading from tape.

Wed Sep 10, 2014 12:50 pm

redhawk wrote:Does anyone know where I can get a sample of a BBC BASIC saved program in audio format??
Let me check... I have an original BBC Welcome cassette, but I don't have anything to play it on now. I could post it to you if you have a player you can link to a PC and grab the audio with.

I don't think I have any of my BBC Audio files any more. I think they went a few generations of PC ago, possibly even back when I still used Windows.

Having said all that, I have just found my old walkman type player. If I can find some batteries and it still works, I might be able to digitise a file or two.

Watch this space...

NigelJK
Posts: 65
Joined: Wed Sep 05, 2012 1:44 pm

Re: BBC BASIC Raspberry Pi port. Loading from tape.

Thu Nov 20, 2014 12:52 pm

IIRC the tape interface on the BBC B was an RS232 serial interface. This used a standard 5 pin din and there was an a/d converter at the Beeb end to turn the squeaks and squawks into binary. It was about 2400 baud IIRC. You should be able to knock something up for the RPi and the software to decode should be relatively easy (if it not already lurking in the depths of the BBCBasic core code).

You could 'Save' a basic program to text if you wanted. Older Archimedes allowed for Basic files to be text (they were anyway, they just has a different ID) and could be loaded or saved as such.

User avatar
DougieLawson
Posts: 36327
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: BBC BASIC Raspberry Pi port. Loading from tape.

Thu Nov 20, 2014 1:41 pm

If it worked like the older Acorn Atom (and my Microtan 65) then the protocol was called CUTS @ 300 or 2400 baud.

http://www.sol20.org/articles/img/CUTS_PE_Mar_76.pdf
http://wikipcpedia.com/wiki/large-pebbl ... -and-cuts/
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Return to “RISCOS”