Need a GONG sound in Assembler [message #206097] |
Tue, 20 July 2010 12:36 |
JB
Messages: 42 Registered: January 2013
Karma: 0
|
Member |
|
|
I am working on a terminal program and I would like to have the GONG
sound CCGMS uses when a Control-V is encountered.
I am really terrible when it comes to using sound. Tried to find the
routine in CCGMS but had no luck. A bell I have, gong I do not.
If anyone can help out, it is much appreciated!
|
|
|
Re: Need a GONG sound in Assembler [message #206099 is a reply to message #206097] |
Tue, 20 July 2010 18:52 |
Joe Forster/STA
Messages: 371 Registered: March 2013
Karma: 0
|
Senior Member |
|
|
> I am working on a terminal program and I would like to have the GONG
> sound CCGMS uses when a Control-V is encountered.
If you give us a download URL of CCGMS and a short but exact
description on how to navigate through the software (in VICE; also
what extra hardware needs to be configured) to get to the point where
the gong sound is made then someone might be able to hack it out for
you... ;-)
|
|
|
Re: Need a GONG sound in Assembler [message #206101 is a reply to message #206097] |
Tue, 20 July 2010 21:54 |
rusure
Messages: 1030 Registered: March 2012
Karma: 0
|
Senior Member |
|
|
On Jul 20, 10:36 am, JB <jbrown1...@gmail.com> wrote:
> I would like to have the GONG sound CCGMS uses when a Control-V is encountered.
I have never used ccgms.
I ripped this off from a compute gazette disk copier.
If there are no typos, it might work for you
ldy #14
lda #0
zero sta $d400,y
dey
bne zero
ldy #7
filsid ldx sidreg,y
lda sidval,y
sta d400,x
dey
bne filsid
lda #$e0
sta $a2
delay lda $a2
bne delay
lda #$14
sta $d404
rts
sidreg .dby 1,$506,$e0f,$1804
sidval .dby $3c73,,$cc9.,$c319,$d315
..END
|
|
|
Re: Need a GONG sound in Assembler [message #206102 is a reply to message #206101] |
Tue, 20 July 2010 22:15 |
rusure
Messages: 1030 Registered: March 2012
Karma: 0
|
Senior Member |
|
|
On Jul 20, 7:54 pm, rusure <r_u_s...@mybluelight.com> wrote:
> On Jul 20, 10:36 am, JB <jbrown1...@gmail.com> wrote:
>
>> I would like to have the GONG sound CCGMS uses when a Control-V is encountered.
>
> I have never used ccgms.
>
> I ripped this off from a compute gazette disk copier.
> If there are no typos, it might work for you
>
> ldy #14
> lda #0
> zero sta $d400,y
> dey
> bne zero
> ldy #7
> filsid ldx sidreg,y
> lda sidval,y
> sta d400,x
> dey
> bne filsid; change to bpl filsid
> lda #$e0
> sta $a2
> delay lda $a2
> bne delay
> lda #$14
> sta $d404
> rts
> sidreg .dby 1,$506,$e0f,$1804
> sidval .dby $3c73,,$cc9.,$c319,$d315
> .END
|
|
|
Re: Need a GONG sound in Assembler [message #206111 is a reply to message #206101] |
Wed, 21 July 2010 10:33 |
JB
Messages: 42 Registered: January 2013
Karma: 0
|
Member |
|
|
On Jul 20, 9:54 pm, rusure <r_u_s...@mybluelight.com> wrote:
> On Jul 20, 10:36 am, JB <jbrown1...@gmail.com> wrote:
>
>> I would like to have the GONG sound CCGMS uses when a Control-V is encountered.
>
> I have never used ccgms.
>
> I ripped this off from a compute gazette disk copier.
> If there are no typos, it might work for you
>
> ldy #14
> lda #0
> zero sta $d400,y
> dey
> bne zero
> ldy #7
> filsid ldx sidreg,y
> lda sidval,y
> sta d400,x
> dey
> bne filsid
> lda #$e0
> sta $a2
> delay lda $a2
> bne delay
> lda #$14
> sta $d404
> rts
> sidreg .dby 1,$506,$e0f,$1804
> sidval .dby $3c73,,$cc9.,$c319,$d315
> .END
Thanks for the code. I will try it out.
What issue of Gazette was this? Might want to look at all the code.
A copier is interesting too.
|
|
|
Re: Need a GONG sound in Assembler [message #206112 is a reply to message #206111] |
Wed, 21 July 2010 12:52 |
rusure
Messages: 1030 Registered: March 2012
Karma: 0
|
Senior Member |
|
|
On Jul 21, 8:33 am, JB <jbrown1...@gmail.com> wrote:
>
>
>
>
>> On Jul 20, 10:36 am, JB <jbrown1...@gmail.com> wrote:
> . I will try it out.
>
> What issue of Gazette was this? Might want to look at all the code.
> A copier is interesting too.- Hide quoted text -
My primary guess is the Disk Rapid Transit program in
the December 1987 issue. A secondary guess is the
Disk Doubler program in the August 1989 issue .The
gong code may be in neither. The SID parameters are
probably the same but may be stored in a different order.
I am almost positive that the delay code is my own.
I found another typo. There are 2 commas
next to each other in the sidval .dby
statement. One comma needs to be deleted.
|
|
|
Re: Need a GONG sound in Assembler [message #206116 is a reply to message #206112] |
Wed, 21 July 2010 16:50 |
rusure
Messages: 1030 Registered: March 2012
Karma: 0
|
Senior Member |
|
|
On Jul 21, 10:52 am, rusure <r_u_s...@mybluelight.com> wrote:
> On Jul 21, 8:33 am, JB <jbrown1...@gmail.com> wrote:
>
>
>
>>> On Jul 20, 10:36 am, JB <jbrown1...@gmail.com> wrote:
>> . I will try it out.
>
>> What issue of Gazette was this? Might want to look at all the code.
>> A copier is interesting too.- Hide quoted text -
>
> My primary guess is the Disk Rapid Transit program in
> the December 1987 issue. A secondary guess is the
> Disk Doubler program in the August 1989 issue .The
> gong code may be in neither. The SID parameters are
> probably the same but may be stored in a different order.
> I am almost positive that the delay code is my own.
The original GONG code is in the program "Disk Rapid
Transit" in the December 1987 issue of COMPUTE
GAZETTE. it's a file, not disk copier. The SID is
activated in the code in locations between $1180 and
$11cf. CG sets the SID volume to it's higest value 15
I use a more modest value of 3. Otherwise, the SID
parameters are identical in the GAZETTE and my programs.
|
|
|
Re: Need a GONG sound in Assembler [message #206120 is a reply to message #206102] |
Wed, 21 July 2010 20:34 |
rusure
Messages: 1030 Registered: March 2012
Karma: 0
|
Senior Member |
|
|
On Jul 20, 8:15 pm, rusure <r_u_s...@mybluelight.com> wrote:
>> sidval .dby $3c73,,$cc9.,$c319,$d315
please change the above line to
sidval .dby $3c73,$cc9.,$c319,$315
|
|
|
|
Re: Need a GONG sound in Assembler [message #206122 is a reply to message #206116] |
Wed, 21 July 2010 23:12 |
DMackey
Messages: 248 Registered: January 2012
Karma: 0
|
Senior Member |
|
|
On Wed, 21 Jul 2010 13:50:57 -0700 (PDT), rusure
<r_u_sure@mybluelight.com> wrote:
> On Jul 21, 10:52 am, rusure <r_u_s...@mybluelight.com> wrote:
>> On Jul 21, 8:33 am, JB <jbrown1...@gmail.com> wrote:
>>
>>
>>
>>>> On Jul 20, 10:36 am, JB <jbrown1...@gmail.com> wrote:
>>> . I will try it out.
>>
>>> What issue of Gazette was this? Might want to look at all the code.
>>> A copier is interesting too.- Hide quoted text -
>>
>> My primary guess is the Disk Rapid Transit program in
>> the December 1987 issue. A secondary guess is the
>> Disk Doubler program in the August 1989 issue .The
>> gong code may be in neither. The SID parameters are
>> probably the same but may be stored in a different order.
>> I am almost positive that the delay code is my own.
>
> The original GONG code is in the program "Disk Rapid
> Transit" in the December 1987 issue of COMPUTE
> GAZETTE. it's a file, not disk copier. The SID is
> activated in the code in locations between $1180 and
> $11cf. CG sets the SID volume to it's higest value 15
> I use a more modest value of 3. Otherwise, the SID
> parameters are identical in the GAZETTE and my programs.
The disk image can be found here :
http://www.q-link.cc/commodore/typins/1987_12.zip
Just in case anyone wants it..
|
|
|
Re: Need a GONG sound in Assembler [message #206127 is a reply to message #206097] |
Thu, 22 July 2010 09:54 |
JB
Messages: 42 Registered: January 2013
Karma: 0
|
Member |
|
|
On Jul 20, 12:36 pm, JB <jbrown1...@gmail.com> wrote:
> I am working on a terminal program and I would like to have the GONG
> sound CCGMS uses when a Control-V is encountered.
>
> I am really terrible when it comes to using sound. Tried to find the
> routine in CCGMS but had no luck. A bell I have, gong I do not.
>
> If anyone can help out, it is much appreciated!
Well I tired another version of CCGMS and I was able to find the GONG
and the BELL routine.
Here is the code for them in case anyone wants to see it, or at least
it will be archived here in case I lose it and need it again. :)
; CCGMS BELL AND GONG WORKS 7-21-2010
*= $C000
LDA #14
STA $D418 ;VOLUME
JMP GONG
BELL LDX #9
STX $D413
LDX #0
STX $D414
LDX #$40
STX $D40F
LDX #0
STX $D412
LDX #$11
STX $D412
RTS
GONG PHA
LDX #0
- LDA REG,X
TAY
LDA DATA,X
STA $D400,Y
INX
CPX #20
BCC -
PLA
RTS
REG .BYTE $18,$06,$0D,$14,$04,$0B,$12,$0F,$08,$01
.BYTE $05,$13,$0C,$0E,$07,$00,$04,$0B,$12,$18
DATA .BYTE $24,$00,$00,$00,$00,$00,$00,$04,$08,$10
.BYTE $0D,$0D,$0B,$1C,$30,$44,$15,$15,$15,$0F
|
|
|
Re: Need a GONG sound in Assembler [message #206128 is a reply to message #206120] |
Thu, 22 July 2010 11:13 |
rusure
Messages: 1030 Registered: March 2012
Karma: 0
|
Senior Member |
|
|
Add a "$" to the value being
loaded in the first line
ldy #$14
Add a "$" to the SID address in
the filesid loop and change the
looping condition from bne to bpl
ldy #7
filsid ldx sidreg,y
lda sidval,y
sta $d400,x
dey
bpl filsid
Change the ",," & ".," to
"," and change the "d315"
to "315" in the last line
sidval .dby $3c73,$cc9,$c319,$315
|
|
|
|
|
|