[Super Game Boy] Pokemon Gold & Silver MSU1

Go down

[Super Game Boy] Pokemon Gold & Silver MSU1 Empty [Super Game Boy] Pokemon Gold & Silver MSU1

Post by Zumi on Sun 29 Nov 2020 - 7:37

While working on Yellow from the other thread, thought I'd begin working on G/S Wink

Compared to the R/B/Y patches, this will be a lot cleaner and (I hope) can be easily ported to most language versions of G/S/C by simply changing an offsets file (Korean version will be skipped due to it being GBC-only):

  • English - Gold / Silver
  • French - Or / Argent
  • German - Goldene / Silberne
  • Italian - Oro / Argento
  • Japanese (v1.0, 1.1) - Kin / Gin
  • Spanish - Oro / Plata

Basic MSU1 support has been added at this point: https://youtu.be/ojN_bq8yMoI (the sgb garbage bootup has been fixed since)
The PCM pack follows the existing music ID list just to make things easier Smile
There's a spreadsheet linked below if you wanna comment on it

2020-11-29 notes:
If you want to give it a try, the 2020-11-29 test patch only works on the English version, map music is not supported yet (GB music will still play when entering a building)

MEGA folder (2020-12-06): https://mega.nz/folder/ZPZBjSiY#hjWGjGvfIT_mpY9LLCywhA
MEGA folder (all releases): https://mega.nz/folder/BfhRwCpJ#1YQBVZGnB49au8hBKFCQPw

MEGA folder (PCM Pack): https://mega.nz/folder/MKxUVRCJ#zFP2-qsNpkmSzyxUKexn9w

Source tree: https://github.com/ZoomTen/pokegold-msu1

PCM Sources Spreadsheet: https://docs.google.com/spreadsheets/d/13YP2H3uoZxcQNVf_x13Vb_AB17-szYJiIj_8I5I0mSI/edit?usp=sharing

Known bugs:

  • After Oak speech, New Bark Town music fades out immediately after starting
  • (Increase the length of some cutscenes to fit the music? Or no?)


  • PCM pack is incomplete
  • PCM pack has bad loops
  • (May be more than one supported PCM pack?)


Last edited by Zumi on Sun 6 Dec 2020 - 11:48; edited 5 times in total

Zumi
Snap Dragon
Snap Dragon

Since : 2020-10-22

Back to top Go down

[Super Game Boy] Pokemon Gold & Silver MSU1 Empty Re: [Super Game Boy] Pokemon Gold & Silver MSU1

Post by Conn on Sun 29 Nov 2020 - 9:44

That is awesome Very Happy
Out of interest, I see that this patch is 500 bytes while the R/B patch is 47 kb... so I wonder what else the R/B patch does to the rom?
In deeper interest I ask because, if you'd manage to reduce the Blue patch to the basics needed for msu1 (500 bytes like the gold/silver has), it should be quite easy to simply port it to the green patch (https://www.romhacking.net/hacks/876/) which resembles the green out of the blue version.
Conn
Conn

[Super Game Boy] Pokemon Gold & Silver MSU1 Image212

Since : 2013-06-30

Back to top Go down

[Super Game Boy] Pokemon Gold & Silver MSU1 Empty Re: [Super Game Boy] Pokemon Gold & Silver MSU1

Post by Zumi on Mon 30 Nov 2020 - 4:22

Conn wrote:That is awesome Very Happy
Out of interest, I see that this patch is 500 bytes while the R/B patch is 47 kb... so I wonder what else the R/B patch does to the rom?

Well... one, it hacks in a music ID system to make it easy to call both GB music and SGB music, two, it changes everything to use that system, and three, since it's based off a disassembly there's a lot of relocating and code rewriting - maybe I should have went with xdelta instead? Wink

As I explained in the other thread, R/B has a sort of a "manual" music system, where music is played by supplying a bank and a non-sequential ID, which is calculated by (I believe) dividing the offset of the music header by 3. For example, here's how the rival theme is played:

