ghidra_ysc icon indicating copy to clipboard operation
ghidra_ysc copied to clipboard

maxsize is bigger than memory range

Open AIdaveloper opened this issue 2 years ago • 4 comments

Hello. Can't import file. Ghidra 10.2.3.

error: Exception reading ysc:4:default/default(ysc.cspec): maxsize is bigger than memory range ghidra.program.model.lang.CompilerSpecNotFoundException: Exception reading ysc:4:default/default(ysc.cspec): maxsize is bigger than memory range.

I understand that the problem is most likely in the jvm. If you tell me how to solve it I will be very grateful

AIdaveloper avatar May 08 '23 13:05 AIdaveloper

It doesn't work yet with the latest script files. But if you are trying to load older script files, you'll need to make a change to the cspec here: https://github.com/Parik27/ghidra_ysc/blob/65d0ff530c8441e14b0908de60f4dfab3163e8a9/data/languages/ysc.cspec#L25 Change the maxsize to 4 instead of 500. It was fixed in a later commit, but that commit was moved to the experimental branch.

Parik27 avatar May 10 '23 15:05 Parik27

Thanks a lot. The memory bug has been fixed, but a new one has appeared. error: "Exception reading ysc:4:default/default(ysc.cspec): Unknown pentry register: RPTR" As you said, it doesn't work with new scripts. Can you tell me how to update your extension? Or can you recommend some other program for decompiling ysc scripts

AIdaveloper avatar May 10 '23 16:05 AIdaveloper

RPTR was added in the experimental branch. The only change you need to make is in the pentry line to change maxsize from 500 to 4.

Well to update the extension you'll need to edit the sinc file to add the new opcodes and adjust the opcodes for the others.

If you just need decompiled scripts, check: https://github.com/root-cause/v-decompiled-scripts

There's also links for the decompiler used in the readme file.

Parik27 avatar May 10 '23 18:05 Parik27

Well to update the extension you'll need to edit the sinc file to add the new opcodes and adjust the opcodes for the others. Thank you. I'll try to figure it out

If you just need decompiled scripts, check: https://github.com/root-cause/v-decompiled-scripts

I need both decompiled scripts and an assembler. I want to launch a robbery preparation screen or an office laptop from anywhere. To do this, I need to find certain lines to which I need to jump the script at startup. That's why decompiled scripts are not enough for me.

Plus, assembler gives more information and features than decompiled scripts

AIdaveloper avatar May 10 '23 18:05 AIdaveloper