Jump to content
Sign in to follow this  
mike_z

TI99 OLD CS1 problem

Recommended Posts

Recently I came across my old TI99. I thought I'd try it and see if it would work. Seemed to have a few connection problems and the fuse let go on the power supply, but after a couple hours of cutting and soldering, it came to life. Then I tried writing a short basic program with the intention of saving it to cassette and then seeing if I could load it in again. I wrote three lines of basic, connect the cassette and typed SAVE CS1 After responding to the prompts, the program was saved. I listened to the tape and you can hear a leader and then the data burst. There is no trailer, is that correct? So Next I tried to load the program and it would not work. I turned off the TI99 so that there was nothing in it. Typed OLD CS1 started the cassette at the correct prompt. The tape recorder made the leader and data sounds, but the TI99 did not respond. After a while the TI99 responded NO DATA. After playing around with it a while I found that the DB9 I/O cord was bad. Replaced the DB9 connector and tried again, still no soap. I tried changing the volume (the only adjustment on the recorder) but still no data. Next I down loaded Audacity and tried that instead of my old cassette. Once again I could record the BASIC program but could not load it back to the TI99. Again I played with the volume etal but no soap, any ideas.? Thanks Mike

Share this post


Link to post
Share on other sites

Usually, if the TI99 responds with NO DATA, one should lift up the recorder volume.

I would recommend to clean the heads of the recorder

Share this post


Link to post
Share on other sites

Thanks I tried that, but to no avail. Does anyone know what the recording format is? What is the leader character? How many of them should there be? What is the data format. Is the data just straight? How is the memory addresses sent? Is there any checking CRC? Is there a trailer? Thanks Mike

Share this post


Link to post
Share on other sites

Thanks for the link. The cassette.htm is what I was looking for up the TI99 and see if I can capture the data at the TMS9901. Mike

  • Like 2

Share this post


Link to post
Share on other sites

Well...... I believe that I see the rough format of a recording. I found what I think is a record. It starts with 8 bytes of 00 followed by one byte of FF followed by 64 bytes of data and then one byte for checksum. My recording is a short BASIC program. My question is what is the data format of the 64 bytes. Is it ASCII text? I would think that this maybe the case, how else could the program be listed? Is the data something else? Maybe tomorrow I can look a little closer and try and determine if the data is ASCII text. Thanks Mike

  • Like 1

Share this post


Link to post
Share on other sites

What sort of cassette machine? The old basic mono portable works best. A hi-fi deck might record fine, but only has line-out, not speaker level. Sound card output from computer via headphone jack is often weak as well. Look for about a volt AC at the output. If played through the cassette machine's built-in speaker instead of through the output jack into the TI, it would be quite loud, as it would normally be set at just about full volume for the TI to properly "hear" it.

 

Little "walkman style" player/recorders usually have headphone out reduced so dummies won't blow out their ears.

 

Unless you have an adapter, any stereo output will only connect one channel into a mono cable. You'd lose half the output level.

 

As stated, "NO DATA" is just about always too low of playback level's volume. Assuming cable is good.

Edited by Ed in SoDak
  • Like 4

Share this post


Link to post
Share on other sites

I'm using an old mono Realtone cassette recorder. I tried a newer GE and the Audacity. I even amplified the signal some and still no soap. So I opened the unit up and looked at the signal going into the 9901 on pin 30. I get a nice square wave. I can not see the signal to well with the scope, but the leader looks like it might be OK. Maybe tomorrow I can drag out my logic analyzer and try can capture the wave form. 

 

Either the recording is not correct or there is something wrong with the 9901 or some other more inter parts. Thanks Mike

Share this post


Link to post
Share on other sites


 


 


 


 

BITD there were many cassette players that simply would not work with the TI - to the extent that in the UK TI published a list of brands then on sale in the UK that would work.
In the USA the official TI list of working recorders was:
Superscope    C2L00LP;   Panasonic    RQ2309A;   Sears    2165;   Sears    21686; JC Penney    6568.
The TI Recorder was a GE model.

