Famitone2 - How to Resume a Song?

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

Post Reply
User avatar
Goose2k
Posts: 89
Joined: Wed Dec 11, 2019 9:38 pm
Contact:

Famitone2 - How to Resume a Song?

Post by Goose2k » Sun Jul 05, 2020 10:56 pm

In Famitone2, is it possible to resume a song at its previous position? I know that I can pause and upause, but I want to: pause, play a different song, and then resume the original song.

It doesn't need to be perfect. I just have some simple cases, such as: going into pause I play pause menu music, and when I unpause I would like the song to resume, rather than starting from the beginning again.

I am using Famitone2 via NESLib, if that matters.

User avatar
dougeff
Posts: 2707
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: Famitone2 - How to Resume a Song?

Post by dougeff » Mon Jul 06, 2020 6:19 am

You could copy all the famitone song variables. 97 of them. Before changing song. Then copy them all back to continue the other song.

If you set the famitone base to be at $100. Copy $100-$160. skip $161. do copy $162.

My notes.

https://github.com/nesdoug/famitone2d/b ... mitone.txt

Edit... also copy $169-16c if the songs have different speeds.
nesdoug.com -- blog/tutorial on programming for the NES

User avatar
Goose2k
Posts: 89
Joined: Wed Dec 11, 2019 9:38 pm
Contact:

Re: Famitone2 - How to Resume a Song?

Post by Goose2k » Mon Jul 06, 2020 9:48 am

Thanks Doug!

Post Reply