Sunday, July 2, 2017

Adding Audio

(updated 15/7/2017) I've recently started working on Prism again after a few months off. This last week I've finally gotten round to working on Prism's audio output. Up until now, Prism only had beeper and tape (SAVE) outputs, but now:
  • In addition to being able to save to tape, Prism's tape-out and beeper output form a 2 bit channel audio output (the spectrum's audio circuit has similar behaviour)
  • Added 3x (modelled) YM2149 - used to implement Turbosound and the 128K Spectrum's AY-3-8912
  • Added 3 Covox (basically just an 8 bit latch on ports 0xFB, 0xF3 and 0xB3 which connect to  DACs to give 3 channels of 8 bit digital sound).
  • Added Specdrum (like Covox, but on port 0xDF)
  • Added SounDrive 1.05 mode 1 (basically Covox on ports 0x0F,0x1F,0x4F and 0x5F). These are panned: 0x0F and 0x1F are "left" channels and 0x4F and 0x5F are "right" channels.
  • Added SAA1099 (the sound chip used in the Sam Coupe) with thanks to Miguel Angel Rodriguez Jodar for allowing me to use his implementation from the ZX Uno Sam core. At boot time, the SAA1099 is available on ports 0x02FF (data) and 0x01FF (register). However when Prism has been set to disable the Timex screen mode selection port (0xFF), then the SAA1099 is available at the same ports as on the Sam Coupe and SAA1099 add-ons (so: port 0x00FF(data) and 0x01FF(register)).
  • Added two sigma-delta DACs and a pair of resistor-capacitor filters to create the audio output (thanks again to Miguel for pointing me at the Xilinx document on sigma-delta DACs)
  • Added a mux to act as an audio output mixer.
It's sounding pretty good (though I have to disable a fixed-frequency buzzer on my FPGA dev board before I can hook up one of the audio outputs, so I've implemented it in mono for now)






No comments:

Post a Comment