Older cassette machines may be in need of demagnetising, cleaning and possibly realigning!
As already mentioned here, modern devices have too low an output signal voltage to satisfy the console. Adding an extra level of amplification may work.
It was recommended that for most recorders the tone setting be HIGH.
One big problem was not using a mains supply for a cassette recorder- amazing how many tapes failed for that simple reason.  The voltage drop in the console  was too great.
The signal the TI needs is neither square wave nor sine wave- rather peculiar with some quite sharp bits. Cassette recorders were designed for sine waves, and if one insists on a pure sine wave output it probably won't work. This is probably why cheaper machines seemed to work better.
There were several articles in the TI magazines of the time comparing different models, and providing lists of ones that would work and those that didn't.There is a great article at http://www.unige.ch/medecine/nouspikel/ti99/cassette.htm


 


 




 

sndgraph.jpg

Edited by blackbox
  • Like 2

Share this post


Link to post
Share on other sites

I'm using a Realtone recorder, this is the same recorder that I used many years ago. I spent a lot of time cleaning it and it will record and play back well. My GE recorder does not output enough signal so I have abandoned using that one.

 

I'm not sure I understand what "mains supply" is. Are you suggesting that I sub a power supply for the recorders batteries?

 

The square wave signal I mentioned is at the 9901 chip on pin 30. This is the condition signal from the recorder.  Using a scope I can see the frequency shift signals you mention on the output of the recorder.

 

My logic analyzer captured a recorder signal from this pin 30 on the 9901 chip. This should be the digital signal the TI captures. BUT the leader, which the documentation says is 768 bytes of 00h is not that, but some thing else. It does look like it repeats  I have to take some time to see what the bytes are and to see if I can find the DATA MARK. I saved a simple BASIC program

10 AAAAAAAA

20 BBBBBBBB

30 CCCCCCCC

I hope to be able to find the 8 A's, 8 B's and 8 C's, I figure that they should be ASCII bytes. I don't know whether the LSB or the MSB are transmitted first or if there are any other bits included with the bytes. The documentation seems to indicate that there are no extra bits. Mike

Share this post


Link to post
Share on other sites
39 minutes ago, mike_z said:

I hope to be able to find the 8 A's, 8 B's and 8 C's, I figure that they should be ASCII bytes. I don't know whether the LSB or the MSB are transmitted first or if there are any other bits included with the bytes. The documentation seems to indicate that there are no extra bits.

 

I don’t know whether you are familiar with TMS9900 Assembly Language Code (ALC). If you are, the snippet in the following spoiler of the ALC source by TI programmers of the cassette routines from the console ROM may offer you some insight:

