Shevek  <[EMAIL PROTECTED]>  wrote:

> On my computer, I have connected the printer port, the joystick
> ports and the cassette port to some easy-accessable plugs. I'm
> planning on doing the cartridge slots, too. The joystick and the
> printer port are easy to access, and so is the tape motor. My
> question is: How do I send data to the tape output and what kind of
> signal will be on it when I do so? A connected question: What kind
> of signal should I give the input-line in order to get a 0 or a 1,
> when reading it? I've disassembled the bios and it looks like it I
> have to put &H0A or &H0B on i/o-port &HAB to make it high or low.
> But it didn't give any voltage, when measured. Does anyone know how
> to do this? Thanks, shevek

The cassette connector is for connecting to a cassette recorder, and 
therefore doesn't input/output digital signals, but audio signals. 

For the cassette out (to the MICrophone input of a cassette 
recorder), it's an audio signal with a voltage level in the order of 
10's of millivolts, and only passes through signals in a limited 
frequency range (some 10's up to a couple of KHz.). So no use for 
controlling anything. It's coupled to register C, bit 5 of the PPI 
(Programmable Peripheral Interface, a 8255 or compatible IC).

The cassette input takes an audio signal. Same limitation here: 
frequency limited, and no exactly defined or fixed input levels. This 
signal is input through Port A, bit 7 of the PSG (Programmable Sound 
Generator).

The cassette motor connections are usually simply hooked up to a 
relais (that's giving the well known clicks when giving MOTOR ON or 
OFF), and it's controlled through register C, bit 4 of the PPI ('next 
to' the cassette write signal), with "0" meaning "motor on".


The PSG is located starting at I/O-address A0h (-A2h), so to read the 
casette input signal:

        out (&hA0), 14          ;set PSG register 14 (=port A)
        
after this, bit 7 of I/O-port &hA2 contains the cassette input 
signal.


For the PPI (on I/O-ports A8-ABh):

        out (&hAA), inp (&hAA) and &b11101111      or:
        out (&hAB), &b0xxx1000

("x" = don't care)
Sets cassette motor on,

        out (&hAA), inp (&hAA) or &b00010000         or:
        out (&hAB), &b0xxx1001

sets cassette motor off.

         out (&hAA), inp (&hAA) or &b00100000      or:
         out (&hAB), &b0xxx1011

sets cassette output ("MIC") to "1"

          out (&hAA), inp (&hAA) and &b11011111      or:
          out (&hAB), &b0xxx1010

sets cassette output to "0"

The 1st instructions shown above, address PPI register C on its 'own' 
I/O-address, the second instructions do the same, but in a different 
way, by using a single bit set/reset function of register C of the 
PPI (also used in the BIOS routines).


Ofcourse, you'd have to do some assembly programming to get a decent 
audio frequency tone out of the cassette port.

If you're thinking of using it to control anything, like LED's, 
relais, other hardware, I would use the printer port or the joystick 
port instead.


Greetings,

Alwin Henseler    ([EMAIL PROTECTED])

http://huizen.dds.nl/~alwinh/msx      (MSX Tech Doc page)
http://www.twente.nl/~cce/index.htm     (Computerclub Enschede)


****
MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put
in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the
quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
****

Reply via email to