EricBall Posted June 28, 2006 Share Posted June 28, 2006 I've been toying with creating an uber music+SFX routine which would automatically mix 2 music channels, 2 "drum" channels (play for a frame), and 2 SFX channels. Unfortunately, I think the RAM usage will be to high to be practical (6 timers, 6 pointers...) on the 2600, maybe on the 7800. Anyway, what I was wondering is what TIA AUD register twiddling various programmers use to create SFX. The SFX in Skeleton are simple, just a note played for several frames (using volume for stereo positioning). What I want to do if make a compact description "language" which the mixer routine would use to vary the AUD values over multiple frames. i.e. play sound for 10 frames, incrementing the volume and frequency by one every frame, then play different sound for 5 frames, etc. This is to reduce the ROM space required for each SFX "tune". Quote Link to comment Share on other sites More sharing options...
vdub_bobby Posted June 28, 2006 Share Posted June 28, 2006 I think the easiest way to do this is to write a 2-channel+drums music driver and a SFX driver and then just have flags for when the SFX are playing. In the music driver, process all timers, etc. every frame but don't modify any AUDxx registers if the SFX (for that channel) are playing. I'd go with this approach since you generally don't need to call the SFX routine every frame (unlike with a music routine) and then you have freedom in how you write your SFX routine - for some games - like M-4 - the effects are pretty simple and just decreasing/increasing AUDxx values every couple of frames is all that is needed, but for other games - like Reindeer Rescue and Go Fish! - the SFX were complicated enough that I needed to use tables to drive changes in AUDxx, simply adding/subtracting values wasn't good enough (see especially the effect that plays when you eat another fish in Go Fish! and the jump effect in Reindeer Rescue). Hmmm...rereading this, I don't know if this applies. But there it is. Quote Link to comment Share on other sites More sharing options...
djmips Posted July 6, 2006 Share Posted July 6, 2006 I think one big improvement you can make over most existing 2600 music drivers is to provide envelope information for a channel. This would give you the ability to have Attack Decay Sustain Release. I found that you can update the envelope twice per frame. I update once before display and once after display. This would give you close enough to a 8ms period for your envelope updates. I don't think you can do portamento on the 2600 as nicely as on other systems but I would support it. I sometimes change the waveform type per frame and it's table driven. I've also found that if you update the frequency at 60Hz or ~120Hz you can dither the frequency and get something that's in-between. I haven't experimented with it too much but it's interesting... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.