Design a small Sound card for Next

Everything that is not ZX Spectrum Next goes here. Get ready for the Nostalgia!
PiyoTaro
Posts: 176
Joined: Thu Jun 01, 2017 11:13 am

Design a small Sound card for Next

Post by PiyoTaro » Fri Apr 12, 2019 7:25 pm

PiyoTaro wrote:
Tue Jun 04, 2019 6:41 pm
Image
June 4, 2019: The prototype module has been activated.
The sound chip address has been changed to '$xxF7' due to a conflict with ZXSpectrumNext internal peripherals.

I'm also wondering whether to design a new printed circuit board. The prototype board was a little larger than expected. I also took time to adjust the noise of the analog amplifier, so I would like to use a new sound chip with digital audio output.
  • YM3438: FMx6(equivalent YM2203 add LFO, STEREO OUT)/ +8bit-DA ch
    YMF288(with 16bit NOSDAC): FM, +SSG(AY)x3 MONO, +Drumsx6 / Parameter compatible with YM2608B,without ADPCM-ch, without FMch3-CSM mode of YM2203
STORY
"FM Sound" is to be implemented in "ZXSpectrumNext". However, it seems that FM Sound core was not developed. And the core development was completed on September 16, 2018 release.
  • I want to use my sound card as a device to be added to "TurboSoundNext" at the moment.
    The sound function of "ZXSpectrumNext" adopted the "SID" for some reason that FM Sound can not be implemented (it is written on the machine spec and is still "plus"), but it could not do that, Also consider "Waveform memory", which has a simpler structure than SID (possibly than AY).
    My project should not affect the spec implementation of "ZXSpectrumNext".
    (add 2019/5/31)
PiyoTaro wrote:
Sun Mar 24, 2019 4:11 pm
Append: 2019/4/13
1. I am requesting "sound expansion for the game BGM". I'm not an instrument store.
2. I thought that the specification of "ZXSpectrumNext 's extension port" could be connected to the original ZXSpectrum 3+ peripherals.
However, I found a conversation in FB that "the expansion mode can not be used in" turbo mode ".

I have written my thoughts at the beginning of this thread because there was a reply of an incorrect explanation (the logic IC "74HC" series can not drive TTL5V !?).
PiyoTaro wrote:
Sun Mar 24, 2019 2:58 pm
2. TS-FM Problem:
Last September I received a reply about the implementation of FM Sound. However, the announcement of "rejected for copyright reasons" is not found except this reply.
I started designing my own Sound card.
PiyoTaro wrote:
Sat Mar 30, 2019 9:35 pm
PiyoTaro wrote:
Sun Mar 24, 2019 2:58 pm
I started designing my own Sound card.
The sound feature of ZX Spectrum Next, "Turbo Sound Next" adds features to the upper bits of AY's registers. Therefore, if you replace it with an AY compatible chip such as YM2203, the expanded register will overlap.

In the first place,"Turbo Sound" is a mechanism that stores bit0 when 255/254 is written to the AY register port and switches two sound chips with bit0.
"Turbo Sound Next" switches 3 sound chips with lower 2 bits.
I posted a circuit diagram with "bit2 =0" as the expansion board select signal.

---
But my circuit is not compatible with "Turbo Sound FM". So I tried to find a simpler address decoder.

ZXSpectrum compatible "Timex TS2068/TC2068" has its own sound extension.

The 8-bit I/O bus 0xF5 is assigned to the AY register port, and 0xF6 is assigned to the AY data port.
In addition, bit8 and bit9 are assigned to the selection of 1 and 2 of joystick port by the address of 16-bit I/O bus.

(Postscript 2019/5/4) "ZXSpectrum SE" seems to decode two kinds of sound chips compatible with ZXSpectrum128 and Timex.
"ZX Spectrum SE Reference" https://www.worldofspectrum.org/faq/ref ... .htm#Sound

References used: ーーー
I tried to draw an address decoder circuit with this specification.
By using the 16-bit I/O bus bits, there is no need to use flip-flops in the chip select circuit. In this circuit, only two logic ICs are required.
(*April,14th "Cannot access the Expansion bus (edge ​​connector) in Turbo mode" Therefore, I changed the logic IC to "74HC" family product.)
20190504_timexfmall_decoder.png
20190504_timexfmall_decoder.png (53.74 KiB) Viewed 967 times
This project aims at a small FM sound card that can be put on the pin header terminal CN5 (on the ZX Spectrum Next board).
  • Z80 I/O address:"xxxx xxxN 1111 01NN b"
    0x00F5: OPN2 bank 0 address
    0x00F6: OPN2 bank 0 data
    0x01F5: OPN2 bank 1 address
    0x01F6: OPN2 bank 1 data
