VOGONS


First post, by Shamatic

User metadata
Rank Newbie
Rank
Newbie

First time poster, long time lurker here.

The reason I'm posting here is because I've been working on a project that might spark your interest.

Background: So, on a long night I was looking at some old schematics about a PWM Covox implemented in TTL and an idea struck me that an Atmega328 would totally capable to do the same thing and more. And it seemed to be an easy thing to implement. Since I had some Pro Minis at hand, I started to work on it almost right away (I mean in a few days). Now that easy thing turned me to learn AVR assembly (I had no assembly knowledge before at all) to control as much aspect of the MCU as possible to make this contraption work. I hope you think I succeeded my task.

Here is a photo of the completed device:
file.php?mode=view&id=180595

This thing has a lot going for it:

  • It's the simplest and the cheapest in it's category, only a few parts to build. And also the smallest, as the whole design can fit in an LPT connector housing.
  • Fully working DSS with proper auto-detection support. (Tested in Wolfenstein 3D, Alone in the Dark, Dungeon Master.)
  • Stereo-in-1 mode supporting multiple kinds of signaling modes. (Tested to work with Inertia Player, ModPlay Pro, Dual Module Player, Galaxy Music Player and Crystal Dreams.)
  • Mono Covox plays on both channels.
  • Fully automatic, properly switches to the exact state it needs to be, no matter what garbage others leave on the LPT's control port.
  • MCU code is written in AVR Assembly, uses 266 bytes of flash and 16 bytes of ram (for the DSS fifo buffer) and it's interrupt driven.

Hereby I attach a package of code and instructions if you wish to build it yourself and give it a test run. I would appreciate any feedback if you did.

AVRSnd 0.5b

PS: I know this setup has it's limits in the sound quality department, but I'm already contemplating about porting this code to the STM32 bluepill, which has I2S output, can be programmed on the low level, not to mention being faster. Also (as far as I know) it has enough ports to emulate a dual lpt setup too, so that would be some added bonus too. Sadly my only Bluepill is in my homemade Unamiga clone, so this will have to wait until I order some, and have both the motivation and the time to do the porting. (This can amount to a surpisingly long amount of time, as I'm lazy.)

Edit: Fixed the bug of Modplay and Galaxy Player is playing in reverse

Attachments

Reply 1 of 3, by wbc

User metadata
Rank Member
Rank
Member

sounds very promising, I once built a similar PWM stereo Covox on a EPM3032 CPLD, and it sounded way better than any R-2R based DACs I've tried, and now this one loks like an ultimate and cheap Covox solution! looking forward for the updates, and would be nice to have a PCB schematic to make building easier :)

--wbcbz7

Reply 2 of 3, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Wow, that's cramped! I'll never challenge you at a game of Tetris or Columns! 😁
Seriously though, fine work! Congrats!

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 3 of 3, by CODOR

User metadata
Rank Newbie
Rank
Newbie

Nice! I've been working on something similar on and off (mostly off) for a while now except it lives on a solderless breadboard so it's way bigger (and I'm using through-hole parts so it's unlikely to fit in a D-sub shell). Mono COVOX and Stereo-on-1 work on mine but there's no autodetect code yet. DSS doesn't work; looking at your code I think I may have reversed the sense of the ACK pin 😜