AYe AYe...

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
User avatar
BrunoFlorindo
Posts: 290
Joined: Sat May 10, 2008 2:46 am
Location: Anaheim, CA, USA

Re: AYe AYe...

Post by BrunoFlorindo »

Looking good! Any hope to adapt SpecAY so we can make AY files work on the Zeddy without xonverting them?
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: AYe AYe...

Post by Andy Rea »

Hi Bruno,

you wouldn't be 'ZXbruno' on comp.sys.sinclair would you ??? I've had a quick look at the AY spec, and a very quick look at SpecAy, i just don't think it's gonna be possible on zeddy, spectrum 128K can map ram to full 64K memory space and so can run the z80 code chunks (within the ay files) at any address, i just can't see how i/we (the zeddy fraternity) could create a software in limited memory space that can run arbitary code at a memory space other than the memory space it was assembled at, it might be self modifying code and the 2 players i have played with are.

on the other side of th coin, there is hope for new zeddy musci, the PT3 player is sort of working, but it does some funky stuff with the stack pointer so nmi's have to be disabled which throws the vsync timming all over the place and the picture jumps around :lol:

but there are programs for windows and linux that can create PT3 and convert older formats to PT3

Andy
what's that Smell.... smells like fresh flux and solder fumes...
User avatar
BrunoFlorindo
Posts: 290
Joined: Sat May 10, 2008 2:46 am
Location: Anaheim, CA, USA

Re: AYe AYe...

Post by BrunoFlorindo »

Excellent!
How about WAV2AY? Any chance we can make the Zeddy talk just by using the AY? Or isn't the CPU fast enough?

P.S. Yes, I'm zxbruno on CSS. I'm also on ECSS, WOS, the TS2068 yahoo group and Speccy.org. :)
Moggy
Posts: 3266
Joined: Wed Jun 18, 2008 2:00 pm

Re: AYe AYe...

Post by Moggy »

Andy Rea wrote:Exccelent, for me it makes no difference as to who makes what board, i may go with SirMorris's ay expansion for ZXpand that way i can use AY sound on more than 1 Zeddy, but i like the challenge of creating things myself... i had a harder time working out which port was register select and whihc was data than actually building the thing !

tis great to see more people interested in AY for the Zeddy.

the thing about the stereo that bugs me, is there seems to be no one 'correct' way, each individual seems to have there own idea about which channel should go left/right/shared. i'm contemplating changing my design to *mono* ( well all channels to left and right simulataneously).

Andy.

P.s. i hate reverse engineering other peoples code !

Hi Andy have You thought about having the three channels as seperate outputs :?:
That way it would be a useful music tool rather than just a player the three outputs could then be ran through a mixing desk and panned, level controlled etc as needed leaving the ay board as the prime mover only.
I downloaded a couple of thousand STC files and having spent a day running through them, I noticed the levels on say the drum track was overshadowing the rest of the channels, or the bass line on another was over the top.Summed to a mono channel as per the ZONX there's not a lot You can do about balancing the output except hope You got it right during composition. ;)
I ask this as a musician seeking another useful musical tool to be used, not in isolation but to be used to record along side other instruments rather than wanting just a player. :D

I listened to a lot of Yerzmyeys stuff and I could swear I heard a brief piece of speech on one track called Fifth channel, either that or a great piece of programming :lol:

Anyway just a thought Andy, if not viable then no worries.

Regards Moggy
User avatar
BrunoFlorindo
Posts: 290
Joined: Sat May 10, 2008 2:46 am
Location: Anaheim, CA, USA

Re: AYe AYe...

Post by BrunoFlorindo »

Digitised speech during an AY tune doesn't sound wonderful, but it is possible. Gasman (Matt Wescott) did it. :-)
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: AYe AYe...

Post by Andy Rea »

@Moggy,

really pleased your having fun listening to all those STC files, there is quite a few to get through, i love the old game and demo ones that i can remeber from the old days.

but Regards the channel separation, i guess thats something that the individual can do should he/she wish too, it wouldn't be a difficult job, but i have no intention of bulding AY boards i'm leaving that job to SirMorris, im more interested about working on a player that can play a format that we can use modern tools to create new musics, but so far i'm not hvaing much joy with the PT3 player, it uses AF' and index register and does some funky magic with SP used as an automatic index to get value from a table.

i can even seem to get the original soundtracker to work reliably in spectrum emulator, do i really want to get my real spectrum out again :mrgreen:

Andy
what's that Smell.... smells like fresh flux and solder fumes...
User avatar
yerzmyey
Posts: 1240
Joined: Thu May 15, 2008 10:11 am
Location: Rubber Planet
Contact:

Re: AYe AYe...

Post by yerzmyey »

Moggy:


> I downloaded a couple of thousand STC files and having spent a day running through them, I noticed the levels on say the drum track was overshadowing the rest of the channels, or the bass line on another was over the top.
--------------
Listenning on what hardware? On ZX81 with AY?
Also there is an importan question about the chip itself. Almost all STC have been written for AY. However Spectrum people often use YM instead (slightly different volumes balance) which might cause the problem.


> Summed to a mono channel as per the ZONX there's not a lot You can do about balancing the output except hope You got it right during composition. ;)
--------------
As long as we talk about square waves and white noise.
Buzzer has only one volume.


> I listened to a lot of Yerzmyeys stuff and I could swear I heard a brief piece of speech on one track called Fifth channel, either that or a great piece of programming :lol:
---------------
It's programming in this case - we noticed with Factor6 that with some work, it could be possible to simulate speech with AY and a music-editor only, hahaha. :) What people can invent when they're bored. ;)
Anywayz. If anybody has some AY song recorded from ZX81, I would be grateful for the MP3 + original Spectrum version to compare.


> Regards Moggy
--------------
Best wishes :)
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/
Slipstreem
Posts: 21
Joined: Sun Jul 31, 2011 1:02 am

Re: AYe AYe...

Post by Slipstreem »

yerzmyey wrote:As long as we talk about square waves and white noise. Buzzer has only one volume.
That infers to me that you're saying that the outputs are digital, ie, a 0 or a 1, which they aren't. The outputs have 16 possible volume levels each through envelope control.

The outputs are analogue, and that's why it's vitally important that the outputs aren't just shorted together but mixed together via appropriately chosen resistor values if proportionally accurate summing of the outputs is to take place and distortion is to be avoided. I wouldn't mind betting that an AY-3-8910 with it's outputs simply shorted together is going to sound quite different from one where the outputs are correctly summed.
User avatar
yerzmyey
Posts: 1240
Joined: Thu May 15, 2008 10:11 am
Location: Rubber Planet
Contact:

Re: AYe AYe...

Post by yerzmyey »

Slipstreem:

> That infers to me that you're saying that the outputs are digital, ie, a 0 or a 1, which they aren't. The outputs have 16 possible volume levels each through envelope control.
--------------------
It's probably some issue of nomenclature which I don't know. You suggested changes while composing, so I answered: YES, it is possible to change volumes while composing - and YES - 16 levels of it.
UNLESS we're talkin'bout the buzzer. The "hardware envelope" effect. Its volume cannot be controlled. It can be only ON and OFF.



> The outputs are analogue, and that's why it's vitally important that the outputs aren't just shorted together but mixed together via appropriately chosen resistor values if proportionally accurate summing of the outputs is to take place and distortion is to be avoided.
-------------------
And surely You're right because there are already two machines with broken AY sound in this way - Atari STe (well, ST doesn't sound perfectly either) and supposedly ZX+3 (I don't have one, so I only can repeat others' statements in this subject-matter).
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/
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: AYe AYe...

Post by Andy Rea »

I've done it :D PT3 player on Zeddy :shock:

Was no mean feat and took a few (well alot) of hours pondering and altering bits of code, i started off with Sergey Bulba's code for PT3play on ZX spectrum, which doesn't assemble in tasm.... but a few tweaks here and there i can assemble it, and test it. great works just fine if A) you want no sound, B) you want no display, c) you get no responce from keyboard... looking good.

MOD1, was to actually make some sound, ok thats not hard, find the bit of code that writes the registers and jiggle the port addresses about, check, ok it makes some sounds but i still have int's disabled and nmi's off but its a start

MOD2, the player code uses af' which on a zeddy is used for timing the display generation, so code moddified not to use af' bit of a cheat really because i just replaced all the EX af,af' with PUSH hl\ LD hl,(a_stor)\ PUSH af\ EX (sp),hl\ POP af\ LD (a_stor),hl\ POP hl has been changed to EXX\ PUSH AF\ EX (SP),HL\ POP AF\ EXX slightly shorter and a tiny bit quicker.

This was after trying other methods inclding stroring the af' pair in the bc' pair but it turns out the zeddy uses the alternate registers too.

MOD3 - 5 ok this is the realy tricky bit, i have almost no spare registers and the code as is frequently load sp with an address inside a lookup tabel so that it can quickly 'pop' words off, then restores sp and goes along on its merry way.... however should an interrupt occur at one of these times the oblivious to what is going on zeddy pushes the registers onto the stack, thus corrupting the nice table... :( bit by bit i managed to hack together work around for each of the times the SP was used in this way.

MOD6 almost there now, just change all th references IX in IY and we are ready to go, your not really supposed to use IY and have the zeddy running basic but with a trick intterupt handler it's possible.

the upshot is a player that can play PT3 files whilst maintaining a steady display and can still run basic or your own machine code. But it does come at a cost, the player is 2.6K :shock: and it's average cycle time each 1/50th second is around 6000 clock cycles, it's usually lower but ocassinally it, much higer too.

anyway you can all get busy now creating ZX81 musical master pieces using VORTEx II tracker from Sergey Bulba available herehttp://bulba.untergrund.net/vortex_e.htm

here are some file for those more technically minded
source.zip
source codes used, handler.asm = my interupt handler, zxptplaymod6.asm = the modified source for the player, VTII0bG.txt = the original source for the player.
(18.89 KiB) Downloaded 172 times
and those that have zon-x and ZXpand... a little demo.
pt3demo.zip
copy into an empty directory on your ZXpand, make that directory the default one, and LOAD "PT3DEMO"
(10.13 KiB) Downloaded 184 times
Andy

p.s. youtube video on it's way
Last edited by Andy Rea on Sun Aug 21, 2011 11:10 pm, edited 1 time in total.
what's that Smell.... smells like fresh flux and solder fumes...
Post Reply