kion-dgl / Miku-Legends-2

Source Code for Writing files to the Megaman Legends 2 format to replace Megaman with Miku
GNU General Public License v3.0
2 stars 0 forks source link

Application crashes on cutscene after Forbidden Islands Boss #30

Closed kion-dgl closed 1 month ago

kion-dgl commented 1 month ago

It looks like the game crashes on the cutscene after the Forbidden Islands hip-thing boss. Right when Megaman is about to come in, so it's likely during a scene change.

image

My best guess for why this could be happening is because the game is referencing MegaMan's data in memory directly, such as Megaman holding something in his hand, or maybe some kind of animation during the cutscene.

The easiest way to test this would be try and pack the data the original way the game intended. The only model that needs to do this would be to have the hair + normal shoes to test out this hypothesis.

kion-dgl commented 1 month ago

Went back and played the cutscene as Megaman, the whole cut scene works. It's on the last line of the cutscene that crashed which means it might be something that runs right after the cutscene ends that causes the crash.

In terms of testing, we should be able to save the state before the end of the boss and then skip the cutscene to check and see if it works.

The approach for this issue is to try re-packing the miku file into megaman's original foot print. The way we will approach that is to see which encoded sections fit, and which ones don't and then plan how to pack the model information in this issue.

kion-dgl commented 1 month ago

Before jumping into to solutioning, I did a few more tests to root cause by disabling all of the mods and then adding them back in one at a time to see what caused the game to crash.

MegaMan Texture Applied to Miku after Forbidden Islands Cutscene

It looks like it turns out that PL00T2.BIN is the reason for the game crashing. PL00T2.BIN contains a copy of the MegaMan texture to be applied after cutscenes, and it looks like i'm not re-producing the file well enough for it to work correctly.

After looking at PL00T2.BIN it looks like there are two decompressed textures, which means that we need to write a test case to see which textures are there, and then we need to update them in the ROM.