After quite some time (TILT!Audio* started in January 2017) I finally managed to get WPC sound running. The main difference to the first approach with dataeast is the different bus speed, that is used in WPC systems. This is because in WPC systems the bus between the main cpu and the sound subsystem is shared between the dmd controller and the sound card. This requires a higher bus speed and additional addressing wires.
My first try was to translate all the control wires 5 address lines, RW and WDEN directly to GPIO of the Pi. The idea was to simply do the address decoding in software within the interrupt service routine.
Looking at the output of the logic analyser and on the schematics you can see that writing to the 374 buffer requires CA0 and CA1 to be low, while CA2-4 need to be high. The CLK for the 374 buffer will go high exactly when WDEN goes high while RW is still on low.
The solution finally was to do the address decoding in hardware. This has reduced the frequency of interrupts dramatically. Effectively an interrupts only occurs, if a command byte is transferred to the sound card. The fact that wpc to some extend uses multi byte commands can be handled by the software. Sequences of command bytes are send with a 1ms delay between bytes so that the maximum interrupt frequency is around 1kHz.
Another improvement as I need to design a new adapter shield anyways was to consolidate the level shifter and the buffering of the sound data byte in a single chip that can be operated at 3v3 and has 5v tolerant inputs. Additionally I make use of the new Raspberry Pi Zero which has enough power and memory for the sound generation.
This results in a smaller and also cheaper design for wpc and with some smaller changes in the software the same approach could be used for dataeast as well.
As soon as the final shield is ready and tested, I will provide PCBs and kits in my shop at //go-dmd.de/shop.
Finally you can see the first working demo here:
Schematics for shield:
And finally another video from the first installment in a getaway!
*TILT!Audio is the new name for RasPiSound