Skip to content

ldursw/vgm-player

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VGM Player

This project allows VGM (Video Game Music) files from Sega Master System, Sega Game Gear, and Sega Mega Drive/Genesis to be played on real hardware using the YM2612 sound chip and the Teensy 3.6 board.

Features

  • Support for Master System, Game Gear, Mega Drive/Genesis
  • Standalone player using the SD Card slot
  • Can be controlled by a computer using the USB port
  • Correct volume for PSG and FM
  • Integration with emulators available
  • Supports emulated and discrete SN76489
  • Uses the Mega Amp circuit for amplification
  • Hardware support for Teensy 3.6 and Arduino Due
  • Player support for Windows and Linux (experimental)

Supported boards

Board SD Card Stream Real PSG Emulated PSG
Teensy 3.6 ✔️ ✔️ ✔️ ✔️
Arduino Due ✔️ ✔️ ✔️

✔️ Fully supported
❔ Not tested

Demo

Difference between other implementations

PSG

One of the biggest differences between this project and other implementations is that an emulated PSG is used instead of the discrete SN76489. It is widely known that the Sega version has some differences mainly in the noise channel.

For example, most games get a weird artifact instead of the expected noise channel. After Burner II has a constant tone on a discrete chip whereas on emulation it sounds right.

When using an emulated PSG the microcontroller will emulate the chip and the output is sent to the DAC0 pin at 44.1 kHz.

If you want to use a discrete PSG anyway, all you have to do is uncomment -DUSE_REAL_PSG on hardware/platformio.ini, connect the D0..D7 lines from the shift register to the SN76489 and connect /WE to pin 29 though a voltage converter.

Remote control

Another difference is that the hardware can be controlled via a companion application written in .NET Core that accepts a generic input class and sends to the hardware via USB and also displays the current state on screen.

GUI

There are 3 available input methods. VgmFile reads standard .vgm and .vgz files. VgmPipe creates a named pipe vgmstream that accepts commands from other applications, such as emulators. VgmPCM streams 44.1 kHz signed 8-bit mono PCM files to the chip.

Compiling and Running the project

To compile the code for the hardware you will need PlatformIO. You can use the CLI or an IDE with extension support such as Visual Studio Code. After installing PlatformIO just open the hardware directory and upload the code to the board.

To compile the player application you will need the .NET Core SDK. You can use the CLI or an IDE such as Visual Studio Community or Visual Studio Code. On Linux you may have to install the libSDL2 package.

License

All files in this repository are licensed under GNU General Public License Version 3.

Credits

Thank you very much for all these awesome people

About

Hardware music player for YM2612 and SN76489

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published