CPCWiki forum

General Category => Amstrad CPC hardware => Topic started by: chinnyhill10 on 00:22, 10 January 14

Title: Tape loading
Post by: chinnyhill10 on 00:22, 10 January 14
I've purchased a car cassette adaptor for my new 464. I've put it in the datacorder, and then run the cable out through the back. A nice non destructive solution.


First up I tried to load Zub which succeeded after some fiddling with volume. But after that I had no success.


I'm using Winape to play the CDT files into the adaptor. The problem is that the CPC always seems to crash out just before the speed load begins. I'm aware this could be audio level related but also the Winape player doesn't seem to give the CPC enough time.


In short Winape starts playing the data before the CPC is ready. Data starts playing while the relay is still clicking in the 464. Meanwhile while the CPC is still readying itself data has started to play in.


So in short is there a better CDT player than Winape? One that is tried and tested with real CPC's? Or is it a case that trying to load via the tape heads with one of these devices is always going to be unreliable?


Thanks.
Title: Re: Tape loading
Post by: chinnyhill10 on 00:54, 10 January 14
If I pause playback during that gap for a second, stuff loads fine.


So it's not a hardware issue as the tape method I'm using appears to work ok..


I know a 464 will pause the tape itself when it needs to, but I never used to have a rem socket on my 6128 cassette player and no game ever failed to load during the pause between the basic loader and the main speed load.


Very puzzled!
Title: Re: Tape loading
Post by: Bryce on 09:22, 10 January 14
Are you sure the samples are playing at the right speed?

Have you cleaned the 464s tape heads lately?

Bryce.
Title: Re: Tape loading
Post by: ralferoo on 09:43, 10 January 14
Check here World of Spectrum - Utilities (http://www.worldofspectrum.org/utilities.html)

The Amstrad CDT format is the same as the Spectrum TZX format, so you can use any spectrum utilities too.

Personally, I use playtzx under linux.
Title: Re: Tape loading
Post by: arnoldemu on 10:52, 10 January 14
I do the same as ralf.
I convert it to an au file. Load it into Audacity, ramp the volume up to 3/4 and play it to the cpc.
Always works great - except for having to start/stop the tape myself ;)
Title: Re: Tape loading
Post by: chinnyhill10 on 11:30, 10 January 14
Quote from: arnoldemu on 10:52, 10 January 14
I do the same as ralf.
I convert it to an au file. Load it into Audacity, ramp the volume up to 3/4 and play it to the cpc.
Always works great - except for having to start/stop the tape myself ;)


I tried WinTZX, a rather unstable program under Windows 7. Audio output levels are fine, it's the pause between the Basic loader and the Speed loader that continues to be the problem.


If I pause the playback for a second during the gap, everything loads ok. If I just let the TZX play the CPC simply isn't ready to receive the data.


Play the same file into an emulator and it's fine. It seems my real CPC needs a fraction more time to ready itself.


Interestingly in the log files of WinTZX I see references to 113%. Both Winape and WinTZX couldn't be playing back the TZX faster than realtime could they?


Might be time to try and load WEC Le Mans from a real external tape with no remote and see what happens!
Title: Re: Tape loading
Post by: The Last Bandit on 12:22, 10 January 14
Have you tried TapDancer ? Its an Android app for playback of old tape files.


Has 'experimental' support for Amstrad CDT files, not tired it myself on the Amstrad but it works fine with my Acorn.
Title: Re: Tape loading
Post by: chinnyhill10 on 12:57, 10 January 14
Sold my only Android device a while back. My only options are an iPhone, an iPad or the PC that sits next to the 464.
Title: Re: Tape loading
Post by: ralferoo on 13:33, 10 January 14
Quote from: chinnyhill10 on 11:30, 10 January 14
If I pause the playback for a second during the gap, everything loads ok. If I just let the TZX play the CPC simply isn't ready to receive the data.

Play the same file into an emulator and it's fine. It seems my real CPC needs a fraction more time to ready itself.
The emulator will almost certainly be behaving correctly in this regard - the pauses encoded on the CDT will match what's recorded on the tape.

