Readit News logoReadit News
portasynthinca3 commented on Remote code execution via MIDI messages   psi3.ru/blog/swl01u/... · Posted by u/portasynthinca3
liotier · 8 months ago
Of course it is SysEx. SysEx is to standard MIDI what inline assembler is to Python. A world of undocumented proprietary stuff lurks within just about every MIDI device !
portasynthinca3 · 8 months ago
> SysEx is to standard MIDI what inline assembler is to Python

I really like this comparison!

portasynthinca3 commented on Remote code execution via MIDI messages   psi3.ru/blog/swl01u/... · Posted by u/portasynthinca3
trelbutate · 8 months ago
So, the repo's README claims the repo contains the image dumps, but they're not actually there. Is this correct?
portasynthinca3 · 8 months ago
My bad! I added *.bin to .gitignore last minute to exclude assembled code snippets, but looks like the dumps were excluded as well. I'm going to upload them in the next few hours
portasynthinca3 commented on Remote code execution via MIDI messages   psi3.ru/blog/swl01u/... · Posted by u/portasynthinca3
purplesyringa · 8 months ago
This is such a ludicrous premise, I'm amazed you pulled it off.

You mention "another packing optimization". I'm wondering, how are you transferring frames? The dot matrix is eight 7x5 characters, i.e. 280 bits in total, which amounts to 40 7-bit groups per frame. You seem to be using twice that space in transmission, is it wasted on some control data or is the transmission just slightly suboptimal?

portasynthinca3 · 8 months ago
Thanks!

The dot matrix is actually eight 5x8 characters, or 320 bits in total. I'm packing those 320 bits into the the 4 bits per byte that are available to us in this shell protocol. Plus, another 9 bytes for the packet header and footer. Looks like I wrote 92 in the article, I must have miscalculated that.

I'm not using the full 7 bits because figuring out a way to do so turned out to be way too hard for me, so I opted for a solution that is negligibly worse than the optimal one, in comparison to the original one.

If you're wondering about the exact algorithm, consider checking these files out, but please keep in mind that I haven't cleaned the code up yet: https://github.com/portasynthinca3/swl01u/blob/master/fun/bi..., https://github.com/portasynthinca3/swl01u/blob/master/fun/ba...

Deleted Comment

u/portasynthinca3

KarmaCake day163June 4, 2022View Original