Spoiler
*
* THIS IS A SET OF ROUTINES DEFINED FOR AUDIO CASSETTE
* COMMUNICATION. THEY ARE ENTERED THROUGH A GRAPHICS
* LANGUAGE PROGRAM, WHICH GIVES INFORMATION LIKE THE NO.
* OF BLOCKS (=64 BYTES) TO BE WRITTEN, OR THE NUMBER OF
* FREE BLOCKS IN CASE OF READ MODE; THE VDP START ADR.
* AND THE BAUD RATE.
*   THE ROUTINES TAKE CARE OF THE NECESSARY ENCODING/
* DECODING AND THE ERROR CHECKING.
*
* THE BIPHASE FORMAT, USED IN THIS SET OF ROUTINES, HAS
* THE FOLLOWING REPRESENTATIONS FOR THE BINARY DIGITS:
*
*     ---------------             ---------         ----
*    |               |           |         |       |
* ---                 ---     ---           -------
*     <-----"0"----->            <---- "1"--------->
*
* REPRESENTATIONS OF THE BITS MAY BE CHANGED IN PHASE BY
* 180 DEGREES, DEPENDING UPON THE VALUE OF THE BIT STREAM
* AFTER THE PREVIOUS BIT.
*
*    PRINCIPLES OF OPERATION
*
*          WRITING
*   THE ACTUAL IMPLEMENTATION OF THE BIPHASE RECORDING SCHEME
* IS RELATIVELY SIMPLE. THE VALUE FOR THE DATA RATE, AS INDICATED
* BY THE GRAPHICS LANGUAGE PROGRAM, IS USED AS A TIMER VALUE FOR
* THE INTERNAL TMS9985 TIMER/COUNTER. IT IS USED AS A TIMER VALUE
* FOR HALF A BIT CELL.
*
*      ------------                    ------        ----
*     |            |                  |      |      |
*  ---              ---            ---        ------
*     |<----><---->                    <-----><----->
*         DRATE                            DRATE
*
*   EACH BIT CELL THUS CONSISTS OF TWO TIMER INTERVALS. THE TIMER
* INTERRUPT AT THE BEGINING OF EACH BIT CELL CAUSES THE OUTPUT LINE
* TO CHANGE VALUE. THE NEXT TIMER INTERRUPT, IN THE MIDDLE OF THE
* BIT CELL, ONLY CHANGES THE VALUE OF THE OUTPUT LINE IF THE BIT TO
* BE OUTPUT EQUALS A BINARY "1".
*
*          READING
*    ON READING BACK, THE BASIC TIMER INTERVAL TIME IS SET TO 1.5
* TIMES THE DRATE OF THE WRITE SECTION. THE TIMER IS SYYNCHRONIZED
* ON THE FLUX CHANGE AT THE BEGINING OF THE BIT CELL. AFTER THE TIMER
* HAS GIVEN AN INTERRUPT, THE CURRENT INPUT LINE VALUE IS COMPARED TO
* THE VALUE AT THE BEGINING OF THE BIT CELL. IF THIS VALUE HAS
* CHANGED, THE BIT VALUE IS ASSUMED TO BE "1" IF NOT, IT WILL BE
* A "0"
*      TO PROVIDE A TIME-OUT MECHANISM THE TIMER AUTOMATICALLY
* RESTARTS ITSELF WITH THE SAME RATE.  IF THE TIMER TIMES OUT BEFORE
* THE NEXT FLUX CHANGE, AN ILLEGAL BIT LENGTH IS ASSUMED, AND AN
* ERROR RETURN CODE IS PRODUCED.
*
*********************************************************************
*
*    CASSETTE WRITE ROUTINE
*
* WRITES N BLOCKS OF 64 BYTES TO THE AUDIO CASSETTE.
*
* THE OUTPUT FORMAT USED IS:
*   - ZERO LEADER CONSISTING OF LDCNT ZEROES
*   - SYNC BYTE (8 "1" BITS)
*   - NUMBER OF BLOCKS TO FOLLOW (8 BITS)
*   - CHECKSUM (8 BITS)
*   - 2*N BLOCKS, CONSISTING OF:
*      - 8 BYTES OF ZERO
*      - 1 BYTE OF ONES
*      - 64 BYTES OF INFORMATION
*      - CHECKSUM (8 BITS)
*   - EACH BLOCK IS REPEATED TWICE. THE LEADING ZEROES AND
*     ONES ARE USED FOR TIMING AND TO R
*   - TRAILER OF EIGHT "1" BITS
*
*      REGISTER DEFINITION
*
*  R0  TEMPORARY
*  R1  PHASE FLAG REGISTER
*  R2  COUNTER/BYTE COUNTER
*  R3  DATA RATE COUNTER
*  R4  BYTE
*  R5  BLOCK COUNT
*  R6  LOOP COUNT
*  R7  CHECKSUM
*  R8  SET/RESET OUTPUT INSTRUCTION
*  R12 CRU BASE REGISTER = TIMER CRU
*
*********************************************************************
*      THE GRAPHICS LANGUAGE PROGRAM PROVIDES THE FOLLOWING
*  INFORMATION:
*     (R1)  DATA LENGTH IN BYTES
*     (R1) +2   VDP RAM START ADDRESS
*
*  THE DATA SHOULD BE READ BACK AT THE SAME BAUD RATE AT WHICH
*  IT WAS WRITTEN.
*
HX0010 DATA >0010
* = BR TABLE
*
* WRITE ROUTINE
*
WRITE  CLR  R0               NO OFFSET FOR VIDEO ADR.
       LI   R2,>0300         LOAD LEADER COUNT FIRST
       LI   R8,>1E19         LOAD SBZ INSTN
       LI   R3,>0023         SET DATA RATE AT 1500 BAUD
       BL   @INIT            INIT. FURTHER
       LI   R0,BOUT          SAVE    BYTES
