News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Bryce

464+ Mod

Started by Bryce, 13:34, 08 June 12

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bryce

#25
Correct (MacDeath) the sound output (Pin 7) on the cassette player isn't connected. But the Op-Amp for this also isn't present. I could easily add this, but I suspect you (MrLou) will opt not to want this, because the intended use is mainly for music and you have already mentioned your dis-like of the humming on the sound output of the 464. This is probably why Amstrad chose to remove it. Having a non shielded wire routed from the tape deck on the right all the way over to the AY on the left is probably a major source of humming on the output. And do you really need to hear the tape loading? Is it worth having a humming in the speaker? I could connect it to its own speaker, not connected to the normal sound output at all? That would avoid the humming, but I will need to find a space in the CPC.

As far as the counter is concerned, I have a few counters here, I'll take a look at how much work it would be to add this.

Bryce.

mr_lou

Quote from: Bryce on 09:16, 14 June 12
Correct (MacDeath) the sound output (Pin 6) on the cassette player isn't connected. But the Op-Amp for this also isn't present. I could easily add this, but I suspect you (MrLou) will opt not to want this, because the intended use is mainly for music and you have already mentioned your dis-like of the humming on the sound output of the 464. This is probably why Amstrad chose to remove it. Having a non shielded wire routed from the tape deck on the right all the way over to the AY on the left is probably a major source of humming on the output. And do you really need to hear the tape loading? Is it worth having a humming in the speaker? I could connect it to its own speaker, not connected to the normal sound output at all? That would avoid the humming, but I will need to find a space in the CPC.

Less humming / noise is definitely better than being able to hear the tape loading. It's important to be able to record CPC tunes without noise.
It would however be nice to be able to hear the loading. I was thinking it could have its own speaker, one of those very small flat speakers from Game & Watch games? No need to be able to control volume of it. It just needs to be low volume so it can be heard, with the option of turning it off again (from inside the machine - no more switches outside).  ;)

Bryce

I'll take a look at where I could connect a small piezo speaker then.

Bryce.

mr_lou

Cool. :-)
I'm thinking it will be very helpful when needing to find the location of a certain program on the tape. Especially when/if there is no counter.
Maybe instead of an on/off switch inside, it could be a variabel resistor? I mean adjust volume if needed, or completely turn it off by turning it all the way down? But still only possible from inside the machine. No more switches outside. :-)

Bryce

The Classic 464 actually uses a very indirect way of making those sounds. The Tapedeck isn't actually connected directly to the speaker anywhere. The data leaving the tape PCB is already in a digital form and is passed through the AY and back to the speaker as far as I know. So the Firmware / CPU must play some part in linking the two.

Bryce.

Gryzor

I think this was discussed in the past... so actually the tape unit already demodulates it, then the main unit modulates it again to allow it through the speaker? But if that's so, how can you hear it when a tape is bad and wobbles and flutters? I don't think the CPC would recreate that effect from a digital signal?

arnoldemu

Quote from: Bryce on 11:53, 14 June 12
The Classic 464 actually uses a very indirect way of making those sounds. The Tapedeck isn't actually connected directly to the speaker anywhere. The data leaving the tape PCB is already in a digital form and is passed through the AY and back to the speaker as far as I know. So the Firmware / CPU must play some part in linking the two.

Bryce.
i don't think it's passed through the ay because it doesn't have an input and no writing is done to ay for that during loading/saving.

as far as the cpu is concerned it reads bits from the 8255, and writes bits to it for saving.

how the sound actually gets to the speaker I don't know.

maybe the circuit has some leakage?

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Bryce

Slightly off-topic at this stage, but here's an explanation of the cassette loading circuitry:

The tape unit doesn't fully demodulate the signal, it just digitises it, ie: there are only two levels 0V and 5V. This is fed directly back to the PIO and "internally" forwarded on to the AY. If you take a look at the 464 Schematics below, you can see the connections (or lack of them). The Op-Amps I've labelled (A to D) do the following:

Tape loading related:
Op-Amp A: Amplifies the analogue signal from the tape head to a usable voltage (but still analogue).
Op-Amp B: Is configured as a comparitor and Digitises the signal by jumping between 0V and 5V depending on the analogue voltage received. From this point on the signal is digital, but not demodulated, ie: the 1s and 0s are not all the same length.

