Another C1P build

davisgw
Posts: 204
Joined: Sat Aug 27, 2022 4:52 pm

Re: Another C1P build

Post by davisgw »

Hi all,
I would like suggestions for ways to transfer old OSI cassette software to my C1p....without a player. Here's what I've tried so far to transfer a tape of Sargon II chess to my C1p (I"m pretty sure it is NOT BASIC):
1) Since my old cassette player no longer works I put the cassette into my only working player, a stereo player in my home stereo system, and captured the output as a .WAV file on my PC, which is wired to capture old vinyl records to mp3 files.
2) Then I tried OSIKCS to convert the .WAV to a .LOD file with the following result, which would not load on the C1p.
osikcs -s -f -c1 sargon.wav sargon.lod
Decoding: 44100 samples/sec, 16 bits 2 channel(s) ~956 seconds. Channel 1:
Input frequency: 2340.70Hz @ 292 bps; Wrote 15002 bytes 2067 framing error(s)
Sample Range:L= -22157 to 22725 R= -22157 to 22726

3) Then I tried playing the .WAV file on my laptop connected to the tape input on the C1p, as described in this discussion by HOWARDB, which also would not load on the C1p.
Is there any way to get the captured .WAV file in a form that will load? Connecting the stereo player directly to the C1p is not an option I am willing to do.
bxdanny
Posts: 460
Joined: Thu Apr 16, 2015 2:27 pm
Location: Bronx, NY USA

Re: Another C1P build

Post by bxdanny »

I remember reading that the Sargon II tape for OSI never loaded correctly. There was some kind of glitch in the mastering, which basically meant that all copies were defective. It was described in one of the OSI-tems newsletters that I posted, but I don't remember which one, and there were quite a few. Eventually, a later issue posted the code that should be in the unreadable portion.

Does it mostly load, but gets errors on one particular section? If so, it is probably that problem with the tape. You could try the same loading technique with a different, known-good tape (if you have one) to verify that. Either technique you described should work, but I guess you could also try running a long audio cable from the tape deck to the C1P. If the output volume of the deck is adjustable, you would probably want it turned up pretty high.
Mark
Posts: 333
Joined: Tue Sep 16, 2008 6:04 am
Location: Madison, WI
Contact:

Re: Another C1P build

Post by Mark »

