Compatibility problem with TurboSound FM (register expansion of TurboSound Next interferes)

This section is for discussing everything about Next hardware and latest updates.
PiyoTaro
Posts: 181
Joined: Thu Jun 01, 2017 11:13 am

Compatibility problem with TurboSound FM (register expansion of TurboSound Next interferes)

Post by PiyoTaro » 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. I noticed that the sound chip can be decoded with a single 13-NAND logic IC and TurboSound's D-FlipFlop circuit, and can be substituted with a pinheader instead of the "edge connector".
However, I noticed that the AY register extension of "TurboSound Next" causes interference with YM2203 of "TurboSound FM" and there is no compatibility information of the extended "edge connector" in Turbo mode. This will post to other threads.
  • Postscript 2019/3/31:
    I thought that the expansion port was driven at 14MHz, and because I chose a "74AC" class logic IC, six logic ICs were needed for "Negative logic OR combination".
    It decodes two low-cost OPN2 (YM2612/YM3438), OPNA and OPNB.
    A conflict is avoided by setting bit 3 (= 0) to the "board select bit".

I tried to get a "TurboSound" product.

"Velesoft": https://velesoft.speccy.cz/turbosound-cz.htm
Product Description: (Russian)http://speccy.info/TurboSound (translation)https://translate.google.com/translate? ... boSound_FM

The AY-3-8912 on the motherboard is replaced with a connector, and the signal is extracted to the board, and the logic IC switches between the "two sound chips" when writing to the address 0xFF or 0xFE of AY.
  • 1. Interference between AY register and external sound chip expanded by "TurboSound Next"

    It can be imagined that our "TurboSound Next" also has the same mechanism to expand the AY address and switch chips.
    However, when I looked at the material, I noticed that the sound chip register has been expanded in other ways.

    An AY-based sound chip such as YM2203 (which expands the address of 0x10 or more) interferes with bits 5 and 6 of TS-Next.
    https://www.specnext.com/turbo-sound-next/

    Bit 7 = “1”
    Bit 6 = Left audio (“1” enabled, “0” disabled)
    Bit 5 = Right audio (“1” enabled, “0” disabled)
    Bit 4 = “1”
    Bit 3 = “1”
    Bit 2 = “1”
    Bits 1 and 0 as
    “’11”: Selects the first PSG (default);
    “10”: Selects the second PSG;
    “01”: Selects the third PSG.
    "YM":https://en.wikipedia.org/wiki/Yamaha_YM2203
  • 2. Problems related to "pitch".
    Until recently, I did not understand the meaning of displaying "PSG Clock" in the explanation of the demo program.

    The ZX Spectrum/48 and compatibles have a CPU clock of 3.5 MHz. (PSG clock is 1.75 MHz)
    However, ZX Spectrum128/2+ has a CPU clock of 3.54690 MHz. The clock frequency of ZX Next is also different from ZXSpectrum compatible machines.

    Also, many of the sound card products I found on "eBay" and the like had a 3.58 MHz oscillator. ("Turbo Sound" products were also available with 8 MHz clock)
    The upper compatible sound chip of the OPN YM2203 requires a clock of around 8 MHz. Should I buy a 7 MHz or 7.19 MHz oscillator for compatibility (order items not listed in the specification table)?
    I did not notice that "the pitch is strange".

    ZX Spectrum Next has a timing adjustment function and can switch 48/128 mode, but "Detailed CPU clock" has not been announced.
  • 3. "Extended Edge Connector" compatibility information in "Turbo mode"
    ZX Spectrum Next has a timing adjustment function and can switch 48/128 mode, but "Detailed CPU clock" has not been announced.
    Is 14 MHz output to "Extended edge connector" in Turbo mode?
    Recently I found a post at FB about this situation.
    Allen Albright
    https://www.facebook.com/groups/specnex ... %22R%22%7D

    Work on the expansion bus is still pending... I don't know if there is time to finish this up before the cased are shipped. But it is a priority to get most peripherals working.

    There are issues like making sure the expansion bus is only enabled in 3.5MHz mode and being able to temporarily disable next devices to allow incompatible peripherals to function while the expansion bus is enabled.