AY output related:
Op-Amp C: Is a pre-amp for the output of the AY which then goes to the volume control (it is only connected to the output of the AY and nothing else, which means that ALL sounds from the speaker have been produced by the AY)
Op-Amp D: Is the end stage which drives the speaker.

If the analogue signal from the tape were to go directly to the speaker, then there would have to be a connection from the output of Op-Amp A (Pin 7 of the LA6324) to the input of the pre-amp (Pin 12 of the LA6324) or Pin G of the cable connection, but it's not there. Sound In and the pre-amp are only connected to the AY, which means the sound came from there. In the second schematic you can see that the Digital output (Pin E) also only goes to B7 of the of the PIO, so it is definitely a digital signal and is not connected to anything else.

Bryce. 

Bryce

@Arnoldemu: It's a bit too clear and controllable to be leakage. You can completely turn it down with the volume control, which would mean that it leaks (loudly and clearly) to the pre-amp, but not at all to the end-stage? This seems unlikely.

Bryce.

arnoldemu

How can the PIO forward it to the AY? The only connects it has are 2 lines for control, and 8 for data.
the AY needs you to write a register and value to get sound out, the 8255 input can't do that.

So how does the sound get to the speaker?
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Bryce

Due to the lack of physical connection, I assume that the CPU is reading B7 and writing whatever is required to the AY. Do you have a dis-assembled version of the loading sequence we could look at?

Bryce.

MacDeath

#36
hearing the "bit flow" from the tape was a nice way to find what you're searching "by hears"...

you know, those long beeps before the scratch Matrix escape crunch noise of the actual bit-stream...


But to be fair that's because when I last used tapes on my CPC6128... it was for a compilation of cracked games on a "big" tape, and I was just using my walkman with only the audio connected.

So I had to use ear and see the block on the screen to find the start of the games.


on 464PLUS, no sounds nor counter...
I guess Amstrad wanted peoples to have only original games with 1 game per tape.

Actually a clever way to somewhat get rid of those Cracked 60 or 90minutes tapes compilations. ;D


But I can understand how much a pain in the @$$ it is to add a counter or a mini sound system to it.



also, do you remember this application enabling to do samples from a tape... Ultrason I guess...
can it be used with an unmodified 464PLUS ?

perhaps not that good/practical if you can't hear directly what the Tape is reading.

Also could the DMA channels on the PLUS be exploited in anyway to get such kind of application even better ou a 464PLUS ?

Could be great to also have a jack plug on the casing for Audio-in only so you could use a modern MP3 or CD source to read/launch bits.

Bryce

Ah... So on a 6128 with external tape player you hear the sounds too? That would prove that it's not leakage and IS being produced by the AY. The wire from the tape socket of the 6128 goes directly to B7 of the PIO and definitely isn't connected to anything else.

Bryce.

MacDeath

not sure actually, but i think so, if my memory is not altered by eons of beer and booze.

To simply use my walkman connected to my CPc6128 was cool anyway.
not sure it could work with protected game though.

Badstarr

If you load a tape on the 464 Plus and then set the TV volume full blast you can hear the bit stream, at least you can on mine. I always liked hearing the "loading music" I could hear the slightest deviation from ideal. I would usually spot an error before the CPC flagged it up, I used to load cassettes via the headphone socket on my Midi HI-FI (well we all had them in the 80s/90s) I actually just poked the bare wires into the cassette socket on my 6128 so I never even had a proper plug pushed into the socket lol! I remember the first cassette I ever loaded on my 6128 was Gemini Wing, I got it in a bargain bin at a local computer store for 25p! I was over the moon when it loaded via my crazy hack solution!
Proud owner of 464 GTM64 6128 GTM65, GX4128 and a 464/6128 Plus Hybrid a 20 year long ambition realised! :-)

arnoldemu

#40
Quote from: Bryce on 14:42, 14 June 12
Ah... So on a 6128 with external tape player you hear the sounds too? That would prove that it's not leakage and IS being produced by the AY. The wire from the tape socket of the 6128 goes directly to B7 of the PIO and definitely isn't connected to anything else.

Bryce.
yes you do hear the sounds with a 6128 and an external player, but you only hear them well if you turn the volume high.
If you do that, the ay sound is far too loud and can get distorted.

