fabzzap / audiotap

GNU General Public License v2.0
8 stars 2 forks source link

Hmm there's something wrong... #3

Open Zibri opened 3 years ago

Zibri commented 3 years ago

I don't know exactly what, but your program seems not to produce good TAP files in most cases. But I thought about the problem and wrote a simple program in python to encode a WAV in a TAP. Since I use it for C64 I didn't put many features (like clocks of ntsc version or vice20) but they will be in the next versions. Anyway, a TAP file is just an array of lengths of impulses measure rising edge to the next one (it works also measuring from a positive peak to the next positive peak or the two negatives). If this number obtained as you know by the formula: count/samplerate CLOCK) / 8 exceeds 255 then you have to represent it as a 00 followed by the little endian bytes of count CLOCK.

If you need I can send you a few files and you will see that while the conversion is immediate and working with the "simple" program, it fails and produces not working TAPs using your program with the default parameters. Not sure why but you can inspect my first version of the wav2tap here https://github.com/Zibri/C64/blob/master/wav2tap2.py

ciao.

Zibri commented 3 years ago

oh.. I forgot... check this out: https://github.com/Zibri/C64/blob/master/t2snd6.prg if you run this on a C64 or VICE and record the C64 audio, you can then convert the result to a working TAP file with my wav2tap2.py Tested also with protected games and turbotapes.

fabzzap commented 2 years ago

What's not working? Any examples of non-working conversions? If you think that a WAV is not converted to a working TAP, can you please let me have the WAV so I can see how Audiotap treats it?