Help: Cassette Program Preservation

Tools, techniques and guides for software preservation - get help archiving your discs here!
Post Reply
Kanoe
Posts: 12
Joined: Tue Dec 19, 2023 8:53 am
Contact:

Help: Cassette Program Preservation

Post by Kanoe »

Greetings,

I hoping someone might be able to help me a bit with a project I am trying to complete.

Nearly 40 years ago my dad wrote a program in BBC basic for his 3 kids.

It was a simple program that when you pressed a key on the keyboard it played a nursey rhyme and displayed a picture relating to the nursey rhyme.

We recently found the cassette and I have been trying to get the program off it using various programs and instructions, mostly from these forums but not had much success so far.

I have what i think is a pretty good UEF file from it, in that MakeUEFAm found what looks like all the blocks, all the blocks had checksum OK message and there were some items that had end of file flag, however when I try to load it in an emulator it doesn't work.

It seems like when making the UEF file that it doesn't know that there is nothing more on the cassette so doesn't stop, I can manually cancel it to stop the process but then when loading the file in the emulator and getting it to find what files are in the UEF file it seems to do the same, ie after finding the last block it is still looking for more and doesn't stop.

If needs be I can link the UEF file I have got so far for people to look at if that would help.

I hoping to share this with my son, who is now 2, but the window he would actually like this is closing fast, so all help appreciated.

Apologies if I'm slow to reply to questions I don't have much time per day to progress this.
User avatar
Diminished
Posts: 1252
Joined: Fri Dec 08, 2017 9:47 pm
Contact:

Re: Help: Cassette Program Preservation

Post by Diminished »

It sounds like maybe it's not catching the sync byte at the start of the final block or something.

If you were able to post an audio recording of the tape's contents as a WAV file (maybe on google drive or something?) I can try processing it using Quadbike.

Or at the very least, if you post the UEF it will be possible to extract whatever data is actually present, although the final block of the program will presumably be missing.

Oh, and welcome to the forum.
Kanoe
Posts: 12
Joined: Tue Dec 19, 2023 8:53 am
Contact:

Re: Help: Cassette Program Preservation

Post by Kanoe »

Many thanks for the welcome and the reply.

Below is a link to the UEF file.

https://drive.google.com/file/d/1zcKSit ... sp=sharing
User avatar
flaxcottage
Posts: 5723
Joined: Thu Dec 13, 2012 8:46 pm
Location: Derbyshire
Contact:

Re: Help: Cassette Program Preservation

Post by flaxcottage »

Another way to go with this could be;

1. provide a link to the WAV file as Diminished suggests,

2. someone on the forum will be able to convert this to a UEF, I am sure,

3. if the WAV loads into a real BBC, I could then create a SSD image of the data on the tape as it will not be protected,

4. using Disk Image Manager, a UEF could then be created from the SSD image

It seems like a bit of a faff but it should work. I have done similar many times before.

Would it then be possible to host the image on the Archive website as it is an educational program?
- John

Check out the Educational Software Archive at www.flaxcottage.com
User avatar
Diminished
Posts: 1252
Joined: Fri Dec 08, 2017 9:47 pm
Contact:

Re: Help: Cassette Program Preservation

Post by Diminished »

Kanoe wrote: Tue Dec 19, 2023 4:46 pm Below is a link to the UEF file.
Alas. Actually I think the UEF is fine, but it looks like the start of the tape has been erased and overwritten with some other data. RHYME only starts at block &E.

It's not a total dead loss. The attached listing rhyme.txt contains all the BASIC that was recoverable.

You can load this using the UEF file rhyme-1.uef (EDIT: UEF file removed; replacement in later post) but you'll need to do

Code: Select all

*TAPE
PAGE=&E00
NEW
LO.""
Once it's loaded,

Code: Select all

MODE 2
and then you can try typing

Code: Select all

PROC4
PROC5
PROC6
PROC7
to access the remaining individual pictures.

I can't get the tunes to play. They're clearly working because the shift lock light is flashing as the sound buffer fills and empties, but no audio emerges. My guess is that there were some ENVELOPEs that were decapitated off the start of the program. There are clearly a few graphical problems as well.

Not sure if anyone else fancies trying to knock what remains into slightly better shape.