BTW, I'm not buying the "AY is making the sound". I'm not going to change my mind on this. It doesn't.
I can't see how it does.
How could a pin on the 8255 cause the sound of the AY to be affected. The 8255 is physically seperate from the ay.
The AY is connect to the 8255 through other pins, and then it's only to control it.

Saying it affects the AY is the same as saying "when I put this input on this pin of the 8255, others magically change to send sound commands to the ay".

To affect the sound, the input from the tape needs to be piped through to the speaker, joining it with the AY sound, but not through the AY... it's not got audio in! (it's not a sid  :laugh: ).

So I think the diagrams are not accurate:
http://www.cpcwiki.eu/imgs/b/b1/CPC_Disc_Cassette_Schematic.gif

Something *is* missing.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

arnoldemu

#41
Quote from: Bryce on 14:23, 14 June 12
Due to the lack of physical connection, I assume that the CPU is reading B7 and writing whatever is required to the AY. Do you have a dis-assembled version of the loading sequence we could look at?

Bryce.
http://www.cpctech.org.uk/docs/os.asm

Look for this:

;; sample edge and check for escape
cpu is in a tight loop sampling the input.

BTW:
If you have a tape player connected *WITHOUT* motor control, and you turn up the volume, and you don't start the loading process. You can STILL hear it through the speaker.
It is also true if you just do this from basic:
out &f600,&10
So, leave it on Ready prompt, turn it up and listen... ;)

So now, where is the sound comming from??? ;)


My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Badstarr

I feel pretty sure from memory that the tape is connected to the SOUND pin on the expansion bus which is then connected to the amplifier and the internal speaker, on the 464 Plus I don't think this happens. The way I understood it, (over simplification follows...) is that the audio from the tape is fed to essentially, a noise gate, when the audio reaches a certain threshold the gate opens which the CPC interprets as a 1, when the audio falls back bellow the threshold, the gate closes, which is interpreted as a 0. This is why, when you play an audio tape, for example Nirvana, Smells Like Teen Spirit. You get a horrible distorted version played through the CPC. This is because the audio is essentially triggering a switch that lets through, say +5v. Its like a 1bit sample rate, basically one level of quantisation (on off).
Proud owner of 464 GTM64 6128 GTM65, GX4128 and a 464/6128 Plus Hybrid a 20 year long ambition realised! :-)

Bryce

I wasn't suggesting that the analogue signal is magically getting sent to a non-existant analogue input on the AY. I was suggesting that the CPU (which is reading the 0s and1s at B7 of the 8255) is running a small routine to tell the AY to play note X when a 0 is read and play note Y when a 1 is read. The reason for this conclusion is the schematics, which as you can see below (this time the 6128), the wire from the tape port goes directly to the 8255 input B7. It's not (according to the schematics) connected to anything else and has no direct route to the speaker.

The "noise gate" you describe is the part I called Op-Amp B in the diagram above. If I get time at the weekend, I'll open up a 464 and a 6128 and check if there are any connections there, that are not on the schematics. Last night while doing some more of the 464+ mod (the original theme of this thread :D ) I found several errors in the schematics and the BOM.

Bryce.


arnoldemu

Quote from: Bryce on 09:18, 15 June 12
I wasn't suggesting that the analogue signal is magically getting sent to a non-existant analogue input on the AY. I was suggesting that the CPU (which is reading the 0s and1s at B7 of the 8255) is running a small routine to tell the AY to play note X when a 0 is read and play note Y when a 1 is read. The reason for this conclusion is the schematics, which as you can see below (this time the 6128), the wire from the tape port goes directly to the 8255 input B7. It's not (according to the schematics) connected to anything else and has no direct route to the speaker.

The "noise gate" you describe is the part I called Op-Amp B in the diagram above. If I get time at the weekend, I'll open up a 464 and a 6128 and check if there are any connections there, that are not on the schematics. Last night while doing some more of the 464+ mod (the original theme of this thread :D ) I found several errors in the schematics and the BOM.

Bryce.
@Bryce: The CPU doesn't do what you suggest.
There is nothing in the loading/saving which does this.

What I would like to know on a cpc is the SOUND on the expansion, does it have tape noise or not?
It is possible it doesn't, and that only the speaker has the extra connection.

