Difference between revisions of "Cassette"

From Ninerpedia
Jump to navigation Jump to search
(Add link to new article on using cassette storage for DATA (not programs))
(→‎Connecting your Cassette Recorder: add note re remote control polarity and voltage)
 
(2 intermediate revisions by the same user not shown)
Line 22: Line 22:
When the leads have been connected, press your cassette PLAY button and check to see if the motor is running (the computer console must be switched on). If the motor is silent, you will need to use the polarity reversal adaptor supplied with the cassette lead. This should ensure that your recorder now works. If you still experience difficulty, you may have to avoid plugging the remote in.
When the leads have been connected, press your cassette PLAY button and check to see if the motor is running (the computer console must be switched on). If the motor is silent, you will need to use the polarity reversal adaptor supplied with the cassette lead. This should ensure that your recorder now works. If you still experience difficulty, you may have to avoid plugging the remote in.


You are now ready to record a program, or try loading a commercial tape.  
You are now ready to record a program, or try loading a commercial tape.
 
===Note on the remote control plug===
When you plug the 2.5mm plug into your cassette recorder you may be removing a volt from the supply to the motor, which may cause problems if you are using a battery supply. Main supply to your cassette recorder is generally more reliable.
 
Also the polarity of the 2.5mm plug is important and may need to be reversed- originally in the UK TI supplies of the cassette lead included a small polarity reversing adaptor.
 
Here are the technical details:
The remote control is an electronic switch (for the technically minded, most consoles use a Darlington driver controlled by an optically isolated device). The polarity of its connection to the remote device MATTERS! If it does not work, try reversing the wires to the 2.5mm plug.
 
As an electronic device, the remote circuitry uses up some of the voltage available to the remote device, a minimum of one volt. Some devices may be unhappy to have a whole volt removed - use mains supply for your recorders if possible and note that rechargeable batteries only start with a lower open circuit voltage than other cells! Not too much lower but if the one volt drop counts...
 
You can turn anything on and off... provided you observe the correct polarity and do not try to switch too great a load!
 
Most consoles use a TIL119 isolator, and add to it a TIS92 NPN transistor with the collecter connected (normally!) to the tip of the plug.


==Loading a cassette Tape==
==Loading a cassette Tape==
Line 86: Line 100:
It is better to demagnetise before you notice any problems. Similarly a build up of oxides will prevent your recorder from picking up a proper signal, and may cause it to digest your tape.  
It is better to demagnetise before you notice any problems. Similarly a build up of oxides will prevent your recorder from picking up a proper signal, and may cause it to digest your tape.  


==Controlling the remote with ExBas==
CASSETTE PORT CONTROL  by Peter Walker
How one could control the cassette from a program so that music could be played at certain parts of a game program. The following Assembler program does this.
Each time it is called from ExBas it toggles the cassette No 1 on and off. When it goes off it also cuts the sound port to your TV/Monitor to give a clean break. On restarting, it delays the enabling of the sound port until the cassette has had time to get up to its proper speed.
===Source Code===
As this machine code is for Extended Basic assemble the following to a none compressed object file, say CAS/OBJ
DEF CASCON
R11SAV  BSS 2
WRKSPC  BSS 32
GPLWS    EQU >83E0
STATUS  EQU >837C
*
CASCON  MOV R11,@R11SAV  SAVE R11
          LWPI WRKSPC
          LI  12,>002C    LOAD R12 BASE FOR CSI CONTROL
          TB  0          IS CSI ON?
          JEQ ON
          SBO 0          SWITCH ON MOTOR
          LI  1,>7000    SET DELAY=28672
DELAY    DEC 1
          JNE DELAY
          SBZ 2            ENABLE AUDIO
          JMP OUT
ON      SBO 2            KILL AUDIO
          SBZ 0            SWITCH OFF MOTOR
OUT      CLR 0
          MOVB R0,@STATUS
          LWPI GPLWS
          MOV @R11SAV,R11  RESTORE R11
          RT
          END
