Megalextoria
Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Digital Archaeology » Computer Arcana » Commodore » Commodore 8-bit » Need a GONG sound in Assembler
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Need a GONG sound in Assembler [message #206097] Tue, 20 July 2010 12:36 Go to next message
JB is currently offline  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 Go to previous messageGo to next message
Joe Forster/STA is currently offline  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 Go to previous messageGo to next message
rusure is currently offline  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 Go to previous messageGo to next message
rusure is currently offline  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 Go to previous messageGo to next message
JB is currently offline  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 Go to previous messageGo to next message
rusure is currently offline  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 Go to previous messageGo to next message
rusure is currently offline  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 Go to previous messageGo to next message
rusure is currently offline  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 #206121 is a reply to message #206111] Wed, 21 July 2010 23:04 Go to previous messageGo to next message
DMackey is currently offline  DMackey
Messages: 248
Registered: January 2012
Karma: 0
Senior Member
On Wed, 21 Jul 2010 07:33:51 -0700 (PDT), JB <jbrown1289@gmail.com>
wrote:

<Snip>
>
> 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.


Let us know how it works out.
Re: Need a GONG sound in Assembler [message #206122 is a reply to message #206116] Wed, 21 July 2010 23:12 Go to previous messageGo to next message
DMackey is currently offline  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 Go to previous messageGo to next message
JB is currently offline  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 Go to previous messageGo to next message
rusure is currently offline  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
Re: Need a GONG sound in Assembler [message #206130 is a reply to message #206127] Thu, 22 July 2010 12:22 Go to previous messageGo to next message
rusure is currently offline  rusure
Messages: 1030
Registered: March 2012
Karma: 0
Senior Member
That's a gong ? Now the COMPUTE GAZETTE gong is a GONG!!!!
Re: Need a GONG sound in Assembler [message #206132 is a reply to message #206130] Thu, 22 July 2010 14:01 Go to previous messageGo to next message
JB is currently offline  JB
Messages: 42
Registered: January 2013
Karma: 0
Member
On Jul 22, 12:22 pm, rusure <r_u_s...@mybluelight.com> wrote:
> That's a gong ?  Now the COMPUTE GAZETTE gong is a GONG!!!!

I am not sure I follow you?

The gazette gong is pretty sad compared to the ccgms gong, but thats
my opinion anyway.
Re: Need a GONG sound in Assembler [message #206133 is a reply to message #206132] Thu, 22 July 2010 16:35 Go to previous message
rusure is currently offline  rusure
Messages: 1030
Registered: March 2012
Karma: 0
Senior Member
On Jul 22, 12:01 pm, JB <jbrown1...@gmail.com> wrote:
> On Jul 22, 12:22 pm, rusure <r_u_s...@mybluelight.com> wrote:
>
>> That's a gong ?  Now the COMPUTE GAZETTE gong is a GONG!!!!
>
> I am not sure I follow you?
>
> The gazette gong is pretty sad compared to
> the ccgms gong, but thats my opinion anyway

Everybody is entitled to their incorrect opinion
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Commodore Free Issue 42 available (fwd)
Next Topic: Warpcopy & D71 images.
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Apr 19 12:36:46 EDT 2024

Total time taken to generate the page: 0.24473 seconds