Tape protection systems

discussion of beeb/electron applications, languages, utils and educational s/w
Coeus
Posts: 468
Joined: Mon Jul 25, 2016 11:05 am

Re: Tape protection systems

Postby Coeus » Mon Apr 24, 2017 2:40 pm

AndyF wrote:Was there anything to disrupt (in theory) the 'old skool' method ie a straight tape-to-tape ?

For instance, some early (ZX) speedlocks had pulsating leader tones (with clicks) which could play havoc with some tape recorders auto gain control.


To which the answer was to use a pair of HiFi decks where the recording deck had manual level control. I cannot see any way a tape could be made that uncopiable using high quality analogue equipment because the cassesstes being distrubuted had almost certainly been through a high speed tape duplicator, i.e. the same things used for pre-recorded music cassettes. Certainly at the beginning of the BBC Micro era these were anlogue machines running at some multiple of the final speed with the source of reel to reel tape.

User avatar
BigEd
Posts: 1499
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: Tape protection systems

Postby BigEd » Mon Apr 24, 2017 3:08 pm

vanekp wrote:if I wanted to crack it then I would do that I just want to be-able to reproduce the tape in a high quality format but a 1:1 copy of the original with all its copy protection, and yes I have got my own custom program to read the tapes in as data so I can then use that with custom save program to write it back to tape with all its protection in place have managed to reproduce most (no looked into joust as yet also uses switching parity).
What I am trying to find out is how do I (other than what I have given above) change parity mid stream, or maybe no-one has tried this on a BBC I am not sure which is why I put it out here on the forum.


I'm interested in the findings here. Note that the tape system on the Beeb is very close to the serial system, so if you have a logic analyser you should be able to see a serial port version of what you're doing. That might be easier to deal with than working with the tape signal.

Let's look at that command line:

Code: Select all

makeuef \
    -i EstraSide2_8bitUSB.csw \
    -w 0 180 \
    -z 30 8o1 -z 32 8e1 -z 35 8o1  -z 39 8e1  -z 41 8o1  -z 47 8e1  -z 49 8o1 \
    -z 51 8e1 -z 54 8o1 -z 56 8e1  -z 61 8o1  -z 64 8e1  -z 66 8o1  -z 68 8e1 \
    -z 70 8o1 -z 73 8e1 -z 75 8o1  -z 80 8e1  -z 84 8o1  -z 88 8e1  -z 90 8o1 \
    -z 93 8e1 -z 95 8o1 -z 99 8e1 -z 102 8o1 -z 104 8e1 -z 106 8o1 -z 109 8e1


According to these docs makeuef will be switching dataformat between blocks. So the format you'd like to write, from a Beeb, is one where the UART is reconfigured during the inter-block gaps. That should be possible, but it means careful timing and it means being able to do that while a save is in progress... that probably means duplicating the saving code from the OS, to give yourself a routine which saves one block at a time.

User avatar
vanekp
Posts: 343
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands

Re: Tape protection systems

Postby vanekp » Mon Apr 24, 2017 4:21 pm

And that code I have already have done a bunch of protected tapes, just the switching of parity I am doing as above but on debugging the loading of the data I discovered it it coming up with a crc error as the crc it generates and that it got from the tape do not match.
Here is a list of the ones I have done or are attempting to do:-
Game BBC (wav)
------------------ -------------
3DGrandPrix ok
Alien8 ok
AticAtac ok
Boffin ok
Boffin2 ok
BoneCruncher ok
CastleQuest ok
CavemanCapers ok
Citadel ok
CombatLynx ok
Contraption ok
Demolator ok
Elite ok
EstraFirebird wont load data parity switches
ExplodingFist ok
Fortress ok
Frak! ok
Ghouls ok
Gyroscope ok
HunchBack ok
Joust won't load data parity switches.
KillerGorilla ok
LunarJetman ok
ManicMiner ok
MatchDay ok
MrMephisto ok
NightShade ok
Psycastria ok (data must be 8o1)
Repton ok
Revs ok
Snooker ok
Spellbinder ok
StarQuake ok (data must be at 8o1)
StairWayToHell ok (block length changes for each block)
SuperManManOfSteel ok
TheHobbit ok
TheMine ok
TwinKingdomValley ok
Wizadore ok
YieAr ok

