Change Tandy Sound to JT89

User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Change Tandy Sound to JT89

Unread post by spark2k06 »

I have created a new branch (prerelease-jt89) and below I show the changes made for the migration:

https://github.com/MiSTer-devel/PCXT_Mi ... ff65c6b8b7

After this initial change, the sound is very bad, I attach the synthesised RBF. I am starting this thread in case someone knows how to fix it.
Attachments
PCXT_JT89_01.zip
(1.19 MiB) Downloaded 139 times
User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Re: Change Tandy Sound to JT89

Unread post by spark2k06 »

First attempt at fix taking into account the sign, as suggested by jotego, but probably poorly executed:

https://github.com/MiSTer-devel/PCXT_Mi ... 4017553c41

The fact is that the other module, also created by him, of OPL2 is also signed but 16 bits instead of 11 bits, and it works correctly:
Audio Mixer.png
Audio Mixer.png (14.07 KiB) Viewed 2325 times
However, this still sounds bad for the Tandy sound part.
Attachments
PCXT_JT89_02.zip
(1.22 MiB) Downloaded 107 times
kitune-san
Top Contributor
Posts: 401
Joined: Wed May 18, 2022 11:20 am
Has thanked: 127 times
Been thanked: 412 times

Re: Change Tandy Sound to JT89

Unread post by kitune-san »

If you are accounting for the sign, I don't think these bits are fixed at 0.

---
tandy_snd <= {2'b00, {3'b000, {oldt_1[10], oldt_1}} << status[35:34]};
---
kitune-san
Top Contributor
Posts: 401
Joined: Wed May 18, 2022 11:20 am
Has thanked: 127 times
Been thanked: 412 times

Re: Change Tandy Sound to JT89

Unread post by kitune-san »

Maybe like this.

Code: Select all

tandy_snd <= {2{oldt_1[10]}, {4{oldt_1[10]}, oldt_1}} << status[35:34]};
User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Re: Change Tandy Sound to JT89

Unread post by spark2k06 »

kitune-san wrote: Wed Oct 26, 2022 10:57 am Maybe like this.

Code: Select all

tandy_snd <= {2{oldt_1[10]}, {4{oldt_1[10]}, oldt_1}} << status[35:34]};
Thank you very much! that was it :-)

Finally it stays like this:

Code: Select all

tandy_snd <= {{{2{oldt_1[10]}}, {4{oldt_1[10]}}, oldt_1} << status[35:34], 2'b00};
I update the prerelease branch, it will be available soon but I also attach a binary so that users can compare the previous Tandy sound with the current one.
Attachments
PCXT_JT89_03.zip
(1.22 MiB) Downloaded 124 times
jordi
Posts: 282
Joined: Thu Jun 11, 2020 10:11 am
Has thanked: 112 times
Been thanked: 87 times

Re: Change Tandy Sound to JT89

Unread post by jordi »

kitune-san wrote: Wed Oct 26, 2022 10:57 am Maybe like this.

Code: Select all

tandy_snd <= {2{oldt_1[10]}, {4{oldt_1[10]}, oldt_1}} << status[35:34]};
I'm wondered that you always have a nice solution :)
sofakng
Posts: 138
Joined: Fri Jun 19, 2020 12:52 am
Been thanked: 23 times

Re: Change Tandy Sound to JT89

Unread post by sofakng »

Can you also take a look at something else while you are looking into the sound?

The sound from the current PCXT core is inverted from a real SN76489 chip.

Here is a picture of my recordings: [volumes have been normalized]
PCXT.png
PCXT.png (73.13 KiB) Viewed 2104 times

Top is TNDLPT adapter (by Serdashop) and bottom is PCXT.
sofakng
Posts: 138
Joined: Fri Jun 19, 2020 12:52 am
Been thanked: 23 times

Re: Change Tandy Sound to JT89

Unread post by sofakng »

Here is the waveform using your JT89 core (on the bottom) [volumes have been normalized]

EDIT: I've added 86Box and ScummVM captures too:

PQ1.png
PQ1.png (128.35 KiB) Viewed 2075 times

