ZXpand-AY Sound Module (Two 8 bit I/O ports control)
ZXpand-AY Sound Module (Two 8 bit I/O ports control)
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?
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?
Re: ZXpand-AY Sound Module (Two 8 bit I/O ports control)
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
Tim
-
- Posts: 57
- Joined: Fri Jul 22, 2011 2:13 pm
Re: ZXpand-AY Sound Module (Two 8 bit I/O ports control)
you can still buy an Mrx here http://www.sellmyretro.com
Re: ZXpand-AY Sound Module (Two 8 bit I/O ports control)
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
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
Re: ZXpand-AY Sound Module (Two 8 bit I/O ports control)
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!
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.
Re: ZXpand-AY Sound Module (Two 8 bit I/O ports control)
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
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
Re: ZXpand-AY Sound Module (Two 8 bit I/O ports control)
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
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
Re: ZXpand-AY Sound Module (Two 8 bit I/O ports control)
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
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
Re: ZXpand-AY Sound Module (Two 8 bit I/O ports control)
PokeMon,
That looks like what I was looking for. Thanks for the good find!
Tim
That looks like what I was looking for. Thanks for the good find!
Tim
Re: ZXpand-AY Sound Module (Two 8 bit I/O ports control)
+1 for Pokemon's IDE. It's the best out there.