WEFAX Simulator (WESIM.BAS)

WEFAX Simulator by Charles Jackson

Description

WEFAX Simulator by Charles Jackson

From the Antic disk of September 1986 (Vol. 5 No. 5).

The magazine article

From the Antic Software Archive at atarimagazines.com. The program remains the property of its author and publisher.

What is in this file

Atari BASIC program · 1.9 KB

Dialect
Atari BASIC
Lines
45
Variables
TONE$, GREY$, X, K, BYTE
BASIC listing (45 lines)
10 REM WEFAX SIMULATOR
20 REM BY CHARLES JACKSON
30 REM (c) 1986, ANTIC PUBLISHING
40 GRAPHICS 0:POKE 712,PEEK(710):POKE 752,1
50 ? :? "   If you've never heard a WEFAX":? "signal before, this program will"
60 ? "generate one for you.":? :? "   This sample signal contains "
70 ? "no usable picture information."
80 ? :? :? "  (Press the space bar to end)"
90 DIM TONE$(47),GREY$(50):GOSUB 390
100 POSITION 11,12:? " [Press START] ":IF PEEK(53279)<>6 THEN 100
110 POKE 53768,1:REM SET 64-KHZ. CLOCK
120 POSITION 11,12:? " Starting Tone ":GOSUB 330
130 POKE 20,0:POKE 19,0:POSITION 11,12:? " Phasing Pulses "
140 POKE 53761,174:FOR X=1 TO 30
150 IF PEEK(764)=33 THEN POP :GOTO 320
160 POKE 53760,14:POKE 20,0
170 IF PEEK(20)<29 THEN 170
180 POKE 53760,21
190 IF PEEK(20)<31 THEN 190
200 NEXT X
210 POSITION 9,12:? "     Greyscale     "
220 FOR X=1 TO 50
230 POKE 77,0:IF PEEK(764)=33 THEN POP :GOTO 320
240 K=USR(ADR(GREY$))
250 NEXT X
260 POSITION 9,12:? " Picture Information "
270 FOR X=1 TO 800
280 POKE 77,0:IF PEEK(764)=33 THEN POP :GOTO 320
290 K=USR(ADR(TONE$))
300 NEXT X
310 POSITION 9,12:? "   Ending Tone             ":GOSUB 330
320 POKE 764,255:GRAPHICS 0:END
330 POKE 20,0:POKE 19,0
340 POKE 53761,174
350 POKE 53760,21:POKE 53760,14
360 IF PEEK(764)=33 THEN POP :GOTO 320
370 IF PEEK(19)<1 THEN 350
380 RETURN
390 FOR X=1 TO 47:READ BYTE:TONE$(X,X)=CHR$(BYTE):NEXT X
400 FOR X=1 TO 50:READ BYTE:GREY$(X,X)=CHR$(BYTE):NEXT X
410 ? "↰":RETURN
420 DATA 104,169,0,133,20,162,1,142,8,210,169,174,141,1,210,173,10,210,201,14,144,239,201,22,176
430 DATA 235,141,0,210,165,20,201,28,144,226,169,21,141,0,210,165,20,201,31,144,250,96
440 DATA 104,169,174,141,1,210,169,0,141,8,210,133,20,169,28,56,229,20,24,74,74,24,105,14,141
450 DATA 0,210,165,20,201,28,144,236,169,21,141,0,210,165,20,201,31,144,250,169,0,141,1,210,96