HX0300 LIMI 1                LABEL IS NASTY!
WRITE0 CLR  R4
       BL   *R0              WRITE BYTE OF LEADER
       DEC  R2               COMPLETE LEADER
       JNE  WRITE0           AND RTN IF NOT COMPLETED
       SETO R4               BYTE =>FFFF (SYNC BYTE)
       BL   *R0
       MOV  R5,R4            WRITE BLOCKCOUNT TO TAPE
       SWPB R4
       BL   *R0              AND OUTPUT AGAIN
       MOV  R5,R4            TWICE (ONE CHECKSUM)
       SWPB R4
       BL   *R0
       CLR  R9               USED TO SEE IF 2ND RECD. WAS WRITTEN
REWRI  LI   R2,8             WRITE 8 BYTES OF ZERO
LEAD   CLR  R4               ZERO
       BL   *R0              WRITE THEM
       DEC  R2               MORE?
       JNE  LEAD             YES
       SETO R4               WRITE ALL ONES BYTE
       BL   *R0              WRITE IT
       MOVB @R10LSB,*R15     RESTORE VDP ADR.
       LI   R2,64            LOAD COUNT WITH ONE BLOCK
       MOVB R10,*R15
       CLR  R7               CLEAR CHECKSUM
WRBYT  CLR  R4
       MOVB @VRDOFF(R15),R4  VDP DATA TO R4 MSB
       A    R4,R7            ADD BYTE TO CHEKCSUM
       BL   *R0              OUTPUT BYTE TO TAPE
       DEC  R2               DEC. BYTE COUNTER
       JNE  WRBYT            WRITE ALL 64 BYTES
       MOV  R7,R4            OUTPUT CHECKSUM
       BL   *R0
       INV  R9               2ND TIME RECORD WRITTEN?
       JNE  REWRI            REWRITE
       AI   R10,64           BUMP ADR. TO NEXT RECD
       DEC  R5               DONE ALL BLOCKS?
       JNE  REWRI            NO... NOT YET, CONTINUE
*==LES==*        SPIN                  WAIT FOR COMPLETION OF LAST CYCLE
WSPIN  JMP  WSPIN            WAIT FOR COMPLETION OF LAST CYCLE       *==LES==*
       B    @STTIM           STOP TIMER AND EXIT
*
* INITIALIZATION ROUTINE
*
INIT   MOV  *R1+,R5          COPY NO. OF BLOCKS IN BLKCNT
       AI   R5,63            COMPUTE IN BLOCKS OF 64 BYTES
       SRL  R5,6             DIVIDE BY 2**6=64
       SOC  *R1,R0           COPY ADR. + OFFSET IN R0
       MOV  R0,R10           SAVE ADR FOR WRITING DUPLICATES
       MOVB @R0LSB,*R15      COPY IN VIDEO ADR
       CLR  R1               INIT THE ERROR FLAG
       CLR  R12              CRU BASE
       MOVB R0,*R15          COPIED...
       SOC  @HX0020,R14      SET TIMER INTPT FLAG
       SBZ  2                TURN OFF VDP INTPT
       SBZ  12               TURN OFF ??? INTPUT
       LDCR R3,15            LOAD TIMER
       SBZ  0                ENABLE INTS
       SBZ  1                TURN OFF EXTERNAL INT.
       SBO  3                ENABLE CLOCK INTPT
       RT                    AND RTN
*
* BYTE OUTPUT ROUTINE
*
BOUT   LI   R6,8             LOAD LOOP COUNTER
       INV  R4               INVERT FOR ENABLING "0" BIT JUMP
*==LES==* BOUT0  SPIN                  IDLE AROUND UNTIL LAST CYCLE OF
BOUT0  JMP  BOUT0            IDLE AROUND UNTIL LAST CYCLE OF         *==LES==*
       X    R8               ALWAYS FLIP AT START OF BIT
       XOR  @HX0300,R8
HXSPIN EQU  $
*==LES==* D3F0   SPIN                  PREVIOUS BYTE+1ST OF THIS BYTE
D3F0   JMP  D3F0             PREVIOUS BYTE+1ST OF THIS BYTE          *==LES==*
       MOV  R4,R4            TEST HIGHEST BIT FOR NEW FLIP CHECK
       JLT  BOUT1            BIT SET MEANS NO FLIP (SEE INV)
       X    R8               FLIP OUTPUT LINE
       XOR  @HX0300,R8       REVERSE INSTN
