Sonic and Sega Retro Message Board: Odd Music Related Glitch - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Page 1 of 1
    Locked
    Locked Forum

Odd Music Related Glitch ...S2 Clone Driver

#1 User is offline Shadow Fire 

Posted 04 April 2013 - 07:46 AM

  • Ultimate victory!
  • Posts: 1538
  • Joined: 05-February 05
  • Gender:Male
  • Location:The Land of Darkness
  • Project:Sonic: The Lost Land (Series), The GCN (site)
  • Wiki edits:60
Okay, you may or may not be aware that I'm getting back into hacking thanks to RHS. However, in spite of the (slow) progress I've been making, I've run into an odd error.

The music that plays for Slot $82 (02 in sound test), disables sound, until a different music track is played. It is the only one it seems to do it on, and RHS and I have both confirmed that it isn't the file.

Does anybody have any clue as to what could be causing it? RHS and I are stuck on this.

#2 User is offline Tiddles 

Posted 04 April 2013 - 04:27 PM

  • Diamond Dust
  • Posts: 452
  • Joined: 25-December 09
  • Gender:Male
  • Location:Nottingham, England
  • Project:Get in an accident and wake up in 1973
  • Wiki edits:31
I've never hacked S2 or used the S1 or S2 drivers, but the only time I've seen a similar effect is where the driver is treating that music ID as the 1up track. I don't know why that would be mapped to $81 or if it's anywhere near what's actually happening here, but it might be a direction that's worth investigating? Just a thought.

#3 User is offline redhotsonic 

Posted 04 April 2013 - 05:21 PM

  • Also known as RHS
  • Posts: 1128
  • Joined: 31-January 05
  • Gender:Male
  • Location:United Kingdom
  • Project:Sonic 2 Recreation
  • Wiki edits:24
After speaking to ValleyBell, it seems that the life ID in the wrong ID slot. He was gonna post here, but he was off to bed, so I'll post it on his behalf, so give him your thanks if the following works.


Go to "Sound_81to9F:". The first "cmpi.b" checks for the song ID of the extra life jingle. Change that to to whatever the 1-up jingle is actually at.


Also, due to the crappy way the sound index extention works, you need to check, if it's index 00-7F or 80-FF.

Here is the code:

Sound_81to9F:	; XREF: Sound_ChkValue
	cmpi.b	#$82,d7			; is "extra life" music played? (sound 02 or 82)
	bne.s	loc_72024		; if not, branch
	cmpi.b	#$01,($FFFFFFFC).w	; is "extra life" music played? (sound 80-FF)
	bne.s	loc_72024		; if not, branch
	tst.b	$27(a6)
;	blah, blah, blah


This code should work.

#4 User is offline Shadow Fire 

Posted 04 April 2013 - 08:34 PM

  • Ultimate victory!
  • Posts: 1538
  • Joined: 05-February 05
  • Gender:Male
  • Location:The Land of Darkness
  • Project:Sonic: The Lost Land (Series), The GCN (site)
  • Wiki edits:60
Give ValleyBell my thanks, man. It would seem that was the one bit of code I missed when I changed the order of the music files.

Lesson learned. No moar ASM hacking in the early hours of the morning.

Page 1 of 1
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users