Last edited by PiyoTaro on Fri Apr 12, 2019 6:47 pm, edited 4 times in total.

Alcoholics Anonymous
Posts: 513
Joined: Mon May 29, 2017 7:00 pm

Re: Compatibility problem with TurboSound FM (register expansion of TurboSound Next interferes)

Post by Alcoholics Anonymous » Thu Mar 28, 2019 4:02 pm

PiyoTaro wrote:
Sun Mar 24, 2019 4:11 pm
Is 14 MHz output to "Extended edge connector" in Turbo mode?
Recently I found a post at FB about this situation.
Allen Albright
https://www.facebook.com/groups/specnex ... %22R%22%7D

Work on the expansion bus is still pending... I don't know if there is time to finish this up before the cased are shipped. But it is a priority to get most peripherals working.

There are issues like making sure the expansion bus is only enabled in 3.5MHz mode and being able to temporarily disable next devices to allow incompatible peripherals to function while the expansion bus is enabled.
(I am Allen Albright btw)

The expansion bus is meant for connection of legacy peripherals or peripherals compatible with regular spectrums. None of these things can operate at higher than 3.5MHz. So one thing that is being looked at is forcing 3.5MHz when the expansion bus is enabled.

The other thing being considered is only enabling the expansion bus if the current memory paging matches a 48k spectrum (ie ROM3, BANK 5, BANK 2, BANK 0). The reason is there are a few peripherals that require the ROM to be present (rst 8 peripherals like the if1) and a small number monitor memory addresses outside the rom area (currah uspeech and if1 requires access to system variables). This may have to be an optional setting.

Alcoholics Anonymous
Posts: 513
Joined: Mon May 29, 2017 7:00 pm

Re: Compatibility problem with TurboSound FM (register expansion of TurboSound Next interferes)

Post by Alcoholics Anonymous » Thu Mar 28, 2019 4:25 pm

PiyoTaro wrote:
Sun Mar 24, 2019 4:11 pm
It can be imagined that our "TurboSound Next" also has the same mechanism to expand the AY address and switch chips.
However, when I looked at the material, I noticed that the sound chip register has been expanded in other ways.

