Hello, After reading C=Hacking 20, "The C64 Digi", by Robin Harbron, www.ffd2.com/fridge/chacking/c=hacking20.txt I started to fool about with 4 bit digi files. Right away I wanted to use some of the files I have in my mp3 collection to spice up the project a little.
I quickly found out that there are few, 4 bit formats available to export to with my favorite audio editor. I decided to provide a simple solution to my problem with VB. A little reading of the wav audio format and I hacked up some simple code to strip the header and lower four bits from 8 bit PCM files. It also rewrites the file in a format that can be loaded directly into C64 ram for playback.
A player in C64 asm is also provided as well as sample wav files and a d64 image with two example digi files ready for play back. As well as the VB source and pre compiled exe.
The conversion utility is entitled 'pack4bit' and is available for download here:
and this is not even scratching the surface of what issue 20 has to offer!
Conversion from pule width to amplitude modulation is actually not really done. I just decimate the lower nybble and then use upper nybble as the sample data. However the results sound quite acceptable for this application, retro 4 bit audio.
note: the file 'pimp.wav' & 'pimp.prg' contain adult language.
So I have to admit that I really fell over when I heard the C64 spill out voice sounds back in the day. It was beach head II that I thought was totally entertaining and was enhanced so much by the voice and sound. My avatar may give an indication of one of my older favorites with digi.
I look forward to the next section in the article for some pulse width fun.
This person has some info about the company that did much of the audio for the games that set the standard for this stuff. here is a link if you would like to have a look:
Post by David Murray on Apr 8, 2008 13:59:40 GMT -5
One thing I never figured out on some of those games like Impossible mission, is how did they have room in RAM to store all of those sound effects and also have room for the game itself. One thing you answered for me.. I didn't realize they might be using 4-bit audio. Heck... now that I think about it, maybe they were using 1-bit audio. That would certainly save some space.