Skip to content

ESPboy-edu/ESPboy_PT3Play

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESPboy_PT3Play

ESPboy PT3 - AY-3-8910 music player, using standard speaker or additional ESPboy PCM5102 I2S DAC module for better sound quality

demo video

initial version by Shiru

shiru@mail.ru

https://www.patreon.com/shiru8bit

This is a PT3 format chiptune music player. The format is kind of standard de-facto for AY-3-8910 chiptune music on Russian ZX Spectrum clones. About ten thousands songs has been made since mid-90s when it was first introduced.

The program emulates AY sound chip and plays PT3 files loaded into the SPIFFS. The sound is output through the sigma-delta modulation based DAC via the built-in speaker. It also supports i2s stereo DAC if connected (change define in the sketch, no run-time option to switch between outputs at the moment).

Programming lesson learned: do not use sigma-delta while accessing SPIFFS, it crashes the device (i.e. disable sigma-delta while accessing files).

I have included some of my own music to test it out. See zxtunes.com or the TrSongs archive to get much more.

You can buy this DAC module ready-made or make it yourself.

1

2

3

4

1. Buy I2S PCM5102 DAC module

PCM5102 module

2. Connect PCM5102 DAC module -> ESPboy I2S bus

  • VIN -> VCC
  • GND -> GND
  • LCK -> G2 (GPIO2 / D4 / I2S0-WS)
  • DIN -> RX (I2S0-DATA)
  • BCK -> SS (CS / GPIO15/ D8 / I2S0-BCK)
  • SCK -> 10k resistor -> GND

3. Upload this firmware

NOTE1: Before compilation, set Arduino IDE settings

  • Board: ESP8266 WeMos D1 mini
  • !CPU frequency: 80Mhz

NOTE2: After compilation upload music files to SPIFFS

4. Useful links

About

ESPboy PT3 - AY-3-8910 music player using DAC module

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages