Tape Loading Inconsistency Trouble

Discussions about Sinclair ZX80 and ZX81 Hardware
Post Reply
bwinkel67
Posts: 83
Joined: Mon Mar 23, 2020 2:38 am

Tape Loading Inconsistency Trouble

Post by bwinkel67 »

So I've used the EightyOne emulator (version 1.16) to create a bunch of WAV files to use with my actual TS1000. I've done it both in ZX81 and TS1000 mode. I max the volume of my earphone jack and then put Windows Media Player at 85% and I always get the program to load with no problem. But I just tried the program below and have been unable to do so. The .p file loads in fine into the EightyOne emulator (in either ZX81 or TS1000 configuration) and I've generated the WAV file from either one but neither will load. I've tried it at 100%, 92%, 85%, 75%, 65% and 50% volume and every time I get the K cursor. Any idea why all but this program loads fine? Nothing else has changed. Successful programs have been as small as 2K and as large as the full 16K.

Code: Select all

10 REM MADN
15 REM (C) 1981-87 BODO WENZEL
16 REM UPDATE: 2020 MIKE JONAS
20 CLS
22 PRINT TAB 3;"MENSCH AERGERE DICH NICHT";AT 20,0;"WIEVIELE SPIELER (1-4)?"
23 INPUT SP
24 PRINT AT 20,0;"STEHEN ZU...           "
25 DIM S(4,4)
26 DIM T(4,4)
30 REM ANFANG
40 PRINT AT 14,0
41 DIM P(4)
50 FOR J=1 TO SP
51 GOSUB 1300
52 LET P(J)=W
53 NEXT J
60 LET J=0
61 LET K=J
70 FOR I=1 TO SP
71 IF P(I)=K THEN GOTO 30
80 IF P(I)>K THEN LET J=I
81 IF P(I)>K THEN LET K=P(I)
85 FOR N=1 TO 4
86 LET S(I,N)=1
87 NEXT N
90 NEXT I
91 FOR Z=0 TO 99
92 NEXT Z
93 GOSUB 1000
95 PRINT AT 14,0
96 FOR L=1 TO SP
97 PRINT "                  "
98 NEXT L
100 REM SCHLEIFE
110 LET Z=3
120 IF S(J,1)>48 THEN GOTO 180
130 GOSUB 1200
131 FOR K=1 TO 4
132 LET PO=S(J,K)
133 IF PO>0 AND PO<40+4*J+K+16*(J=1) THEN LET Z=1
134 REM \F5\C117,0;"J=";J;" K=";K;" PO=";PO;
135 GOSUB 400
136 REM \F5" ADD=";PO;" Z=";Z;"  ";\C120,0
137 IF PO<>S(J,K) THEN GOTO 140
138 NEXT K
139 GOTO 170
140 LET Z=1
141 IF J=1 THEN GOTO 200
150 PRINT "WELCHER STEIN (1-4)?"
151 INPUT K
160 LET PO=S(J,K)
161 GOSUB 400
162 PRINT AT 21,0;"                    "
163 GOSUB 500
170 LET Z=Z-1
171 IF W=6 OR Z>0 THEN GOTO 120
180 LET J=J*(J<SP)+1
181 GOTO 100
200 REM COMP
210 PRINT "ACHTUNG"
220 FOR K=1 TO 4
221 LET PO=S(J,K)
222 LET P(K)=K
223 GOSUB 700
230 LET P(K)=P(K)-PR
231 GOSUB 400
232 GOSUB 700
240 LET P(K)=P(K)+PR
241 IF PO=S(J,K) THEN LET P(K)=-30
250 NEXT K
300 REM ZUG
310 LET K=1
311 FOR I=2 TO 4
312 IF P(I)>=P(K) THEN LET K=I
320 NEXT I
321 GOTO 160
400 REM ADD
410 IF PO<>0 THEN GOTO 430
420 LET PO=(12*J-11)*(W=6)
421 GOTO 470
430 LET PO=PO+W
431 IF J<>1 AND S(J,K)<49 AND PO>48 THEN LET PO=PO-48
440 IF PO<12*J-12+48*(J=1) THEN GOTO 470
441 REM VOR HAUS
450 IF S(J,K)<12*J-12+48*(J=1) THEN LET PO=PO-J*8+53-32*(J=1)
451 REM IN HAUS
460 IF PO>J*4+44+16*(J=1) THEN LET PO=S(J,K)
470 FOR I=1 TO 4
471 IF PO=S(J,I) AND I<>K THEN LET PO=S(J,K)
472 REM SELBSTSCHLAG
480 NEXT I
481 RETURN
500 REM KO
510 LET T(J,K)=PO
511 FOR I=1 TO SP
512 FOR K=1 TO 4
513 IF I<>J AND PO=S(I,K) THEN LET T(I,K)=0
520 NEXT K
521 NEXT I
550 REM SORT
560 FOR I=1 TO 3
561 FOR K=I TO 4
562 IF T(J,K)>=T(J,I) THEN GOTO 570
563 LET PO=T(J,I)
564 LET T(J,I)=T(J,K)
565 LET T(J,K)=PO
570 NEXT K
571 NEXT I
600 REM ENDE
610 FOR I=1 TO SP
611 FOR K=1 TO 4
612 IF T(I,K)<49 THEN RETURN
620 NEXT K
621 NEXT I
622 RUN
700 REM PRIO
710 LET PR=0
720 FOR J=2 TO SP
721 FOR I=1 TO 4
722 IF PO=0 THEN GOTO 800
730 IF S(J,I)=0 OR S(J,I)>48 THEN GOTO 900
740 REM VERFOLGEN
741 IF PO+6<S(J,I) THEN LET PR=PR-2
750 REM UEBERRUNDEN
751 IF PO>S(J,I) THEN LET PR=PR-3
760 REM FLUECHTEN
761 IF PO<S(J,I)+7-48*(S(J,I)>42 AND PO<13) THEN LET PR=PR-6
770 REM SCHLAGEN
771 IF PO=S(J,I) THEN LET PR=PR+30
810 REM VORRAT
811 IF PO=0 AND W=6 THEN LET PR=PR-8
820 REM EIGENER START
821 IF PO<>1 AND S(1,K)=1 THEN LET PR=PR+9
830 REM INS HAUS
831 IF PO>60 THEN LET PR=PR+10
900 REM FREMDER START
901 IF PO<>J*12-11 THEN LET PR=PR+4
910 NEXT I
911 NEXT J
912 LET J=1
913 RETURN
1000 REM BILD
1005 PRINT AT 2,3;"%B%B%B%B    ()()()()%C%C    %C%C%C%C",
1010 PRINT TAB 3;"%B%B%B%B    ()  %C%H  ()    %C%C%C%C",
1015 PRINT TAB 11;"()  %C%H  ()",TAB 11;"()  %C%H  ()"
1020 PRINT TAB 3;"%B%B()()()()  %C%H  ()()()()()",TAB 3;"()";
1025 PRINT TAB 27;"()",TAB 3;"()%B%H%B%H%B%H%B%H      %D%H%D%H%D%H%D%H()",TAB 3;"()";
1030 PRINT TAB 27;"()",TAB 3;"()()()()()  %A%H  ()()()()%D%D"
1035 PRINT TAB 11;"()  %A%H  ()",TAB 11;"()  %A%H  ()",
1040 PRINT TAB 3;"%A%A%A%A    ()  %A%H  ()    %D%D%D%D",
1045 PRINT TAB 3;"%A%A%A%A    %A%A()()()()    %D%D%D%D"
1050 RETURN
1200 REM NEUES BILD
1210 FOR I=1 TO SP
1211 FOR K=1 TO 4
1212 IF S(I,K)=T(I,K) THEN GOTO 1280
1220 LET W=S(I,K)
1221 FOR N=5 TO I*4+K
1222 IF W<>0 AND W=T(INT ((N*100/4-25)/100),N-4*INT ((N*100/4-25)/100)) THEN GOTO 1261
1223 NEXT N
1224 GOSUB 1500
1230 IF W<>0 THEN GOTO 1235
1231 LET N=I
1232 GOTO 1237
1235 FOR N=1 TO 4
1236 IF W<>12*N-11 THEN GOTO 1240
1237 LET P$=CHR$ (165+N)+CHR$ (165+N)
1238 GOTO 1260
1240 NEXT N
1241 IF W<49 THEN GOTO 1250
1242 LET P$=CHR$ (165+I)+"%H"
1243 GOTO 1260
1250 LET P$="()"
1260 PRINT AT PR+2,2*PO+3;P$
1261 LET S(I,K)=T(I,K)
1262 LET W=S(I,K)
1263 GOSUB 1500
1270 PRINT AT PR+2,2*PO+3;CHR$ (37+I);K
1280 NEXT K
1281 NEXT I
1290 PRINT AT 19,0
1300 REM WUERFEL
1310 LET W=INT (RND*6)+1
1320 PRINT "SPIELER ";CHR$ (37+J);", WURF: ";W
1330 RETURN
1550 IF W<>0 THEN GOTO 1560
1551 LET PO=11*(I>2)+(K=2 OR K=4)
1552 LET PR=11*(I=1 OR I=4)+(K>2)
1553 RETURN
1560 IF W>4 THEN GOTO 1570
1561 LET PO=4
1562 LET PR=13-W
1563 RETURN
1570 IF W>8 THEN GOTO 1580
1571 LET PO=9-W
1572 LET PR=8
1573 RETURN
1580 IF W>12 THEN GOTO 1590
1581 LET PO=0
1582 LET PR=17-W
1583 RETURN
1590 IF W>16 THEN GOTO 1600
1591 LET PO=W-13
1592 LET PR=4
1593 RETURN
1600 IF W>20 THEN GOTO 1610
1601 LET PO=4
1602 LET PR=21-W
1603 RETURN
1610 IF W>24 THEN GOTO 1620
1611 LET PO=W-17
1612 LET PR=0
1613 RETURN
1620 IF W>28 THEN GOTO 1630
1621 LET PO=8
1622 LET PR=W-25
1623 RETURN
1630 IF W>32 THEN GOTO 1640
1631 LET PO=W-21
1632 LET PR=4
1633 RETURN
1640 IF W>36 THEN GOTO 1650
1641 LET PO=12
1642 LET PR=W-29
1643 RETURN
1650 IF W>40 THEN GOTO 1660
1651 LET PO=49-W
1652 LET PR=8
1653 RETURN
1660 IF W>44 THEN GOTO 1670
1661 LET PO=8
1662 LET PR=W-33
1663 RETURN
1670 IF W>48 THEN GOTO 1680
1671 LET PO=53-W
1672 LET PR=12
1673 RETURN
1680 IF W>52 THEN GOTO 1690
1681 LET PO=W-48
1682 LET PR=6
1683 RETURN
1690 IF W>56 THEN GOTO 1700
1691 LET PO=6
1692 LET PR=W-52
1693 RETURN
1700 IF W>60 THEN GOTO 1710
1701 LET PO=68-W
1702 LET PR=6
1703 RETURN
1710 LET PO=6
1711 LET PR=72-W
1712 RETURN
Kahenraz
Posts: 25
Joined: Mon Feb 10, 2020 2:06 pm

