: GO ( Start word)
CLS HEADER MESS1 WAIT MESS2
WAIT CLS SG
;
: MESS2 ( info part 2)
4 1 AT ." At the bottom of the screen arethe BITs of reg 7. Reg
7's bits control the Tone and Noise out-puts. When bits 0-5 are
set (1) the channel is OFF. Wheb bits 0-5 are reset (0) the channel
is ON. If the arrow > is pointed atan I/O port a constant update of
the port value will be shown. This program was first publishedin
Forth User Vol.2 No 2/3 1984 and has been changed to work with AMI
by the Jupiter Ace Archive Team.
To run the program..."
;
: mess1 ( info part 1)
4 2 AT ." The sound chip in AMI is an AY-8910.It's 3-voice programable
sound generator can be experimented with using this sound kitprogram. The
program is easy to use. Keys:
S Changes the speed.
1 Moves the > arrow c
ursor. 3 Triggers the envelo
pe shape. 6 Increases the reg v
alues. 7 Decreases the reg v
alues. 0 Resets all register
s."
;
: WAIT ( wait for key press)
22 0 AT ." press a key"
10 0
DO
BEGIN
INKEY
UNTIL
LOOP
:
: header
0 0 at ."
AMI SOUND TOOL KIT"
;
0 VARIABLE R
0 VARTABLE W
: SET
SWAP 65533 OUT 49194 OUT
;
: R?
65533 OUT 65533 IN
:
: R.
2 0 AT 16 0
DO
I 0 SET SPACE I
DUP DUP . 2+ 8
AT R? . 2 SPACES
CR
LOOP
;
: RR
R @ DUP
;
: K67
RR R? ROT + SET
;
: K1
RR 2+ 0 AT SPACE
1+ 15 AND R !
;
: SP
800 W @ - W
!
BEGIN
INKEY 0=
UNTIL
;
: T
16 15388 @ — 31
AND SPACES
;
: A
." TONE FINE"
T ." COARSE"
T
;
,
: SETUP
CLS ." REG CONTENTS USE"
CR CR T ." A"
A ." B"
A ." C"
A ." NOISE PERIOD"
T ." ENABLE LOW"
T ." A VOLUME"
T ." B VOLUME"
T ." C V0LUME"
T ." ENV. PERIOD FINE"
T ." COARSE"
T ." ENV. SHAPE"
T ." I/0 PORT A"
T ." I/0 PORT B"
R.
;
: SG1
INKEY DUP 49 =
IF
K1
ELSE
DUP 55 =
IF
-1 K67
ELSE
DUP 54 =
IF
1 K67
ELSE
DUP 48 =
IF
R.
ELSE
DUP 115 =
IF
SP
ELSE
DUP 51 =
IF
13 13 R? SET
THEN
THEN
THEN
THEN
THEN
THEN
DPOP RP 2+ DUP 0
AT . " >"
OVER . 8 AT R?
. 2 SPACES
;
: SG
SETUP CR ." IB IA NC NB NA TC T
B TA"
BEGIN
FAST SG1 7 R? 24
0
DO
21 22 I - AT
2 /MOD SWAP . 3
+LOOP
DROP SLOW W @ 0
DO
LOOP
0
UNTIL
;