The FM sound chip "OPN2 YM3438" has a built-in DAC, and the analog output circuit is just one low-pass filter amplifier.
Connect the output of the sound board to the ZX Spectrum Next "EAR terminal (sound output)" and connect it to the audio equipment with the "Resistor included" Audio cable.


(Postscript.2019/4/21) I found an application manual translated into English of "YM2612" compatible with YM3438.
The difference between OPN2 and "OPN YM2203" is "Register B4H + - stereo; LFO sensitivity" ?
"Sega Genesis Technical Manual-YM2612 section" (from the personal site "Maxim's World of Stuff"): http://www.smspower.org/maxim/Documents/YM2612#regb0


---
PC application for listening to FM sound:

"TFM Music Maker", a Windows app, is a tool for "Turbo Sound FM", but it can also emulate a sound chip and play music.
This app is a tool for "Turbo Sound FM" and can edit instrument sound data for OPN and compose 6 channels. There is also a function to export music data for Sega MegaDrive.

Link (Russian) http://www.nedopc.com/soft.php
(English translation)https://translate.google.com/translate? ... 2Fsoft.php


(Add.2019/4/24) "DefleMask" is a Chiptune Tracker that also supports the MegaDrive YM2612 FM chip. You can try FM sound with MIDI keyboard.
In addition to FM and DCSG sounds, you can use FM Ch-6 tracks as "PCM" compatible with Windows Wav, or use FM Ch-3 as four "sine wave" tracks.

Link http://deflemask.com/

---

I would like to make a prototype with the following circuit diagram. If the clock generator is 8MHz as per the data sheet, the "PSG clock" will be 2MHz. (The tone parameters are compatible with Japanese PC-8801, FM-TOWNS, etc.)
(Postscript.2019/4/21: I also got an additional 3.579 × 2 = "7.158 MHz" clock gen.)

If possible, I would like to use the same frequency as the mega drive, 7.670442MHz, or 7MHz equivalent to ZX/48K which will be used in "Turbo Sound FM". (I also learned how to buy a custom-made oscillator. It seems that 10 unit prices will be about the same price as 1 unit sale.) However, it is not a project that sells as a parts kit, but it is assumed that each can collect and work on existing parts.

(*April 14th, I revised the circuit diagram.)
I would like to prototype with this circuit diagram. The amplification gain of the op-amp TL072 is based on the "Mega Amp" project. (Ri=51k, Rf=160k=82k+82k, Cf=47pF) (2019/4/18 Corrected Ri=not 39k. I realized that "GOAC YM3438" is not a discrete YM3438 FM chip. Also, I intend to make prototypes by replacing "Rf" with 82k+82k, and want to compare the loudness of the sound with "Turbo Sound Next". And there are small mistakes in this Rev2 schematic.)
Also, the clock generator is not wired in the schematic.
20190414_timexfmall-2.png
20190414_timexfmall-2.png (28.13 KiB) Viewed 1756 times
(Add.2019/4/24) I'm currently designing a single-sided board. The layout and circuit diagrams I drew last time are drawn upside down because they were written with "pinheader" instead of "pinsocket".
Last edited by PiyoTaro on Wed Jun 05, 2019 12:09 pm, edited 16 times in total.

PiyoTaro
Posts: 176
Joined: Thu Jun 01, 2017 11:13 am

Re: Design a small Sound card for Next

Post by PiyoTaro » Sat Apr 20, 2019 6:30 pm

  • [2019/4/30] Of the posts below, the drawings and photos have been revised with the latest posts.
    (This thread is posting my thought process. As soon as I confirm that the hardware works, I will set up a new thread as a "software development".)
PiyoTaro wrote:
Fri Apr 12, 2019 7:25 pm
ーーー
This project aims at a small FM sound card that can be put on the pin header terminal CN5 (on the ZX Spectrum Next board).
  • Z80 I/O address:"xxxx xxxN 1111 01NN b"
    0x00F5: OPN2 bank 0 address
    0x00F6: OPN2 bank 0 data
    0x01F5: OPN2 bank 1 address
    0x01F6: OPN2 bank 1 data
The FM sound chip "OPN2 YM3438" has a built-in DAC, and the analog output circuit is just one low-pass filter amplifier.
Connect the output of the sound board to the ZX Spectrum Next "EAR terminal (sound output)" and connect it to the audio equipment with the "Resistor included" Audio cable.