BOUT1  SLA  R4,1             GET NEXT BIT READY FOR OUTPUT
       DEC  R6               HAS BEEN COMPLETED... THEN LOOP
       JNE  BOUT0            UNTIL BYTE COMPLETED
       RT                    RETURN IF BYTE COMPLETED
*
* TIMER INTERRUPT ROUTINE
*
TIMER  SBZ  0                MAKE SURE WE'RE IN INTPT MODE
       SBO  3                CLEAR DECREMENTER INTPT
       MOV  R1,R1            TEST FLAG REGISTER
       JLT  TIMER1           FLAG SET -> ERROR EXIT
       LWPI WKSC             BACK TO REGULAR WORKSPACE
       C    *R14,@HXSPIN     DOING A SPIN?
       JNE  TIMER1           NO, DON'T INC ADR.
       INCT R14              BYPASS SPIN
TIMER2 RTWP                  AND RETURN
TIMER1 LWPI WKSC
       MOV  @WKSE+R6+R6,R14  GET EXIT ADDRESS
       JMP  TIMER2           AND EXIT
*
*  READ REGISTER DEFINITIONS
*
*  R0  TEMPORARY
*  R1  ERROR EXIT/INPUT LEVEL FLAG
*  R2  COUNTER/BYTE COUNTER
*  R3  DATA RATE COUNTER
*  R4  BYTE
*  R5  BLOCK COUNT
*  R6  BIT LENGTH ERROR EXIT ADR
*  R7  CHECKSUM
*  R8  RETRY COUNT/BYTE COUNT
*  R12 CRU BASE REGISTER = TIMER CRU
*
*
* CASSETTE READ ROUTINES
*
HX2100 BYTE >21,0
*
* DEVIATION OF UP TO -25 TO +50 PERCENT OF THE
*    NOMINAL BAUD RATE IS PERMITTED
*
VERIFY SOC  @HX0010,R14      SET VERIFY BIT
       CLR  R0               SET ADR BIT TO READ FROM VDP
       JMP  READA
* = BR TABLE
READ   SZC  @HX0010,R14      RESET VERIFY BIT
       LI   R0,>4000         SET ADR. BIT TO WRITE TO VDP
READA  LI   R3,>002B         SET BAUDRATE IN
HX002B EQU  $-2
       BL   @INIT            AND INIT
       MOV  R10,R7           SAVE VDP ADR.
       CLR  R0               INDICATE FIRST RECORD
HX20_  MOVB @HX20_+1,@ERRCD  ASSUME TIME OUT ERROR          *==LES==*   HX20 to HX20_
READ12 LI   R8,30000         LOAD RETRY COUNT FOR 10 SECS
       LIMI 1                ALLOW TIMER INTPTS
       LI   R6,READ0         LOAD TIME-OUT RETRY ADR
READ00 LI   R3,>2B           IF FALSE START
READ0  ANDI R1,>FF           CLEAR FLAG TO PREVENT ERROR HANG UP
HX00FF EQU  $-2
       DEC  R8               COUNT FOR ONE RETRY
       JEQ  STTIM            RETRY ERROR
       LI   R2,48            COUNT AT LEAST 48 ZEROES
       MOV  R0,R0            AM I IN THE MIDDLE?
       JNE  READ1            YES LOOK FOR 48 ZEROES
       A    R2,R2            NO LOOK FOR MORE
READ1  BL   @RDBIT           GET A BIT ** TIME OUT GIVES RETRY
       JMP  READ15
       JMP  READ0            "1" RETURN
READ15 DEC  R2               DETECTED A "0" BIT, COUNT IT
       JNE  READ1            AND CONTINUE TILL DONE
* --- CALCULATE ACTUAL BIT RATE BASED ON 8 ZERO BIT TIMES ---
       LI   R9,>7FFF         BIG COUNT FOR TIMER
       LI   R8,8             NUMBER OF BITS TO AVERAGE
       LDCR R9,15            SET TIMER
       SBZ  0                TURN ON 9901 INTPTS
       SBO  3                ENABLE CLOCK INTPT
