# Re: about "penny lane.prg" on vic 20

From: Marko Mäkelä <msmakela_at_gmail.com>
Date: Mon, 11 May 2015 08:26:36 +0300
Message-ID: <20150511052636.GA1624@x220>
```On Sun, May 10, 2015 at 09:45:16PM +0200, didier derny wrote:
>Iâ€™ve just compared â€™â€™penny lane.prgâ€™â€™Â  on vice and and on a real vic 20
>
>I found it quite bad, either on vice and on the real vic 20

Anders Carlsson (who is on this list) adapted the tune for one part of
the demo Veni, vidi, Vic that I put together in 1995 and 1996. All the
songs of the demo, except the Popcorn music, used a music player that
was written by Asger Alstrup. The Popcorn music and player were written

Back then, we blamed the badness on the Vic-20, whose sound generators
provide 7-bit dividers. Coming from the C64 where the SID offers 16-bit
multipliers (not dividers) for each channel, we thought that we should
aim for the correct frequency (some A note at 440 Hz). In retrospect,
this was a bad idea. Instead, we should have optimized the divider
values to get the closest possible fit, dividing an octave to 12 parts,
just like it is done in real instruments: f(n)=f0*2^(n/12) where n is an
integer that identifies the note that you want to play. If I remember
correctly, Anders mentioned this on this list some years ago.

I guess that the note table in the Popcorn tune was created using the
formula. I do not remember if it had any frequency adaptation between
PAL (17734472 Hz/16 = 1108404 Hz system clock; 18/16 of the C64 speed!)
and NTSC (14318181 Hz/14 = 1022727 Hz; same as the C64). I am pretty
sure that the tables in Asger Alstrupâ€™s music routine were computed by
the assembler.

>Any chance that several version exists ?
>
>As far as I remember the screen was totally black while playing

I do not remember such a version. But then again, I started the Vic-20
hacking in the 1990s when the C64 had already started going out of
fashion. My first computer was the C64.

Marko

Message was sent through the cbm-hackers mailing list
```