But then i have this behavior :
- If i use c: patch (cassette SIO) then CLOAD, everything is OK, the BASIC program is loaded and complete.
- If i don't use c: patch (cassette SIO) then CLOAD, the sound is distorded and/or the loading fails with an error.
Do you know why ?
It looks like there is just enough timing jitter that the decoder misses a bit when the XL/XE OS sets up the transfer. The timing is slightly different with acceleration and so it decodes correctly. I'll have to see if I can tweak the decoder.
Second question : Is it possible to do a working CSAVE with Altirra ?
I've tried but the virtual tape remains empty.
You need to activate the Record button in Tape Control, just like on a real tape recorder. Failing to do this will result in the computer trying to record but nothing getting recorded; this is the same as on real hardware, since the computer cannot tell if Play or Record is pressed on the tape deck.
PS : The help file seems...empty (Altirra.chm). I can open it, i have the index but no content at all (Vista and 8.1 both 64bits).
As Mclaneinc noted, you cannot view HTML Help files that have the "mark of the Internet" on them indicating that the came from a network zone. Blame Microsoft for the lame error message that appears. If you open the help file from Altirra's Help menu, Altirra will attempt to detect this and remove the mark.
However, there is another case that will cause this, which is attempting to view the HTML Help file from a network share. This will also be blocked by HTML Help, and since it is by location, you can't unblock it except by moving the file or changing global HTML Help settings in the Registry.
Then i loaded the blank virtual tape in Altirra, and i tried to csave the basic program. And indeed you can hear the "real" saving noise. If you go to File/Casette/Tape Control while "Csaving", you will also see the cursor moving forward, but there is no waveform inside: It remains empty.
"Rewind" the virtual tape or Cold reset to basic, CLOAD and...It fails with an error 143.
That's why I also tried to record the audio directly from Altirra (Record/Audio) but the record is not usable (And B.T.W recorded in both stereo L/R channels while it should not).
This happened because the tape deck was in Play mode. The computer has control over the motor, so the tape will begin moving, but nothing will be recorded because it is in Play mode instead of Record. Again, the computer can't tell if Play or Record is actually pressed on the tape deck.
Record/Audio is for recording the computer's audio output, not the tape output. This always records stereo in case you have an add-on that has stereo output, but the base computer only produces mono and that's why the channels were the same. Needless to say, this is not meant for recording tape. You also cannot record a tape this way even on a real computer, by the way. It sounds the same, but it's not. The audio output has discontinuous phase as well as an unwanted carrier added on top. Attempting to decode this audio as a tape may sort of work at standard rates (600 baud) but the error rate will be high.
To editorialize a little; I think it is high time the OS keyed off an embedded 'magic number' or perhaps read a file's type identification from one of its NTFS 'Alternate Stream' forks instead of the arbitrary and easily corrupted filename extension. I mean, RISCOS was doing this back in the late 1980's and was the first of many disappointments I encountered when moving to the PC ecosystem from the ARM machines. In fact doesn't the Apple operating system use resource forks to identify the file type?
Classic MacOS required resource forks, but file handling is mostly standard on OS X. Both Mac resource forks and NTFS alternate data streams suffer from the same problem: there are a lot of systems, network protocols, and programs that won't handle them. Single byte streams tagged with a name, however, are nearly universal. There is such a modern tagging system in common use, but it's more common in network protocols than in files: MIME file types. And even that people frequently get wrong.