Here are the Audacity files if anybody wants to take a look:

PCXT Tests.zip
(31.22 MiB) Downloaded 146 times
cursedverses
Posts: 180
Joined: Sun May 24, 2020 9:13 pm
Has thanked: 186 times
Been thanked: 34 times

Re: Change Tandy Sound to JT89

Unread post by cursedverses »

From a strictly analogue hi-fi soundpoint, does this just mean you have a negative when you require a positive, and vice versa? A soundwave is representative of a speaker's movement over time after all (one polarity pushes the speaker and the other pulls).
dmckean
Posts: 310
Joined: Sat Jan 16, 2021 7:03 am
Has thanked: 396 times
Been thanked: 95 times

Re: Change Tandy Sound to JT89

Unread post by dmckean »

cursedverses wrote: Wed Oct 26, 2022 8:53 pm From a strictly analogue hi-fi soundpoint, does this just mean you have a negative when you require a positive, and vice versa? A soundwave is representative of a speaker's movement over time after all (one polarity pushes the speaker and the other pulls).
Yes and almost anything in the audio signal path can invert the sound.
sofakng
Posts: 138
Joined: Fri Jun 19, 2020 12:52 am
Been thanked: 23 times

Re: Change Tandy Sound to JT89

Unread post by sofakng »

Yeah, I don't know what it means but I just wanted to show what I found. If it's not an issue than that's great!
User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Re: Change Tandy Sound to JT89

Unread post by spark2k06 »

sofakng wrote: Wed Oct 26, 2022 11:09 pm Yeah, I don't know what it means but I just wanted to show what I found. If it's not an issue than that's great!
You will notice absolutely no physical audio change, but there is no problem in inverting the waveform to be more faithful to the original, I attached binary again with this change:

Code: Select all

oldt_0 <= -tandy_snd_e;
On the other hand, I share a couple of recordings provided by @Mills regarding Arnim Laeuger's previous Tandy sound with respect to José Tejada's new jt89 by the time I bring the update to all users:

SN76489AN Compatible Implementation by Arnim Laeuger
JT89 by jotego
Attachments
PCXT_JT89_04.zip
(1.21 MiB) Downloaded 125 times
sofakng
Posts: 138
Joined: Fri Jun 19, 2020 12:52 am
Been thanked: 23 times

Re: Change Tandy Sound to JT89

Unread post by sofakng »

Thanks so much! I'm not sure if the JT89 audio was inverted though? I was referring to the original sound core but I can't tell based on the waveform if JT89 is inverted.

Also, I'm just curious but why did you switch from the Arnim Laeuger core to the JT89 version? The Arnim Laeuger core waveform matched the actual SN76589 nearly perfectly (except for the inversion).

The JT89 audio core doesn't seem to match the original waveform but I do trust Jotego and would assume his is most accurate but it's odd the waveform is different?

Thanks again for all your work on the core! I never realized how important the Tandy 1000 was especially relating to early Sierra games, etc.
User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Re: Change Tandy Sound to JT89

Unread post by spark2k06 »

sofakng wrote: Thu Oct 27, 2022 2:11 pm Thanks so much! I'm not sure if the JT89 audio was inverted though? I was referring to the original sound core but I can't tell based on the waveform if JT89 is inverted.
Well, as it doesn't really affect how it sounds, I'll just put it back uninverted for future updates, that's not a problem.
sofakng wrote: Also, I'm just curious but why did you switch from the Arnim Laeuger core to the JT89 version? The Arnim Laeuger core waveform matched the actual SN76589 nearly perfectly (except for the inversion).

The JT89 audio core doesn't seem to match the original waveform but I do trust Jotego and would assume his is most accurate but it's odd the waveform is different?
I don't know if JT89 wave is accurate or not, but listen to the differences with the audios I've shared and judge for yourself, I certainly prefer the sound of Jotego's :)
sofakng wrote: Thanks again for all your work on the core! I never realized how important the Tandy 1000 was especially relating to early Sierra games, etc.
To you for appreciating the work done with the core.
Post Reply