ZXpand-AY Sound Module (Two 8 bit I/O ports control)

Discussions about Sinclair ZX80 and ZX81 Hardware
Post Reply
tdg8934
Posts: 304
Joined: Mon Sep 23, 2013 6:10 pm

ZXpand-AY Sound Module (Two 8 bit I/O ports control)

Post by tdg8934 »

From what I have been able to tell from the ZON-X81 manual and the Yamaha YM2149 datasheet to control the two 8 bit I/O data ports all I need to do is the following:

1. Set R7 (register 7) control first for noise and tone being off and either port B or A as output or input.

Output B & Output A = FFh (255d)
Output B & Input A = BFh (191d)
Input B & Ouput A = 7Fh (127d)
Input B & Input A = 3Fh (63d)

2. Set RE (register E) for port A data 0-FFh (0-255d)
OR Set RF (register F) for port B data 0-FFh (0-255d)

(as registers R0 to RD registers are used for tones and noise control and not needed for controling I/O port A & B).


Write this to the register port being CFh and data register port being 0Fh.

Does this sound right?
tdg8934
Posts: 304
Joined: Mon Sep 23, 2013 6:10 pm

Re: ZXpand-AY Sound Module (Two 8 bit I/O ports control)

Post by tdg8934 »

Is there a chance of getting schematics to the ZXpand and ZXpand-AY? To use the I/O ports I'll need to at least access to ground and +5vdc would be nice too. I found the older MrX-Soundcard manual and in the back was guidelines about the I/O. It looks like I was correct or pretty close to what was needed.

Tim
sascha2000
Posts: 57
Joined: Fri Jul 22, 2011 2:13 pm

Re: ZXpand-AY Sound Module (Two 8 bit I/O ports control)

Post by sascha2000 »

you can still buy an Mrx here http://www.sellmyretro.com
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: ZXpand-AY Sound Module (Two 8 bit I/O ports control)

Post by sirmorris »

5v and ground are available along with the IO pins. The AY board schematic is attached, along with an ASM file which contains everything you need to know about accessing the IO.

Let me know if I can help further.

C
Attachments
iotester.asm
(721 Bytes) Downloaded 266 times
zxpay.png
X:\!!Projects\!ZXpand\PCB\AY\testcode\iotester.asm
(35.98 KiB) Downloaded 621 times
tdg8934
Posts: 304
Joined: Mon Sep 23, 2013 6:10 pm

Re: ZXpand-AY Sound Module (Two 8 bit I/O ports control)

Post by tdg8934 »

That's right the +5vdc and ground are there. You provided the PCB pad layout in the other posting that showed the I/O.

viewtopic.php?f=6&t=1203

Schematics look good too.

Thanks for the great work Sir Morris!
Last edited by tdg8934 on Wed Oct 23, 2013 2:01 pm, edited 1 time in total.
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: ZXpand-AY Sound Module (Two 8 bit I/O ports control)

Post by sirmorris »

You're welcome :)

The program that I posted appears to be the start of something. I think my intention was to make one port an input and continuously read its vale and display it on-screen in binary. The other port would continuously count up for investigation using a logic probe, 'scope or analyser. I have to admit that I haven't run it in a long time and it appears to exit immediately after displaying the port state.

It would be a great service to the community if you wouldn't mind matching up what I posted with the data sheet and reporting on your findings - I don't have the spare time to play at the moment. :(

Good luck
C
tdg8934
Posts: 304
Joined: Mon Sep 23, 2013 6:10 pm

Re: ZXpand-AY Sound Module (Two 8 bit I/O ports control)

Post by tdg8934 »

Sir Morris,

Being an Electrical Engineer (more so in System and Test Engineering) I have looked at the ASM file and understand most of it. Can you or someone tell me what is the best way or program to use these ASM files? I haven't done anything with the TS1000/ZX81 is years and don't know what the latest toolsets are people are using. How do these ASM files get turned into P files like I see with your CMDR SP2 program for the ZXpand card? Love to learn more and do the testing of this card and get back into assembly language again after many years. Just need to know where to get started.

Thanks,

Tim
User avatar
PokeMon
Posts: 2264
Joined: Sat Sep 17, 2011 6:48 pm

Re: ZXpand-AY Sound Module (Two 8 bit I/O ports control)

Post by PokeMon »

Hi Tim,

you might be interested in the ZX-IDE for developing assembler and basic programs for ZX81 or ZX81.
It's quite simple.

Take a look at this well described tool:
http://sinclairzxworld.com/viewtopic.php?f=6&t=1064
tdg8934
Posts: 304
Joined: Mon Sep 23, 2013 6:10 pm

Re: ZXpand-AY Sound Module (Two 8 bit I/O ports control)

Post by tdg8934 »

PokeMon,

That looks like what I was looking for. Thanks for the good find!

Tim
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: ZXpand-AY Sound Module (Two 8 bit I/O ports control)

Post by sirmorris »

+1 for Pokemon's IDE. It's the best out there.
Post Reply