Jump to content
IGNORED

2600 Sound


Cap5750

Recommended Posts

Hoping not to get yelled at too much. :)

 

I've read over countless documents and searched faqs, messageboards, lists etc and haven't found what I'm looking for.

 

Okay, so it's nearly 6 AM my time and I've had all of 30 minutes of sleep before getting back up to play around with this some more.

 

Anyway, I'm messing with one of the demo tutorials (the one where you move the smiley around with the joystick and it detects if you "crash" into the line).

 

I decided to remove the changing of the color background and put in a sound effect. I tried this:

 

SOUND LDX #15

STX AUDC0

STX AUDF0

STX AUDV0

DEX

STX AUDC0

STX AUDF0

STX AUDV0

 

This produced a faint buzz. Cool! :)

 

However, it never shut off. After looking through the stella programmers guide, I saw where I needed to place a zero in audv0 to turn off the sound.

 

Okay, if I did this immediately after my code above, I get nothing. So, I decided to try and place a loop that did nothing in order to give some "time" for the sound to play, but that didn't do anything either.

 

I've looked through some of the other code (in particular the disassembly of Combat) and didn't notice any major differences.

 

What am I missing?

 

Thanks,

Cap

Link to comment
Share on other sites

What am I missing?

The first part of your writes to the three audio registers won't be heard at all, since the values (#15) are only valid ~11/1,000,000 sec before getting overwritten by new values (#14).

 

And if you set AUDV0 to zero directly after that, you won't here the second values for the very same reason. So your sound is just played to short to be heard at all.

 

:idea: You should enable audio and then wait e.g. 60 frames (= 1 sec) before you turn it off again.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...