[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
IIgs too fast for sound
- Subject: IIgs too fast for sound
- From: "ralmin" <xbiber@bigpond.net.au>
- Date: Sun, 01 Jul 2001 06:47:08 GMT
- Newsgroups: comp.sys.apple2
- Organization: BigPond Internet Services (http://www.bigpond.net.au)
- Xref: archiver1.google.com comp.sys.apple2:9772
I have a machine-language routine for use by BASIC programs to play music on
the Apple II, from a book that I've misplaced. It's given two byte-sized
numbers, the length and pitch of the note to play, then you call the
routine.
READ N
FOR I=1 to N
READ L,P
POKE 864,L: POKE 865,P: CALL 866: REM PLAY A NOTE
FOR S=1 TO 5: NEXT S: REM SHORT BREAK BETWEEN NOTES
NEXT T
Anyway, it runs too fast on my IIgs (ROM 3) and produces a tone that's too
high and internally out of tune. I've tried setting System Speed to Normal
in the Control Panel and it made no difference. Why is this?
Ralmin.
PS: The routine is:
360: length
361: pitch
362: LDY 0361
365: LDX 0361
368: INX
369: BNE 0368
36B: LDA #04
36D: JSR FCA8 -- monitor WAIT routine
370: LDA C030 -- twiddle speaker
373: DEY
374: BNE 0365
376: DEC 0360
379: BNE 0362
37B: RTS