Code:
ld c, BANK(Music_MeetRival)
 ld a, MUSIC_MEET_RIVAL
 call PlayMusic

Effectively, you have two parameters to play the music, one is the bank (stored in c, which I believe can either be $02, $08, $1F) and the other is the non-sequential ID (stored in a).
It doesn't help that there are also hardcoded routines which directly manipulate the audio RAM:

Code:
farcall Music_RivalAlternateStart
...
Music_RivalAlternateStart::
 ld c, BANK(Music_MeetRival)
 ld a, MUSIC_MEET_RIVAL
 call PlayMusic
 ld hl, wChannelCommandPointers
 ld de, Music_MeetRival_branch_b1a2
 call Audio1_OverwriteChannelPointer
 ld de, Music_MeetRival_branch_b21d
 call Audio1_OverwriteChannelPointer
 ld de, Music_MeetRival_branch_b2b5
Audio1_OverwriteChannelPointer:
 ld a, e
 ld [hli], a
 ld a, d
 ld [hli], a
 ret

What I've done in the R/B patch is build a routine which matches an ID with the correct parameters, and then calls PlayMusic, as well as handling the special cases as well - then make everything use that routine.

Now G/S on the other hand, is way cleaner and more predictable - you simply need to do:

Code:
ld de, YOUR_MUSIC_ID
 call PlayMusic

It has a central music pointer table, so the music can be in any bank. Very convenient in this case, as I can replace whatever is in PlayMusic and make it point to my custom routine, which is exactly what I did - and it'll make it work with like all of the manually called music.