most are from this list http://beebwiki.mdfs.net/List_of_copy_protected_software_titles_on_cassette
It's just a little project of mine to be-able to reproduce tapes/wav files with 100% quality as using things like uef2wav or BackToLife the quality of the wave is as good as the source they where generated from and sometimes don't load 1st time even from a Digital Storage Device so my aim to reproduce them in the original working format.
If the loader can switch parity between blocks saving doing the same must be possible. O and I know my data is good cause if I set all the block data to the same parity and create the wav file it works fine so the problem is in the switching of parity that its going wrong, but get the idea others have not played with this.

User avatar
BigEd
Posts: 1499
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: Tape protection systems

Postby BigEd » Mon Apr 24, 2017 4:32 pm

So, you're not experimenting with saving from the beeb, you're experimenting with the way you convert to UEF?

User avatar
vanekp
Posts: 343
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands

Re: Tape protection systems

Postby vanekp » Mon Apr 24, 2017 5:44 pm

no no I an copying the tape data in a raw format with headers or what ever information to a disc file and using that to create a wav file I can use to put into a Digital Storage Device to play them pack on a real BBC.
Besides creating uef files on beeb-em (which you can also do with this) seems to create a non-standard uef file which only works on beeb-em. won't work on tapper, mame, jsbeeb and even b-em I get this :-
Hq-uefBlocks!.png

User avatar
Pernod
Posts: 1001
Joined: Fri Jun 08, 2012 10:01 pm
Location: Croydon, UK

Re: Tape protection systems

Postby Pernod » Mon Apr 24, 2017 7:43 pm

vanekp wrote:Besides creating uef files on beeb-em (which you can also do with this) seems to create a non-standard uef file which only works on beeb-em. won't work on tapper, mame, jsbeeb and even b-em I get this

Don't pay any attention to what MAME tells you, it doesn't yet handle all UEF blocks so will fail with anything slightly unusual.
- Nigel

BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.

User avatar
richardtoohey
Posts: 3378
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand

Re: Tape protection systems

Postby richardtoohey » Tue Apr 25, 2017 2:03 am

vanekp wrote: a 1:1 copy of the original with all its copy protection
Definitely an interesting project. :D

User avatar
CMcDougall
Posts: 5623
Joined: Wed Feb 02, 2005 3:13 pm
Location: Shadow in a Valley of Scotland

Re: Tape protection systems

Postby CMcDougall » Tue Apr 25, 2017 8:37 pm

^already done, my original .WAV files from original tapes \:D/ (but not uploading until fibre is >1gb Upload...)
or for small files, just use the BackToLife program with my .CSW files, built from my .WAVs
viewtopic.php?f=32&t=5023#p45962 8)
vanekp wrote:Alien8 ok
AticAtac ok
Boffin ok
Boffin2 ok
Elite ok
EstraFirebird wont load data parity switches
ExplodingFist ok
Fortress ok
Joust won't load data parity switches.
LunarJetman ok
MrMephisto ok
NightShade ok
Psycastria ok (data must be 8o1)
Revs ok
StarQuake ok (data must be at 8o1)
most are from this list beebwiki.mdfs.net/List_of_copy_protected_

that's more like it now edited, IF ExplodingFist is the version that loads the intro screen like a ZX spec...
Boffin/s are just changing file names on last 3 chars of last main file, so loader before it just ignores these to work.

only tapes of those i've not waved myself are Estra (typical!) Fortress, ExplodingFist (got other2) & LunarJetman.

Space Hi-Way by Amcom is another Streamer

I have asked this very question a while back, and no answer was given how this was done BITD to make Master copy from beeb /elk :?

so unless you can reverse the dodgy loader system program, then can write the streams back from actual machine.
ImageImageImage

User avatar
vanekp
Posts: 343
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands

Re: Tape protection systems

Postby vanekp » Tue Apr 25, 2017 9:08 pm

does anyone have the tape version of "Doctor Who and the Mines of Terror " don't see it in the archive and supposedly does exist, preferable the wav file for it.
supposedly has some sort of copy protection I would like to look at :- The game was supplied as a cassette and accompanying paged ROM. The cassette "has bytes alone with bits of pilot tone before the next byte." Clusters of low and high tone also appear. There are "some non-standard format blocks as well."

User avatar
leenew
Posts: 3402
Joined: Wed Jul 04, 2012 3:27 pm
Location: Doncaster, Yorkshire

Re: Tape protection systems

