Anyway to test cassette read signals?

Modding and Technical Issues

Moderator: Moderators

Post Reply
mrtuba
Vic 20 Newbie
Posts: 6
Joined: Sat May 21, 2016 4:15 am

Anyway to test cassette read signals?

Post by mrtuba »

Does anyone have any utilities that allow testing of the read signal from a datasette? I had some utility programs for my C64 for azimuth adjustment, something like that would help if it ever existed for the VIC.

I'm trying to get a cassette interface to my FPGA based VIC20 working, but it won't read correctly from either a real C2N or from a Tapuino. I'm trying to work out where the problem may lie. Functionally what I am seeing is something similar to a C2N with a bad azimuth adjustment.

The only success I have had is with a very small basic program that loads correctly maybe 50% of the time.

I know my clock for the 6502 is a little off what it should be for a PAL VIC due to limitations of the PLL I have available, but I would have thought that would not cause an issue as the effect would be the same as with a C2N with a slightly different motor speed.

I'm also having to use a 5v to 3.3v logic level converter on the read signal, but checking with a scope that doesn't seem to be causing a problem. As I understand things the important edges on the read signal are negative going, which are nice a sharp both sides of the converter. The positive going edges seem generally OK too, there is a very slight ramp on them but again nothing I am overly concerned about.

As the signaling looks reasonable on the surface at least, that kind of points to a fault with the VIA. So I was thinking of trying to code something up that could read a sequence of pulses from a hand crafted TAP file played via my Tapuino to validate the operation of the VIA is correct, but I thought I would check if anyone had something like that already.

Alternatively if anyone can suggest a test for the VIA that mimics the operation of the ROM loader that would be good. My VHDL VIA implementation passes all of the VICE tests now, but that is not an exhaustive test and none of those really exercise edge triggered interrupts on CA1 which would be critical for the cassette interface.

Any thoughts or ideas are appreciated.
User avatar
pixel
Vic 20 Scientist
Posts: 1329
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: Anyway to test cassette read signals?

Post by pixel »

Blast(!) a sine wave onto some tape with a regular recorder and check what's getting back in via the C2N. Should be amazingly close to your calculations even with tape wobble.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
groepaz
Vic 20 Scientist
Posts: 1180
Joined: Wed Aug 25, 2010 5:30 pm

Re: Anyway to test cassette read signals?

Post by groepaz »

write some test programs and submit them to the VICE repo! :)

perhaps you can take enthusis "minimal head align" (check csdb) and port it over to the VIC20... at least you should be able to see if something is terribly broken with this
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: Anyway to test cassette read signals?

Post by eslapion »

mrtuba wrote:Any thoughts or ideas are appreciated.
Most Commodore datasettes are equipped with a small looping wire labelled TP or TP1 (test point one) which you can attach to an oscilloscope.

If you don't have a scope, cheap audio vu-meters will do. The datasette is designd to operate on signal frequencies which are within audio equipment range.

Adjust the head until you have the strongest amplitude on the signal coming out of TP.

See schematic here: http://www.zimmers.net/anonftp/pub/cbm/ ... as-15r.gif

and here: http://www.zimmers.net/anonftp/pub/cbm/ ... as-20r.gif

It is shown as a ring connected to pin 9 of IC1-3 here: http://www.zimmers.net/anonftp/pub/cbm/ ... as-17r.gif
Be normal.
Post Reply