However, as you know, the CPC can control the tape motor and so between loading the loader and that doing the speedload, the tape will be switched off momentarily. Most loaders will turn the motor back on as literally the very first instruction so that it sounds like a click rather than a clunk, but it's not uncommon to have the motor off for a longer period especially if the loader is written in BASIC.

If you're feeling confident with a hex editor, it's a fairly simple matter to edit the CDT file to make the pauses longer...
Title: Re: Tape loading
Post by: chinnyhill10 on 14:56, 10 January 14
Quote from: ralferoo on 13:33, 10 January 14
The emulator will almost certainly be behaving correctly in this regard - the pauses encoded on the CDT will match what's recorded on the tape.

However, as you know, the CPC can control the tape motor and so between loading the loader and that doing the speedload, the tape will be switched off momentarily. Most loaders will turn the motor back on as literally the very first instruction so that it sounds like a click rather than a clunk, but it's not uncommon to have the motor off for a longer period especially if the loader is written in BASIC.


But.....


I used to play these games on a 6128 using a tape recorder with no remote socket. So the CPC could not pause the tape.


That's why I am puzzled. In theory the ability to pause the tape should not be a factor.
Title: Re: Tape loading
Post by: arnoldemu on 18:36, 10 January 14
Have you considered that it may be the tape motor or the tape belt that may not be good?

I don't know how these fake tapes work, but if they control the output speed based on the tape motor then this could be the issue.

Amstrad loader is good at handling different speeds and variations that come about from a worn belt.

Fast loaders expect the rate to be constant and at the rate they expect so will fail if the rate is not correct.

It may also explain why it used to work on the 6128 without tape motor control, it may just be the tape is running a little fast and the delay is therefore just a bit too short.


Title: Re: Tape loading
Post by: chinnyhill10 on 20:27, 10 January 14
Quote from: arnoldemu on 18:36, 10 January 14
Have you considered that it may be the tape motor or the tape belt that may not be good?

I don't know how these fake tapes work, but if they control the output speed based on the tape motor then this could be the issue.



They don't use the motor at all. Just the heads.


Found a newer version of WinTZX than the one listed on World Of Spectrum. Yie Ar Kung Fu has loaded first time. Last night it wouldn't.


Will try some more games in a bit.
Title: Re: Tape loading
Post by: chinnyhill10 on 20:39, 10 January 14
Nope. WEC Le Mans still only loads if you pause the TZX.


You can hear the tape motor has stopped but you can hear the data starting to come in before power is restored to the datacorder.


I expect what is happening is that the CPC is pausing the tape which cuts all power to the datacorder including the heads.

Title: Re: Tape loading
Post by: Devilmarkus on 21:07, 10 January 14
The CPC has a relay, which starts and stops the tape motor, that's all...
Controlled by CPU

In the 664 and 6128 this connection is meant to be used by remote motor control. Many datacorders have it.
Title: Re: Tape loading
Post by: Cholo on 23:24, 10 January 14
Indeed, a lot of things could be wrong. As we dont know what game or CDT file you are trying to load it could be any number of reasons.

Original tape game was badly recorded onto original tape. Quite a few original games was recorded badly. Like:

- Missing files. Quite sure severeal of those 10 game tape compilations .. is missing at least a loader or similar (games load but colours are off, loading screens are skipped etc, or simply not executing).

- Wrong gaps. I recall the very first Amstrad Action tape had this issue. It was the tape with Kung Fu & No.1. The side with No.1 (i think) has a extremely small gap between the initial block loader and the large Record afterwards. So small that it always failed & crashed. The 464 firmware and/or tape mechanism just couldnt cope with it. Didnt get to play the game to much later when i got "experienced" to hear something was wrong a made a manual copy of the block & record to a new tape with a proper gap. Quite sure North & South had a bit of the same issue but to a lesser extend .. it worked as long as you rewind the tape "exactly right" with no "air".

- Errors. Even made on the "factory" or later. Final Fight & Jack and the Beanstalk springs to mind right ways as having factory errors. FF was in the programming i think & Jack had a big "hickup" error A in the middel of the tape. In both cases many people isnt even aware of this .. as in the case of FF its a multi loader & happens later .. in Jack it happens right there on loadup on the middel of the tape (one big record) but as the loader dosnt check for errors it executes anyway. Thankfully a fixed version of FF was released just a few years ago & a fully playable (with a little gfx issues) version of Jack exist too. Funny you can still read review of Jack saying its a "easy 4 levels" where as its actually a really "hard 7 level" long game  ;)