===Demo XB program===
To demonstrate this program, write a program like this
100 CALL INIT :: CALL LOAD("DSK1.CAS/OBJ")
110 CALL KEY(3,K,V)::IF V-1 THEN 110
120 CALL LINK("CASCON")::GOTO 110
Each time a key is pressed, the cassette is turned on or off.
===Call Load format of code===
Using the assembly source code above you need to have the Editor Assembler and a disk drive. There is an easier method to place the machine code into memory, this only requires that you have the 32k expansion ram, no disk drive required: Here, the Assembly object code is placed into memory by using CALL LOADS
100 CALL INIT
110 CALL LOAD(16376,67,65,83
, 67, 79, 78, 37, 22)
120 CALL LOAD(8194,37,72,63,
248)
130 CALL LOAD(9460,6,28,0,0,
0,0,0,0,0,0,0,0,203,20,203,5
3,203,78,203,231,204,71)
140 CALL LOAD(9482,204,150,2
04,228,0,44,205,75,205,96,33
,131,200,11,36,244,2,224,36,
246,2,12)
150 CALL LOAD(9504,0,44,31,0
,19,7,29,0,2,1,112,0,6,1,22,
251,30,2,16,2,29,2)
160 CALL LOAD(9526,30,0,4,19
2,216,0,131,124,2,224,131,22
4,194,224,36,244,4,91,73,221
)


==Emulators==
==Emulators==
Line 93: Line 174:


[[Category:Expansion]]
[[Category:Expansion]]
[[Category:Media]]

Latest revision as of 09:42, 12 July 2015

Using a cassette recorder to store programs and data, caring for tapes and recorders, and emulation.

Standard audio recorders provide an inexpensive method to store your programs and data.

Due to modifications in the design of audio tape recorders, an increasing number of them can be difficult to use with computers, and TI produced a TI Recorder, designed for use with the computer.

You may be able to use cheaper recorders, but try before buying if you have a tape you must load, especially if recorded by someone else.

For ease of operation, the tape recorder should have a tape counter, and if you buy one with a tone control you may find it easier to use.

The TI99/4A is designed for use with recorders having 3.5mm jack sockets. Recorders with 5 pin DIN sockets may be unsuitable due to the different input and output levels of these machines.

Always use a mains power supply for your cassette player, to ensure the tape runs at the correct speed.

SEE ALSO Storing Data on Cassette and Media#Cassettes


Connecting your Cassette Recorder

You will usually be using only one tape recorder, and this is connected using the lead with two 3.5mm jack plugs and one 2.5mm jack plug. Plug the smaller plug into your recorders remote control, the plug with the red wire into the microphone socket, and the plug with the white wire into the earpiece socket. The other end of the cable is a nine pin plug. This is connected to the socket on the rear of the console : NOT the socket on the left, which is for the joystick.

When the leads have been connected, press your cassette PLAY button and check to see if the motor is running (the computer console must be switched on). If the motor is silent, you will need to use the polarity reversal adaptor supplied with the cassette lead. This should ensure that your recorder now works. If you still experience difficulty, you may have to avoid plugging the remote in.

You are now ready to record a program, or try loading a commercial tape.

Note on the remote control plug

When you plug the 2.5mm plug into your cassette recorder you may be removing a volt from the supply to the motor, which may cause problems if you are using a battery supply. Main supply to your cassette recorder is generally more reliable.

Also the polarity of the 2.5mm plug is important and may need to be reversed- originally in the UK TI supplies of the cassette lead included a small polarity reversing adaptor.

Here are the technical details: The remote control is an electronic switch (for the technically minded, most consoles use a Darlington driver controlled by an optically isolated device). The polarity of its connection to the remote device MATTERS! If it does not work, try reversing the wires to the 2.5mm plug.

As an electronic device, the remote circuitry uses up some of the voltage available to the remote device, a minimum of one volt. Some devices may be unhappy to have a whole volt removed - use mains supply for your recorders if possible and note that rechargeable batteries only start with a lower open circuit voltage than other cells! Not too much lower but if the one volt drop counts...

You can turn anything on and off... provided you observe the correct polarity and do not try to switch too great a load!

Most consoles use a TIL119 isolator, and add to it a TIS92 NPN transistor with the collecter connected (normally!) to the tip of the plug.

Loading a cassette Tape

