Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - SMS Sound Segments

Reply to topic
Author Message
PolestaR
  • Guest
Reply with quote
SMS Sound Segments
Post Posted: Sat Oct 28, 2000 8:34 am
How long does each frequency last when it is written to port 7F? Like does it last a specified amount of time? Can the Sound chip only be updated at certain times?
Thanks for any help :)
-Jason Starr-
 
  • Joined: 24 Jun 1999
  • Posts: 1732
  • Location: Paris, France
Reply with quote
Post Posted: Sat Oct 28, 2000 1:27 pm
Quote
> How long does each frequency last when it is written to port 7F? Like does it last a specified amount of time? Can the Sound chip only be updated at certain times?

It stays until you change it by a second write to the same channel frequency register.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 25 Oct 1999
  • Posts: 2029
  • Location: Monterey, California
Reply with quote
Post Posted: Sat Oct 28, 2000 8:05 pm
Quote
> How long does each frequency last when it is written to port 7F? Like does it last a specified amount of time? Can the Sound chip only be updated at certain times?

Both the volume and frequency settings will last until they are changed to something else.

And yes, the sound chip can be updated at any time. Commonly this is done in or around the vertical blank, because the vertical blank is one of the few methods of time syncing that yo can do with an SMS. However, you can do it at any time. If you don't want to support sample playback ("Find the miracle ball!"), you can probably just check the sound chip registers once every frame and use it to synthesize a sound wave that lasts for one frame.

If you do want to emulate sample playback, however, you'll need to do a bit of work. When playing back samples, the sms must update the volume level at a certain number of cycles apart (the z80 is usually doing little else but writing to the sound port and waiting in idle loops during this time). So your sound handler needs to log each update to the sound chip along with exactly whe it happened, and use this log to construct a correct output wave for that frame. Yeah, that's more difficult, and your cpu emulator needs to allow you to get the number of cycles elapsed between writes to the sound port.
  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!