It's a shame. Looks like a nice piece of work.
Attachments
rhyme.txt
(9.54 KiB) Downloaded 21 times
Last edited by Diminished on Tue Dec 19, 2023 11:02 pm, edited 1 time in total.
Kanoe
Posts: 12
Joined: Tue Dec 19, 2023 8:53 am
Contact:

Re: Help: Cassette Program Preservation

Post by Kanoe »

Wow, thanks that is super cool to see.

We are going to have a go at filling in the blanks as it were and writing the missing bit of the program in BBC Basic.

Out of interest I have re-recorded the cassette to wave, there seems to be data a lot later on the side and mysteriously the other side of the cassette also appears to have data on it, although I couldn't get MakeUEFAm to pick anything up.

The label on the cassette says 1) Nursey 2) Rhyme so I wonder if this was talking about sides!?

If you fancy having a look at the recordings themselves I have linked them below:

https://drive.google.com/file/d/1Pnmkms ... sp=sharing

https://drive.google.com/file/d/1FYVnDf ... sp=sharing

The Side 2 is the one I was having some success with.

EDIT: Also I must be doing something wrong in BeebEm as the file you kindly provided never comes out of the load for me to enter the MODE 2 command
Kanoe
Posts: 12
Joined: Tue Dec 19, 2023 8:53 am
Contact:

Re: Help: Cassette Program Preservation

Post by Kanoe »

flaxcottage - Thanks for the offer, would love to add this to the archive if we get it working. My dad says he used to record the Open Uni courses on BBC Basic that they would show overnight in the 80's and he mentioned something about a competition for people to send in programs they created. He created this program for that and for us kids as a way to self teach BBC Basic.
User avatar
Diminished
Posts: 1252
Joined: Fri Dec 08, 2017 9:47 pm
Contact:

Re: Help: Cassette Program Preservation

Post by Diminished »

Kanoe wrote: Tue Dec 19, 2023 9:28 pm We are going to have a go at filling in the blanks as it were and writing the missing bit of the program in BBC Basic.
Best of luck. I have since realised that there is clearly also a missing VDU 5 that the surviving pictures need to draw correctly, so best loading instructions now would be

Code: Select all

*TAPE
PAGE=&E00
NEW
LO.""
MODE 2
VDU 5
and then

Code: Select all

PROC4
PROC5
...
etc., as before. With this, the remaining pictures all draw correctly.
If you fancy having a look at the recordings themselves I have linked them below:
I had a look at these. The only BBC Micro data on this tape is the part you have already successfully captured -- the first three and a half minutes of Side 2. The remainder (if it is actually computer data) is in some alien format. It is certainly not intended for any system I am familiar with.

I did try running the start of your Side 2 recording through Quadbike, but it was no more successful than MakeUEF was.
EDIT: Also I must be doing something wrong in BeebEm as the file you kindly provided never comes out of the load for me to enter the MODE 2 command
I won't bore you with the details, but this actually appears to be a bug in BeebEm. I've updated my UEF creation tools to evade it, and attached a new UEF, which I hope will work better.
Attachments
rhyme-4.uef
(3.64 KiB) Downloaded 12 times
Kanoe
Posts: 12
Joined: Tue Dec 19, 2023 8:53 am
Contact:

Re: Help: Cassette Program Preservation

Post by Kanoe »

Thanks, I will give that a go tomorrow.

Is there a better emulator I can use other than BeebEm if it is bugged for the UEF files I am creating, as I dont have a way to hack it like you did?
User avatar
Diminished
Posts: 1252
Joined: Fri Dec 08, 2017 9:47 pm
Contact:

Re: Help: Cassette Program Preservation

Post by Diminished »

Kanoe wrote: Tue Dec 19, 2023 11:10 pm Thanks, I will give that a go tomorrow.

Is there a better emulator I can use other than BeebEm if it is bugged for the UEF files I am creating, as I dont have a way to hack it like you did?
Don't worry about it -- the problem is specific to one of my own tools (which I've now patched, anyway). Using MakeUEF with BeebEm shouldn't be a problem.

Having said that, there are other emulators for Windows -- beebjit, B-Em, b2, and even the browser-based jsbeeb.
Kanoe
Posts: 12
Joined: Tue Dec 19, 2023 8:53 am
Contact:

Re: Help: Cassette Program Preservation

Post by Kanoe »

Well it's been an interesting day.

Was playing with an actual BBC Micro B that I had borrowed and it was great to see the cassette being read by it as my dad was round.

It was a shame that the machine decided to go up in smoke after 20 mins.

On the software front we now have a working programme in BBC Basic and IDE can run it and do 4 of the 7 nursery rhymes, still no sound at this stage but we think we know the issue.

The sound function takes 4 arguments, the first channels was hardcoded to 1,the next is for volume and in the code is setting it to 1 and 0 bit volume wants —15 (loudest) to 0 (silent) so we think it is playing just not with the volume set correctly. We think there is an envelope missing that was doing this.

Thats on the list to have a go at tomorrow.
User avatar
OneSwitch
Posts: 230
Joined: Tue Nov 22, 2011 5:50 pm
Contact:

Re: Help: Cassette Program Preservation

Post by OneSwitch »

A quick bodge to hear the music can be done by changing lines 1650 and 1720 to replace the call for an Envelope to just put sound out in the basic way at maximum volume:

1650READ A%,P%,D%:SOUNDC%,-15,P%,D%
1720 IF A%=2 THEN SOUND&102,-15,81,20:SOUND&101,-15,121,20ELSESOUNDC%,-15,P%,D%


If you wanted to get deeper into the nicer sounds possible with a Beeb this link looks good: https://stardot.org.uk/mirrors/www.bbcd ... _mm_04.htm

And here's some Envelopes I've used in the past:

ENVELOPE1,2,0,0,0,0,0,0,40,0,0,-10,126,110:RETURN:REM 1.ORGAN (QUICK)
ENVELOPE1,2,0,0,0,0,0,0,126,-20,-5,-20,126,110:RETURN:REM 2.POP CORN
ENVELOPE1,4,-4,-4,-4,40,40,40,126,-10,0,-10,126,110:RETURN:REM 3.GALAXIAN
ENVELOPE1,3,1,1,0,4,20,0,126,-5,0,-10,126,0:RETURN:REM 4.BOUNCY
ENVELOPE1,1,0,0,0,0,0,0,2,0,-10,-5,120,0:RETURN:REM 5.TOY ORGAN 2 (SLOW)
ENVELOPE1,3,48,48,48,1,1,1,30,-10,0,-5,126,110:RETURN:REM 6.BRIGHT-WARBLE
ENVELOPE1,7,2,1,1,1,1,1,121,-10,-5,-2,120,120:RETURN:REM 7.WOBBLY-REVERB
ENVELOPE1,25,16,12,8,1,1,1,10,-10,0,-10,100,50:RETURN:REM 8.ARPEGGIO

Lovely thing your Dad wrote. Amazing to be able to salvage it from that fragment.
Kanoe
Posts: 12
Joined: Tue Dec 19, 2023 8:53 am
Contact:

Re: Help: Cassette Program Preservation

Post by Kanoe »

Thanks very much, we have got it playing some sound now.

It looks like 2 envelopes were used in the program, one for an organ kinda sound, Which when played reminds me of how it used to sound and for for a bell / chime. Still working on trying to find something that sounds like that.

Next item we are working on is that it seems to mess up the colours its using after the first one that plays.
Kanoe
Posts: 12
Joined: Tue Dec 19, 2023 8:53 am
Contact:

Re: Help: Cassette Program Preservation

Post by Kanoe »

Anyone got any tips for actually getting the BBC Basic we have written into an UEF or SSD file that we can then load into an emulator?

We want to test it but cant figure out how to do it so we can only check that it works in the IDE that we wrote the code in.
Kanoe
Posts: 12
Joined: Tue Dec 19, 2023 8:53 am
Contact:

Re: Help: Cassette Program Preservation

Post by Kanoe »

Thanks, yeah I found the Paste option in BeebEm and it got the program in and I could run it, just can't seems to figure out saving it to Disc or Cassette.

Will keep trying.

There is also something a little wrong with drawing the pictures I haven't figured out yet, sometimes when selecting a different nursey rhyme the picture draws but with the wrong colours, if it is the first one I pick after running the program the colours are expected.

It feels like something needs a reset in between but I can't figure out what yet.
User avatar
OneSwitch
Posts: 230
Joined: Tue Nov 22, 2011 5:50 pm
Contact:

