6-Channel Sound on the ZX81

ZX-Team Forum
Benutzeravatar
sascha2000
User
Beiträge: 468
Registriert: 05.05.2011, 11:58
Wohnort: Zwischen Reutlingen und Tübingen

6-Channel Sound on the ZX81

Beitrag von sascha2000 » 04.04.2012, 23:52

Hallo,

aufgrund von Anregungen durch "yerzmyey" auf dem letzten ZX-Treffen habe ich eine weitere zusätzliche Variante der Adressdekodierung des GALs der MrX Karte im "Angebot".

cause of suggestions of "yerzmeyey" on the last ZX-Meeting I offer now anohter adress decoding for the MrX card.


# Latch data for the modified
#0xD7 0x07
#0xC7 0x17
#0xC7 0x07
#0xD7 0x17

Nur der Vollständigkeit halber hier die Adressen des Originals identisch mit dem Zxpand-AY
Just to be complete here the Adresses of the Original just the same like fot the Zxpand-AY

#the original
#0xDF 0x0F modified ZON-X
#0xCF 0x1F original ZON-X
#0xCF 0x0F from ZON-X user manual
#0xDF 0x1F additional combination

Damit könnte man 2 MrX oder eine MrX und ein ZXpand-AY gemeinsam betrieben und so die wirklich eindrucksvollen 6-Kanal Sounds vom ZX-Spectrum auf den ZX81 bringen.
So it is possible now to use 2 MrX together or one MrX with one ZXpand-AY together and to convert the impressive 6-Channel Sounds from ZX-Spectrum to the ZX81.

Here the gal equation:

Gal16V8
#
#


Clk A1 A2 A3 IRQ WR A6 A7 A5 GND
/OE NC NC NC NC BUCS BC1 BDIR Q0 VCC
#
# Boolsche Gleichungen
#
Q0 := /Q0
IF(VCC)
BDIR = /WR * /IRQ * A1 * A2 * /A3 * /A5 * A6 * A7 + /WR * /IRQ * A1 * A2 * /A3 * /A5 * /A6 * /A7
IF(VCC)
BC1 = /IRQ * A1 * A2 * /A3 * /A5 * A6 * A7
BUCS = /BC1 * /BDIR

And here the Jed file:

http://www.eightbits.de/MrX-v006.jed

Viele Grüße
Sascha

Benutzeravatar
yerzmyey
User
Beiträge: 185
Registriert: 19.07.2007, 20:51
Wohnort: Rubber Planet
Kontaktdaten:

Re: 6-Channel Sound on the ZX81

Beitrag von yerzmyey » 05.04.2012, 09:53

Yes guys, it should work (if programmed well).
The idea came because it wouldn't be a "software-dead" project: there are plenty of 2xAY songs on Spectrum and they might be converted into ZX81 just like 1xAY songs in PT3 and STC.
Also I will chat about it with Andy Rea but not too soon from now, because he helped me a lot within last week in several ZX81 projects and if I ask him anything again in a short time - he will chop my head off.
IN NIHILUM REVERTERIS - a big text-adventure game for ZX81: http://tiny.pl/g2m6m
"MONOCHROME" issue 5 - (Spring 2014) free paper/PDF magazine about ZX81: http://tiny.pl/q2m44
ZX81 COMPETITIONS 2007/2009: http://zx81.republika.pl/

andyrea
User
Beiträge: 41
Registriert: 03.04.2018, 20:30

Re: 6-Channel Sound on the ZX81

Beitrag von andyrea » 05.04.2012, 18:19

He He :D

I've thought about this quite often, what is the most comon format for the turbo-sound files? STC's would be preferable because they take the least time for the player code per cycle, but 2 pt3's may be possible but it won't leave much time for anything else...

Also you need to check with Sirmorris, but i thought ZXpand was on port 0x07 so this scheme may not be compatible.

Regards Andy

SirMorris
User
Beiträge: 31
Registriert: 11.04.2008, 10:58

Re: 6-Channel Sound on the ZX81

