Another C1P build

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

Re: Another C1P build

Post by davisgw »

I had two more tapes to transfer and also used Audacity to record them to my PC. On the third tape I got this response when executing the script:

c:\Temp>kcs_decode.py input.wav > output.txt
Traceback (most recent call last):
File "C:\Temp\kcs_decode.py", line 107, in <module>
sys.stdout.write(line.decode('latin-1'))
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeEncodeError: 'charmap' codec can't encode characters in position 9-11: character maps to <undefined>


This indicates a binary .WAV file. The solution is in the Read.me file as:
kcs_decode.py input.wav -b > output.txt
I hope this helps. Thanks again Mark.
davisgw
Posts: 204
Joined: Sat Aug 27, 2022 4:52 pm

Re: Another C1P build

Post by davisgw »

The two tapes I am trying to transfer are Slot Machine and Labrynth, both supposed to be for 8K C1p. But I cannot get Labrynth to load (I think it is a object code file) and Slot Machine loads as a BASIC file but gets errors at run time, including "out of range" for some POKE statements. I'm attaching the files here to see if anyone can explain the issues. Thanks in advance.
Attachments
Games.zip
(125.96 MiB) Downloaded 3 times
bxdanny
Posts: 460
Joined: Thu Apr 16, 2015 2:27 pm
Location: Bronx, NY USA

Re: Another C1P build

Post by bxdanny »

I don't know what format the Labyrinth game is supposed to be in, but the Slot Machine game works for me (although I'm not very impressed with it). What errors are you getting, and when? Are you starting with an empty workspace before loading the game?
bxdanny
Posts: 460
Joined: Thu Apr 16, 2015 2:27 pm
Location: Bronx, NY USA

Re: Another C1P build

Post by bxdanny »

OK, I found the problem with the slotmachine.txt program. In line 120, the E in the word STEP has bit 7 set, so it is actually $C5 instead of $45. You should NOT load the program with my Editor enabled, since I filter out characters with the high bit set, resulting in the line containing STP instead of STEP.

(Or, if you do have the Editor enabled, just use it to insert the missing E into STEP in line 120. You could also use it to change NBER to NUMBER in line 65.)
davisgw
Posts: 204
Joined: Sat Aug 27, 2022 4:52 pm

Re: Another C1P build

Post by davisgw »

I tried loading the slot machine program to edit the "E" in statement 120 but could not get it all loaded. So I assumed that BASIC is too slow to token each line, and added 90 ms/char and 300 ms/line to the transmit timing from TerraTerm and was able to load, edit, and run the program. Apparently 300 baud from a PC is not the same line timing as from a cassette. I will try a character delay for Labrynth and post it here if it works. Thanks bxdanny.
bxdanny
Posts: 460
Joined: Thu Apr 16, 2015 2:27 pm
Location: Bronx, NY USA

Re: Another C1P build

Post by bxdanny »

The timing problem may be because the slotmachine.txt file does not contain the NUL characters between lines that a SAVE from a real 600 board would generate. So I have created a slotmachine.bas file that includes them (and fixes that "E" as well). Also a clean, 8-bit mono .wav version of that file. Both are in the attached .zip file.
Attachments
slotmachine.zip
(131.12 KiB) Downloaded 1 time
Post Reply