(Postscript.2019/4/21) I found an application manual translated into English of "YM2612" compatible with YM3438.
The difference between OPN2 and "OPN YM2203" is "Register B4H + - stereo; LFO sensitivity" ?

"Sega Genesis Technical Manual-YM2612 section" (from the personal site "Maxim's World of Stuff"): http://www.smspower.org/maxim/Documents/YM2612#regb0

---
I would like to make a prototype with the following circuit diagram. If the clock generator is 8MHz as per the data sheet, the "PSG clock" will be 2MHz. (The tone parameters are compatible with Japanese PC-8801, FM-TOWNS, etc.)
(Postscript. I also got an additional 3.579×2 ="7.158 MHz" clock gen.)

I would like to prototype with this circuit diagram. The amplification gain of the op-amp TL072 is based on the "Mega Amp" project. (Ri=51k, Rf=160k, Cf=47pF)

Prototype the FM sound module.

The idea of ​​making a prototype with the "module type" is because I found a product of pin header/pin frame connector that can be divided into "28 pins" and a "universal board" with a width of 72mm and 28-holes.

---
About "ZXSpectrumNext 2A board":
([2019/4/30] I replaced my photo)
20190430final_speecycase.jpg
20190430final_speecycase.jpg (283.54 KiB) Viewed 886 times
"CN5": A hole for soldering the pin header is lined up just behind the "Extended Edge Connector".

Most of the people who currently use the dev board will be using it in the "ZXSpectrum (Speecy) chassis with rubber keyboard".

At the location of the "Extended Edge Connector", there is a bulging space 2cm high at a place up to about 4cm deep.
By the way, there is a screw hole at the back of the "edge connector" in the "2A board". It will not be able to be stored in the completed "ZXSpectrumNext" chassis unless it is cut with a square board.

Mount the "pin frame connector" and electronic components on the "2.54mm pitch, universal board". Then, turn it over and attach it to the "pin header".
(Maybe there is a space about 11mm high between the main board and the pin header/pin frame.)


---
20190420-2_proto190417_layout.png
20190420-2_proto190417_layout.png (40.16 KiB) Viewed 886 times
After drawing the "circuit diagram", I tried drawing the "layout diagram of parts" while searching the catalog of electronic parts shop. Among the parts, "capacitors" needed products with low height.






---
It turned out that it is cheaper to produce a printed circuit board by using a free CAD application service to a manufacturer in units of 10 sheets, rather than collecting parts one by one and making a prototype with a universal board and a wire.

Since I had published "circuit diagram" by posting to the forum, "BOM" and "layout" should be published as well, but I wondered if it would be a project that everyone could actually work on.

(2019/4/20:
In Japan, there are fewer mail-order shops that sell discrete components such as logic ICs and resistors in units of one.
The "prototype parts" were not delivered to me this weekend.
In other words, the prototype has not been completed yet. As soon as I receive the parts, I will work and post photos.)
Last edited by PiyoTaro on Tue May 07, 2019 6:32 pm, edited 3 times in total.

PiyoTaro
Posts: 176
Joined: Thu Jun 01, 2017 11:13 am

Re: Design a small Sound card for Next

Post by PiyoTaro » Wed Apr 24, 2019 7:10 pm

  • [2019/4/30] Of the posts below, the drawings and photos have been revised with the latest posts.
    (This thread is posting my thought process. As soon as I confirm that the hardware works, I will set up a new thread as a "software development".)
PiyoTaro wrote:
Sat Apr 20, 2019 6:30 pm
PiyoTaro wrote:
Fri Apr 12, 2019 7:25 pm
This project aims at a small FM sound card that can be put on the pin header terminal CN5 (on the ZX Spectrum Next board).
Prototype the FM sound module.

The idea of ​​making a prototype with the "module type" is because I found a product of pin header/pin frame connector that can be divided into "28 pins" and a "universal board" with a width of 72mm and 28-holes.

---
About "ZXSpectrumNext 2A board":
([2019/4/30] I replaced my photo)
Image
"CN5": A hole for soldering the pin header is lined up just behind the "Extended Edge Connector".

Most of the people who currently use the dev board will be using it in the "ZXSpectrum (Speecy) chassis with rubber keyboard".

At the location of the "Extended Edge Connector", there is a bulging space 2cm high at a place up to about 4cm deep.
By the way, there is a screw hole at the back of the "edge connector" in the "2A board". It will not be able to be stored in the completed "ZXSpectrumNext" chassis unless it is cut with a square board.

Mount the "pin frame connector" and electronic components on the "2.54mm pitch, universal board". Then, turn it over and attach it to the "pin header".
(Maybe there is a space about 11mm high between the main board and the pin header/pin frame.)
20190424_proto_layout.png
20190424_proto_layout.png (72.33 KiB) Viewed 1183 times

The "pinsocket" is placed on the component side, and the prototype board is mounted face down on the "pinheader CN5". Parts are mounted facing the "ZXN main board".
(I'm currently designing a single-sided board. The layout and circuit diagrams I drew last time are drawn upside down because they were written with pinheader instead of "pinsocket".)

I am preparing work tools and parts for this weekend. Wire strippers and wires were expensive. The price displayed in the "PCB manufacturing service" advertisement is very attractive. Is 5-printed circuit boards worth US $ 5? (2019/4/24)
Attachments
20190424_proto_parcel.jpg
20190424_proto_parcel.jpg (355.12 KiB) Viewed 889 times
Last edited by PiyoTaro on Tue May 07, 2019 6:34 pm, edited 2 times in total.

PiyoTaro
Posts: 176
Joined: Thu Jun 01, 2017 11:13 am

Re: Design a small Sound card for Next

Post by PiyoTaro » Tue Apr 30, 2019 1:52 pm

PiyoTaro wrote:
Sat Apr 20, 2019 6:30 pm
PiyoTaro wrote:
Fri Apr 12, 2019 7:25 pm
This project aims at a small FM sound card that can be put on the pin header terminal CN5 (on the ZX Spectrum Next board).
Prototype the FM sound module.
---

I mounted the components on the board at last weekend. Compare with the layout
(Postscript. The wiring could not be shown because only 3 photos can be attached).
I have not yet wired the busline. The schematic will be posted in the next post.
20190430final_proto.jpg
20190430final_proto.jpg (415.77 KiB) Viewed 890 times
---

At the top of the "ZX Spectrum (Speecy) case", there is a space 4 cm deep and 2 cm high.

A "universal board" with a width of 72 mm and a 2.5 mm pitch is cut to a height of about 40 mm.
I have developed a layout that allows parts to be mounted on a 26-hole-wide board (by removing the pins from the "pinsocket").
20190430final_proto_layout_gnd_flip.png
20190430final_proto_layout_gnd_flip.png (78.04 KiB) Viewed 1070 times
Image

---

Solder the pinheader to the "ZX Spectrum Next" expansion port CN5.

If you do not cure the edge connector with "masking tape", an unexpected accident will occur. I could not remove the solder debris from the gold plated edge terminals.
20190430missedge.jpg
20190430missedge.jpg (235.54 KiB) Viewed 890 times
Last edited by PiyoTaro on Tue May 07, 2019 6:36 pm, edited 1 time in total.

seedy1812
Posts: 67
Joined: Tue May 30, 2017 11:31 am

Re: Design a small Sound card for Next

Post by seedy1812 » Wed May 01, 2019 3:04 pm

Wouldn't it have been easier to get an edge connector and then you don't have to solder things to the motherboard ?

PiyoTaro
Posts: 176
Joined: Thu Jun 01, 2017 11:13 am

Re: Design a small Sound card for Next

Post by PiyoTaro » Sat May 04, 2019 9:18 am

seedy1812 wrote:
Wed May 01, 2019 3:04 pm
Wouldn't it have been easier to get an edge connector and then you don't have to solder things to the motherboard ?

Currently we can not find edge connector products for ZXSpectrum.
I have been searching for ebay and sellmyretro for a long time, but there is concern about the quality of products that are processed by cutting a general-purpose "card edge connector".
(I recently found edge connector related products on ByteDelight webshop site)

Your point is "price", but the price of card edge connector is very expensive compared to pinsocket. :shock:
example https://www.te.com/usa-en/product-5530843-6.html
  • Postscript
    Looking at the catalog of connectors, there was a product that could be secured a clearance with the board with a 3.2 mm long part added under the connector. A connector for ZXSpectrum would be such a product.
    In addition to "connecting the connector vertically to the board", there are also connector products in which pins are spring-loaded and sandwich the board. It is fearful that it will not damage the printed circuit board in strength.
However, once this "built-in" sound card has been prototyped, I would like to design an "FMPAC" cartridge that can be used with other Spectrum compatible machines.

But, I have not found a "standard" about the shape of the device connected to the expansion port. (If the card edge connector is mounted on the board, it will be mounted vertically to the expansion port, and there should be a standard for "cartridge shape".)

PiyoTaro
Posts: 176
Joined: Thu Jun 01, 2017 11:13 am

Re: Design a small Sound card for Next

Post by PiyoTaro » Tue May 21, 2019 1:32 pm

Supplement.
Information obtained from the connector's catalog. For the edge connector, "DIP SOLDER" type: One that plugs into the board and connects vertically with the motherboard. "CARD EXTENDER" type: Connect the board horizontally to the motherboard by pinching the board.


I found a live video to design a cartridge case.

"Spectranet LIVE case design" by ByteDelight
https://youtu.be/kqTJpEEuHTc?t=1118

At the beginning of the video, there were plans for connecting with edge connectors.

There is a difference in the shape of the power connector between “48/128” and “+2A /B/+3”. The width of the part in contact with the main body should be 82mm.
"Expansion connector" opening is 75mm wide. The height from the floor to the motherboard is 8mm.

PiyoTaro wrote:
Sat May 04, 2019 9:18 am
seedy1812 wrote:
Wed May 01, 2019 3:04 pm
Wouldn't it have been easier to get an edge connector and then you don't have to solder things to the motherboard ?
Currently we can not find edge connector products for ZXSpectrum.
I have been searching for ebay and sellmyretro for a long time, but there is concern about the quality of products that are processed by cutting a general-purpose "card edge connector".
(I recently found edge connector related products on ByteDelight webshop site)
Your point is "price", but the price of card edge connector is very expensive compared to pinsocket. :shock:
example https://www.te.com/usa-en/product-5530843-6.html
  • Postscript
    Looking at the catalog of connectors, there was a product that could be secured a clearance with the board with a 3.2 mm long part added under the connector. A connector for ZXSpectrum would be such a product.
    In addition to "connecting the connector vertically to the board", there are also connector products in which pins are spring-loaded and sandwich the board. It is fearful that it will not damage the printed circuit board in strength.
However, once this "built-in" sound card has been prototyped, I would like to design an "FMPAC" cartridge that can be used with other Spectrum compatible machines.

But, I have not found a "standard" about the shape of the device connected to the expansion port. (If the card edge connector is mounted on the board, it will be mounted vertically to the expansion port, and there should be a standard for "cartridge shape".)

seedy1812
Posts: 67
Joined: Tue May 30, 2017 11:31 am

Re: Design a small Sound card for Next

Post by seedy1812 » Thu May 23, 2019 10:20 am

Have you seen https://www.tindie.com/products/TRC/zx- ... connector/ $2.25 when 10+ units ordered

Back in the day companies were producing different expansion add ons. Some were plain through connectors either fixed or with a cable and I had one where was like a T junction so you had a vertical and horsizontal edge connector so you could plug 2 items in.

PiyoTaro
Posts: 176
Joined: Thu Jun 01, 2017 11:13 am

Re: Design a small Sound card for Next

Post by PiyoTaro » Thu May 23, 2019 1:30 pm

seedy1812 wrote:
Thu May 23, 2019 10:20 am
Have you seen https://www.tindie.com/products/TRC/zx- ... connector/ $2.25 when 10+ units ordered

Back in the day companies were producing different expansion add ons. Some were plain through connectors either fixed or with a cable and I had one where was like a T junction so you had a vertical and horsizontal edge connector so you could plug 2 items in.
Thank you for the advice.
(The connector is $2.75 a piece, but it seems to cost $14 shipping to me.)
How about putting the module designed by "pin socket" on the conversion board connected to "edge connector"? Design a "cartridge type case or dust cover" that houses the module on the conversion board.


I am studying EAGLE at the same time as prototyping.
If I would like to distribute the board as a "Speecy expansion device", I thought that the OPN3 with more functions (3ch SSG,6ch Drums like YM2608. In the FM chip, it's probably a new product launched after 2000) than the OPN2 would be better, and I designed a smaller and half-sized module.

But unfortunately my prototype didn't work. I will post a verification article later.

seedy1812
Posts: 67
Joined: Tue May 30, 2017 11:31 am

Re: Design a small Sound card for Next

Post by seedy1812 » Thu May 23, 2019 4:44 pm

If you read the description it seems the Speccy edge connectors come from a bigger / longer item and they cut them to size and block one of the pins. If you did that all yourself then costs would come down.

For prototyping https://www.tindie.com/products/TRC/zx- ... rd-adapter would be ideal ( $8 + $14 shipping to the uk ) (only 2 left ). Should be only 1 shipping cost even if you get 10 edge connectors

Post Reply