Of course, I still have to deal with music that fades in, special cases etc. (that's handled inside the music update routine itself) But the majority of the music that's in G/S is handled with these standard routines I believe.

I'm not sure about rewriting the R/B patch to use this kinda system, how do you think I should deal with it, considering what I've just described? ^^;


Last edited by Zumi on Mon 30 Nov 2020 - 5:21; edited 1 time in total

Zumi
Snap Dragon
Snap Dragon

Since : 2020-10-22

Back to top Go down

[Super Game Boy] Pokemon Gold & Silver MSU1 Empty Pokemon G/S MSU1 (2020-11-30)

Post by Zumi on Mon 30 Nov 2020 - 5:16

Pardon the double posting, wanted to separate the topic Smile

Support for map music has been added, music fade out, looping music, and some bug fixes ( curse you, SGB packet transmission interval Sad )

Still English only for now, I want to complete it first before I port it to the other language versions, including JP 1.0 and 1.1

Known bugs: After Oak's speech, the New Bark Town music fades out immediately

MEGA folder (2020-11-30): https://mega.nz/folder/EXZl3ACK#98esAr1eoIH2Tc1J0DFK-w
MEGA folder (all releases): https://mega.nz/folder/BfhRwCpJ#1YQBVZGnB49au8hBKFCQPw

MEGA folder (PCM Pack): https://mega.nz/folder/MKxUVRCJ#zFP2-qsNpkmSzyxUKexn9w

Source tree: https://github.com/ZoomTen/pokegold-msu1

Zumi
Snap Dragon
Snap Dragon

Since : 2020-10-22

Back to top Go down

[Super Game Boy] Pokemon Gold & Silver MSU1 Empty Re: [Super Game Boy] Pokemon Gold & Silver MSU1

Post by Conn on Mon 30 Nov 2020 - 15:57

Sorry to spam your topic Embarassed
Well... one, it hacks in a music ID system to make it easy to call both GB music and SGB music, two, it changes everything to use that system, and three, since it's based off a disassembly there's a lot of relocating and code rewriting - maybe I should have went with xdelta instead?
Yes, I think this code-relocating makes the patch so big. I was a bit obsessed with the green version so I looked into it, checking if it could be done... but I think with the current code it is impossible for somebody like me who never dealt with pokemon at all. If there is a chance to compile a patch version with the music necessary stuff only, without code relocating - maybe then it is possible to port...
But one thing after the other, I am sure you are complete busy with Yellow/Silver/Gold Very Happy So, lets drop it for now and see how Y/S/G go Razz
Conn
Conn

[Super Game Boy] Pokemon Gold & Silver MSU1 Image212

Since : 2013-06-30

Back to top Go down

[Super Game Boy] Pokemon Gold & Silver MSU1 Empty Re: [Super Game Boy] Pokemon Gold & Silver MSU1

Post by Brutapode89 on Tue 1 Dec 2020 - 13:09

Oh yeah! Very Happy And I too hope for French versions (Or & Argent).
Brutapode89
Brutapode89
Blacksmith
Blacksmith

Since : 2019-10-06

Back to top Go down

[Super Game Boy] Pokemon Gold & Silver MSU1 Empty Re: [Super Game Boy] Pokemon Gold & Silver MSU1

Post by JUD6MENT on Fri 4 Dec 2020 - 10:26

I am going to be working on the silver and gold PCM sets starting today. I just finished my semester in school and got.free time again.

92 tracks! Wow, that is insane!
JUD6MENT
JUD6MENT

[Super Game Boy] Pokemon Gold & Silver MSU1 Image110

Since : 2018-04-19

Back to top Go down

[Super Game Boy] Pokemon Gold & Silver MSU1 Empty Pokemon G/S MSU1 (2020-12-06, English)

Post by Zumi on Sun 6 Dec 2020 - 11:48


  • Fixes the New Bark Town music fading out immediately on MSU1
  • Fixes some bug with the Mom music on GBC
  • Fix higher probability of game crash upon loading new map

MEGA folder (2020-12-06): https://mega.nz/folder/ZPZBjSiY#hjWGjGvfIT_mpY9LLCywhA
MEGA folder (all releases): https://mega.nz/folder/BfhRwCpJ#1YQBVZGnB49au8hBKFCQPw

Source tree: https://github.com/ZoomTen/pokegold-msu1

Zumi
Snap Dragon
Snap Dragon

Since : 2020-10-22

Back to top Go down

[Super Game Boy] Pokemon Gold & Silver MSU1 Empty Re: [Super Game Boy] Pokemon Gold & Silver MSU1

Post by Brutapode89 on Sun 6 Dec 2020 - 19:16

Hi guys. When the PCM track list will be completed, can I make a PCM pack from Heart Gold & Soul Silver?
Brutapode89
Brutapode89
Blacksmith
Blacksmith

Since : 2019-10-06

Back to top Go down

[Super Game Boy] Pokemon Gold & Silver MSU1 Empty Re: [Super Game Boy] Pokemon Gold & Silver MSU1

Post by Zumi on Sun 6 Dec 2020 - 21:31

Brutapode89 wrote:Hi guys. When the PCM track list will be completed, can I make a PCM pack from Heart Gold & Soul Silver?

Please do Smile

I think that's about all of the tracks anyway, so you could just get started right away

Zumi
Snap Dragon
Snap Dragon

Since : 2020-10-22

Back to top Go down

[Super Game Boy] Pokemon Gold & Silver MSU1 Empty Re: [Super Game Boy] Pokemon Gold & Silver MSU1

Post by Brutapode89 on Tue 8 Dec 2020 - 16:33

Guys. The PCM set from Heart Gold & Soul Silver is ready:
https://mega.nz/folder/pfIgzL5B#esDcpxFTFLwbMygadFdeTQ
Don't forget to let me know if some musics are missing Wink

Before to test, use this tool:
https://www.zeldix.net/t2068-msu-1-re-normalization-lower-pcm-volume
Brutapode89
Brutapode89
Blacksmith
Blacksmith

Since : 2019-10-06

Back to top Go down

[Super Game Boy] Pokemon Gold & Silver MSU1 Empty Re: [Super Game Boy] Pokemon Gold & Silver MSU1

Post by FreezyPops on Fri 11 Dec 2020 - 16:18

So uh...do I just use the .msu file from the Red version, or is there one specific for gold/silver? Asking cause I didn't see that in the megas. Cause I used the Red.msu the game played, tho when talking to the mom there is a VERY loud beep noise until you get through all her text

FreezyPops
Newcomer

Since : 2020-12-03

Back to top Go down

[Super Game Boy] Pokemon Gold & Silver MSU1 Empty Re: [Super Game Boy] Pokemon Gold & Silver MSU1

Post by Relikk on Fri 11 Dec 2020 - 16:55

FreezyPops wrote:So uh...do I just use the .msu file from the Red version, or is there one specific for gold/silver? Asking cause I didn't see that in the megas. Cause I used the Red.msu the game played, tho when talking to the mom there is a VERY loud beep noise until you get through all her text

You can use the same MSU file as long as there is no data contained within it, and in this case there shouldn't be. Just make sure the MSU file is renamed to the same name as the ROM/PCM's you're using it with.
Relikk
Relikk

[Super Game Boy] Pokemon Gold & Silver MSU1 Image211

Since : 2017-02-17

Back to top Go down

[Super Game Boy] Pokemon Gold & Silver MSU1 Empty Re: [Super Game Boy] Pokemon Gold & Silver MSU1

Post by FreezyPops on Fri 11 Dec 2020 - 20:25

Cool thanks. For the Heartgold PCM files, do I need to rename any of them or just put them in the folder as is?


FreezyPops
Newcomer

Since : 2020-12-03

Back to top Go down

[Super Game Boy] Pokemon Gold & Silver MSU1 Empty Re: [Super Game Boy] Pokemon Gold & Silver MSU1

Post by Conn on Sat 12 Dec 2020 - 3:55

The pcm set by brutapode isn't mapped to a name convention yet, e.g. pokegold-msu1-*.pcm. So at this time you cannot really play it, because you do not know which track maps to which theme number
Conn
Conn

[Super Game Boy] Pokemon Gold & Silver MSU1 Image212

Since : 2013-06-30

Back to top Go down

[Super Game Boy] Pokemon Gold & Silver MSU1 Empty Re: [Super Game Boy] Pokemon Gold & Silver MSU1

Post by Brutapode89 on Sat 12 Dec 2020 - 11:50

Conn wrote:The pcm set by brutapode isn't mapped to a name convention yet, e.g. pokegold-msu1-*.pcm. So at this time you cannot really play it, because you do not know which track maps to which theme number

Oh. I'll update the set when I found all numbers. I'll play Pokémon Gold even in English and I'll find numbers shortly. I'll use the bsnes emulator. Wink
Brutapode89
Brutapode89
Blacksmith
Blacksmith

Since : 2019-10-06

Back to top Go down

[Super Game Boy] Pokemon Gold & Silver MSU1 Empty Re: [Super Game Boy] Pokemon Gold & Silver MSU1

Post by Conn on Sat 12 Dec 2020 - 16:45

Breakpoint $2004, write, hex number of theme is lowerr byte in A:

I'd recommend to make a map similar to this:
https://docs.google.com/spreadsheets/d/1I7_-feDT4oorK44U44xtYdYF2h0BdAvL_Jn6c1AaqPw
It helps also other users with their set and tell zumi which need to loop/not loop

Much luck Wink
Conn
Conn

[Super Game Boy] Pokemon Gold & Silver MSU1 Image212

Since : 2013-06-30

Back to top Go down

[Super Game Boy] Pokemon Gold & Silver MSU1 Empty Re: [Super Game Boy] Pokemon Gold & Silver MSU1

Post by Brutapode89 on Sat 12 Dec 2020 - 17:05

Ruins of Alph and Encounter! Team Rocket must be looped.

Ah! By the way, there's a problem, the PCM file number 74 is using the theme of the Johto's Wild Pokémon Battle (Night) and the theme of the Kanto's Wild Pokémon Battle.
Brutapode89
Brutapode89
Blacksmith
Blacksmith

Since : 2019-10-06

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum