Digitized Audio through MIC port

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
Post Reply
utz
Posts: 27
Joined: Fri Jul 15, 2011 11:06 pm

Digitized Audio through MIC port

Post by utz »

On my everlasting quest for obscure 1-bit audio utilities I came across an interesting routine by a certain J N Creak, published in Your Computer issue 05/84. It promises to reproduce digitized audio through the mic port. Curious, I typed it in and what do you know, it actually kind of works.

Well, check for yourself - the attached .z81 snapshot should play a short doodle when loaded into EO (16k RAM).

I've double and triple checked the listing - everything should be typed up correctly. However, either I've made a mistake after all, or the code is buggy. For example, when you press 1, it should jump to a part of the routine that allows you to chop up and reorganize the sound (check readme.txt for details).

Unfortunately I have extremely limited knowledge of MCode, so I wouldn't know where to start hunting for bugs. I've only located one possible error in the BASIC part - in line 2410 there's a GOTO 1100 - that line number doesn't exist.

Despite not knowing anything about ASM either, I've attempted a disassembly - probably it will be full of mistakes, but maybe it is still helpful in some way.

So, honored ZX-81 community, I need your help once again. Aside from getting the routine to fully work, I'd also like to do the following things:

- Eliminate the sampling part of the routine and possibly make more room for samples.
- Feed samples directly into the Zeddy - should be possible to inject the code via EO binary loading.
- Save samples back to tape, and load them again later
- Rewrite the BASIC part, so it can be used as a simple 1-channel mod player.

Any suggestions on how to do that will be highly appreciated! Also, I would be very happy if someone could annotate the asm code for me, provided it is correct.

Cheers,
-utz

PS The original listings can be found at ftp://ftp.worldofspectrum.org/pub/sincl ... 405/Pages/, page 125+126.
Attachments
src_doc.zip
(6.46 KiB) Downloaded 160 times
speech.z81
(10.88 KiB) Downloaded 152 times
User avatar
PokeMon
Posts: 2264
Joined: Sat Sep 17, 2011 6:48 pm

Re: Digitized Audio through MIC port

Post by PokeMon »

I can not help by now with your project but have some TEXT=>ZX81 Basic Converter for Textfiles.
But interesting link you pointed to with a lot of Sinclair related stuff (magazines).
Didn't know that link before.
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: Digitized Audio through MIC port

Post by sirmorris »

Hi Utz,

I seem to remember this program - I was a big fan of Your Computer and I had nearly every issue. You're right - there was a serious issue with the code and it's possible that there were some corrections printed in a subsequent issue. Are the next issues in the archive? If not I may have some here I can check for you.

I'll have a look at the code and see if there are any obvious bugs but without the benefit of well commented source by the author it's difficult to know the original intention.

C
utz
Posts: 27
Joined: Fri Jul 15, 2011 11:06 pm

Re: Digitized Audio through MIC port

Post by utz »

@sirmorris: Had a quick look at the next issues, but didn't find any corrections. Unfortunately I can't check properly, because I have extremely limited bandwidth at the moment, and the WOS magazine archive isn't indexed. So, if you could check your own collection, that'd be great.

UPDATE: So there was a correction after all, in the June issue.
"The ZX81 Speech article in May neglected to mention that the machine code needs to be stored in a REM statement. At the front of Listing 1 insert a REM statement containing 400 characters at line 1."
Thanks YC, that is rather obvious, and doesn't fix anything. :evil:
Post Reply