CRLOOP BL   @FLUXC           FIND BIT                    *==LES==*   LOOP to CRLOOP
       JMP  ENDL             CHANGE-DEC NO. OF BITS
       JMP  CRLOOP           NO CHANGE, KEEP LOOKING     *==LES==*   LOOP to CRLOOP
ENDL   DEC  R8               LOOK FOR MORE ???
       JNE  CRLOOP           YES                         *==LES==*   LOOP to CRLOOP
       SBO  0                SET 9901 TO CLOCK
       STCR R3,15            READ TIMER
       S    R3,R9            HOW MUCH TIME USED?
       MOV  R9,R3            SAVE CELL TIME
       SLA  R9,2             CELL TIME * 4
       A    R9,R3            MAKE NEW 3/4 BIT TIME
       SRL  R3,6             5/8 CELL TIME/2
       ORI  R3,>0001         SET 9901 TO CLOCK
       LI   R10,READ5        RTN ADR FOR SUBSUBROUTINE
       CI   R3,>001F         MAKE SURE FREQ. NOT TOO SMALL
       JLT  READ00           TOO SMALL, LOOK FOR REAL ZEROS
       B    @RDBIT2          LOAD NEW BIT TIME
*
READ5  BL   @RDBIT           AGAIN READ BIT INPUT
       JMP  READ5            "0" IS STILL OK
* ENTRY NOT KNOWN
D4B6   LI   R2,7             SHOULD BE "ALL ONE" BYTE
READ3  BL   @RDBIT           NEXT BIT PHASE
       JMP  READ0            FALSE ALARM-NOT A REAL LEADER
       DEC  R2               ALL SYNC BYTE DONE?
       JNE  READ3            NO...KEEP ACCEPTING "1" BITS
       LI   R6,ERROR1        GET SET FOR ERROR EXIT
* AT THIS POINT WE ARE SYNCHRONIZED ON THE DATA STREAM
* COMING IN FROM THE CASSETTE, BOTH ON BIT AND R4 LEVEL
* ALL DATA COMING IN NOW SHOULD BE CORRECT. IF NOT WE
* TAKE THE ERROR EXIT
       MOV  R0,R0            DO I READ BLOCK COUNTS?
       JNE  DUMP3            I ALREADY READ THEM
       MOVB @HX2100,@ERRCD   ASSUME NOT ENOUGH BLOCKS
       MOV  R7,R0
       CLR  R7               INIT CHECK SUM
       BL   @RDBYTE          CALL READ BYTE ROUTINE
       C    R5,R4            ENOUGH SPACE AVAILABLE??
       JL   STTIM            ** ERROR ** NOT ENOUGH SPACE
       MOV  R4,R5            READ NO. OF BLOCKS ON TAPE
       INC  R5               AND INC FOR EASE OF PROGRAMMING
       NEG  R7               PREPARE FOR BLOCK COUNT CHECK
       BL   @RDBYTE          READ CHECK SUM
       JNE  STTIM            BAD BLOCK COUNT DATA
       JMP  DUMP4            LOOP AROUND TO FIRST READ
RDLOOP ANDI R7,>FF           USE ONLY LOWER BYTE OF CHKSUM
       NEG  R7               NEGATTE FOR ZERO RESULT
       BL   @RDBYTE          READ RECORDED CHKSUM
       JEQ  DUMP             **NO ERROR** CHKSUM CORRECT
ERROR1 MOV  R5,R5            ERROR ON 2ND RECORD
       JLT  STTIM            YES, FLAG ERROR
       MOVB @R0LSB,*R15      RESTORE VDP ADR.
       NEG  R5               NO, TRY 2ND READING
       MOVB R0,*R15
       JMP  READ12           READ AGAIN
DUMP   MOV  R5,R5            HAS 2ND RECORD BEEN READ?
       JLT  DUMP2            YES, SO DON'T READ AGAIN
       LI   R2,73            SKIP NEXT RECORD
DUMP1  LI   R6,DUMPX
       BL   @RDBYTE          WAIT FOR A BYTE
DUMPX  DEC  R2               MORE TO READ?
       JNE  DUMP1            READ SOME MORE
