Users browsing this thread: 1 Guest(s)
Music Player

#21
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
One thing that was just reported to me about the music player:

If a map has 00 as music ID, it's silence / current song, which mean song ID 00 does not overwrite the previous song that was playing. This mean if you are on a map with song ID 00 and use the music player, when exiting the menu the music player song will continue to play, given another song than 00 is not set in the entrance event of the map as an example.

It's not technically a music player bug, more something that needs to be modified in order to take into account this exception. I'll look into this this weekend but the only thing I can think about is stopping the music player song and play nothing if map song ID is 00, since I can't predict when a player will enter a map with song ID 00 and have the previous song ID played in RAM, or maybe I can... I'll need to check this.

One thing a hacker can do is either have no map with 00 as music ID or set a song in the entrance event of those maps.
  Find
Quote  

#22
Posts: 139
Threads: 6
Thanks Received: 1
Thanks Given: 4
Joined: May 2013
Reputation: 0
Status
None
Interesting. Doesn't the coding tell the song of the map to play when you exit the menu? Maybe changing it to begin playing the map music as soon as you exit the OST menu might fix it.


Experience is the benchmark to maturity.

Final Fantasy VI - Ted Woolsey Uncensored Edition:
http://www.romhacking.net/hacks/1386

Final Fantasy IV - Namingway Edition:
http://www.romhacking.net/hacks/2337
  Find
Quote  

#23
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(03-02-2017, 11:45 PM)Rodimus Primal Wrote: Interesting. Doesn't the coding tell the song of the map to play when you exit the menu? Maybe changing it to begin playing the map music as soon as you exit the OST menu might fix it.

I kinda like navigating the menu and have the OST song playing. I'll need to do some testing and see what is possible to do. I'll report back probably this weekend about it.
  Find
Quote  

#24
Posts: 139
Threads: 6
Thanks Received: 1
Thanks Given: 4
Joined: May 2013
Reputation: 0
Status
None
Copied from RHDN:


Quote:From Gi Nittack: Many of the maps have the 'play current song' flag set on them, to either continue the song from a previous map (think entering a house inside a town), or use this to play a song via the entrance event during a certain time. So if there is no event bit currently set or clear to play a song, it will play the last current song, which is the music player song.

If a map does have a song that is set to play instead of the play current song, or nothing which it is, than there is no issue with the map song kicking back in after exiting the menu/music player. The issue is for the maps that have nothing/play current song and currently have no event bit telling it a song to play, which there are many instances.

So it would either be time consuming having to change each map or maybe a line of instruction could tell the Music Player to kick back to in its instructions. Either way it would have to be tested. Either that or I release the next update before Madsuir figures it out.


Experience is the benchmark to maturity.

Final Fantasy VI - Ted Woolsey Uncensored Edition:
http://www.romhacking.net/hacks/1386

Final Fantasy IV - Namingway Edition:
http://www.romhacking.net/hacks/2337
  Find
Quote  

#25
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(03-03-2017, 06:23 PM)Rodimus Primal Wrote: So it would either be time consuming having to change each map or maybe a line of instruction could tell the Music Player to kick back to in its instructions. Either way it would have to be tested. Either that or I release the next update before Madsuir figures it out.

I think it's a bit time consuming but it's a fix. I'll try to set in memory somewhere the last valid map song and if when coming back from menu (and have started the music player) map song ID is 00, play that song. I haven't had time yet to look at the code but I'll try probably do Sunday, I got two mid-semester exams tomorrow so that was the priority.
  Find
Quote  

#26
Posts: 139
Threads: 6
Thanks Received: 1
Thanks Given: 4
Joined: May 2013
Reputation: 0
Status
None
No worries. I know it's not game breaking so I'll probably release my update to TWUE as it is. Good luck on the tests.


Experience is the benchmark to maturity.

Final Fantasy VI - Ted Woolsey Uncensored Edition:
http://www.romhacking.net/hacks/1386

Final Fantasy IV - Namingway Edition:
http://www.romhacking.net/hacks/2337
  Find
Quote  

#27
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
I've updated the music player to version 1.3. The code saving the map song and resuming it after menu exit was already there but not fully working. I've fixed and improved it. Now the game save the song ID and volume when entering the main menu and resume both on menu exit. However the map song start from beginning.

This is a fix for map with song ID 00 as well as a fix for some volume problems. However I cannot disable / overwrite / replace what is in the entrance event after the menu exit meaning if you got anything there regarding song loading or fading, I'm not sure what will be the result. Logically, the menu song resuming should not have the time to kick in and entrance event song loading should have priority but it's a thing to test.

The custom functions also use menu RAM $D2-$D3 for song ID and volume saving.

Added / Modified Code
Code:
;----------------------------------------
; Map Song Saving                       |
;----------------------------------------
SaveSong:           ; Save field song ID when entering main menu
LDA #$04            ; Main menu init ID
STA $26             ; Save as current menu
LDA $1301           ; Load current song
STA $D2             ; Save in temporary RAM (unused)
LDA $1302           ; Load current volume
STA $D3             ; Save in temporary RAM (unused)
RTS

;----------------------------------------
; Map Song Resume                       |
;----------------------------------------
RestoreSong:        ; Restore last field song when exiting main menu
LDA $D2             ; Map song ID
STA $1301           ; Set Song
LDA #$10            ; SPC Command
STA $1300
LDA $D3             ; Map song Volume
STA $1302           ; Set Volume
JSL $C50004         ; Play Song
LDA #$FF
STA $27             ; Exit Menu
RTS
  Find
Quote  
[-] The following 3 users say Thank You to madsiur for this post:
  • Gi Nattak (03-10-2017), Rodimus Primal (03-10-2017), Timbo (03-10-2017)

#28
Posts: 81
Threads: 12
Thanks Received: 0
Thanks Given: 0
Joined: Feb 2017
Reputation: 3
Status
Brave
Could this be expanded to include an option to temporarily change or disable the map or default battle song as well?
  Find
Quote  

#29
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(03-10-2017, 11:35 PM)Timbo Wrote: Could this be expanded to include an option to temporarily change or disable the map or default battle song as well?

Just replacing 24 (first entry) by FF here should do the trick. The other more tedious way is edit every regular formation. For randomness, see this thread.

Code:
C2/BF3B: 24 (Battle Theme)
C2/BF3C: 14 (Boss Theme)      
C2/BF3D: 33 (Atma Weapon)
C2/BF3E: 2E (Returner)        
C2/BF3F: 1A (Factory)          
C2/BF40: 3B (Final)          
C2/BF41: FF (current 1)
C2/BF42: FF (current 2)
  Find
Quote  
[-] The following 1 user says Thank You to madsiur for this post:
  • Timbo (03-12-2017)

#30
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
I uploaded version 1.3.1. Basically I'm using $1F80 instead of $1301 to save the song ID since $1301 is not always used to store the current song ID (like when continuing a song previously stopped, e.g. event command $F3 after sleeping at a INN). I also changed a few song names to match exactly all the original OST names (credit Rodimus Primal).
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite