My Klyball 600D build

Post Reply
bxdanny
Posts: 342
Joined: Thu Apr 16, 2015 2:27 pm
Location: Bronx, NY USA

Re: My Klyball 600D build

Post by bxdanny »

ronin,

So were you able to load anything? Either way, you could also check the output side of your interface by capturing its output on the PC (AUX to line in is probably best) and using the OSIKCS program to see if it can be decoded back into text. And if not, posting it here to see if anyone can find the problem with it.
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)
ronin47
Posts: 145
Joined: Thu Dec 14, 2023 2:17 pm

Re: My Klyball 600D build

Post by ronin47 »

bxdanny wrote: Sat Apr 27, 2024 11:48 am ronin,

So were you able to load anything? Either way, you could also check the output side of your interface by capturing its output on the PC (AUX to line in is probably best) and using the OSIKCS program to see if it can be decoded back into text. And if not, posting it here to see if anyone can find the problem with it.
Hey there.

I've not had the chance yet due to other things getting in the way, but I'm hoping to get the opportunity tomorrow afternoon. I'll report back as soon as I've tried, but I have downloaded some things to try from Mark's site including OSIKCS, and I like the idea of capturing on PC to see if it's working as expected.
ronin47
Posts: 145
Joined: Thu Dec 14, 2023 2:17 pm

Re: My Klyball 600D build

Post by ronin47 »

OK, so I did some testing and there are 2 outcomes.

Firstly saving. I have included a number of files, different variations of saving the following small program:

10 PRINT "U";
20 GOTO 10

I took the procedure from the build manual and once I had typed in the above I did the following:

Typed SAVE and hit return.
Typed NULL8 and hit return.

Typed LIST and once recording was running (Taken from AUX into a laptop running Audacity) I hit return.

Where I used NULL 8 the filenames include _w_NULL8 and where I didn't type NULL8 the filenames include _wo_NULL8.

The other files were from before I started doing the above, so may be with, may be without.

I ran them through OSIKCS to see what they looked like, and it was garbled, unlike MonsterMazeC1 which came back good and I've included for reference.

Trying to load MonsterMazeC1.wav failed with garbage on screen.

I'm assuming that as it loads in I should see the lines of basic appear on screen?

I guess I could try adjusting R57 now I have known good files to see if things improve. It may be related to the levels for playback too, so I need to play some more, but trying to relax before work again tomorrow as it's been a long tiring weekend, so will likely leave it until in the week now.
Attachments
osikcs.zip
(3.99 MiB) Downloaded 25 times
Mark
Posts: 301
Joined: Tue Sep 16, 2008 6:04 am
Location: Madison, WI
Contact:

Re: My Klyball 600D build

Post by Mark »

When using the cassette I/O with the OSI, the volume level for playback on the tape recorder needed to be at 80-90% or "very loud". Not sure what this level was in volts, but it was enough to drive an 8 Ohm speaker directly with pretty decent volume.

I listened to your recordings, and I think they started out OK, but after 2 seconds or so maybe an AGC kicked in, limiting recording levels?

If you look at the waveform for print_u_w_NULLS it starts out OK, but after 2 seconds the amplitude decreases by maybe 50%?
print_u_w_NULL8
print_u_w_NULL8
print_u_w_NULL8.jpg (175.33 KiB) Viewed 82 times
OSIKCS decoder is rather simple and needs high amplitude waveforms without too much noise. If you run it through Audacity, use the lowpass filter function set to 2400hz with 48dB/octave roll-off. I need to add this to OSIKCS internally someday.

Whenever I ran mic-out to speaker-in on the OSI, I used a tape recorder in record mode using it as an amplifier (speaker out connected to OSI, mic in from OSI), or one of those Radio Shack LM386 based utility speakers. Nice thing about Radio Shack devices is they came with schematics....
I've run headphone out from a laptop to the OSI cassette port without issues, so playing back MonsterMazeC1.wav should work. As far as adjusting the input timing resistor on my KCS decoder circuit, I think I just did it by playing back a tape and finding the center of where it read without error as I didn't have a scope handy.

I've changed the default encoded WAV frequency in OSIKCS from 22050 to 21600 so the generated waveforms are exactly 2400/1200hz 300baud as there is no reason the playback has to be "Soundblaster compatible" anymore, correcting a 2% faster output in older versions.
OSIKCS_v1.3.zip
OSIKCS 21600
(104.71 KiB) Downloaded 28 times
Good Luck!
-Mark
bxdanny
Posts: 342
Joined: Thu Apr 16, 2015 2:27 pm
Location: Bronx, NY USA

Re: My Klyball 600D build

Post by bxdanny »

ronin,

I' agree with what Mark said, but I'd also note that there is a big difference in levels between the "0" bits (1200 Hz tones) and the "1" bits (2400 Hz tones) in the files that you posted, and I'm wondering about that. Look at this example:
w_o-NULL8.png
w_o-NULL8.png (96.52 KiB) Viewed 80 times
When there are two one-bits in a row, the amplitude of the 2400 Hz tones becomes even smaller. I think the amplitudes of the two tones should be about equal. I also see a strong 2400-Hz harmonic creeping into the 1200-Hz zero-bit tones. I'm not sure if that is a problem, or if it is normal.

Anyway, even with those problems, the print_u_wo_NULL8 file was decoded partially correctly by OSIKCS. It got the GOxx10 right (where the xx should have been TO, or 54 4F hex, but instead came out as B5 28 hex). [Well, if you really included a space between GOTO and 10, then it missed a character, but still not too far off.] It also got the next 26 characters right: carriage return, 10 nulls, linefeed, OK, carriage return, 10 nulls, linefeed. [There is certainly no need to add nulls, since 10 nulls are automatically added after each carriage return by the output-to-tape routine in ROM. When you added more with the NULL 8 command, you were actually creating a total of 18 nulls after each line: the built-in 10 between the carriage return and linefeed, plus 8 more after the linefeed.]

BTW, the Monster Maze program needs to be loaded from the Monitor program (<Break>ML), not from BASIC. And the C1 version on Mark's site does not actually use the keys that are documented. I believe he took it from a diskette that I sent to him back in 2005, and the copy on that disk is one I had been playing around with, changing the keystrokes that it was looking for, just to prove to myself that I understood what was going on there. I am attaching a .wav file that will load a corrected copy. [It uses the checksum loader format; the loader itself is taken from the Extended Monitor tape image. As I remember, the original Monster Maze tape used that format; the actual loader may or may not have been the same one.]

Edit: In the corrected Monster Maze program, I recommend using Q and A for up and down, and 0 and hyphen for left and right. [The documentation that came with the tape said V and B for left and right.] Since all keyboard rows are activated, any key in the correct column of the keyboard matrix will actually work for the direction keys.] In the version on Mark's site, you could use 3 and A for up and down, and 5 and 7 for left and right.
Attachments
MonMazC1.zip
(203.28 KiB) Downloaded 24 times
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)
ronin47
Posts: 145
Joined: Thu Dec 14, 2023 2:17 pm

Re: My Klyball 600D build

Post by ronin47 »

@mark @bxdanny

Thanks both for the input there. I will try the version of OSIKCS you've posted @ Mark, thanks.

In terms of the waveform I measured using my scope and it came out about 550 uS which is fine according to the service manual, it states between 500 and 640 uS and I'm at about 550 uS.

Can I ask, is the NULL8 command needed for saving? I'm curious as the manual says to do so, but doesn't go into why.

What's interesting is that the file print_u_wo_NULL8 id partially decode, so didn't use NULL8 hence why I was wondering what difference it made.

As far as the drop in volume, I'd noticed that too, it was a bit odd. I did pick up the save from AUX rather than MIC, so I wondered if it was too loud and that caused the laptop to kick in protection, however the same happens when I save using MIC.

Playback was at about 80-90% volume, but again that may vary depending on the playback device.

I'll try some of the suggestions you've both made as soon as I can and will update here.

EDIT: I have a small digital recorder and it doesn't suffer the same volume drop as when recording with Audacity, so it's doing something to limit it, either that or the sound card driver is. Also, I just re-read and noted the NULL8 part you mentioned @bxdanny so I will avoid in future.

I also tried recording from the digital recorder to Audacity and it bails at the same point, despite the audio playback from the recorder not having a drop. I will try reducing the recording level on audacity and see if it helps. (It didn't BTW)
ronin47
Posts: 145
Joined: Thu Dec 14, 2023 2:17 pm

Re: My Klyball 600D build

Post by ronin47 »

OK, so the volume drop is definitely the laptop and not the OSI.

I plugged into a set of speakers and there is no drop at all, just like with the digital recorder. I need to figure that out next.

BTW, how do I initiate a load from the Monitor. I've had a Google but not figured it out yet, thanks.
bxdanny
Posts: 342
Joined: Thu Apr 16, 2015 2:27 pm
Location: Bronx, NY USA

Re: My Klyball 600D build

Post by bxdanny »

To load from the Monitor, just type M to enter the Monitor, followed by L. That's it.

P.S. I still think the saving problem is likely due to the level of the 1-bits (2400 Hz tones) being much lower than that of the 0-bits (1200 Hz tones). Check that the value of C13 is correct (0.01 uF). I know you have had incorrect capacitor values in other places.
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)
ronin47
Posts: 145
Joined: Thu Dec 14, 2023 2:17 pm

Re: My Klyball 600D build

Post by ronin47 »

bxdanny wrote: Mon Apr 29, 2024 1:18 pm To load from the Monitor, just type M to enter the Monitor, followed by L. That's it.

P.S. I still think the saving problem is likely due to the level of the 1-bits (2400 Hz tones) being much lower than that of the 0-bits (1200 Hz tones). Check that the value of C13 is correct (0.01 uF). I know you have had incorrect capacitor values in other places.
Cool, thanks I will give that a go. I have already checked C13 for the correct value, but it never hurts to revisit :)
Mark
Posts: 301
Joined: Tue Sep 16, 2008 6:04 am
Location: Madison, WI
Contact:

Re: My Klyball 600D build

Post by Mark »

NULL8 isn't required for saving, in fact OSI defaults to 10 NULLS between <CR> & <LF>, and the NULL command appends even more after <LF>

After entering or loading your BASIC file, to save to cassette, all you do is type "SAVE", then "LIST". This causes the OSI to output the listing to tape and print "OK" at the end (which generates a syntax error when the data is reloaded). To get out of SAVE mode you have to type "LOAD" and then hit the space bar to exit load mode. BASIC takes care of automatically writing 10 NULLS between <CR> and <LF> at the end of every line, perhaps to give the BASIC tokenizer a few ms to process the input buffer? The BASIC loading process goes through the same routine as entering data from the keyboard, which can cause a couple problems. For instance you can enter lines using ? instead of "PRINT" which can make lines longer than you can load when SAVED to tape, and BASIC will insert a newline if the BASIC statement is longer then 71 chars, breaking loading.

There are a few tips and tricks in Aardvarks First Book of OSI
Such as enter POKE517,0 to turn off SAVE mode without having to do the LOAD <spacebar> thing.

You've seen how to load machine code programs via the monitor <RESET>ML, however OSI provided no way to generate these files. The Aardvark manual has a BASIC program to do this, you can do it with on your PC with OSIALod I used to use a ROMed assembler program to do this on my OSI. I can dig it up if there is any interest.

-Mark
Post Reply