When your console has been connected to your tv and tape recorder, and switched on, you may load a prerecorded program from tape.

Press a key to obtain the menu selection and then press key 1 to obtain TI BASIC READY.

Now make sure the ALPHA LOCK key is DOWN, and key in: OLD CS1 and press ENTER.

The computer will now give you instructions on what to do: First rewind the tape and then press ENTER.

This is a good point at which to set your volume and, if you have them, tone controls. Start with the volume control at the mid point, and if available, set the tone control at maximum treble.

Now press cassette PLAY and then press ENTER. The tape should start running (do you need the polarity reverser? see above). The first part of the tape is a pilot tone, which is followed by a fluctuating signal. You may obtain an error message at this stage, which will indicate that the volume is not set correctly.

NO DATA FOUND means that the volume is far too high, or far too low (or the cassette recorder isn't connected).

ERROR IN DATA means the volume is not quite right. Make a note of the tape counter setting when the tape stopped, then press R (to Read) and follow the screen instructions. When the tape is rewound, before you press PLAY again, make a small change in the volume setting, then try again. If you are again unlucky, see if the tape counter is now reading a higher or lower figure. If it is higher, you need to move the volume a little more in the same direction. If lower, move it in the opposite direction - then try again.

Tape recorders vary in their success at matching the requirements of the computer: on some it hardly seems to matter how you set the volume, but on others the tape will only load at one setting. Tapes recorded by someone else will usually need to be loaded at a higher volume than your own, and may have a narrower range of acceptable volumes. The reason for this difficulty is that tape recorders do not all have their heads at exactly the same level, and with a tape recorded on another machine, some of the signal will not be picked up on your recorder. So you need a higher volume setting to make up for this loss.

With a very few recorders you may find that your tape is running at a speed which varies from that of the machine the tape was recorded on, preventing the program loading. This is a very rare problem but you may come across it.

When the tape is loaded, the computer will instruct you to press cassette STOP then press ENTER. You will receive a DATA OK message and after a short pause a flashing square will appear : this is the cursor, and indicates the computer is ready for you to tell it what to do.

You will want to RUN the program,so type in RUN and press ENTER. The computer will take a few seconds to sort itself out but in due course the program will be available for you to play.

When you only have the console, you may only run programs in TI Basic. Trying to load or run programs in any other language (such as Extended Basic) will produce error messages.

Saving programs to tape

When you have keyed in a program you may wish to save it on tape, for future use. Otherwise you will have to key it all in again. Use cassette tapes of maximum length C60. C90 tapes and longer are thinner and liable to stretch slightly in use, distorting the data the computer needs. Many large newsagents now sell computer tapes of C10, C15 or C20 length. A C20 tape will hold three average length programs on each side.

If you are keying in a long program,it is a good idea to save your work from time to time, even though it is not finished, then if some disaster occurs (such as baby brother unplugging your console) you don't have to start all over again : you may load your work and carry on from there. When you are ready to save a program, type in SAVE CS1 (with the alpha lock key down) and follow the directions which will appear on the tv screen. When the computer has finished the recording, you will be asked if you wish the tape to be checked : if your program is worth recording, it is worth verifying the recording- always respond Y (yes) you wish the tape to be checked. Then follow screen directions.

This part of the procedure is the same as loading a tape, but the computer will be checking the tape data against what it has in memory. See the section on loading programs for further assistance.

The reason you should always check your recording is that even the best tapes have small sections with little or no oxide coating, causing what are termed 'drop outs', Very short duration drop outs will not affect music, but you will lose some data. If you find that your recording is unloadable for any reason, the program is still in the computer, and you may use SAVE CS1 again to try a different tape.

Additional notes on using SAVE

The keys R C and E are used when an error has been found, to R(ead) or R(ecord), C(heck), or E(xit). These keys are also active whenever the current instruction is 'THEN PRESS ENTER'

Be careful not to press them unless you wish to Exit the routine.

When you have finished recording a program, when the display asks you to 'PRESS CASSETTE STOP THEN PRESS ENTER', instead of pressing ENTER and moving on to the verify routine, you may press R to immediately record the program again, say on another tape.

If you wish to save a program, and find on looking at the screen the message 'PRESS CASSETTE PLAY THEN PRESS ENTER' you will realise that instead of SAVE CS1, you have typed OLD CS1, and you are well on your way to destroying all your hard work. You can escape from this problem by pressing E. An error message may appear, but your program should be safe.


Tape care

Please remember that tapes are relatively fragile so do not keep them near to any strong electromagnetic field. In particular, it is unwise to place a tape near to the console, the tv modulator, or your tv set, for any length of time. As tapes can be damaged so easily, always make two copies of your program, on separate tapes. If one is damaged you can then make a further backup from the second tape. A magnetic tape has a limited life and you should rerecord onto another tape if a tape begins to become difficult to load.

The magnetic particles on your tapes will pass on some of their magnetism to your tape recorder heads : this in turn will slowly wipe off your program. Regular use of a tape head cleaner and demagnetiser is strongly recommended, usually a monthly clean and demagnetisation are sufficient. It is better to demagnetise before you notice any problems. Similarly a build up of oxides will prevent your recorder from picking up a proper signal, and may cause it to digest your tape.


Controlling the remote with ExBas

CASSETTE PORT CONTROL by Peter Walker

How one could control the cassette from a program so that music could be played at certain parts of a game program. The following Assembler program does this.

Each time it is called from ExBas it toggles the cassette No 1 on and off. When it goes off it also cuts the sound port to your TV/Monitor to give a clean break. On restarting, it delays the enabling of the sound port until the cassette has had time to get up to its proper speed.

Source Code

As this machine code is for Extended Basic assemble the following to a none compressed object file, say CAS/OBJ

	 DEF CASCON 
R11SAV   BSS 2 
WRKSPC   BSS 32 
GPLWS    EQU >83E0 
STATUS   EQU >837C 
*
CASCON   MOV R11,@R11SAV  SAVE R11 
         LWPI WRKSPC 
         LI  12,>002C    LOAD R12 BASE FOR CSI CONTROL 
         TB  0           IS CSI ON? 
         JEQ ON 
         SBO 0           SWITCH ON MOTOR 
         LI  1,>7000     SET DELAY=28672 
DELAY    DEC 1 
         JNE DELAY 
         SBZ 2            ENABLE AUDIO 
         JMP OUT 
ON       SBO 2            KILL AUDIO 
         SBZ 0            SWITCH OFF MOTOR 
OUT      CLR 0 
         MOVB R0,@STATUS 
         LWPI GPLWS 
         MOV @R11SAV,R11  RESTORE R11 
         RT
         END

Demo XB program

To demonstrate this program, write a program like this

100 CALL INIT :: CALL LOAD("DSK1.CAS/OBJ") 
110 CALL KEY(3,K,V)::IF V-1 THEN 110 
120 CALL LINK("CASCON")::GOTO 110 

Each time a key is pressed, the cassette is turned on or off.

Call Load format of code

Using the assembly source code above you need to have the Editor Assembler and a disk drive. There is an easier method to place the machine code into memory, this only requires that you have the 32k expansion ram, no disk drive required: Here, the Assembly object code is placed into memory by using CALL LOADS

100 CALL INIT 
110 CALL LOAD(16376,67,65,83 
, 67, 79, 78, 37, 22) 
120 CALL LOAD(8194,37,72,63, 
248) 
130 CALL LOAD(9460,6,28,0,0, 
0,0,0,0,0,0,0,0,203,20,203,5 
3,203,78,203,231,204,71) 
140 CALL LOAD(9482,204,150,2
04,228,0,44,205,75,205,96,33 
,131,200,11,36,244,2,224,36, 
246,2,12) 
150 CALL LOAD(9504,0,44,31,0
,19,7,29,0,2,1,112,0,6,1,22,
251,30,2,16,2,29,2)
160 CALL LOAD(9526,30,0,4,19
2,216,0,131,124,2,224,131,22
4,194,224,36,244,4,91,73,221
)

Emulators

TI Emulate does NOT in any way emulate cassette handling. The TI emulator in MESS emulates cassette files and saves / loads to WAV files. PC99 will emulate cassette handling by loading and saving data to files on your hard disk.