Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct sound queue titles #61

Open
AlexField442 opened this issue Apr 10, 2022 · 1 comment
Open

Correct sound queue titles #61

AlexField442 opened this issue Apr 10, 2022 · 1 comment

Comments

@AlexField442
Copy link

This is more of a suggestion, but shouldn't we use "PlayMusic" and "PlaySound" instead of "PlaySound" and "PlaySound_Special"? I'm saying this because, although used interchangably in Sonic 1, the Nick Arcade symbol tables suggest they are meant to be specific, while the labels here suggest they're meant for "sounds" and "special sounds".

(search "bgmset" and "soundset"; their locations match-up near perfectly with Sonic 1

@Clownacy
Copy link
Member

Clownacy commented Apr 10, 2022

If only those symbols contained a name for the 'PlaySound_Unused' function... Looking at the official "Sound-Source" code, the three queues are generic: none are specifically intended for music or sounds; they're just for queuing multiple requests in a single frame. Section 2 of 'md11.txt' backs this up:

2: How to make a request

 Set the request number in the kyflag below. If there is a possibility that more than one request number is set from interrupt to interrupt, there are three buffers for requests, so check whether they are 0 or not in order before setting them. Please do so. (The sound clears all three buffers to zero each time a CALL is made.)

  	kyflag equ $fff00a
  	 (buf1 equ $fff00a)
  	 (buf2 equ $fff00b)
  	 (buf3 equ $fff00c)

With that in mind, the idea that each queue is for music, SFX, and whatever the third thing would have been (background SFX?), seems to be entirely Sonic Team's.

The third sound queue is broken in Sonic 1, because of a bug in the sound driver. It was fixed in Sonic 2 (after the Nick Arcade prototype), and the third PlaySound function (erroneously known as 'PlaySoundStereo' in the Sonic 2 disassembly) finally started being used. Strangely, the leftover Big Ring object from Sonic 1 was modified to use PlaySoundStereo. In Sonic 3, the second and third PlaySound functions were merged together. The third queue's usage in Sonic 2 and Sonic 3 suggest that it was always intended for sounds, so its name could have been something like 'soundset2', but I guess we can't know for sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants