Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-01 - 43,50011/player.mac
There are no other files named player.mac in the archive.
;***** START OF PLAYER.MAC *****

IFNDEF MCOMP,<TITLE PLAYER - EXEC MODE - EDIT DATE 17 NOV 69 - RCC

RIM10B
PLYORG=140
LOC PLYORG

A=1
B=2
C=3
D=4
E=5
F=6
G=7
P=17
>
IFDEF MCOMP,<
SUBTTL PLAYER IMAGE

PLYORG=140

PLYIMG:

PHASE PLYORG	;WHERE PLAYER LIVES WHEN RUNNING
>

MTOP=37174
TENDMP=37400
IFNDEF JIFSEC,<JIFSEC=^D60>	;WORLD-WIDE COMPUTABILITY

DEFINE PARTM (N) <
P'N:	ADDI N,.-.
PBIT==1
REPEAT 6-N,<PBIT==PBIT+PBIT>
	TLNE N,1
	TROA 0,PBIT
	TRZ 0,PBIT
>

DEFINE SET (N) <
	ILDB 15,16
PP'N:	MOVE 15,BOT+400(15)
	HRRM 15,P'N
>

DEFINE ADJUST (N) <
	HRRZ 16,P'N
	IMULI 16,3
	ADD N,16
>
PLAYER:	JRST RELOAD
WAIT:	MOVEI P,PPDL
	DATAI B
	JUMPL B,.-1
	TLNE B,200000
	JRST PLAYQ
	TLNE B,2000
	JRST TENDMP
	TLNE B,100000
	JRST TUNE
	TLNE B,60000
	JRST PREAD
	TLNE B,10000
	JRST RDI1
	TLNE B,30
	JRST APPEND
	JRST WAIT+1

APPEND:	SKIPE IS
	SKIPA E,WHERE
PREAD:	MOVSI E,MUST-MTOP
	MOVSI C,1
	MOVEI D,1000
	TLNN B,2
	JRST READ1-1
	HRRZ D,B
	CAIGE D,40
	JRST WAIT
	IDIV C,D

READ1:	HRRM C,TDIDL
	CONO PTR,20
	SETZM WDCNT
	SETZM IS
	SETZM MTOP+1
	SETZM MTOP
	SETZM WHERE
	MOVEI C,607751	;PDP1 JUMP BLOCK
	MOVEM C,CKSUM
WORDS:	PUSHJ P,GBW		;GET TIME FOR THIS SET OF FREQS
	JUMPE C,RZERO
	HRROS C
TDIDL:	IMULI C,1000
	ASH C,-3
WORDM:	MOVEM C,MUST(E)
	AOBJP E,OFLO
	PUSHJ P,GBW		;GET FIRST 3 VOICES
	MOVS A,C
	TLNE B,40010	;3 PART OR 6 PART?
	JRST .+3	;3 PART
	PUSHJ P,GBW	;6 PART, GET NEXT 3 VOICES
	ADD A,C
	MOVEM A,MUST(E)
	AOBJN E,WORDS

OFLO:	JRST PLAY

RZERO:	SKIPN WHERE
	MOVEM E,WHERE
	JRST WORDM

PLAYQ:	SKIPN IS
	JRST WAIT
PLAY:	DATAI C
PLAY1:	TLZ C,-2
	MOVEI 17,0
	TLZN C,1
	JRST J
	CAIGE C,100
	JRST WAIT
	HRRM C,PTEMPO
	JRST J
PTEMPO:	IDIVI 15,1000		;ADR MAY BE MODIFIED
	DATAI 16
	JUMPL 16,WAIT
	ADDI 17,2
	ADJUST 1
	ADJUST 2
	ADJUST 3
	ADJUST 4
	ADJUST 5
	ADJUST 6

PQ:	PARTM 1
	PARTM 2
	PARTM 3
	PARTM 4
	PARTM 5
	PARTM 6
	AOJL 15,PQ

J:	MOVE 16,J1
	SET 1
	SET 2
	SET 3
	SET 4
	SET 5
	SET 6

	MOVE 15,MUST(17)	;NEGATIVE DURATION
	JUMPN 15,PTEMPO
	JRST WAIT		;HERE AT END OF MUSIC

J1:	POINT 6,MUST+1(17)
J2:	POINT 3,B,17
WHERE:	XWD MUST-MTOP,0
GBW1:	MOVEM C,WDCNT
	PUSHJ P,RPB	;18 BIT READ TO C
	SUBM C,WDCNT	;LA-FA

GBW:	SOSL WDCNT
	JRST RPB	;POPJ'S TO CALLER
	MOVE D,CKSUM	;END OF BLOCK
	PUSHJ P,RPB	;READ CKSUM
	CAME C,D
	JRST 4,WAIT	;CKSUM ERROR
	CLEARM CKSUM
	PUSHJ P,RPB	;1ST WD OF BLK
	TRNN C,400000
	JRST GBW1	;POSITIVE. DIO.
GBW2:	SETOM IS	;JMP BLOCK
GBW3:	DATAI B
	TLNE B,60030
	JRST GBW3	;WAIT FOR OPR TO TURN OFF SW
	SOJA P,WAIT

RPB:	MOVE F,RDC1
	MOVEI C,0
RPB1:	DATAI G
	JUMPL G,GBW3	;ABORT READ
	CONSO PTR,10
	JRST RPB1
	DATAI PTR,G
	TRZN G,200	;BINARY 8 HOLE
	JRST RPB1	;NO. FEED. SKIP.
	TRZE G,100	;7 HOLE?
	JRST 4,.+1	;YES. SHOULDNT BE
	IDPB G,F	;ASSEMBLE 18 BIT WD
	TLNE F,770000
	JRST RPB1	;MORE TO GO
	EXCH C,CKSUM
	ADD C,CKSUM
	CAIL C,-1
	SUBI C,-1	;PDP1 IS 1'S COMP
	EXCH C,CKSUM
	POPJ P,0
TUNE:	HRL 0,B
	HRRZM B,DETUN
	MOVE C,J2
	MOVNI D,PP6-J
TUNE1:	ILDB A,C
	IMULI A,100
	ADDI A,BOT
	HRRM A,PP6+2(D)
	ADDI D,PP2-PP1
	JUMPL D,TUNE1
	DATAI D
	TLNE D,100000
	JRST .-2
	JRST WAIT

RELOAD:	HRLZ 0,DETUN
	JRST RDI+1

RDI:	MOVSI 0,444444
	MOVEI P,PPDL

RDI1:	SETZM TAB
	SETZM TAB+1
	CONO 200000
	CONO PI,10000
	MOVE A,RC1
	MOVEM A,42
	MOVEI C,0
	MOVEI D,P6-P1
	HRRM C,PQ(D)
	SUBI D,P2-P1
	JUMPGE D,.-2
	MOVSI 15,400000
	MOVNI 14,JIFSEC
	CONO PI,12300
	CONO 3000
	CONSO 1000
	JRST .-1
	CONO 1001
	JRST PQ
BK0:	0
	CONO 1001
	AOJGE 14,BK1
	JRST 12,@BK0

BK1:	CONO PI,11577
	CONO 0
	HRRZ A,BK0
	SUBI A,PQ
	TLZ 15,400000
	IMULI 15,J-PQ
	ADD A,15
	MOVE C,T1
	MOVE D,T2
	DIV C,A
	MOVE B,C
	MOVEI A,TABX

BK1A:	HRRM A,BK1B
	MOVEI E,13
BK1B:	MOVEM C,.-.(E)
	MUL C,MAGIC
	SOJGE E,.-2
	ASH B,-1
	MOVE C,B
	SUBI A,14
	CAIL A,TAB
	JRST BK1A
	MOVEM C,13(A)
	MOVEI A,TAB-BOT-2
	MOVE C,BOT+100(A)
	MUL C,DTC0
	MOVEM C,BOT(A)
	SOJGE A,.-3
	DATAI D
	TLNE D,10000
	JRST .-2
	JRST WAIT
IS:	IFDEF MCOMP,<-1>
	IFNDEF MCOMP,<0>
DTC0:	377400000000
DETUN:	444444
RDC1:	XWD 220600,C
RC1:	JSR BK0
WDCNT:	0
CKSUM:	0
T1:	0
T2:	147320000000
MAGIC:	361503374705	;2**(-1/12)

BOT=MAGIC+1
TAB=BOT+700
TABT=TAB+77
TABX=TABT-14
PPDL=TAB+100
MUST=PPDL+20

PLYLEN=.-PLAYER

IFDEF MCOMP,<	DEPHASE>

IFNDEF MCOMP,<	END RDI>

;***** END OF PLAYER.MAC *****