- Technical issues. Not errors but on purpose "weak signals" or similar techy stuff usually part of a tape protection to prevent making copies of a game.


Lost in translation: Quite a lot can go wrong here as well. Im not entirely sure how much the CDT/TZX format can handle. Donno much about the technical .. but from simple attempts .. you know that there has to be more techy stuff when you cant get 40 raw recordings to load. Then there is the whole issue of how its translated & tested before being uploaded. Quite a few CDT only work with 1 or 2 emulators as well. The tools used to convert to CDT or TZX also behaves & translates differently. Most TZX tools dont understand even native amstrad firmware "block"s but may recognize & translate advanced protections (like speedlock) as the protections are similar on the spectrum as on the amstrad. Question is .. has the different parts translated by different tools been merged correctly?

Im not surpriced if you have troubles playing a CDT back as that is yet another thing that can go wrong.

Still a little surpriced that you mention running a 6128 with a recorder without a rem port  :o It isnt impossible of cause especially if you are aware of the situation but i still imagine you'd run into a good 20-30% of tapes failing to load. Protected games is one thing, but even old Amsoft titles usually had that one giant delay between the loader (with the Amsoft logo sloooowly drawing) .. and loading the rest of the game. Quite a few .. multiload games with "press any key to continue" like pauses as well.

On the positive side and seen from a retro gamer point of view we are quite lucky that the native amstrad loading scheme is the slow & safe "block" one.  Aka trying to playback a CDT to a real 464 becomes as lot easier if its in "block" format as you can rewind and pretty much immediately tells you if something is read wrongly. Must be a real nightmare on the other 8 bit machines.