Postby leenew » Thu Apr 27, 2017 9:42 am

This is a great idea to have tape images with all protection intact.
Quick question..
Are all UEFs in the stairway to hell archive exact images of original tapes? Or is it possible that some have been made into a UEF from a de protected SSD? Or some other method? Or is a UEF *always* a direct and fully intact tape image? :-k
I think I made a list somewhere of games that we didn't have a UEF of.
If not, I will definitely make one.

Lee.

User avatar
Rich Talbot-Watkins
Posts: 1121
Joined: Thu Jan 13, 2005 5:20 pm
Location: Palma, Mallorca

Re: Tape protection systems

Postby Rich Talbot-Watkins » Thu Apr 27, 2017 12:05 pm

UEFs are direct tape rips which more or less replicate any tape format which is can be written with a normal Beeb (including blockless formats, 300 baud, parity bits etc). I'm not quite sure what CSW is - I assume it's an even more raw format which represents a waveform without further context (and thus can replicate tapes from other platforms too).

Coeus
Posts: 468
Joined: Mon Jul 25, 2016 11:05 am

Re: Tape protection systems

Postby Coeus » Thu Apr 27, 2017 12:22 pm

Rich Talbot-Watkins wrote:UEFs are direct tape rips which more or less replicate any tape format which is can be written with a normal Beeb (including blockless formats, 300 baud, parity bits etc). I'm not quite sure what CSW is - I assume it's an even more raw format which represents a waveform without further context (and thus can replicate tapes from other platforms too).


For CSW see http://ramsoft.bbk.org.omegahg.com/csw.html (courtesy of hoglet).

User avatar
Rich Talbot-Watkins
Posts: 1121
Joined: Thu Jan 13, 2005 5:20 pm
Location: Palma, Mallorca

Re: Tape protection systems

Postby Rich Talbot-Watkins » Thu Apr 27, 2017 12:54 pm

I hadn't realised it was short for Compressed Square Wave. So essentially it's just a run length encoded 1 bit wave at a chosen sample rate? I'm almost surprised that's a sufficiently good representation to be completely generic, but I guess you don't need more than that.

User avatar
CMcDougall
Posts: 5623
Joined: Wed Feb 02, 2005 3:13 pm
Location: Shadow in a Valley of Scotland

Re: Tape protection systems

Postby CMcDougall » Thu Apr 27, 2017 4:40 pm

UEF is a poor rip, can't handle gaps or streams.
UEFhq is made from a CSW
thus CSW is the master rip (made from WAV), that keeps gaps (blank space between files & stream info)
UEF & UEFhq are crap for getting back to actual beeb/elk, some UEFhq ok with TapDancer app.
CSW always work back to beeb/elk, unless not tested /crap WAV to start off with.
ImageImageImage

User avatar
vanekp
Posts: 343
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands

Re: Tape protection systems

Postby vanekp » Thu Apr 27, 2017 5:03 pm

which is exactly why I started this project to make an image on disk where you can make a decent quality wav file from it if you wish or a h.q. uef (in beeb-em) only to make the wave file I use the BBC to do that and record it directly into a wave editor, but they load 1st time then from some device like a ipod no rewind tape errors, only the ipod has no pause so have to pause it in between at times..never managed to get tapdancer to work for me on a smart phone.

User avatar
Rich Talbot-Watkins
Posts: 1121
Joined: Thu Jan 13, 2005 5:20 pm
Location: Palma, Mallorca

Re: Tape protection systems

Postby Rich Talbot-Watkins » Thu Apr 27, 2017 5:10 pm

UEF has block types which represent gaps of silence or leader tone. It can also handle streams of (blockless) data. The disadvantage of UEF as a tape format is that its tailored specifically to Acorn tape format; the advantage is that it's higher level than a raw wave stream and is thus smaller, and easier to parse.

Thomas Harte will correct me I'm sure, but I don't think there's any barrier to creating a perfect audio copy of an Acorn tape stream, using only UEF as an intermediate format.

Also, I don't think UEFhq is a thing is it? There's only one UEF format as far as I understand. Perhaps there are two ways of generating them, and only the hq way preserves all the information. It's the exact same format at the end though.

User avatar
CMcDougall
Posts: 5623
Joined: Wed Feb 02, 2005 3:13 pm
Location: Shadow in a Valley of Scotland

Re: Tape protection systems