DUMP2  AI   R0,64            BUMP RECORD ADR. IN VDP
       MOVB @R0LSB,*R15      OUTPUT ADR. TO VDP
       ABS  R5               SET FLAG FOR 1ST RECORD
       MOVB R0,*R15
DUMP4  CLR  R7               CLEAR CHKSUM AFTER DUMPING
       DEC  R5               REDUCE NO. OF BLOCKS TO READ
       JNE  READ12           READY...MORE BLOCKS TO GO
       JMP  DONE             NO MORE TO READ
DUMP3  LI   R2,64            START OUT FOR 128 BYTES
       CLR  R7               ZERO CHKSUM FOR NEXT RECORD
RDL0   BL   @RDBYTE          READ ONE BYTE
       SWPB R4               SWAP TO UPPER BYTE
       COC  @HX0010,R14      IS IT A VERIFY
       JNE  STO              NO, SO STORE IT
       SB   @VRDOFF(R15),R4  IS IT RIGHT?
       JEQ  STO1             YES, CONTINUE
       CI   R5,1             LAST RECORD?
       JEQ  STO1             YYES, IGNORE BAD COMPARISONS
       JMP  ERROR1           NO, TRY READING 2ND RECORD
STO    MOVB R4,@VWDOFF(R15)  WRITE DATA TO VDP
STO1   DEC  R2               SEE IF DONE
       JNE  RDL0             NO.. NOT YET
       JMP  RDLOOP           COMPLETE READ LOOP
DONE   MOVB @HX002B,@ERRCD   CLEAR ERROR CODE
* ------ ALSO ERROR EXIT --------
STTIM  SZC  @HX0010,R14      FREE UP BIT
       SZC  @HX0020,R14      TURN OFF TIMER INTPT FLAG
       SBZ  3                TURN OFF TIMER INTPT MASK BIT
       SBO  12               ENABLE    INTERRUPT
       SBO  1                ENABLE EXT INTPT
       SBO  2                ENABLE VDP INTPT
       B    @NEXT
*
*  BIT INPUT ROUTINE
*
* READ ONE BIT FROM THE INPUT STREAM. RETURN TO CALLER+2
* IF BIT READ IS "1"
*     THE VALUE OF THE BIT CELL IS COMPUTED BY DETERMINING
* THE INPUT LINE VALUE AT 3/4 OF THE BIT CELL LENGTH. IF THE
* INPUT LINE LEVEL HAS CHANGED DURING THAT PERIOD, THE BIT
* READ = "1"; IF NOT, THE BIT READ = "0"
*     THE NEXT FLUX CHANGE SHOULD COME WITHIN 3/4 OF A BIT
* CELL, IN ORDER TO ACCEPT THE BIT
*
RDBIT  MOV  R11,R10          SAVE RTN ADR. IN LEVEL 2
*==LES==*        SPIN                  WAIT FOR END OF CYCLE
RSPIN  JMP  RSPIN            WAIT FOR END OF CYCLE             *==LES==*
       BL   @FLUXC           SEE IF WE HAD A FLUX CHANGE
       INCT R10              IF SO... UPDATE RTN ADR
       ORI  R1,>FF00         SET FLAG FOR ERROR EXIT
RDBIT2 CZC  @HX00FF,R1       WHICH WAY IS CHANGED FLUX?
       JEQ  F2               INPUT IS A ZERO
F1     TB   27               WAIT FOR A CHANGE
       JNE  RDBIT1           CHANGED
       JMP  F1               NO CHANGE
F2     TB   27               WAIT FOR A CHANGE
       JNE  F2               NO CHANGE, WAIT SOME MORE
RDBIT1 LDCR R3,15            AN ERROR EXIT
       SBZ  0                ENABLE INTPTS
       SBO  3                ENABLE CLOCK INTPT
       ANDI R1,>FF           RESET ERROR FLAG TO PREVENT CHANGE
       XOR  @HX00FF,R1       RECORD FLUX CHANGE
       B    *R10             TIMER... THEN EXIT ON LEVEL 2