As for the errors in the schematics it would be great, when you have time to correct them.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

ralferoo

This discussion is quite interesting to me. Personally I hate the silent load of my 464+ and actually put extra effort in to route tape read and write noise into my sound output on my FPGA emulator - because that's what a real CPC does as far as I'm concerned!

mr_lou

I just find it practical to be able to hear the audio.

About the audio being sent to the CPU or not, I don't think so either. Because if you put any normal audio tape with music in the player, you can hear that too coming out the speaker

Bryce

Quote from: arnoldemu on 09:38, 15 June 12
@Bryce: The CPU doesn't do what you suggest.
There is nothing in the loading/saving which does this.

What I would like to know on a cpc is the SOUND on the expansion, does it have tape noise or not?
It is possible it doesn't, and that only the speaker has the extra connection.

As for the errors in the schematics it would be great, when you have time to correct them.

To be honest, I didn't really think it did, but as I said, the schematic also doesn't show how the sound gets there either. I'll try to find time to rip open a 464 at the weekend and find out exactly what's connected to what and how the sound is getting to the speaker.

Regarding the errors, I didn't write them all down. The only one I can remember is that R106 in the 6128+ BOM is listed as a 1.5Ohm resistor, when in fact it should be 1.5KOhm. I know this because I ordered the parts for the mod from the BOM and now I have to go and order this part again. 1.5K (or even 1.5Ohm) is not a standard (preferred) resistor value, so it's not a resistor I'd normally have lying about :(

Bryce.

Badstarr

I have had a brief mess around with a multi meter and the mainboard from a 6128 and the only tape associated signal I can find that is connected in any way to the CPC audio amp is the Data Out pin. I think Bryce is quite right that the AY is producing the signal we hear on a classic CPC while loading. The AY is particularly good at producing Square Waves, and it is quite possible that an error in the source audio from the cassette could be reproduced as the signal produced by the AY would be directly correlated to the source audio. How faithfully the error is recreated would depend on the baud rate which I believe can be around 2000 bits/sec this would seem adequate to me.


The reason why music played through the system seems quieter and very degraded is most likely due to the CPC only being interested in a Unipolar signal, the CPC only needs to make a distinction between Off and On or Loud and Quiet. A Music signal would essentially be cut in half, causing it to become half as loud, hence having to turn the volume up to hear it. Also the baud rate would be adequate to produce the horrible version of whatever 80's classic tape you happen to try to play through it.  :laugh:   
Proud owner of 464 GTM64 6128 GTM65, GX4128 and a 464/6128 Plus Hybrid a 20 year long ambition realised! :-)

Bryce

#49
Ok, I just did a full tape loading investigation, here's the result:

1) There is no direct (intentional) connection between the tape output and the speaker.
2) The loading sound in the speaker is definitely unintentional and not designed to be that way.
3) The problem is definitely "solved" on the 464+
4) The AY is not producing the sounds.

I measured the output of the AY while a tape was loading, it's zero. The only physical connection between the tape output and the sound amplifier is a +5MOhm path, which would definitely not produce any sound on the speaker. The effect happens because the classic CPC has shared an Op-Amp chip for the tape amplifier and the sound amplification. Referring back to the diagram I posted on the previous page, Op-Amps A + B which amplify the tape head output are in the same IC package as Op-Amp C which is the pre-amp for the sound. There is cross-talk between these Op-Amps, which then gets exaggerated by the fact that it's a pre-amp and is amplified further after the volume switch. The 464+ doesn't use Op-Amp C for the sound circuitry. the output of the AY on the 464+ is pre-amplified by two transistors and goes directly to the audio-out (at Line-out levels). Also, the entire amplification on the classic CPC happens on the tape-deck PCB, but on the 464+ it happens on the mainboard.

I can add a small Op-Amp (or maybe even use the un-used stage) on the 464+ to create the sound on the 464+ if you like. I also looked at adding a counter: Not a chance, the space just isn't there.

Bryce.

Edit: There's a very easy way to prove this... Disconnect the Data-Out pin on the cassette player, so no data is making it to the mainboard (or the AY), then load a tape... The sound is still heard in the speaker.

Powered by SMFPacks Menu Editor Mod