Re: Help: Cassette Program Preservation

Post by OneSwitch »

You can fix the colours in a brute force way by typing (or having as a line):

MODE 2:VDU 5:PROC4

for example.

Somewhere the code is changing the colour pallette I imagine.
chrisn
Posts: 982
Joined: Sat Apr 19, 2014 12:31 pm
Location: UK
Contact:

Re: Help: Cassette Program Preservation

Post by chrisn »

Kanoe wrote: Fri Dec 22, 2023 8:36 am Thanks, yeah I found the Paste option in BeebEm and it got the program in and I could run it, just can't seems to figure out saving it to Disc or Cassette.
The File -> Disc Options -> New Disc 0 menu item lets you create a new .ssd disc image, then you can SAVE"RHYME".
Atom / BBC B with Music 5000/4000/2000 / Electron / A3000 / Master 128
Kanoe
Posts: 12
Joined: Tue Dec 19, 2023 8:53 am
Contact:

Re: Help: Cassette Program Preservation

Post by Kanoe »

OneSwitch wrote: Fri Dec 22, 2023 2:18 pm You can fix the colours in a brute force way by typing (or having as a line):

MODE 2:VDU 5:PROC4

for example.

Somewhere the code is changing the colour palette I imagine.
Thanks, yeah I already set the mode and VDU at the start of the file, and he was definitely modifying the colour palette in each PROC so that's why I was looking for a reset. I think i fixed it by adding a VDU 20 when switching between them as this resets the colour palette and that seems to have fixed the issue.

For anyone interested, this is the list of outstanding items to restore:

Create / render visuals for Happy Birthday
Create / render visuals for Baa Baa Black Sheep
Create / render visuals for Campdown Races
Fix visuals for London Bridge
Fix twinkling star visual
Save to .SSD or .UEF

DONE:
22/12/2023: Create tune for Happy Birthday
24/12/2023: Create tune for Baa Baa Black Sheep
25/12/2023: Create tune for Campdown Races
26/12/2023: Fix tune for London Bridge
26/12/2023: Fix tune for Humpty Dumpty
26/12/2023: Fix tune for Twinkle Twinkle
28/12/2023: Fix tune for Hickory Dickory Dock
Last edited by Kanoe on Thu Dec 28, 2023 10:20 am, edited 1 time in total.
julie_m
Posts: 597
Joined: Wed Jul 24, 2019 9:53 pm
Location: Derby, UK
Contact:

Re: Help: Cassette Program Preservation

Post by julie_m »

Kanoe wrote: Wed Dec 20, 2023 7:19 pm Well it's been an interesting day.

Was playing with an actual BBC Micro B that I had borrowed and it was great to see the cassette being read by it as my dad was round.

It was a shame that the machine decided to go up in smoke after 20 mins.
Actual smoke? That's probably not as serious as it looks. There are some capacitors in the power supply that don't exactly age well, but the tin box tends to contain any damage.
chrisn
Posts: 982
Joined: Sat Apr 19, 2014 12:31 pm
Location: UK
Contact:

Re: Help: Cassette Program Preservation

Post by chrisn »

Diminished wrote: Tue Dec 19, 2023 10:59 pm I won't bore you with the details, but this actually appears to be a bug in BeebEm.
I'll try to see if I can figure out what's happening in BeebEm.
Atom / BBC B with Music 5000/4000/2000 / Electron / A3000 / Master 128
Kanoe
Posts: 12
Joined: Tue Dec 19, 2023 8:53 am
Contact:

Re: Help: Cassette Program Preservation

Post by Kanoe »

The missing visuals are proving to be quite tricky. That's why I left it till last. Haven't managed to get my head around what I'm supposed to be doing for them yet. Will post again when some progress has been made.
Kanoe
Posts: 12
Joined: Tue Dec 19, 2023 8:53 am
Contact:

Re: Help: Cassette Program Preservation

Post by Kanoe »

Haven't managed to make much progress on the missing visuals. I really haven't got my head round trying to draw everything in connected triangles.

I have managed to fix the BBC machine itself though with a cap kit for the psu. C1 had blown apart and C2 had leaked but apart from that it was OK. Cleaned up nicely.
Post Reply

Return to “software preservation”