Postby CMcDougall » Thu Apr 27, 2017 5:17 pm

UEF & UEFhq ARE different

UEF is basic, hence said crap as no spaces kept if no motor control....
ImageImageImage

User avatar
CMcDougall
Posts: 5623
Joined: Wed Feb 02, 2005 3:13 pm
Location: Shadow in a Valley of Scotland

Re: Tape protection systems

Postby CMcDougall » Thu Apr 27, 2017 5:46 pm

ImageImageImage

User avatar
CMcDougall
Posts: 5623
Joined: Wed Feb 02, 2005 3:13 pm
Location: Shadow in a Valley of Scotland

Re: Tape protection systems

Postby CMcDougall » Thu Apr 27, 2017 6:34 pm

or a quick comparison:
UEF v UEFhq.png

so, as can be seen on left normal UEF, showing only length1 between files (as always),
then with UEFhq on right, shows length3, so keeps the gaps /etc :D
this is same with CSW, IF the emulator can handle the protection/s :x
ImageImageImage

User avatar
vanekp
Posts: 343
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands

Re: Tape protection systems

Postby vanekp » Tue Nov 07, 2017 5:39 am

Back to my original question http://stardot.org.uk/forums/viewtopic.php?f=2&t=9628#p167143 to which no one seems to have an answer :(
Surely some one out there knows how tapes are created with switching parity for the blocks :wink:

crj
Posts: 324
Joined: Thu May 02, 2013 4:58 pm

Re: Tape protection systems

Postby crj » Tue Nov 07, 2017 3:40 pm

If people ever wanted to design a hardcore tape format, the place to start might well be 8b/10b encoding. That's rather more sophisticated and robust than the old gap-block-gap-block mechanism for synchronisation: each byte encodes to 10 bits on the tape (the same number of bits on tape as Acorn's start-bit,data,stop-bit) but there is guaranteed to be a transition at least every six bits, and five consecutive bits the same is a "comma code" that can be recognised regardless of alignment.

Comma codes mean that if you rewound and tried again, loading could resynchronise without needing gaps.

Unfortunately, though a BBC Micro is easily capable of encoding and decoding 8b/10b at 1200bps, I'm pretty sure there's no way to trick the UART into giving access to the raw bit stream on the tape. Stop bits are mandatory. )-8

(Furthermore, 8b/10b encoding is DC-balanced, so you could probably use it directly as the audio waveform sent to tape rather than having to frequency modulate it. That is, of course, even further divorced from the capabilities of Acorn's tape hardware, but it might be amusing to try to design a 1MHz bus peripheral that could sustain 432 bytes per second of actual data to/from tape in the same bandwidth Acorn uses for 78 bytes/second!)

User avatar
vanekp
Posts: 343
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands

Re: Tape protection systems

Postby vanekp » Tue Nov 07, 2017 6:09 pm

I got to work what I wanted to work =D> :D switching parity while writing to tape for in this case switching between 8E1 to 8O1
writing &19 and &1D between data blocks to &FE08 does work, just could not get it to work before but managed to do it with Video Classics from Firebird which on the 3rd file. Also was playing on BeebEm before but that's pointless as it does not care about tape parity which is why a lot of games will work on there but not on a real BBC.
Peter.

User avatar
vanekp
Posts: 343
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands

Re: Tape protection systems

Postby vanekp » Sat Nov 25, 2017 5:55 pm

YAY =D> :D managed to reproduce a working copy of Joust on the BBC
the secrete....
the 1st 243 bytes are written at 8O1 then 1 byte at 8E1 and the rest of the file is written at 8N1 (normal parity)
Peter.

User avatar
leenew
Posts: 3402
Joined: Wed Jul 04, 2012 3:27 pm
Location: Doncaster, Yorkshire

Re: Tape protection systems

Postby leenew » Sat Nov 25, 2017 6:01 pm

I get the feeling this UEF work is very important =D> ... although I can't quite formulate my thoughts any more than that at the moment :lol:

Lee.

User avatar
vanekp
Posts: 343
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands

Re: Tape protection systems

Postby vanekp » Sat Nov 25, 2017 6:40 pm

LOL it's the sense of achievement that I am able to reproduce 100% working copys of tapes which I could not do years ago when I 1st owned a BBC :wink:


Return to “software: other”

Who is online

Users browsing this forum: Baidu [Spider] and 2 guests