Re: Tape Loading Inconsistency Trouble

Post by Kahenraz »

My thread may related:

https://www.sinclairzxworld.com/viewtop ... f=7&t=3769

You're going to have a problem with a stereo line-out and the Timex mono input.

That's my guess.

I've ordered some adapters for testing but they're still in the mail.
Aurelbois
Posts: 10
Joined: Wed Jul 10, 2019 7:36 pm

Re: Tape Loading Inconsistency Trouble

Post by Aurelbois »

I used this circuit in the past and it work fine.
Stereo2monocable.pdf
(12.71 KiB) Downloaded 81 times
bwinkel67
Posts: 83
Joined: Mon Mar 23, 2020 2:38 am

Re: Tape Loading Inconsistency Trouble

Post by bwinkel67 »

Hi,

All of my other programs loaded fine so I don't believe it's a cable issue (and I do split the stereo to mono). Only this particular program had problem loading. I just got it to load by using the ZXC.EXE tool to convert the .p file to RAW audio. Can be found on this website and is quite old (from 1999 it seems).

http://www.pictureviewerpro.com/hosting ... erters.htm

Then just had to import it into Audacity (all defaults except for sample rate which was half of the 44100 -- i.e. 22050) to convert it to WAV and it worked.

So there seems to be a bug in the EightyOne emulator, which works fine converter all of my other .p files to readable WAV files. The ZXC.EXE is an old converter and I had to use Windows Virtual PC running XP to get it to work on my 64 bit machine, but it was pretty quick (faster than EightyOne) and the file was a little bigger.
Kahenraz
Posts: 25
Joined: Mon Feb 10, 2020 2:06 pm

Re: Tape Loading Inconsistency Trouble

Post by Kahenraz »

If you had to use Virtual PC, it may be a 16-bit application.
User avatar
mrtinb
Posts: 1317
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: Tape Loading Inconsistency Trouble

Post by mrtinb »

I use the Java Tape Converter, when I convert between P and WAV.
Martin
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
rcmolina
Posts: 15
Joined: Mon Jul 13, 2020 6:52 pm

Re: Tape Loading Inconsistency Trouble

Post by rcmolina »

If you don't use Java, you can try also this opensource util:

https://github.com/mcleod-ideafix/zx81putil
Post Reply