Ho, I didn't ask for that
It's just the lack of feedback I was having on the thread let me thing that only I cared for this stuff
Anyway, here is a slightly updated source that should fix the badly decoded opcodes because of the garbage byte (that may be some actual data inlined in the script, I don't know yet).
I haven't tested the new code very much, but it seems to be giving some results. I also worked a bit on the assembly to get more information about the scripting engine.
Hmm, I tried your decompiler today, but I got something like this:
---------------------------
| Entity 1 script 5
---------------------------
0x00CB: op43(0x001100, -880, var[0xFFFFF0C0], 240)
0x00D4: STOP()
What is var[0xFFFFF0C0] supposed to be?
I tried Luccia's room.
It seems this script is used for displaying Lucca's letter:
---------------------------
| Entity 25 script 4
---------------------------
0x0B50: PLAY_SONG(21) // The Girl Who Stole the Stars
0x0B53: op8A() // wait something
0x0B54: op68(0, 0, 0, 60, 60) // screen fade or blink, not sure
0x0B5F: WAIT(60)
0x0B62: op62(165, 100, 0, 0, 820)
0x0B6D: DIALOG(0x0037, 0x00) // My dear Kid, How are you doing?
0x0B71: WAIT_DIALOG()
0x0B72: DIALOG(0x0038, 0x00)
0x0B76: WAIT_DIALOG()
0x0B77: DIALOG(0x0039, 0x00)
0x0B7B: WAIT_DIALOG()
0x0B7C: DIALOG(0x003A, 0x00)
0x0B80: WAIT_DIALOG()
0x0B81: DIALOG(0x003B, 0x00)
0x0B85: WAIT_DIALOG()
0x0B86: DIALOG(0x003C, 0x00)
0x0B8A: WAIT_DIALOG()
0x0B8B: DIALOG(0x003D, 0x00)
0x0B8F: WAIT_DIALOG()
0x0B90: DIALOG(0x003E, 0x00)
0x0B94: WAIT_DIALOG()
0x0B95: DIALOG(0x003F, 0x00)
0x0B99: WAIT_DIALOG()
0x0B9A: DIALOG(0x0040, 0x00)
0x0B9E: WAIT_DIALOG()
0x0B9F: DIALOG(0x0041, 0x00)
0x0BA3: WAIT_DIALOG()
0x0BA4: DIALOG(0x0042, 0x00)
0x0BA8: WAIT_DIALOG()
0x0BA9: WAIT(60)
0x0BAC: DIALOG(0x0043, 0x00)
0x0BB0: WAIT_DIALOG()
0x0BB1: DIALOG(0x0044, 0x00)
0x0BB5: WAIT_DIALOG()
0x0BB6: DIALOG(0x0045, 0x00)
0x0BBA: WAIT_DIALOG()
0x0BBB: DIALOG(0x0046, 0x00)
0x0BBF: WAIT_DIALOG()
0x0BC0: DIALOG(0x0047, 0x00)
0x0BC4: WAIT_DIALOG()
0x0BC5: DIALOG(0x0048, 0x00)
0x0BC9: WAIT_DIALOG()
0x0BCA: DIALOG(0x0049, 0x00)
0x0BCE: WAIT_DIALOG()
0x0BCF: DIALOG(0x004A, 0x00)
0x0BD3: WAIT_DIALOG()
0x0BD4: DIALOG(0x004B, 0x00)
0x0BD8: WAIT_DIALOG()
0x0BD9: WAIT(60)
0x0BDC: DIALOG(0x004C, 0x00)
0x0BE0: WAIT_DIALOG()
0x0BE1: WAIT(30)
0x0BE4: opFE1D(180, 0)
0x0BEA: op68(0, 0, 0, 0, 60)
0x0BF5: STOP()
This script has something to do with the ghost shadow.
Because if I replace it with a dialgue, the shadow just won't show up.
---------------------------
| Entity 24 script 4
---------------------------
0x0B19: op34(0x00)
0x0B1B: opFE47(3000, 2000, 0)
0x0B24: Unk opcode 0x94
Hmm, it seems that's the letter Luccia gives to Kid.