Beitrag von SirMorris » 05.04.2012, 18:37

Hi Sascha -

Yes indeed - ZXpand sits on port 7 so it might be better to choose another to prevent clashes.

C

Benutzeravatar
sascha2000
User
Beiträge: 468
Registriert: 05.05.2011, 11:58
Wohnort: Zwischen Reutlingen und Tübingen

Re: 6-Channel Sound on the ZX81

Beitrag von sascha2000 » 05.04.2012, 19:25

Hello SirMorris and Andy,

thank you very much for your feedback about the port problem.

So if the program uses the ZXpand-AY Port Adresses for the first ym2149 and

if the program uses one of the following combinations for the second ym2149

#0xC7 0x17
#0xD7 0x17

it should work? Am I wrong?

I am just asking for, to find a possibility where yerzmyey can work with his equipment at the moment.

However I should change the port adress range for the second ym2149. Do you have any suggestions for combinations you prefer?

@yerzmyey: I am sorry for that mistake. I will send you new GALs with a different adress range as soon as possible.

Regards
Sascha

Benutzeravatar
siggi
User
Beiträge: 2295
Registriert: 06.12.2005, 08:34
Wohnort: D, Hessen, tiefste Werreraa
Kontaktdaten:

Re: 6-Channel Sound on the ZX81

Beitrag von siggi » 05.04.2012, 22:55

Hallo Sascha,
um Adresskonflikte zu minimieren, solltest Du dir mal angucken, welche Adressen von aktueller oder historischer Hardware benutzt werden:
viewtopic.php?f=2&t=572#p3617
und
http://www.fischerkai.de/zxteam/multi_d.htm

Die Adressen von $A7 $AF $B7 $BF für "ZX96-Festplatte" (bzw. CTC in meinem Web-Server) scheinen mir für Eure Zwecke geeignet zu sein, da ihr wohl keine ZX96-IDE-Festplatte mit AY zusammen betreiben wollt und ich keinen AY (mit ZX81/96-Bus) in meinem Web-Server (mit ECB-Bus) einsetzen werde :wink:

Gruß
Siggi

Benutzeravatar
yerzmyey
User
Beiträge: 185
Registriert: 19.07.2007, 20:51
Wohnort: Rubber Planet
Kontaktdaten:

Re: 6-Channel Sound on the ZX81

Beitrag von yerzmyey » 07.04.2012, 19:20

sascha2000 hat geschrieben: @yerzmyey: I am sorry for that mistake. I will send you new GALs with a different adress range as soon as possible.
Regards
Sascha
Absolutelly no problem, normal thing. There's no rush.




Andy:

> what is the most comon format for the turbo-sound files?
------------------------
*.$M (that's how it looks on PC. On ZX it looks *.M or *.m). However it could bee also PT3, I presume, because wheen Spectrum detect a TurrboSound song in the file, it plays both AYs.
I can send You such files to examine. No probleem at all.

> it won't leave much time for anything else...
-------------
Aaah, You know... At least there would be a player for them. Such a player doesn't have to make anything 'spectacular' on the screen, I suspect. ;)
IN NIHILUM REVERTERIS - a big text-adventure game for ZX81: http://tiny.pl/g2m6m
"MONOCHROME" issue 5 - (Spring 2014) free paper/PDF magazine about ZX81: http://tiny.pl/q2m44
ZX81 COMPETITIONS 2007/2009: http://zx81.republika.pl/

andyrea
User
Beiträge: 41
Registriert: 03.04.2018, 20:30

Re: 6-Channel Sound on the ZX81

Beitrag von andyrea » 07.04.2012, 21:24

Uh... yes please send my a couple of turbo sound files, you have my eamil address already :D

I'm sure i could addapt the TSC player to play 2 STC's side by side, should even have a little time left over for display updates

PT3's might be a bit harder, but probably posiible, maybe only in semi-fast ( i'm thinking a minimal display maybe 5 or 6 lines only, to leave more CPU time for the player)

Regards Andy

SirMorris
User
Beiträge: 31
Registriert: 11.04.2008, 10:58

Re: 6-Channel Sound on the ZX81

Beitrag von SirMorris » 07.04.2012, 22:01

Hi Sascha,

The solution you have made would work well.

I think for the turbosound solution it would be reasonable to expect that custom GALs are necessary for one or both boards. Would it be enough to make, for instance, the ZXpand-AY respond only to $0f & $cf and Mr.X to $1f,$df. This way we can keep to the 'standard' ports for both devices and not worry about picking a port used by another device?

If you need/want me to make any changes I'll be happy to do so.

C

Benutzeravatar
yerzmyey
User
Beiträge: 185
Registriert: 19.07.2007, 20:51
Wohnort: Rubber Planet
Kontaktdaten:

Re: 6-Channel Sound on the ZX81

Beitrag von yerzmyey » 11.04.2012, 15:19

andy_rea hat geschrieben:Uh... yes please send my a couple of turbo sound files, you have my eamil address already :D
Regards Andy
Done! I hope You got them.
Greetzzzzzz,
Y
IN NIHILUM REVERTERIS - a big text-adventure game for ZX81: http://tiny.pl/g2m6m
"MONOCHROME" issue 5 - (Spring 2014) free paper/PDF magazine about ZX81: http://tiny.pl/q2m44
ZX81 COMPETITIONS 2007/2009: http://zx81.republika.pl/

andyrea
User
Beiträge: 41
Registriert: 03.04.2018, 20:30

Re: 6-Channel Sound on the ZX81

Beitrag von andyrea » 11.04.2012, 18:31

Yes i got them, they look like PT3's i'll have a go at knocking up a player at some point, but it will either be fast mode only, or minimal display probably just a few lines of text. if the display is reduce to say 5 lines of text that should give approx 2.5X the number of clock cycles available that you get with a full display.

i think first i'll just sit 2 players side by side and see what happens, if that works out ok, i'll look at combining common parts between the 2 players to reduce the code size.

have WE all decided what ports the separate 2 AY chips will be on ?

Regards Andy

Benutzeravatar
sascha2000
User
Beiträge: 468
Registriert: 05.05.2011, 11:58
Wohnort: Zwischen Reutlingen und Tübingen

Re: 6-Channel Sound on the ZX81

Beitrag von sascha2000 » 12.04.2012, 10:11

Sorry Andy I have not had the time to care about the ports.

I think I'll do the same this evening/night and will post a suggestion here.

Sorry for the dealy.

Sascha

Benutzeravatar
yerzmyey
User
Beiträge: 185
Registriert: 19.07.2007, 20:51
Wohnort: Rubber Planet
Kontaktdaten:

Re: 6-Channel Sound on the ZX81

Beitrag von yerzmyey » 12.04.2012, 11:17

andy_rea hat geschrieben:Yes i got them, they look like PT3's i'll have a go at knocking up a player at some point, but it will either be fast mode only, or minimal display probably just a few lines of text. if the display is reduce to say 5 lines of text that should give approx 2.5X the number of clock cycles available that you get with a full display.
i think first i'll just sit 2 players side by side and see what happens, if that works out ok, i'll look at combining common parts between the 2 players to reduce the code size.
Regards Andy
Well, I don't hide I would use such a construction on my ZX81 for practical purposes (concerts/on-line albums) so screen stuff would be secondary/minor here.
But on the other hand, if the screen is on (even in a limited range) it would be a cool thing for title-screens of games.
IN NIHILUM REVERTERIS - a big text-adventure game for ZX81: http://tiny.pl/g2m6m
"MONOCHROME" issue 5 - (Spring 2014) free paper/PDF magazine about ZX81: http://tiny.pl/q2m44
ZX81 COMPETITIONS 2007/2009: http://zx81.republika.pl/

Benutzeravatar
sascha2000
User
Beiträge: 468
Registriert: 05.05.2011, 11:58
Wohnort: Zwischen Reutlingen und Tübingen

