Page 1 of 1

BBC BASIC Raspberry Pi port. Loading from tape.

Posted: Mon Aug 11, 2014 12:30 pm
by stenstorp
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.

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

Posted: Mon Aug 11, 2014 12:40 pm
by r3d4
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

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

Posted: Mon Aug 11, 2014 12:45 pm
by fruitoftheloom
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

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

Posted: Mon Aug 11, 2014 3:08 pm
by rpdom
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:

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

Posted: Mon Aug 11, 2014 4:11 pm
by redhawk
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.

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

Posted: Mon Aug 11, 2014 9:47 pm
by stenstorp
Soo... Any thoughts on connecting a tape recoder to the Pi?

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

Posted: Mon Aug 11, 2014 10:38 pm
by redhawk
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.

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

Posted: Tue Aug 12, 2014 6:33 am
by stenstorp
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.

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

Posted: Tue Sep 09, 2014 3:12 pm
by Shawty
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

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

Posted: Wed Sep 10, 2014 9:14 am
by stenstorp
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

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

Posted: Wed Sep 10, 2014 9:17 am
by stenstorp
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)

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

Posted: Wed Sep 10, 2014 10:23 am
by redhawk
Does anyone know where I can get a sample of a BBC BASIC saved program in audio format??

Richard S.

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

Posted: Wed Sep 10, 2014 12:50 pm
by rpdom
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...

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

Posted: Thu Nov 20, 2014 12:52 pm
by NigelJK
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.

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

Posted: Thu Nov 20, 2014 1:41 pm
by DougieLawson
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/