BASIC audio files for testing

Sideburn
Posts: 115
Joined: Sat Feb 03, 2024 10:59 pm

BASIC audio files for testing

Post by Sideburn »

Hi all,

Are there any known working BASIC .wav files out there I can use for testing my cassette interface?

I was testing it today and I am able to save to both a computer in digital audio and a true analog cassette tape and the audio seems to come in ok.

But loading is not working yet. I tried several volume levels and adding gain but no luck. I also tried two computers, a modern MacBook with audacity and a USB audio interface and an older powerbook with analog audio inputs and outputs using soundEdit on OS 9.

If someone is willing to test my file that would be helpful to know if my saves are working ok. I have attached a simple one I saved and did not adjust the gain this is what I got raw from the computer and saved at 11Khz.



Thanks for any help.

-Tavis
Attachments
osi_test.zip
(66.52 KiB) Downloaded 33 times
bxdanny
Posts: 336
Joined: Thu Apr 16, 2015 2:27 pm
Location: Bronx, NY USA

Re: BASIC audio files for testing

Post by bxdanny »

That doesn't sound right at all. The file should consist of just two alternating frequencies, 2400 Hz and 1200 Hz.

Download the utility OSIKCS from Mark's site at http://marks-lab.com/osi/software/tools.html to do some testing.
No current OSI hardware
Former programmer for Dwo Quong Fok Lok Sow and Orion Software Associates
Former owner of C1P MF (original version) and C2-8P DF (502-based)
Sideburn
Posts: 115
Joined: Sat Feb 03, 2024 10:59 pm

Re: BASIC audio files for testing

Post by Sideburn »

Thanks I will have a look at OSIKCS.
I noticed theirs capacitors in the audio / cassette interface circuitry as well. Are they known to go bad?
User avatar
jbtech
Posts: 22
Joined: Mon Nov 13, 2023 12:33 am
Location: Australia
Contact:

Re: BASIC audio files for testing

Post by jbtech »

Hi, the audio clip sounds like the baud rate might be set too high for cassette storage. I'm guessing the rate was changed to suit an RS232 connection, printer / terminal / modem of some sort.

There is only one 6850 ACIA on board so to switch between say cassette and printer, apart from switching the Tx and RX data as well as /CTS signals, the baud rate can be changed accordingly.

The baud rate is set by selecting the relevant frequency from the clock dividers to the input pin 2 of U57 which in turn changes the TxCLK frequency sent to the 6850.

The standard rate for the cassette interface is 300 baud, which corresponds to a frequency of 124.8kHz at the input pin 2 of U57. On the Rev. B PCB this would come from the C4 signal at U59 pin 14.

To increase the baud rate from 300 to 1200, or higher (up to 9600 baud) a higher frequency from the clock divider IC 30 can be used. On the Rev. B PCB this would be done by altering the PCB track which connects to U57 pin 2. e.g. 1200 baud would correspond with the C2 signal from U30 pin 12, a frequency of 499.2kHz.

(On the Rev. D PCB the baud rate can be selected between 300 and 1200 by changing a link on connector J3)

So to check the baud rate, if possible measure the frequency at U57 pin 2 or otherwise trace the connection to see which division of the clock freequency is connected to that point.

To use the cassette interface the baud rate would need to be set to the original, 300 baud configuration.

Hope that helps, regards John.
More from John's Retro Workshop http://www.jbtech.linkpc.net
Sideburn
Posts: 115
Joined: Sat Feb 03, 2024 10:59 pm

Re: BASIC audio files for testing

Post by Sideburn »

Thank you.

Yes this makes sense. One considering all the mods done (and he’s got that db25 connector on the psu board) and two, when I save I thought it was going awfully fast. To me it seems like it’s saving at 9600.

I had read a little in the tips and tricks page on Marks page about how you could change the baud rate.

I will have a look today.
I want to get a known good audio file.I assume I can create one with the OSIKCS tool.

The record level was very low. I was having to max it out on the recording device and it was still low. Seems like it needs a pre-amp.

Also, I was wondering if there will be issues when using digital audio as the I/o device. I’ve used a modern computer and sound editor in the past to save / load to a TRS-80 pocket computer and it was very finicky. You had to get the levels, bit depth and sample rate exactly right. I had much better luck with a standard analog audio cassette recorder.
User avatar
jbtech
Posts: 22
Joined: Mon Nov 13, 2023 12:33 am
Location: Australia
Contact:

Re: BASIC audio files for testing

Post by jbtech »

Sideburn wrote: Wed Feb 07, 2024 11:45 am
The record level was very low. I was having to max it out on the recording device and it was still low. Seems like it needs a pre-amp.
There's a low level output on pin7 of J2, to suit the microphone input of portable cassette recorders and a higher aux/line level from pin 9 - so if your cable is connected to pin 7, swapping that to pin 9 should help.
More from John's Retro Workshop http://www.jbtech.linkpc.net
Sideburn
Posts: 115
Joined: Sat Feb 03, 2024 10:59 pm

Re: BASIC audio files for testing

Post by Sideburn »

Ok I was wondering what aux vs mic was. Yea it is on 7.
Attachments
IMG_7540.jpeg
IMG_7540.jpeg (2.39 MiB) Viewed 639 times
bxdanny
Posts: 336
Joined: Thu Apr 16, 2015 2:27 pm
Location: Bronx, NY USA

Re: BASIC audio files for testing

Post by bxdanny »

Aux is a stronger signal, for "line level" inputs. "Mic" is a weaker signal, for the microphone input of a cassette recorder. I think the "Mic" signal has about 10% of the voltage that "Aux" does. But that's what most people used, because many cheap tape recorders had only microphone inputs. And that's what was connected to the audio-out RCA jack on the back of the C1P as it was sold.
No current OSI hardware
Former programmer for Dwo Quong Fok Lok Sow and Orion Software Associates
Former owner of C1P MF (original version) and C2-8P DF (502-based)
Sideburn
Posts: 115
Joined: Sat Feb 03, 2024 10:59 pm

Re: BASIC audio files for testing

Post by Sideburn »

OK I will try them both and see what the levels look like in my digital audio recorder.
I grabbed some files out of the OsiBas.zip here: https://osiweb.org/software.html#BASIC_code and then ran them through OSIKCS to create a .wav and then ran the wav back through it to create a .txt BASIC listing to verify it works so these should be some good .wav audio test files.
Sideburn
Posts: 115
Joined: Sat Feb 03, 2024 10:59 pm

Re: BASIC audio files for testing

Post by Sideburn »

I just had a look at the board and sure enough, the trace is cut at U57 pin 2 and jumping over to U30 pin 11. Is that 600 baud?

And yes it looks like that cut trace is going to U53 pin 6 / U59 pin 14
Attachments
IMG_7553.jpeg
IMG_7553.jpeg (2.72 MiB) Viewed 624 times
IMG_7554.jpeg
IMG_7554.jpeg (3.2 MiB) Viewed 624 times
Post Reply