* ----- BYTE READ ROUTINE ------
* THE R4 READ ROUTINE IS SIMPLE AND STRAIGHT FORWARD.
* ONLY REMEMBER THAT WE ARE DEALING WITH THREE LEVELS
* OF SUBROUTINES HERE, SO WE MUST SAVE THE RTN ADR IN R9
*
RDBYTE LI   R8,8             LOAD BYTE COUNTER
       CLR  R4               CLEAR RESULT
       MOV  R11,R9           SAVE RTN ADR. IN LEVEL 3
RDBYT0 SLA  R4,1             RESULT ONE BIT TO THE LEFT
       BL   @RDBIT           READ ONE BIT
       JMP  RDBYT1           AVOID COUNTING ZEROS
       INC  R4               IF IT'S A "1", INC. BYTE
RDBYT1 DEC  R8               CONTINUE??
       JNE  RDBYT0           YEP...
       A    R4,R7            UPDATE CHKSUM *** CONDITION CODES
       B    *R9              RTN FROM BYTE READING (LEVEL 3)
* FLUX CHANGE CONTROL ROUTINE
* RETURNS TO (R11) IF FLUX HAS CHANGED, (R11) +2 IF FLUX
* HASN'T CHANGED SINCE LAST OUTPUT VALUE.
*
FLUXC  TB   27               CONTROL VALUE OF INPUT LINE
       JEQ  FLUXC1           INPUT LINE SET
       CZC  @HX00FF,R1       WAS INPUT LINE HIGH LAST TIME?
       JEQ  FLUXC2           INPUT LINE WAS LOW
FLUXC0 XOR  @HX00FF,R1       FLIP FLAG(INPUT LINE CHANGED)
       RT                    & RETURN
FLUXC1 CZC  @HX00FF,R1       INPUT LINE HIGH AGAIN?
       JEQ  FLUXC0           INPUT LINE WAS  LOW -> CHANGE
FLUXC2 INCT R11              UPDATE RTN ADR, NO CHANGE
       RT

 

 

...lee

  • Thanks 1

Share this post


Link to post
Share on other sites

Lee.... thanks a million for the information. No, I'm not familiar with ALC. But I'm an old DEC and CPM guy. I know other assembly languages, so I believe I can understand this. There is also Google if I get stumped. I may have found a reason for my trouble. It may be recorder after all. Looking at the timing on the logic analyzer, the time of the zeros seems to vary. My sample rate on the Logic analyzer is 5 uSec, I would expect some difference but not more that 5-10 uSec. I'm seeing 50 uSec or more. This could screw up the bits. I'm going to check the belt in the recorder, it could have stretched and thus wobble the audio. The belt was changed a few years ago, but the recorder is not used a lot and could have kinked at the motor. I've seen this before. So, I suppose I should just replace the belt.

If the sensing is 1.5 times the data rate, there should be plus or minus 362 uSec that the signal could vary before the bit could be read wrong. Did I read this correctly, the error would not be cumulative, because the timing starts at the flux change interrupt each time.?

So, I'll see if I can improve the recorder and then check how that affects the data stream. Thanks again. Mike

  • Like 1

Share this post


Link to post
Share on other sites

"Mains" voltage is a term in the UK for normal AC house wiring, 120v AC for us across the pond. He means that batteries are often not able to both run the motor and the amplifer at high volume.

 

Output from Audacity should not show any time lag, compared to a slow-running cassette player.

 

On the cassette side of things, even if speed is not correct nor head alignment, so long as they're not too far off, a recording made on that machine is inherently correct when played back on the same machine. It would only be when using a tape made on a different machine or trying this tape in another player, then the errors would show up.

 

As you suspect, there may well be bad parts in the console. That seems to be a rare thing, much more often it's some external glitch or error in the load process.

 

I made this load dongle from an old stereo cassette VU meter. That gives me a stable reference for correct level and I can watch the pointer's wiggle to help detect bad oxide or wrinkles in the tape itself, dropouts, etc. Somewhere I have a crude schematic of it which I'll add when I find it.

 

LoadMeter cassette.jpg

Edited by Ed in SoDak

Share this post


Link to post
Share on other sites

Found the meter pic with schematic added.

MeterDongle.thumb.jpg.781bd4da6d05f1da0370649bc04422d0.jpg

 

Here's a couple related threads:

 

 

 

 

 

 

MeterDongle.jpg

Edited by Ed in SoDak
  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...