Posted By
C=Owl27 on 2020-11-15 02:04:39
| The Great Plus 4 Music Machine
Hello Plus4world.
I've heard it said that the user manual for the Plus4 was a hard read. And in comparison they referenced the Vic20's manual, with it's little cartoon guy. Growing up with Commodores I found the Plus4's manual to be straightforward. A good read and very explanatory. I did not care for the Vic20's manual and choose not to learn how to program on it. With Basic 3.5 and new graphic commands, I much preferred the Plus4. However there was one program I always regretted never getting to work.
Chapter 8 of the Plus 4's user manual instructs programmers how to use sound and music on a Plus4. The final example program was called: ***The Great Plus 4 Music Machine***
But the manual has some typos. As a child I remembered also encountering the same problem, never getting the program to function properly. It's a small program and a small issue, but it bothered me still. Incredibly, I was skimming through the PDF version I found online, finding something stranger about the same program. The page numbers were different then that of my physical copy. Hmm. So I compared the two and found that this second version does not have the same typos that my physical version does.
https://i.ibb.co/1LPQKMw/Great-Music-Machince-Typo-01.jpg
https://i.ibb.co/8b33KQm/Great-Music-Machince-Typo-02.jpg
It has different typos. The stinking program still did not run. The differences were in lines 35 and 1070. After some tweaking I managed to get it working (finally.) Here is the program in question: (I had to use the lowercase because the emulator doesn't like the uppercase version)
5 gosub 1000 6 forx=1to9: readn(x): next x 8 char 1,8,1,"*the great music machine*": 10 vol7 20 do 30 geta$:ifa$=""then30 35 a=asc(a$):if a<49 or a>57 then 50 36 n=a-48 40 sound 1,n(n),4 45 gshape n$,150,8*(6+(9-n)),4 46 forz=1to50:nextz 47 gshape n$,150,8*(6+(9-n)),4 50 loop until a=32 55 vol 0: graphic 0: scnclr 60 end 100 data 345, 383, 453, 516, 571, 596, 643, 685, 704 1000 graphic 1,1 1010 for y=60 to 124 step 16 1020 draw 1, 100, y to 200, y 1030 next y 1040 a$="fedcbagfe" 1050 for x=l to 9: c=13 1060 if int(x/2)=x/2 then c=14 1069 ifx=0thenx=1 1070 char 1, c, x+6, mid$ (a$, x, 1),0 1075 char 1, c+10, x+6, right$(str$(10-x), 1) 1080 next x 1090 for x=l to 8: fory=11 to 16: draw 1, x, y: next y, x 1100 y=l:x=8: draw 1, 8, 16 to x, y 1110 sshape n$, 1, 1, 8, 16 1120 gshape n$, 1, 1, 4 1130 return
I added line 1069. If x was zero then the program crashed. What's funny is that somebody told Commodore to fix it. (Since there are two printed versions) And they tried fixing it, but didn't. So if anybody is trying to get this program to work, Just add line 1069 from the top to the program.
1069 if x=0 then x=1
|
|
Posted By
MMS on 2020-11-15 04:04:38
| Re: The Great Plus 4 Music Machine
Thanks for the folloup and correction!
BTW I was bugged me, why after the creation of the note the XOR left some trace at the upper left corner (maybe a further bug of the GSHAPE routine? as it looks OK)
So if you REM the 1190 and 1100, and add this, you may get a proper looking note, not to mention that no trace left at the upper corner (I think they "overdone" it a little)
1095 CIRCLE1,5,13,3,2: PAINT1,6,13: DRAW1,8,13TO8,1
|
|
Posted By
Csabo on 2020-11-15 07:22:41
| Re: The Great Plus 4 Music Machine
You don't need to add line 1069.
Looks like the typo was introduced by you actually - it's in line 1050. The scans clearly show that the loop should be from 1 (one) to 9, but your code is from l (lowercase L) to 9. Those two characters, when printed, look very similar. Since that variable is not defined, it has a value of zero, so that's a loop from zero instead of one.
|
|
Posted By
C=Owl27 on 2020-11-15 12:40:15
| Re: The Great Plus 4 Music Machine
Thank you for the clarification. Indeed that does add an extra typo. I looked for the online scan and copied it over. Then I had to convert the uppercase to lowercase so that I could paste it into Vice. (I haven't figured out how to paste into plus4emu) However if you examine the two pictures it is clear the program also comes with it's own typos. I typed these out from the manual several times and always came up with the same errors. If you have the same manual as I do, where the program is on pages 99-100, try typing it out and you can also find the same program not working.
|
|
Posted By
SVS on 2020-11-16 08:02:17
| Re: The Great Plus 4 Music Machine
Unfortunateley there is a lot of typo errors in the Plus4 manual. For example in my copy (v. MP4/09/84) I've found:
Pag. 25: ...on the ESCape key and 0 (number zero instead of letter "O"); Pag. 132: ...any legal numeric variable (on the contrary only FP are allowed for DEF FN) Pag. 152: SSHAPE "A$",0,0 (instead of SSHAPE A$,0,0) idem: GSHAPE "A$",,,1 (instead of GSHAPE A$,,,1)
|
|
Posted By
C=Owl27 on 2020-11-17 00:31:38
| Re: The Great Plus 4 Music Machine
Thinking about it probably bound to happen eventually. Adrian's Digital Basement just released a video where this happened back in 1985, in MAD magazine. That issue was dedicated to the retro 8-bit computers of the time, and they released several versions of the same program. For IBM, Atari, Apple, and the Commodore 64.
https://meatfighter.com/mad/mad1.png https://www.youtube.com/watch?v=2AXEfzRr0II
According to ADB, what they released had some typos and wouldn't run. They had to correct it in the next issue. And the program was very long. Imagine having typed it out, only to realize it didn't work. And then thinking... what did I get wrong?
I wonder if somebody with more know how then I could port it to the Ted Commodores.
|
|
|