Ive seen one other amstrad user using a cordless SD adapter like this one:
Car Music MP3 Player Tape Cassette Adapter for SD/MMC Reader | eBay (http://www.ebay.co.uk/itm/Car-Music-MP3-Player-Tape-Cassette-Adapter-for-SD-MMC-Reader-/360564689722?pt=UK_iPad_Tablet_MemoryCard_USBAdapters&hash=item53f3548b3a)

This would solve the pause/gap issues as it will pause/start playback when the 464 motor stopping/starting. On the down side i do hear it has a "mandatory" equalizer and that is usually not good for playing back data (might distort the signal, just like you should never use metal/chrome tapes as they might do the same, aka only "normal position" tapes). Another issue is that youd have to turn CDT into a audio file & im not sure what formats the adapter accepts (aka does it accept "lossless" audio or not? or does it even matter?)

If you run into a particularily nasty protected game that keep failing you could look around to see if there is a cracked version on DSK. Quite often those DSK containing "cracked" files is actually a tape version transfered to disc. It depends on how much you know about copying files but "all" you would have to do is usually just "copy" (playback) the files from pc/emulator (audio out) in correct order & on the 464 then load directly or "load" into a copy program for recording to tape later.
Aka on PC run JL-Copy/amsback to load and record (playback audio) to tape. At the same time run JL-copy/amsback on the 464 to "load" the audio into memory. Once its fully loaded, eject the adapter & insert a blank tape and record the data from memory to real tape. The order of the files is usually easy to guess aka: zorro.bas, zorro1.scr, zorro2.bin, zorro3.bin makes sense, but you can also load up the loader and have a look inside to get the order.
Title: Re: Tape loading
Post by: chinnyhill10 on 00:31, 11 January 14
I had in the region of 200 tape games + covertapes for my 6128. My first tape recorder had no rem socket, after a couple of years I got a Sony which did. Then when the Sony broke I got another Sony that didn't.


I never had problems loading games without a remote socket. However it could be a pain for multi load games as you'd need to sit with the computer when loading and press stop in the right place. Indeed Spectrum owners with external cassette players have to do this as the Speccy has no rem at all!


I've been playing games all evening on the 464. So far WEC Le Mans is the only one that fails to load from the newer version of WinTZX. I can see exactly what happens. The relay cuts the cassette recorder but the gap in the TZX between the basic loader and the speed load isn't long enough so data starts to input before the relay restarts the tape player. When the motor is cut the heads cannot read.


But the newer WinTZX is worth a look. Games that would't load last night work fine with the new version.


Welcome at winTZX (http://www.wintzx.fr/webStart.html)


(Mac users: That site is not Safari friendly. Load up Firefox or you won't see the menu on the left)
Title: Re: Tape loading
Post by: chinnyhill10 on 13:17, 15 January 14
Just to update, every other game I've tried loads ok via the adaptor. Its the WEC Le Mans TZX at fault. Only problem now is multi-loads.


I've run the adaptor cable through a gap at the side of the tape deck and out the expansion port. That way the cassette lid can be closed properly and there is no budging.


A great, cheap and non destructive way to breathe new life into a 464. The adaptor cost less than £2!
Title: Re: Tape loading
Post by: Bryce on 13:26, 15 January 14
Then edit the Le Mans TZX and add a few seconds to the delay.

Bryce.
Title: Re: Tape loading
Post by: chinnyhill10 on 13:12, 16 January 14
Done a further mod.


Took the adaptor apart and took out all of the internals apart from the head itself. I felt the mechanism was putting a strain on the CPC's tape motor (the adaptors have a system of cogs inside designed to imitate a tape running through to fool auto reverse mechanisms).


I also cut a hole in the side of the adaptor that lines up exactly with the gap on the left of the tape recorder where there is an opening through to the main part of the case. So now the cable runs straight through there.


Tested it and it all still works and no more creaking noises from within the tape recorder while it is running.


The amazing thing is when you open up the adaptor the audio wire is just connected straight to a single head. No resistors or anything.


Very pleased.
Title: Re: Tape loading
Post by: Bryce on 13:37, 16 January 14
I was looking at putting the guts of one of these: Stereo Metall Clip Musik Mini Mp3 Player Fm Radio Lcd Display Bis 32Gb Blau | (http://www.ebay.de/itm/Stereo-Metall-Clip-Musik-Mini-Mp3-Player-Fm-Radio-Lcd-Display-Bis-32Gb-Blau/221341596391?rt=nc&_trksid=p2047675.m1851&_trkparms=aid%3D222002%26algo%3DSIC.FIT%26ao%3D1%26asc%3D134%26meid%3D4157077517636574701%26pid%3D100005%26prg%3D1073%26rk%3D4%26rkt%3D4%26sd%3D291049061609%26)  into one of those tape adapters. As a type of HxC for Tape deck. As usual, I haven't got around it doing that either :(

Bryce.
Title: Re: Tape loading
Post by: redbox on 19:38, 16 January 14
Quote from: Bryce on 13:37, 16 January 14
I was looking at putting the guts of one of these: Stereo Metall Clip Musik Mini Mp3 Player Fm Radio Lcd Display Bis 32Gb Blau | (http://www.ebay.de/itm/Stereo-Metall-Clip-Musik-Mini-Mp3-Player-Fm-Radio-Lcd-Display-Bis-32Gb-Blau/221341596391?rt=nc&_trksid=p2047675.m1851&_trkparms=aid%3D222002%26algo%3DSIC.FIT%26ao%3D1%26asc%3D134%26meid%3D4157077517636574701%26pid%3D100005%26prg%3D1073%26rk%3D4%26rkt%3D4%26sd%3D291049061609%26)  into one of those tape adapters.

1 EUR each?!
Title: Re: Tape loading
Post by: Gryzor on 19:41, 16 January 14
WTF?! Indeed, €1??? Let's get a dozen and start hacking away at them :D
Title: Re: Tape loading
Post by: Bryce on 09:25, 17 January 14
Quote from: Gryzor on 19:41, 16 January 14
WTF?! Indeed, €1??? Let's get a dozen and start hacking away at them :D

That was my thought too. For €1 you can install an MP3 player in everything including the cat.
I don't know how friendly the menus are, but it's small and cheap enough to install where you like, and if you like loading games from tapes, you can have your whole collection permanently connected to your 464 :)

Bryce.
Title: Re: Tape loading
Post by: The Last Bandit on 10:08, 17 January 14
Gee my German must be really bad but that link has a price of €51 on it ?
Title: Re: Tape loading
Post by: Bryce on 11:47, 17 January 14
The twat went and changed the price. Then buy them here for a little bit more: helle Farbe Mini MP3 Player Spieler mit Clip Musik Player Metall Aluminium Neu | (http://www.ebay.de/itm/helle-Farbe-Mini-MP3-Player-Spieler-mit-Clip-Musik-Player-Metall-Aluminium-Neu-/121185396793?pt=DE_MP3_Players&hash=item1c37366839)

Bryce.
Title: Re: Tape loading
Post by: ralferoo on 13:27, 17 January 14
Or for about €3, ItS7 LCD Screen Metal Mini Clip-on MP3 Player or 3.5mm Stereo In-ear Red Headset (http://www.ebay.co.uk/itm/400608770150)

BTW, this link hilights what is becoming a very annoying feature of ebay auctions... When you search for something you get e.g. here an MP3 player for an expensive price or headphones for a lower price. When you search for the MP3 player it shows up as the cheaper price.

I've seen things that are about £10 but appear as £1 because they've offered something pointless as one of the "options".
Title: Re: Tape loading
Post by: robcfg on 13:49, 17 January 14
Quote from: Bryce on 11:47, 17 January 14
The twat went and changed the price. Then buy them here for a little bit more: helle Farbe Mini MP3 Player Spieler mit Clip Musik Player Metall Aluminium Neu | (http://www.ebay.de/itm/helle-Farbe-Mini-MP3-Player-Spieler-mit-Clip-Musik-Player-Metall-Aluminium-Neu-/121185396793?pt=DE_MP3_Players&hash=item1c37366839)

Bryce.


The color will sent randomly... LoL!  ;D
Title: Re: Tape loading
Post by: Bryce on 15:04, 17 January 14
@Ralf: Yeah, I just noticed that recently and I also thought FTW!?!

@Rob: Who cares, I was going to rip it apart anyway! If I was going to use it as a normal MP3 player I'd sand it back down to the aluminium to make it grey/silver.

Bryce.
Title: Re: Tape loading
Post by: gerald on 16:07, 17 January 14
I am really wondering what you're all talking about  :D

All I get when following you links is

Bryce link :
Aufgrund rechtlicher Bestimmungen in manchen Ländern wurde der Zugang zu diesem Artikel leider gesperrt. Wir haben Ihren Zugriff auf diesen Artikel gesperrt, da wir verpflichtet sind den Zugang zu unzulässigen Artikeln zu beschränken. Es kann leider vorkommen, dass wir den Zugang zu machen Angeboten sperren, obwohl das jeweilige Angebot nicht gegen die rechtlichen Bestimmungen verstößt. Dies geschieht aufgrund technischer Beschränkungen. Wir möchten uns bei Ihnen für etwaige daraus entstandene Unannehmlichkeiten entschuldigen und hoffen, dass Sie andere interessante Artikel auf eBay finden.

or

Ralferoo link :
Unfortunately, access to this particular item has been blocked due to legal restrictions in some countries. We are blocking your viewing in an effort to prevent restricted items from being displayed. Regrettably, in some cases, we may prevent users from accessing items that are not within the scope of said restrictions because of limitations of existing technology. Please accept our apologies for any inconvenience this may cause, and we hope you may find other items of interest on eBay.

I didn't now mp3 player were illegal in France  :-X
Title: Re: Tape loading
Post by: Gryzor on 16:44, 17 January 14
€51? Again, he's nuts :D From one extreme to the other!


€3 is still pretty good :)
Title: Re: Tape loading
Post by: Bryce on 14:38, 18 January 14
@Gerald: They're not illegal, but as far as I know, there is a hefty tax on MP3 players in France and to stop people avoiding the tax by buying outside the country they block them if they come from China (or so I've been told).

Bryce.
Title: Re: Tape loading
Post by: gerald on 16:19, 18 January 14
Quote from: Bryce on 14:38, 18 January 14
@Gerald: They're not illegal, but as far as I know, there is a hefty tax on MP3 players in France and to stop people avoiding the tax by buying outside the country they block them if they come from China (or so I've been told).
Ok, as I could not see who was selling it  >:(

It looks like ebay is over-protecting themselves. The tax on mp3 player (or anything that can store copyrighted 'cultural' stuff), has to be paid by the one that import the product in France, not the seller. So in this case me, not the chinese vendor nor ebay !
The funny thing, is that it is nearly impossible for someone to pay this tax if they wanted to  :laugh:
Title: Re: Tape loading
Post by: Bryce on 18:09, 18 January 14
Yes, I had this discussion a while ago with the French half of the family. They all think the tax is a joke. My MP3 player certainly doesn't have anything on it that anyone would call cultural :D .

Bryce.
Title: Re: Tape loading
Post by: AMSDOS on 13:01, 30 May 14
I was hoping someone could help me with my CDT problems  :'(


I typed-in this early Amstrad game which is unfriendly when AMSDOS is present and thought it would be a good example to have something original you could load from Tape  :D  What I've done is to get it onto CPCE, save it as CSW and had no problems with that, followed by recording the sound into a WAV. I downloaded CPCTapeXP, though the WAV from CPCE wasn't successful, but after I ran the program through Avrack and record the sound at 16000Khz, 8bit, Mono I think, from it everything seemed to start working and sounded all good. But after I used CPCTapeXP and ran it through Winape, the tempo sounded slightly faster even though the program successfully loaded, I recorded the original at Speed Write 0 after having problems with Speed Write 1 earier, but now I've sent the program to Kukulcan whose having problems with it.


My question is, Is there a preferred rate I should be recording the sound at, or is recording using PCs, Soundcards, Emulation bad? Just seems that if someone has gone to the trouble of writing CPCTapeXP then it should be possible to take a WAV recording and construct to a CDT. Can someone advise what's happened to my CDT file by listening to it?


EDIT: The problem I should point out is some blocks get picked up and others are being missed. I tried this CDT file I've attached in Winape and worked, even though the tempo for it sounded too fast for Speed Write 0, but seemed to get worse the higher the Baud Rate increased.


Thanks.
Title: Re: Tape loading
Post by: Devilmarkus on 13:14, 30 May 14
I usually use 44.100hz, mono, 16bit to record tapes.

BTW.: Your game resets the CPC while playing?!? Or is that a CPC464-6128 issue?
Title: Re: Tape loading
Post by: Devilmarkus on 13:19, 30 May 14
I re-recorded your tape using JavaCPC and converted the WAV to CDT, too...

Result:

Title: Re: Tape loading
Post by: AMSDOS on 13:34, 30 May 14
Quote from: Devilmarkus on 13:14, 30 May 14
I usually use 44.100hz, mono, 16bit to record tapes.

BTW.: Your game resets the CPC while playing?!? Or is that a CPC464-6128 issue?


It's actually an AMSDOS issue, I got Kukulcan to document it on their website, so what happens is when the Bomb hits bottom  or a negative result, this bit of code to shake the city is called:


1120 IF b<=0 THEN MOVE g,b:PRINT CHR$(32);:SOUND 2,100,10,7,0,0,5:FOR p1=1 TO 3:OUT &400,4:OUT &100,39:FOR p=0 TO 10:NEXT p:OUT &400,4:OUT &100,38:FOR p=1 TO 8:NEXT:NEXT


so if AMSDOS is present when OUT &100,39 is done, the system crashes. I found if you change the code you can still get the city to shake without crashing the system by altering those to lower values, for me having 38 & 37 worked respectively. But for the tape I thought I'd leave the problem alone and disable AMSDOS.


I'll try your suggestion and use 44.100hz along with those settings and see if that makes a difference.


EDIT: I forgot to stress that's an early Type-in from Popular Computing Weekly (circa Oct 1984), so it initially wouldn't have been a problem. :)
Title: Re: Tape loading
Post by: arnoldemu on 14:04, 30 May 14
Quote from: AMSDOS on 13:34, 30 May 14

It's actually an AMSDOS issue, I got Kukulcan to document it on their website, so what happens is when the Bomb hits bottom  or a negative result, this bit of code to shake the city is called:


1120 IF b<=0 THEN MOVE g,b:PRINT CHR$(32);:SOUND 2,100,10,7,0,0,5:FOR p1=1 TO 3:OUT &400,4:OUT &100,39:FOR p=0 TO 10:NEXT p:OUT &400,4:OUT &100,38:FOR p=1 TO 8:NEXT:NEXT

Change the &400 to &bc00 and the &100 to &bd00 and it'll work with amsdos.
Title: Re: Tape loading
Post by: AMSDOS on 00:02, 31 May 14
Quote from: arnoldemu on 14:04, 30 May 14
Change the &400 to &bc00 and the &100 to &bd00 and it'll work with amsdos.


Hmm okay, so should I avoid using &400 and &100? To be honest I'm not sure I check those statements out on a 6128 and it is an early 464 program. ??? 


&BC00 and &BD00 are generally wider accepted when using OUT aren't they.  :-[
Title: Re: Tape loading
Post by: ralferoo on 08:03, 31 May 14
Quote from: AMSDOS on 13:01, 30 May 14
My question is, Is there a preferred rate I should be recording the sound at, or is recording using PCs, Soundcards, Emulation bad? Just seems that if someone has gone to the trouble of writing CPCTapeXP then it should be possible to take a WAV recording and construct to a CDT. Can someone advise what's happened to my CDT file by listening to it?

EDIT: The problem I should point out is some blocks get picked up and others are being missed. I tried this CDT file I've attached in Winape and worked, even though the tempo for it sounded too fast for Speed Write 0, but seemed to get worse the higher the Baud Rate increased.

I have this, and I think it's partially a problem with the CDT format originally being the Speccy TZX format. All the timings are based on 3.5MHz, so finding something that divides accurately to 44100Hz is tricky. From the docs, "direct recording" has this warning that seems to apply to all modes:
Quote
The preferred sampling frequencies are 22050 or 44100 Hz (158 or 79 T-states/sample). Please, if you can, don't use other sampling frequencies.

For me, with an MP3 tape adapter plugged into my PC and the "tape" in the 464, SPEED WRITE 1 works about 90% of the time, but randomly not all the time. SPEED WRITE 0 works about 99% of the time, but not EVERY time! I also thought that the real SPEED WRITE 0 sounds "broken" even though it usually loads OK.

For breaking baud, I made all the timings multiples of 79 T-states (in 3.5MHz terms) to give myself the best chance of being able to record it to tape.

Also for the original loader part, instead of 1000 baud SPEED WRITE 0, I used 15*79 and 30*79 T-states for 0/1 lengths, so average 984.5 baud (3500000/79/45) which sounds much "nicer to the ear" than what 2cdt produced for me at 1000 baud.

If you want to try to generate a CDT from code, check out the python code in breaking baud: https://github.com/ralferoo/breaking-baud/blob/master/cdt.py (https://github.com/ralferoo/breaking-baud/blob/master/cdt.py) and if you just want to modify your existing CDT file as saved by an emulator, I'd recommend reading the TZX format spec (TZX technical specifications (http://www.worldofspectrum.org/TZXformat.html)) and then hex editing each recording block to change the zero and one and pilot tone lengths to be closer to multiples of 79 T-states, and ensuring that the one length is exactly double the zero length rather that being slightly off...

You might also find your sound card is actually natively 48000Hz, so there might be additional timing loss from the CDT to 44100Hz WAV and then from that to 48000Hz playback.
Title: Re: Tape loading
Post by: ralferoo on 08:15, 31 May 14
BTW from the breaking baud source, the following is close to what you need:

import cdt
...
def loader(self,name,display,addr=0x8000,exaddr=0x8000):     
  i = open(name,"rb")     
  s = i.read()     
  i.close()     
  self.cdt.pause(250).cpcfile(display,2,s,addr,exaddr)     
  return self
...
cdt=cdtfile(93) # 93 is not used for AMSDOS files, it's for the breaking baud load system
cdt.loader(name,"BREAKING BAUD",0x8000,0x8000)
cdt.write(dst)


You'd want to change the type from 2 to whatever BASIC is (I think it's 1, but it's been a long time so I probably forgot!
Powered by SMFPacks Menu Editor Mod