Toy Story
Page 1 of 3
Page 1 of 3 • 1, 2, 3
20180119
Toy Story
PepilloPEV/Conn's patch v1.0b5:
- Code:
http://www.mediafire.com/file/131voy1n0c2nic7/ts-msu1-patch-pepillopev-v1.0b5.zip/file
enmet's PC RedBook Audio v2 and Sega Genesis PCM set:
- Code:
https://app.box.com/s/bhmhhwhb0oqe9kmpgawxlxp293dzos0s
Last edited by pepillopev on Mon 25 May 2020 - 19:12; edited 47 times in total
pev- Since : 2017-10-16
Toy Story :: Comments
Re: Toy Story
As for issue 1, I noticed that
As for the music restart, I'd implement a ram value
(on a brief check, 7fef00 is surely free).
msuPlay:
PHA
CMP $7fef00; check if track already playing?
BEQ noplay
STZ $2006 ; Conn's recommendation
STA $2004
STA $7fef00 ;copy the track number on free ram
STZ $2005
loopTitle:
BIT $2000
BVS loopTitle ; track not ready
LDA #$FF ; max volume
STA $2006
noplay: ;new branch point
PLA
RTS
This will cancel any music restart if the track is already running
- Code:
$97/D9DA A9 00 01 LDA #$0100 A:1000 X:0000 Y:1708 P:envmxdizC
$97/D9DD 8F AE FF 7E STA $7EFFAE[$7E:FFAE] A:0100 X:0000 Y:1708 P:envmxdizC
- Code:
$97/DA35 A9 01 00 LDA #$0001 A:0000 X:0000 Y:1708 P:envmxdiZC
$97/DA38 85 EC STA $EC [$00:00EC] A:0001 X:0000 Y:1708 P:envmxdizC
As for the music restart, I'd implement a ram value
(on a brief check, 7fef00 is surely free).
msuPlay:
PHA
CMP $7fef00; check if track already playing?
BEQ noplay
STZ $2006 ; Conn's recommendation
STA $2004
STA $7fef00 ;copy the track number on free ram
STZ $2005
loopTitle:
BIT $2000
BVS loopTitle ; track not ready
LDA #$FF ; max volume
STA $2006
noplay: ;new branch point
PLA
RTS
This will cancel any music restart if the track is already running
Thanks for the input, Conn. I will implement your code suggestions and test in the morning.
Good job! Just tested this out and it works well on console too. I think you forgot the final track (ts-msu1-18) in the PCM archive and the manifest as well but it seems to work if you just put it in there yourself.
Because it's the first time I've been able to test it on console, I noticed that the soundtrack was way too quiet for my Rev. F (even with the software boost), so I'm going to fix that in the next PCM pack revision.
The bugs I've found so far is the music not stopping when the level fades out (if we're comparing how the game handles the SPC soundtrack), and sometimes when you die it plays the wrong music on respawn. Dying in level 3 for instance will start the level 1 music. On death, it stops the current music, quickly resumes it then on respawn it switches the level 1 music.
I made a Genesis PCM pack found here.
Because it's the first time I've been able to test it on console, I noticed that the soundtrack was way too quiet for my Rev. F (even with the software boost), so I'm going to fix that in the next PCM pack revision.
The bugs I've found so far is the music not stopping when the level fades out (if we're comparing how the game handles the SPC soundtrack), and sometimes when you die it plays the wrong music on respawn. Dying in level 3 for instance will start the level 1 music. On death, it stops the current music, quickly resumes it then on respawn it switches the level 1 music.
I made a Genesis PCM pack found here.
Conn, your code's logic works as intended, but not in this case, due to how the game resets free ram when the screen transitions (all zeroes written). Unless, your NMI trick can be used to keep the saved msu track to stay in free ram? Not really sure, how to implement this.
Overall, BEQ will never work as intended because it will be 0 during the time we need this check to pass. Using BNE on this same code will just completely bypass the msuPlay routine (no msu audio at all, I know you probably would not see the logic in doing this, but I was curious to try - still learning asm on how the logic flows).
This is the problem I was encountering with this game a lot. It does a lot of screen transitions that reset free ram and wreaks havoc to my code (small msu repeats or no audio depending on how I attempt to work around the issue). I may have to approach this game a different way.
Thanks for finding the music pause/resume routines for me. I implemented it them both and work as you intended. The game is now at v1.0beta2 (updated all important files on link).
Last edited by pepillopev on Sat 20 Jan 2018 - 11:44; edited 3 times in total
Overall, BEQ will never work as intended because it will be 0 during the time we need this check to pass. Using BNE on this same code will just completely bypass the msuPlay routine (no msu audio at all, I know you probably would not see the logic in doing this, but I was curious to try - still learning asm on how the logic flows).
This is the problem I was encountering with this game a lot. It does a lot of screen transitions that reset free ram and wreaks havoc to my code (small msu repeats or no audio depending on how I attempt to work around the issue). I may have to approach this game a different way.
Thanks for finding the music pause/resume routines for me. I implemented it them both and work as you intended. The game is now at v1.0beta2 (updated all important files on link).
Last edited by pepillopev on Sat 20 Jan 2018 - 11:44; edited 3 times in total
Enmet wrote:I think you forgot the final track (ts-msu1-18) in the PCM archive and the manifest as well but it seems to work if you just put it in there yourself...
Enmet, the tracks that are missing are due to how the original snes rom behaves codewise. The game does not play spc music during stage clear, cut scene (except going from game title to stage1), and ending. I verified this when playing the original rom too. Believe me, it is sacrilege when a game ending does not have music! The unspeakable horror!
Anyway, it may be possible to add these missing tracks in the future but priority dictates fixing the bugs first.
Last edited by pepillopev on Sat 20 Jan 2018 - 15:10; edited 2 times in total
Enmet wrote:...I noticed that the soundtrack was way too quiet for my Rev. F (even with the software boost), so I'm going to fix that in the next PCM pack revision...
The currently linked pcm set's volume is at an acceptable level (it is a little loud, but you can still hear the spc sound effects). But again, everyone has their own tastes in this case.
If you decide to make another louder pcm set to help with your Sd2Snes low audio issue, it will probably sound horrible in emulators. For this, we can just make a separate link and mention its for sd2snes use only.
I'm still surprised your sd2snes's audio is too low (even on latest firmware). Weird...
It's really weird that the complete ram gets resetted, but if you want to prevent the music restarts on death,
7fef00
should work. It is only cleared on game-over (and other screen transitions) but not on death. So you can at least prevent restart on dying with my suggestion - but not the titlescreen.
Other stuff like the nmi thing will also rely on ram not cleared, so it won't work in this case.
7fef00
should work. It is only cleared on game-over (and other screen transitions) but not on death. So you can at least prevent restart on dying with my suggestion - but not the titlescreen.
Other stuff like the nmi thing will also rely on ram not cleared, so it won't work in this case.
Applied an additional mute check which stops the brief 1 second msu restart (before entering the 'that old army game' etch-a-sketch screen and after dying). Also stops msu when it is game over. I only tested the first 3 stages (enmet would have to test the others).
Again, Conn, thanks for your two fix suggestions (it did solve the wrong track playing when dying in stage 3, good call).
Again, Conn, thanks for your two fix suggestions (it did solve the wrong track playing when dying in stage 3, good call).
I don't mean the bonus tracks that I added (tracks that are not actually part of the SNES version), but rather the music for the final level was missing. Tracks 1 to 18 are all proper replacements, while 19 to 21 are the bonus tracks that I added. So 18 was missing from the pack so there was no music for the final level, but I simply added it myself and it worked.pepillopev wrote:Enmet wrote:I think you forgot the final track (ts-msu1-18) in the PCM archive and the manifest as well but it seems to work if you just put it in there yourself...
Enmet, the tracks that are missing are due to how the original snes rom behaves codewise.
Is the track reference missing from the manifest.bml or is pcm track itself missing from the linked set? I'll check both later on today. Whatever is missing I'll fix.
Sent from Topic'it App
Sent from Topic'it App
Enmet, thanks for noticing the mishap. Indeed, you are correct, I made the necessary corrections to the manifest.bml, pdf readme, and missing ts-msu1-18.pcm file in your PCM set. All is well, now.
I again have problems to open it (neither my rar nor 7zip) I am not sure if I am the only person, but if possible I'd prefer zip or 7z...
Conn wrote:I again have problems to open it (neither my rar nor 7zip) I am not sure if I am the only person, but if possible I'd prefer zip or 7z...
Conn, I recompressed enmet's set (one including missing track18). I used the original RAR standard (previous one used RAR5 standard). Maybe, this one will work for you. If it does, from here on, I'll stick to the original RAR standard when compressing in multiple file split mode.
I have to split the set's in 250MB chunks as box.com does not allow files greater than that to be uploaded and hosted on their site.
Fixing the above issues, introduced another weird bug. Now when Woody dies, the music does not restart when Woody respawns (it just resumes the msu music where it left off, in some stages):
If you want music mute and restart on dying try hook here:
- Code:
$98/9B45 A9 04 00 LDA #$0004 A:0000 X:0006 Y:000C P:eNvmxdizC
$98/9B48 8D 1C 00 STA $001C [$80:001C] A:0004 X:0006 Y:000C P:envmxdizC
stz $2007 ; stop music
lda #$00
STA $7fef00 ; reset free ram so that the music respawns.
Applied your third fix suggestion and worked as intended. Thanks Conn for your surprise anti-retirement fixes.
Retirement is something else... but how said Qwerty so nicely: "I'm working on it"
I'll try to get SMW2 done, then only stuff left is IoG (almost done), demon's crest (almost done), SoM2 (just started)... guess that's it with my to-do, but I'm surely around to help you guys out further if needed
I'll try to get SMW2 done, then only stuff left is IoG (almost done), demon's crest (almost done), SoM2 (just started)... guess that's it with my to-do, but I'm surely around to help you guys out further if needed
Btw, there's a easy trick to find those hooks I posted above with Geiger:
Play the game with trace cpu and trace once set and play. Make all possible actions except that you need the hook address from.
Then clear the hook at cpu trace, hit play for a second and click cpu trace again, now making the action (dying, pause, whatever).
The second log should now have the address needed at first entry
Play the game with trace cpu and trace once set and play. Make all possible actions except that you need the hook address from.
Then clear the hook at cpu trace, hit play for a second and click cpu trace again, now making the action (dying, pause, whatever).
The second log should now have the address needed at first entry
Thanks for the tip. I will add this to my list of current skills.
Sent from Topic'it App
Sent from Topic'it App
Cracks in the first stage (Snes9x 1.55) , the previous version did not have this. Could you give me the previous one to test? Because I deleted it when the new version came out.
I checked the code and reapplied the patch, for me it works and looking at the asm, also no obvious problem with the new code Pev included from the last version... where does it crash for you? Do you apply on non headered rom?
I applied the patch on a headered rom, the sound works perfectly, but now it's giving black screen in the first stage.
in the pack also does not have the file ts-msu1.msu (I copied from another set), so that makes a difference.
in the pack also does not have the file ts-msu1.msu (I copied from another set), so that makes a difference.
DarthVaderX, the patch must be applied to a clean non-headered rom. Usually the general rule in the Super NES ROM world, see example below:
* notice the extension in bold...
Headered: ToyStory.smc
Non-Headered: ToyStory.sfc
Even that, I do not always go by this as I have seen some ROMs hosted from sites that have the SFC extension and end up being headered ROMs.
In this case, I use a program called WindHex to verify if a ROM is truly non-headered prior to patching. See image below:
Open the questionable ROM in WindHex (follow image shown above). If the ROM is truly non-headered, WindHex will indicate this. If not, it will remove the header for you. After WindHex does its magic, save the file, then ensure your fixed ROM ends in the SFC extension. Then apply the patch. Hope this helps.
WinHex (link):
http://www.romhacking.net/utilities/291/
* notice the extension in bold...
Headered: ToyStory.smc
Non-Headered: ToyStory.sfc
Even that, I do not always go by this as I have seen some ROMs hosted from sites that have the SFC extension and end up being headered ROMs.
In this case, I use a program called WindHex to verify if a ROM is truly non-headered prior to patching. See image below:
Open the questionable ROM in WindHex (follow image shown above). If the ROM is truly non-headered, WindHex will indicate this. If not, it will remove the header for you. After WindHex does its magic, save the file, then ensure your fixed ROM ends in the SFC extension. Then apply the patch. Hope this helps.
WinHex (link):
http://www.romhacking.net/utilities/291/
Page 1 of 3 • 1, 2, 3
Similar topics
» Toy Story MSU-1 (finished)
» The NewZealand Story (MD+)
» Today I want to tell you a story by pictures! :D
» Toy Story msu1 fastrom
» the greatest zelda story ever told
» The NewZealand Story (MD+)
» Today I want to tell you a story by pictures! :D
» Toy Story msu1 fastrom
» the greatest zelda story ever told
Permissions in this forum:
You cannot reply to topics in this forum