Re: 6-Channel Sound on the ZX81

Beitrag von sascha2000 » 13.04.2012, 00:07

Hello,

I have now compared, what is possible with the MrX Adress decoding and what conficts with already used adresses (D means don't care / not used):

bin hex conflict
000D0111 = 07/17 --> cinflict with zxpand
000D1111 = 0F/1F --> cinflict with zxpand-ay
001D0111 = 27/37 --> cinflict with 8255 Port A & Port C
001D1111 = 2F/3F --> cinflict with 8255 Port B & Command
010D0111 = 47/57 --> cinflict with PIO Port A & Command A
010D1111 = 4F/5F --> cinflict with PIO Port B & Command B
011D0111 = 67/77 --> cinflict with Centronics-Printerport) & RAMDISK Latch (48k)
011D1111 = 6F/7F --> cinflict with Centronics-Printerport & EEPROM-Latch (8k)
100D0111 = 87/97 --> cinflict with SIO Port A & SIO Command A
100D1111 = 8F/9F --> cinflict with SIO Port B & SIO Command B
101D0111 = A7/B7 --> cinflict with CTC 0 & CTC 1
101D1111 = AF/BF --> cinflict with CTC 2 & CTC 3
110D0111 = C7/D7 --> cinflict with Pio 3 PIO Port A & Command A
110D1111 = CF/DF --> cinflict with zxpand-ay
111D0111 = E7/F7
111D1111 = F7/FF --> conflict with ULA

At least the MrX needs two adress pairs one for the latch and one for the data. One adress pair seems to be not used it is:

111D0111 = E7/F7

Now choosing another pair is the hot issue. Which conflict does harm less?

@ALL
WHICH CONFLICT COULD BE ACCEPTABLE? I SUGGEST 011D0111 = 67/77 --> cinflict with Centronics-Printerport) & RAMDISK Latch (48k).

@Sirmorris
>I think for the turbosound solution it would be reasonable to expect that custom GALs are necessary for one or both boards.

I would suggest a change on the MrX only, if we find an acceptable port conflict. Thats cause the zxpand-ay is now the standard and the MrX in case of the turbosound the add on. Just my opinion.
The current zxpand-ay can operate with all kind of zon-x adresses without changing the software. This is a big comfort for the users.
I don't think that many users may accept a step back in a way that the zxpand-ay supports less than today, in favor for the turbosound having always 2 Soundcards connected to support the full adress range.

>Would it be enough to make, for instance, the ZXpand-AY respond only to $0f & $cf and Mr.X to $1f,$df. This way we can keep to the 'standard' ports for both devices and not worry about picking a port used by another device?

This could be a solution for shure...... but lets wait if we find an acceptabel conflict .....

Regards
Sascha

andyrea
User
Beiträge: 41
Registriert: 03.04.2018, 20:30

Re: 6-Channel Sound on the ZX81

Beitrag von andyrea » 13.04.2012, 00:22

Wow,Good work Sascha tracking down all those port addresses... now if i'm not mistaken the original Zon-X addresses occured becuase of

faulty / incomplete address decoding
and then different softwares used either/or of the available addresses 0f/1f or cf/df or of/df or cf/1f....

you only need 2 addresses to comunicate with the AY/YM chip so is it not sufficient to use just E7/F7 of course i realise that in some decoding schemes already present D4 has been omitted so this could be a problem.

just thinking out loud really

Andy

Benutzeravatar
sascha2000
User
Beiträge: 468
Registriert: 05.05.2011, 11:58
Wohnort: Zwischen Reutlingen und Tübingen

Re: 6-Channel Sound on the ZX81

Beitrag von sascha2000 » 13.04.2012, 00:55

Hello Andy,

>Wow,Good work Sascha tracking down all those port addresses...

Thank you :D :D :D

>now if i'm not mistaken the original Zon-X addresses occured becuase of

>faulty / incomplete address decoding
Maybe ... and cause of user/freak modifications common in the 80ies ... why ever ...

>and then different softwares used either/or of the available addresses 0f/1f or cf/df or of/df or cf/1f....

Yep!

>you only need 2 addresses to comunicate with the AY/YM chip

Correct!

>so is it not sufficient to use just E7/F7 of course i realise that in some decoding schemes already present D4 has been omitted so this could be a problem.

In the decoding scheme of the MrX A4 is totally ignored. So A4 is not routed to the GAL ...... :cry: :cry: :cry: :cry:

This means at least that always a pair of two adresses will be used for data and latch, cause of the A4 is not decoded. This was a solution I choosed for the MrX .... to gain SW compatibility and saving one wire on the pcb ...... Now it is a drawback :cry:


>just thinking out loud really

did I get it?

Regards
Sascha

Benutzeravatar
siggi
User
Beiträge: 2295
Registriert: 06.12.2005, 08:34
Wohnort: D, Hessen, tiefste Werreraa
Kontaktdaten:

Re: 6-Channel Sound on the ZX81

Beitrag von siggi » 13.04.2012, 09:58

sascha2000 hat geschrieben: WHICH CONFLICT COULD BE ACCEPTABLE? I SUGGEST 011D0111 = 67/77 --> cinflict with Centronics-Printerport) & RAMDISK Latch (48k).
Hi Sascha,
the ramdisk latch at $77 is used in all my Zeddies for bankswitching of a ramdisk or of the MEFISDOS ram banks. So using MEFISDOS with Mr X may get very noisy :mrgreen:

Siggi

Benutzeravatar
Paul
User
Beiträge: 2719
Registriert: 10.03.2010, 12:01
Wohnort: Germanys west end

Re: 6-Channel Sound on the ZX81

Beitrag von Paul » 13.04.2012, 11:10

My exuses for interfering.
I guess the modification of the GALs will be only interesting for few users, and all of those will have ZXpand and MR.X, or at least two Mr.X.
So it would be best to use two ZONX adresses on one device and one on the other. This way all adresses are used and if any adress is used by any program, then sound will come out of one of those units.
I think both GALs should be changed for those using two devices at the same time. Then you dont have any interference with other projects.

Short question: Could two AYPand boards be stacked onto each other? This would be mechanically better and even look better :wink: than the combination of those different board types.
Theoretisch ist zwischen Theorie und Praxis kein Unterschied.
Praktisch allerdings wohl.

Benutzeravatar
sascha2000
User
Beiträge: 468
Registriert: 05.05.2011, 11:58
Wohnort: Zwischen Reutlingen und Tübingen

Re: 6-Channel Sound on the ZX81

Beitrag von sascha2000 » 13.04.2012, 12:51

@sirmorris

>Would it be enough to make, for instance, the ZXpand-AY respond only to $0f & $cf and Mr.X to $1f,$df. This way we can keep to the 'standard' ports for both devices and not worry

Sorry I made a mistake that is not possible, cause MrX does not evaluate a4. So if it listens on $1f and $dF it is listening on on S0f and $cf too.

I think if we want to have 6 channel sound with the MrX, it has to conflict with some devices.


Whats about AF/BF --> cinflict with CTC 2 & CTC 3 ?????

Benutzeravatar
sascha2000
User
Beiträge: 468
Registriert: 05.05.2011, 11:58
Wohnort: Zwischen Reutlingen und Tübingen

Re: 6-Channel Sound on the ZX81

Beitrag von sascha2000 » 13.04.2012, 18:26

cinflict sollte natürlich conflict heissen ..............

Benutzeravatar
siggi
User
Beiträge: 2295
Registriert: 06.12.2005, 08:34
Wohnort: D, Hessen, tiefste Werreraa
Kontaktdaten:

Re: 6-Channel Sound on the ZX81

Beitrag von siggi » 13.04.2012, 18:46

sascha2000 hat geschrieben: Whats about AF/BF --> cinflict with CTC 2 & CTC 3 ?????
Hi Sascha
CTC2 and CTC3 are only used in my Web-Server-Zeddy, which has an ECB-BUS and not a ZX81 bus. So I cannot use Mr.X with it and thus it's no problem for me. But those ports are also used for PIO3 by the ZX96. So there would be a conflict for ZX96 users, which have a MULTIO-IO-Card ...

Siggi

Benutzeravatar
sascha2000
User
Beiträge: 468
Registriert: 05.05.2011, 11:58
Wohnort: Zwischen Reutlingen und Tübingen

Re: 6-Channel Sound on the ZX81

Beitrag von sascha2000 » 15.04.2012, 00:09

Hello,

I have now implemented and tested the new port adresses for the turbo sound:

Valid compinations are:

Latch: Data:
#0xAF 0xE7
#0xBF 0xF7
#0xAF 0xF7
#0xBF 0xE7

Test where done with the following combinations:

2xMrX, Memotech 16K, ULA Replacement
ZXPAND AY, MrX, ULA Replacement

@all

Is this adress range now OK with respect to the users who are interrested in using a zxpand-ay + MrX for getting the turbosound feature?

@yerzmyey

If you want the new GAL chip using this adresses just send me a PN with your private adress. I will send you the chip.

@Others

Everybody who owns the series MrX can get the same for free. Just send me your Adress by mail.


To be complete here the GAL equations which can be compiled with galasm. Just for those who can burn the gal themselves:

Gal16V8
#
#


Clk A1 A2 A3 IRQ WR A6 A7 A5 GND
/OE NC NC NC NC BUCS BC1 BDIR Q0 VCC
#
# Boolsche Gleichungen
#
Q0 := /Q0
IF(VCC)
BDIR = /WR * /IRQ * A1 * A2 * A3 * A5 * /A6 * A7 + /WR * /IRQ * A1 * A2 * /A3 * A5 * A6 * A7
IF(VCC)
BC1 = /IRQ * A1 * A2 * A3 * A5 * /A6 * A7
BUCS = /BC1 * /BDIR


#modified valid here
#0xAF 0xE7
#0xBF 0xF7
#0xAF 0xF7
#0xBF 0xE7


#original not valid here
#0xDF 0x0F modified ZON-X
#0xCF 0x1F original ZON-X
#0xCF 0x0F from ZON-X user manual
#0xDF 0x1F additional combination

Benutzeravatar
yerzmyey
User
Beiträge: 185
Registriert: 19.07.2007, 20:51
Wohnort: Rubber Planet
Kontaktdaten:

Re: 6-Channel Sound on the ZX81

Beitrag von yerzmyey » 15.04.2012, 01:49

sascha2000 hat geschrieben:@yerzmyey
If you want the new GAL chip using this adresses just send me a PN with your private adress. I will send you the chip.
Done!

You can be sure about one thing: if Andy's so kind to make a player, the entire combo WILL BE USED for sure. Many times, even. :)

Thx a lot!
Y
IN NIHILUM REVERTERIS - a big text-adventure game for ZX81: http://tiny.pl/g2m6m
"MONOCHROME" issue 5 - (Spring 2014) free paper/PDF magazine about ZX81: http://tiny.pl/q2m44
ZX81 COMPETITIONS 2007/2009: http://zx81.republika.pl/

SirMorris
User
Beiträge: 31
Registriert: 11.04.2008, 10:58

Re: 6-Channel Sound on the ZX81

Beitrag von SirMorris » 17.04.2012, 23:27

Great work, Sascha! 8)

andyrea
User
Beiträge: 41
Registriert: 03.04.2018, 20:30

Re: 6-Channel Sound on the ZX81

Beitrag von andyrea » 29.04.2012, 13:57

Preliminary TS player for ZX81.

see thread here http://www.rwapservices.co.uk/ZX80_ZX81 ... 4&start=10

You'll have to do a few pokes to suit your AY chips port addresses. The Display when playing is a minimal 8 line affiar, ( the top 8 lines of normal D-file) but moved towards the middle of the display, Basic still runs during playback.

Andy

Antworten