how to decompile bytecode into human readable format

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
User avatar
dhylands
Posts: 3513
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: how to decompile bytecode into human readable format

Post by dhylands » Mon Dec 21, 2020 2:51 pm

Are you using pybricks? If so, the source code appears to be here: https://github.com/pybricks/pybricks-micropython

jcase
Posts: 3
Joined: Sun Dec 20, 2020 5:50 pm

Re: how to decompile bytecode into human readable format

Post by jcase » Mon Dec 21, 2020 6:28 pm

MasterOfGizmo wrote:
Sun Nov 29, 2020 8:44 pm
Any news on this?

The Lego Spike hub runs micropython and the source code doesn't seem to be public. Its default UI comes in form of a mpy and can easily be downloaded from the device. It would be nice to be able to decompile and modify this.
Can you provide these compiled mpy to me? jon <at> cunninglogic <dot> com, or explain to me what a lego spike hub is and where I can buy one?

I've got a semi working disassembler done. Hoping to make it stable, then work on a decompiler.

mohankrr
Posts: 1
Joined: Mon Dec 28, 2020 5:59 pm

Re: how to decompile bytecode into human readable format

Post by mohankrr » Mon Dec 28, 2020 11:26 pm

jcase wrote:
Mon Dec 21, 2020 6:28 pm
Can you provide these compiled mpy to me? jon <at> cunninglogic <dot> com, or explain to me what a lego spike hub is and where I can buy one?

I've got a semi working disassembler done. Hoping to make it stable, then work on a decompiler.
Check this repo.. this is regularly updated and there is some work going on here related to decompiler.

https://github.com/gpdaniels/spike-prime

The following folder contains the file sytem files (mpy) from various versions of the Lego Spike and Lego Mindstorms inventor firmwares..
https://github.com/gpdaniels/spike-prim ... filesystem

The current version of decompiler is here..
https://github.com/gpdaniels/spike-prim ... decompiler

Some conversations on it is here:
https://github.com/gpdaniels/spike-prime/pull/10

jcase
Posts: 3
Joined: Sun Dec 20, 2020 5:50 pm

Re: how to decompile bytecode into human readable format

Post by jcase » Fri Jan 08, 2021 7:21 pm

mohankrr wrote:
Mon Dec 28, 2020 11:26 pm
jcase wrote:
Mon Dec 21, 2020 6:28 pm
Can you provide these compiled mpy to me? jon <at> cunninglogic <dot> com, or explain to me what a lego spike hub is and where I can buy one?

I've got a semi working disassembler done. Hoping to make it stable, then work on a decompiler.
Check this repo.. this is regularly updated and there is some work going on here related to decompiler.

https://github.com/gpdaniels/spike-prime

The following folder contains the file sytem files (mpy) from various versions of the Lego Spike and Lego Mindstorms inventor firmwares..
https://github.com/gpdaniels/spike-prim ... filesystem

The current version of decompiler is here..
https://github.com/gpdaniels/spike-prim ... decompiler

Some conversations on it is here:
https://github.com/gpdaniels/spike-prime/pull/10
Thanks, my decompiler is somewhat reliable now, but im off on another project for the time being, work has me slammed

Post Reply