An AY-based sound chip such as YM2203 (which expands the address of 0x10 or more) interferes with bits 5 and 6 of TS-Next.
If there is a conflict (and in any case you don't want the ay playing when this device is attached anyway), there will be a way to disable most if not all peripherals internal to the next. That is the plan anyway; what will actually happen is being driven by a balance of available space in the fpga and desired features.
The ZX Spectrum/48 and compatibles have a CPU clock of 3.5 MHz. (PSG clock is 1.75 MHz)
However, ZX Spectrum128/2+ has a CPU clock of 3.54690 MHz. The clock frequency of ZX Next is also different from ZXSpectrum compatible machines.
The clocks are all nominally derived from 28MHz so the cpu clock is always 3.5MHz (7,14,..) and the psg clock is always 1.75MHz. For the 128k, the frame size etc is adjusted so that video timing remains correct (the cpu still runs at 3.5MHz but everything around it is also adjusted so the same relative speed as the original 128k is maintained).

However, this is VGA0 timing only. The other video timings (HDMI, VGA1-6) modify the 28MHz clock (see nextreg 0x11 https://www.specnext.com/tbblue-io-port-system/ ) and this means the cpu clock and psg clock change away from 3.5MHz and 1.75MHz respectively. There will be pitch changes. For the AY this isn't too noticeable (maybe at the extreme VGA6 end it might be) but for beeper sound it is moreso.

Every chance I get, I tell people to find a way to use 50 Hz VGA0 or something close (50 Hz VGA1) for video output if they are searching for perfection with regards to legacy compatibility.
Also, many of the sound card products I found on "eBay" and the like had a 3.58 MHz oscillator. ("Turbo Sound" products were also available with 8 MHz clock)
The upper compatible sound chip of the OPN YM2203 requires a clock of around 8 MHz. Should I buy a 7 MHz or 7.19 MHz oscillator for compatibility (order items not listed in the specification table)?
I did not notice that "the pitch is strange".
I can probably make sure there's a 3.5MHz clock on the expansion bus even when it is disabled. But it will vary with the video timing as mentioned above. Also keep in mind this is a contended clock, meaning the ula will pause it many times during the video frame. From that perspective maybe it is better to have an independent clock source. Without looking at a schematic I'm not sure what was done for the AY in the original spectrums - most likely the 1.75MHz clock is not contended.

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

Re: Compatibility problem with TurboSound FM (register expansion of TurboSound Next interferes)

Post by PiyoTaro » Sat Mar 30, 2019 9:37 pm

Alcoholics Anonymous wrote:
Thu Mar 28, 2019 4:25 pm
I would like to ask questions in other forums about adding "PSG Clock(=1.75MHz)" to the software operating conditions. (I did not know that zxart is a tslabs site)

A reference site that is referred to for the "pitch" problem:
"Spectrum Sound PSG (Programmable Sound Generator)"in "ZX Specifications"http://problemkaputt.de/zxdocs.htm#spec ... dgenerator

Also, the article "zxnDMA" on the official site was written about "28MHz", but I forgot that when I posted it.
Alcoholics Anonymous wrote:
Thu Mar 28, 2019 4:02 pm
(I am Allen Albright btw)
About my soundboard.
I designed the board, assuming that the expansion port was driven at "14MHz" like "ZXBus". I selected a 74AC class logic IC.
There were fewer varieties to choose from, so the number of ICs increased to six. The original "TurboSound" used the 74ALS class "KP1533" series.


By the way,
The FB discussion on the extension port that I quoted converges in the direction of "substituting the printer port with serial bus".

However, my device is made to recognize that it is "a device designed for Next" by "a new signal pin" or to make it possible to access the expansion port by lowering the CPU clock by software. It can not be used without these measures.


  • Postscript.
    PiyoTaro wrote:
    Sat Mar 30, 2019 9:35 pm
    I tried to draw an Address decoder with EAGLE

Alcoholics Anonymous
Posts: 513
Joined: Mon May 29, 2017 7:00 pm

Re: Compatibility problem with TurboSound FM (register expansion of TurboSound Next interferes)

Post by Alcoholics Anonymous » Sun Mar 31, 2019 8:16 pm

PiyoTaro wrote:
Sat Mar 30, 2019 9:37 pm
I designed the board, assuming that the expansion port was driven at "14MHz" like "ZXBus". I selected a 74AC class logic IC.
There were fewer varieties to choose from, so the number of ICs increased to six. The original "TurboSound" used the 74ALS class "KP1533" series.
I'm not sure what is going to happen with the expansion bus yet. I just know that legacy peripherals cannot operate above 3.5MHz and there will have to be a way to shut off the bus when speeds go higher than that.

There is also a bug in the zx next pcb design - there are no level shifters on the expansion bus; only series resistors. The fpga is not 5V tolerant on input and the series resistors are not really adequate for interfacing with 5V devices. I say that with the knowledge that people have been doing it this way anyway for years without consequence (so far) as far as I know.

TTL logic from the spectrum's period, eg the LS family, is not able to drive outputs high above 4V anyway and the fpga is specced to handle 4V. But the logic family you're talking about is actually cmos and will drive all the way up to 5V.

I think what will eventually happen is that a 3rd party add on will come out that acts as level shifter on the expansion bus. In the absence of a level shifter and using cmos parts I think I would be tempted to try 3.3. That would likely still work even if a level shifter comes into play. As you can tell, I'm not sure how it will resolve yet - these are just some ideas in my head.

Is your device going to be able to handle varying CPU frequency if the bus is allowed to run at higher than 3.5MHz? The speed is going to be under the control of the user. 3.5MHz when using legacy peripherals or running old sw sometimes with contention sometimes without. 7MHz, 14MHz will not have contention but in the current TBU there are still slowdowns being applied from 14MHz to 7MHz while fetching layer 2 pixels or in part of the frame if the ula uses bank 7 for the display. These issues at 7MHz+ are probably going to be sorted out but I can't say for sure yet.

User avatar
Black_Cat
Posts: 70
Joined: Fri Aug 25, 2017 2:11 pm
Location: Saint Petersburg, Russia Today
Contact:

Re: Compatibility problem with TurboSound FM (register expansion of TurboSound Next interferes)

Post by Black_Cat » Thu Apr 04, 2019 5:59 pm

The scheme you presented https://www.specnext.com/forum/viewtopi ... t=60#p8875 is incorrect. What sources were You guided by?

User avatar
Black_Cat
Posts: 70
Joined: Fri Aug 25, 2017 2:11 pm
Location: Saint Petersburg, Russia Today
Contact:

Re: Compatibility problem with TurboSound FM (register expansion of TurboSound Next interferes)

Post by Black_Cat » Thu Apr 04, 2019 7:12 pm

PiyoTaro wrote:
Sun Mar 24, 2019 4:11 pm
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. I noticed that the sound chip can be decoded with a single 13-NAND logic IC and TurboSound's D-FlipFlop circuit, and can be substituted with a pinheader instead of the "edge connector".
However, I noticed that the AY register extension of "TurboSound Next" causes interference with YM2203 of "TurboSound FM" and there is no compatibility information of the extended "edge connector" in Turbo mode. This will post to other threads.
  • Postscript 2019/3/31:
    I thought that the expansion port was driven at 14MHz, and because I chose a "74AC" class logic IC, six logic ICs were needed for "Negative logic OR combination".
    It decodes two low-cost OPN2 (YM2612/YM3438), OPNA and OPNB.
    A conflict is avoided by setting bit 3 (= 0) to the "board select bit".

I tried to get a "TurboSound" product.

"Velesoft": https://velesoft.speccy.cz/turbosound-cz.htm
Product Description: (Russian)http://speccy.info/TurboSound (translation)https://translate.google.com/translate? ... boSound_FM

The AY-3-8912 on the motherboard is replaced with a connector, and the signal is extracted to the board, and the logic IC switches between the "two sound chips" when writing to the address 0xFF or 0xFE of AY.
  • 1. Interference between AY register and external sound chip expanded by "TurboSound Next"

    It can be imagined that our "TurboSound Next" also has the same mechanism to expand the AY address and switch chips.
    However, when I looked at the material, I noticed that the sound chip register has been expanded in other ways.

    An AY-based sound chip such as YM2203 (which expands the address of 0x10 or more) interferes with bits 5 and 6 of TS-Next.
    https://www.specnext.com/turbo-sound-next/

    Bit 7 = “1”
    Bit 6 = Left audio (“1” enabled, “0” disabled)
    Bit 5 = Right audio (“1” enabled, “0” disabled)
    Bit 4 = “1”
    Bit 3 = “1”
    Bit 2 = “1”
    Bits 1 and 0 as
    “’11”: Selects the first PSG (default);
    “10”: Selects the second PSG;
    “01”: Selects the third PSG.
    "YM":https://en.wikipedia.org/wiki/Yamaha_YM2203
I do not recommend to be guided by the changes of the TS/TSFM interface made by the developers of ZX Spectrum Next. The developers of ZX Spectrum Next had no right to make any changes to the TS/TSFM management interface. I declare this with all responsibility, because I am the author of the latest modification of the interface TS/TSFM.
PiyoTaro wrote:
  • 2. Problems related to "pitch".
    Until recently, I did not understand the meaning of displaying "PSG Clock" in the explanation of the demo program.

    The ZX Spectrum/48 and compatibles have a CPU clock of 3.5 MHz. (PSG clock is 1.75 MHz)
    However, ZX Spectrum128/2+ has a CPU clock of 3.54690 MHz. The clock frequency of ZX Next is also different from ZXSpectrum compatible machines.

    Also, many of the sound card products I found on "eBay" and the like had a 3.58 MHz oscillator. ("Turbo Sound" products were also available with 8 MHz clock)
    The upper compatible sound chip of the OPN YM2203 requires a clock of around 8 MHz. Should I buy a 7 MHz or 7.19 MHz oscillator for compatibility (order items not listed in the specification table)?
    I did not notice that "the pitch is strange".

    ZX Spectrum Next has a timing adjustment function and can switch 48/128 mode, but "Detailed CPU clock" has not been announced.
The TSFM uses a 3.5 MHz frequency to clock the YM2203. You should generate this frequency directly on your Board.
PiyoTaro wrote:
  • 3. "Extended Edge Connector" compatibility information in "Turbo mode"
    ZX Spectrum Next has a timing adjustment function and can switch 48/128 mode, but "Detailed CPU clock" has not been announced.
    Is 14 MHz output to "Extended edge connector" in Turbo mode?
    Recently I found a post at FB about this situation.
    Allen Albright
    https://www.facebook.com/groups/specnex ... %22R%22%7D

    Work on the expansion bus is still pending... I don't know if there is time to finish this up before the cased are shipped. But it is a priority to get most peripherals working.

    There are issues like making sure the expansion bus is only enabled in 3.5MHz mode and being able to temporarily disable next devices to allow incompatible peripherals to function while the expansion bus is enabled.
It makes no sense to worry about the theoretically possible clock frequency, because all musical compositions of ZX Spectrum are designed for the processor at a frequency of 3.5 MHz.
Last edited by Black_Cat on Sun Apr 07, 2019 3:22 am, edited 1 time in total.

User avatar
Black_Cat
Posts: 70
Joined: Fri Aug 25, 2017 2:11 pm
Location: Saint Petersburg, Russia Today
Contact:

Re: Compatibility problem with TurboSound FM (register expansion of TurboSound Next interferes)

Post by Black_Cat » Thu Apr 04, 2019 8:11 pm

PiyoTaro wrote:I designed the board, assuming that the expansion port was driven at "14MHz" like "ZXBus". I selected a 74AC class logic IC.
There were fewer varieties to choose from, so the number of ICs increased to six. The original "TurboSound" used the 74ALS class "KP1533" series.
You can use any series of chips that are compatible with TTL logic input signals, such as ALS, HCT, ACT. HC or AC series are not compatible on inputs with TTL logic, and will not work correctly. If you believe the developers of ZX Spectrum Next, who claim that "Expansion: Original external bus expansion port and accelerator expansion port", then the Board you are developing does not require logic level converters.

Alcoholics Anonymous
Posts: 513
Joined: Mon May 29, 2017 7:00 pm

Re: Compatibility problem with TurboSound FM (register expansion of TurboSound Next interferes)

Post by Alcoholics Anonymous » Sat Apr 06, 2019 4:39 am

Black_Cat wrote:
Thu Apr 04, 2019 7:12 pm
It makes no sense to worry about the theoretically possible clock frequency, because all musical compositions of ZX Spectrum are designed for the processor at a frequency of 3.5 MHz.
It matters very much if the clock is being used to time things as the original poster was suggesting when he asked if he should have a clock generator on board or use the system clock in his design.

The speed of the bus also matters when choosing logic family. A slow logic family cannot keep up if higher bus speeds are allowed. This is why I explained what is currently being considered for the expansion bus.
You can use any series of chips that are compatible with TTL logic input signals, such as ALS, HCT, ACT. HC or AC series are not compatible on inputs with TTL logic, and will not work correctly. If you believe the developers of ZX Spectrum Next, who claim that "Expansion: Original external bus expansion port and accelerator expansion port", then the Board you are developing does not require logic level converters.
My whole post was an explanation of why cmos ttl is not the best choice for logic at this time. It is not a good idea to use HCT, ACT, ALS, HC, AC because cmos will actively drive high voltages all the way to 5v and this is not ideal for the expansion bus. As explained, the long term solution is likely to be a 3rd party level shifter for the expansion bus that will make sure everything is correct electrically to make it ok for 5v to be driven on the bus. TTL logic families that do not use cmos parts do not drive high signals all the way to 5v; instead they are normally driven to 4V or less which is fine for the expansion bus. At his time there is no logic shifter so I would not use the cmos ttl logic families.

User avatar
Black_Cat
Posts: 70
Joined: Fri Aug 25, 2017 2:11 pm
Location: Saint Petersburg, Russia Today
Contact:

Re: Compatibility problem with TurboSound FM (register expansion of TurboSound Next interferes)

Post by Black_Cat » Sat Apr 06, 2019 12:42 pm

Alcoholics Anonymous wrote:
Sat Apr 06, 2019 4:39 am
Black_Cat wrote:
Thu Apr 04, 2019 7:12 pm
It makes no sense to worry about the theoretically possible clock frequency, because all musical compositions of ZX Spectrum are designed for the processor at a frequency of 3.5 MHz.
It matters very much if the clock is being used to time things as the original poster was suggesting when he asked if he should have a clock generator on board or use the system clock in his design.

The speed of the bus also matters when choosing logic family. A slow logic family cannot keep up if higher bus speeds are allowed. This is why I explained what is currently being considered for the expansion bus.
Dear Alcoholics Anonymous, no one in their right mind will create FM music tracks for the external expansion Board using 7MHz mode, or 14Mhz.
Alcoholics Anonymous wrote:
Sat Apr 06, 2019 4:39 am
Black_Cat wrote:
Thu Apr 04, 2019 7:12 pm
You can use any series of chips that are compatible with TTL logic input signals, such as ALS, HCT, ACT. HC or AC series are not compatible on inputs with TTL logic, and will not work correctly. If you believe the developers of ZX Spectrum Next, who claim that "Expansion: Original external bus expansion port and accelerator expansion port", then the Board you are developing does not require logic level converters.
My whole post was an explanation of why cmos ttl is not the best choice for logic at this time. It is not a good idea to use HCT, ACT, ALS, HC, AC because cmos will actively drive high voltages all the way to 5v and this is not ideal for the expansion bus. As explained, the long term solution is likely to be a 3rd party level shifter for the expansion bus that will make sure everything is correct electrically to make it ok for 5v to be driven on the bus. TTL logic families that do not use cmos parts do not drive high signals all the way to 5v; instead they are normally driven to 4V or less which is fine for the expansion bus. At his time there is no logic shifter so I would not use the cmos ttl logic families.
Alcoholics Anonymous, please do not enter PiyoTaro misleading. The ALS series has both TTL input and output, the HCT and ACT series have TTL input, and the CMOS output, HC and AC series have CMOS input and output. The inputs and outputs of the chip YM2612 also correspond to TTL signal levels, and judging by the documentation does not exceed 3,3V. I understand what explains it is your equivocation and verbiage. :) Don't be afraid to tell the truth, speak plainly, in Russian: the developers of ZX Spectrum Next have misled users, and have not fulfilled the promise to make the edge connector compatible with the original ZXBus interface. Therefore, the interface ZXNextBus, it will be impossible to connect most of the existing peripheral equipment. This is because the ZX Next expansion interface is only compatible with 3.3 V TTL devices, and is not compatible with 5V TTL.

Post Reply