On the seasonal occasion, a small demo for any 40-columns PET – inspired by a popular cross-stitch pattern. Prepared in PETSCII graphics and mos6502 instructions by yours truly.
(Users are kindly requested to imagine that trademark “eerie 1950s flying saucer sound effect”, which I find quite difficult to replicate on the PET’s “CB2” sound.)
Nasty details: The PET doesn’t have any sound generator, at all. But there is a serial-shift register of the 6522 VIA, which is connected to port “CB2”, which is in turn accessible via the user port. This shift-register can be set into “free running mode” (by the port A control register “ACR”). In this mode, the register will rotate and shift out a bit to the port, every time a certain counter runs low and resets. This way, if you hook up a speaker to that port (later “CRTC” PETs came with a small piezo speaker connected internally in the same way), you get 1-bit sound, sampling at 1MHz.
The down-side of this is that you can generate sound just in a certain frquency range and that changing the contents of the shift-register results in an audible pulse, as does setting the counter. Thus, I fail to produce any fluttering or shifting sounds. (I guess, you could “race the register” for a seamless continuation?)
Bonus content, the famous “how to produce sound effects” screen with instructions for hooking up a speaker, from the “Space Invaders” game (in pseudo matrix printer hard-copy ):
PS: This is also a simple way to determine, whether your PET (there’s quite a variety) has a CRTC video chip or discrete video logic: if it has a built-in piezo speaker and beeps at startup, it probably has a CRTC chip.