UnderminersTeam / UndertaleModTool

The most complete tool for modding, decompiling and unpacking Undertale (and other GameMaker games!)
GNU General Public License v3.0
1.14k stars 220 forks source link

UndertaleModTool-dev 209655a957: Multiple code entries fail to decompile in KJ's GMS2 Gameboy Emulator #213

Closed Grossley closed 5 years ago

Grossley commented 5 years ago

Using these original project files GMDMG_Project_File.zip I compiled this game in GameMaker Studio 2 using VM. The data.win in question that I compiled myself is here: GMDMG.zip.

The code entries that failed to decompile are:

gml_Object_objGameboy_Step_0.gml:4:System.Exception: Reentered block with different amount of vars on stack
gml_Script_gb_calc_halt_period.gml:4:System.Exception: Reentered block with different amount of vars on stack
gml_Script_gb_irq_launch.gml:4:System.Exception: Reentered block with different amount of vars on stack
gml_Script_gb_iteration_execute.gml:4:System.Exception: Reentered block with different amount of vars on stack
gml_Script_gb_lcd_control.gml:4:System.Exception: Reentered block with different amount of vars on stack
gml_Script_gb_run.gml:4:System.Exception: Reentered block with different amount of vars on stack
gml_Script_gb_start.gml:4:System.Exception: Reentered block with different amount of vars on stack
gml_Script_gb_update.gml:4:System.Exception: Reentered block with different amount of vars on stack
gml_Script_gb_z80_opcode_d9.gml:4:System.Exception: Malformed switch statement: bad condition var (IRQEnableDelay)
gml_Script_gb_z80_opcode_fb.gml:4:System.Exception: Malformed switch statement: bad condition var (IRQEnableDelay)

The original code compiled without issue and the corresponding original code to these can be found in the project files provided.

Grossley commented 5 years ago

I am closing this until it is confirmed to be a decompiler issue.

Kneesnap commented 5 years ago

Why did you close this? There was no reason to close it.

Grossley commented 5 years ago

I closed it because I was not sure if the code itself was faulty or if it was UndertaleModTool's decompiler.

Kneesnap commented 5 years ago

If the code compiles, the decompiler should be able to decompile it. If it can't, there's an issue.

Grossley commented 5 years ago

This has been determined to be a fault of GameMaker's compiler and it is not supposed to decompile in a valid way so this will be closed.