Authentic sounds from vintage sound chips, on modern hardware!
RetroWave is a hardware sound board series that uses vintage sound chips and works with modern hardware.
They are in shape of Raspberry HATs, stackable, hackable, can be used on tiny single board computers like the Raspberry Pi / Jetson Nano, and modern desktop computer with USB ports.
Now available on Tindie.
Uses the Yamaha YMF262-M chip.
Under development.
Under development.
... And there will be more ...
- High quality components
- In shape of a Raspberry HAT
- Uses SPI, a modern high-speed bus
- All control pins & chip registers are directly accessible by software
- Built-in crystal oscillator, no need to use an MCU
- Different RetroWave boards can be stacked together, and they use the same pins
- With a PotatoPi Lite as a USB adapter, the boards can be accessed via 12Mbps full speed USB CDC
There are no abstraction between software and hardware at all.
A simple SPI IO expander is used, and all pins of the sound chips can be controlled by software directly.
With the PotatoPi Lite as USB adapter, you still have the ability to control all the pins directly. Since it just acts as simple "Serial to SPI" converter.
All boards have built-in crystal oscillators. For sound chips that can be used with different clock speeds, programmable oscillators will be used.
Each board uses the same pins on the 40 pin Raspberry header (physical pin numbering):
- 5V (pin 2 and 4)
- All GND pins (pin 6, 9, 14, 20, 25, 30, 24, 39)
- SPI MOSI (pin 19)
- SPI MISO (pin 21)
- SPI CLK (pin 23)
- GPIO6 (pin 31)
Yes, the boards are stackable. And yes, different boards can function at the same time.
We provide a library for accessing the boards, a reference command-line VGM player that uses the library, and a modified DOSBox-X that supports using RetroWave boards for sound output.
The firmware of the USB Adapter is also open sourced: See here.
All of them are free software.
Source files are in the RetroWaveLib
directory.
- Written in pure C
- Robust architecture using callbacks
- Easy to integrate to any project: use CMake or simply copy the files
- Provides ready-to-use platform drivers for: Linux/BSD/MacOS, Windows, and STM32 HAL
- Many ARM-based Linux SBCs (including Raspberry Pi) will take a very long time locking SPI bus clock frequency if automatic CPU frequency scaling is enabled. This will lead to huge latency. In this case, please disable it (
cpufreq-set -g performance
).
Source files are in the Player
directory.
- Plays VGM or VGZ files
- Supports accessing the boards using serial port (on a desktop computer) and SPI (on a Linux SBC)
- Supports playback controls: Pause, Previous/Next, Fast Forward and Single Step
- Displays GD3 metadata information
- Nanoseconds accuracy on Linux/BSD and microseconds accuracy on MacOS
- Cool real-time register map visualization!
See the Releases section.
Currently built targets:
- Linux x86_64
- Linux armhf
- Linux aarch64
- MacOS x86_64
- Windows x86_64 (Windows 7+)
- Ensure you have the build tools, CMake 3.14+ and zlib dev package installed
cd
into the root path of this repomkdir build; cd build; cmake ..; make
Currently all problems are Windows-specific.
If you are good at Windows APIs, feel free to create a pull request!
-
Emulated APIs
Currently the Windows target uses Cygwin to emulate POSIX APIs. It works, but it may not be a good idea.
-
Possible inaccurate timing
It seems that Windows doesn't have a monotonic self-increasing clock/timer that is unaffected by real world time changes. This may make the playback unstable. And the playback will be destroyed if a NTP time update happens in background.
-
Slow OSD
The conhost.exe terminal is extremely laggy when repainting the whole console window. So, OSD refresh rate is set to 1 second and regmap visualization is disabled by default on Windows. If you want to see the register map visualization properly, try using MinTTY as your terminal.
Currently only OPL3 is supported.
For the source files, see here.
Supports accessing the boards using serial port (on a desktop computer) and SPI (on a Linux SBC).
All hardware designs (C) 2021 SudoMaker, All rights reserved.
All source code files in this repo are free software and use the AGPLv3 license.
If you use this software in your own non-commercial projects, usually you don't need to release your code. See this FAQ.
If you see a possible license violation, don't hesitate to tell us.
"Fair use" is only valid in some countries, such as the United States.
This program is protected by copyright law and international treaties.
Unauthorized reproduction or distribution of this program (e.g. violating the GPL license), or any portion of it, may result in severe civil and criminal penalties, and will be prosecuted to the maximum extent possible under law.