C64 Demo Using Audio for Video and Vice Versa

C64 Demo Using Audio for Video and Vice Versa

coolgopher writes:

http://www.quiss.org/signal_carnival/

At Revision 2025, we launched "Signal Carnival" (csdb, YouTube). This demo asks you to change the audio and video cable of your C64:

Image

Technically, "misplugging" these cables isn’t a very new thought. In the 90s, it was a standard factor to attach audio to each speaker and video, to get display screen flickering timed with the music beats.

However, "Signal Carnival" is the primary manufacturing to change each these cables, whereas nonetheless having the ability to play significant audio and video.

How to drive audio utilizing a video sign

The C64’s VIC chip operates at a frequency of seven.9Mhz, and new values will be written to it by the 6502 at a charge of as much as 246kHz. Since even top quality audio not often exceeds 44kHz, that is simply a excessive sufficient frequency to generate music.

Inspired by the music routine from freespin, we mixed two timers to get an fascinating waveform, which is adjusted as soon as per body. This is the code that drives audio:

lda $dc06
ora $dd06
eor $02
sta $d020

Here, $dc06 and $dd06 are the decrease bytes of the B timers of CIA #1 and #2, respectively. They’re in flip elevated each time their A timers overflow. And these are set to a brand new worth for each new notice.

Eor-ing with the worth at zeropage $02 permits to barely tweak the waveform (and quantity!), after which the result’s written to $d020, which is the display screen coloration. Only the brightness of stated coloration issues (chrominance is encoded on the PAL coloration provider frequency, which is exterior of the human listening to vary). There’s no apparent relationship between the brightness of the C64 coloration and its quantity, however that is positive – it truly makes the waveforms extra fascinating.

Of course, the above makes use of up all 4 timers the C64 CIAs have, which implies there are not any timers left for e.g. video stabilization, which is as a substitute performed by way of the lightpen circuitry. (Finally! A use case for $d013. :))

Music is only one voice, however the track switches between voices (and waveforms) typically sufficient to sound mildly polyphonic.


Original Submission

Read extra of this story at SoylentNews.

HI-FI News

by way of SoylentNews https://ift.tt/THvJ1ar

April 24, 2025 at 10:35PM