Could you post the WAV file as-is? (It might be too big though - I'm guessing ~81MB ?).

The numbers you see in OSIKCS look good as far as samples & range
davisgw
Posts: 204
Joined: Sat Aug 27, 2022 4:52 pm

Re: Another C1P build

Post by davisgw »

The loading never started with either of the ways I tried with two of my systems which leads me to think that maybe the signal level is too low. However I'm encouraged by comments from bxdanny and mark. I do have a cassette of WP6502 that I remember loading before I got the floppy version. I will try that when time permits.
As requested here are the .WAV and .LOD files compressed in a zip.
Attachments
Sargon.zip
(127.29 MiB) Downloaded 29 times
Mark
Posts: 333
Joined: Tue Sep 16, 2008 6:04 am
Location: Madison, WI
Contact:

Re: Another C1P build

Post by Mark »

Thanks for posting the audio.

The leader sounds good, but when the actual data arrives, it sounds like the tape head alignment is not quite centered or there is an automatic gain control that cuts in & reduces volume? Or it's a microphone capture of the original?
Anyway the audio levels are about half of what they could be, but too low for OSIKCS... it really likes things with a large swing from the zero crossing just below the point were there is a lot of clipping.
It's strange that the 1200Hz signal is so much lower in volume than the 2400Hz signal.

Audacity is a good program to use to view & manipulate the audio, but the signal levels are a bit too low to process for OSIKCS.
Audacity
Audacity
sargon.jpg (153.7 KiB) Viewed 6019 times
See if you can get a sample with more amplitude.
Good Luck
davisgw
Posts: 204
Joined: Sat Aug 27, 2022 4:52 pm

Re: Another C1P build

Post by davisgw »

I made 2 more tries with both WP6502 and Sargon, the first time with the capture at about double the level of my previous attempt. OSIKCS was happy converting both to .LOD files. Both files began loading but the wp6502 failed most of the way through with a "load error" message (after posting a PLEASE WAIT 133 SECONDS message), and the sargon began loading and posted "checksum error" about halfway through. Then I maxed out the levels during the .WAV capture and got the same result.
So I'm happy that loading starts but I'm giving it up as a learning experience. I'm pretty sure that the Sargon tape was bad as new and the Wp6502 tape is degraded with time. I'm posting the files here. Thanks for everyone's suggestions.
Attachments
Sargon.zip
(157.19 MiB) Downloaded 25 times
wp6502.zip
(60.76 MiB) Downloaded 21 times
Mark
Posts: 333
Joined: Tue Sep 16, 2008 6:04 am
Location: Madison, WI
Contact:

Re: Another C1P build

Post by Mark »

Thanks for posting the audio files. They were very clean.

I ran OSIKCS with the -x flag which generates an exhaustive amount of debug information. From there I was able to identify the locations that generated the framing errors. Each decoded character is shown along with the offset in the wav file and the decode bit sequence (in reverse order the way they were clocked in). The decoded bits with the run-ons were obvious, and I usually just had to add or remove an extra '1' bit in the sequence to get the start & stop bits to align. Since the character set was limited to uppercase hexadecimal and for the most part was wrapped in a checksum, it made the identification of the corrections pretty easy.

Long story short, I was able to recover a working copy of the file, which is attached below. There was one error on checksum line 1F50 that I was unsure about, but since the line had a checksum I would know when I got it right. I looked at the source in the debugger, and then found a github Vic 20 version of Sargon II that had source and searched until I found similar code - and discovered the unknown byte was a '0'. When I put that in the checksum line , it was correct!

Included is the decoded 'lod' file and a generated WAV file with checksum loader & program. Oh, it looks like it needs at least 16K to run.
Sargon II screenshot
Sargon II screenshot
sargonII.jpg (7.5 KiB) Viewed 4679 times
Anyone have OSI specific instructions? I seem to recall seeing them somewhere.... The other platform's instructions seem to apply.

I've also included a bit of the log file & the procedure I used to correct the damage. Its pretty esoteric and not obvious why the bit order looks wrong, but someone might be interested....
Attachments
how to debug kcs.txt
Note on correcting KCS errors
(2.13 KiB) Downloaded 24 times
SargonII-OSI-C1P.zip
OSI C1P Sargon II version
(403.76 KiB) Downloaded 29 times
davisgw
Posts: 204
Joined: Sat Aug 27, 2022 4:52 pm

Re: Another C1P build

Post by davisgw »

Mark,
If nobody has said this before, you are a tenacious magician and Rock Star!!! Seeing the screen shot you posted reminds me that this cassette actually used to load when it was new back around 1980. I'm sure there are chess players in this community that will load it and enjoy....
Thanks so much for taking the time to analyze the failures.
davisgw
Posts: 204
Joined: Sat Aug 27, 2022 4:52 pm

Re: Another C1P build

Post by davisgw »

I was able to load the Sargon chess program that Mark fixed. Below is the original owners guide and a picture of my screen (in 48x12 mode) after the program loads. You need to be patient....it loads a checksum verification program and eventually starts up SargonII. Enjoy.
Attachments
SargonIIdocs.zip
(3.88 MiB) Downloaded 27 times
Mark
Posts: 333
Joined: Tue Sep 16, 2008 6:04 am
Location: Madison, WI
Contact:

Re: Another C1P build

Post by Mark »

Thanks for the kind words!

The WP6502 WAV file looked good. There are two complete copies of the program in your WAV file, the 2nd one had fewer drop-outs.
There were a few glitches decoding it with OSIKCS (it really needs a phase lock loop) & I was going to try to work through the errors, but then I cheated & ran it through real hardware which had no trouble decoding the data.

I captured the serial data, then separated the loader from the program (mostly to add a short delay between the loader and the data), generated a WAV file from the parts using OSIKCS & archived it below.
WP6502 Loading Screenshot (sped up)
WP6502 Loading Screenshot (sped up)
WP6502-C1P.gif (12.84 KiB) Viewed 2957 times
Not sure what version this is, but it seems complete!
Attachments
WP6502-C1P.zip
WAV file & decoded "lod" file
(69.52 KiB) Downloaded 23 times
Post Reply