Will there be a GAZL assembler for Permut8?

anonymous2 449 views10 posts
  • Users avataranonymous

    Looking as the disassembled output of the programs supplied with Permut8 (curiously including helpful comments and symbolic names, something I never would have expected as output of a disassembler) and the .zl files in the plugin itself I cannot help but wonder (wish) if there will be an assembler that allows users to write their own programs for use with Permut8.

  • Users avatarMagnus Lidström

    I see that you have found your way into Prawn OS.

    The disassembler is actually fake and the reason for that is that you can't disassemble GAZL. The lowest persistent code format of GAZL is a textual assembler format so there is nothing to disassemble. The only thing "disasm" does is decompressing and printing .gazl files. The .zl format is zlib compressed without any fancy headers.

    Replacing or adding programs to Prawn OS is possible, but not very easy. I cheated a lot. I mean, it is very far from a real OS. :) I might improve this in the future so that you can load external .gazl files. But there is something that works well already in v1.0. Have you checked out the "patch" utility yet and found the "Permut8 Firmwares" folder?

  • Users avataranonymous

    - Magnus Lidström wrote:
    The disassembler is actually fake and the reason for that is that you can't disassemble GAZL. The lowest persistent code format of GAZL is a textual assembler format so there is nothing to disassemble. The only thing "disasm" does is decompressing and printing .gazl files. The .zl format is zlib compressed without any fancy headers.

    Now that you say it, it's actually quite obvious given the fact the zlib is quite frequently used and it is even mentioned in the about screen. I shall have a good look at that.

    - Magnus Lidström wrote:
    Replacing or adding programs to Prawn OS is possible, but not very easy. I cheated a lot. I mean, it is very far from a real OS. :) I might improve this in the future so that you can load external .gazl files. But there is something that works well already in v1.0. Have you checked out the "patch" utility yet and found the "Permut8 Firmwares" folder?

    It is the patch utility and the sam, linsub, and ringmod "firmwares" in conjunction with the fake disassembly of those programs that made me think about how one would go about writing other patches. I for one would welcome the possibility to easily load external files, perhaps a short reference manual, but that would probably spoil the fun. The comments in the GAZL files are quite enlightening and the syntax of the GAZL "assembler" is pretty readable I should say.

    One more thing: Thank you for including Adventure. It's so fitting on so many levels. It's quite possibly my favorite easter egg in any software product so far. :-)

  • Users avatarMagnus Lidström

    - Random Chance wrote:
    Now that you say it, it's actually quite obvious given the fact the zlib is quite frequently used and it is even mentioned in the about screen. I shall have a good look at that.

    I'll post the utility I use and I intend to put up GAZL with documentation and source code on google code.

    It is the patch utility and the sam, linsub, and ringmod "firmwares" in conjunction with the fake disassembly of those programs that made me think about how one would go about writing other patches.

    The "firmware" patches are not compressed, so the fake disassembly is just a print out of the files you find in the "Permut8 Firmwares" folder. You'll find a simple high-level language (Impala) there too. It is not finished. More of a prototype thing. But GAZL is finished, well-tested and the format is frozen. So you can create patches and they will work as long as Permut8 works.

    The geekiest part is that the actual GAZL code is saved with the project and .p8bank files. Easy to share and will never break. If you use a hack in a song, you will be able to load it years later and it will use the same hack.

  • Users avataranonymous

    - Magnus Lidström wrote:
    I'll post the utility I use and I intend to put up GAZL with documentation and source code on google code.
    The "firmware" patches are not compressed, so the fake disassembly is just a print out of the files you find in the "Permut8 Firmwares" folder. You'll find a simple high-level language (Impala) there too. It is not finished. More of a prototype thing. But GAZL is finished, well-tested and the format is frozen. So you can create patches and they will work as long as Permut8 works.
    The geekiest part is that the actual GAZL code is saved with the project and .p8bank files. Easy to share and will never break. If you use a hack in a song, you will be able to load it years later and it will use the same hack.

    Wow, this is great. I did not notice the "Permut8 Firmwares" folder before (I assumed that everything was contained in the Audio Unit plugin itself). It's good to have a higher-level language available. As for "impala does not support file inclusion or linking of separate compilation units": Why don't you use the C preprocessor? I once used it in an assembler when I did not want to implement file inclusion and simple macros myself to save some time. But I guess from looking at the source code of the compiler that leaving this feature out is a conscious design decision on your part.

  • Users avatarMagnus Lidström

    - Random Chance wrote:
    Wow, this is great. I did not notice the "Permut8 Firmwares" folder before (I assumed that everything was contained in the Audio Unit plugin itself). It's good to have a higher-level language available. As for "impala does not support file inclusion or linking of separate compilation units": Why don't you use the C preprocessor? I once used it in an assembler when I did not want to implement file inclusion and simple macros myself to save some time. But I guess from looking at the source code of the compiler that leaving this feature out is a conscious design decision on your part.

    Yes, you could certainly use a C preprocessor, but I didn't want to include one in the installer. :) Also, some compile-time decisions are better to keep in GAZL. E.g. you can have debugging code in GAZL that is only enabled if the host defines DEBUG to non-zero. This happens in Permut8. When you load via the "patch" command in the console DEBUG is set to 1. When you load a firmware via a .p8bank DEBUG will be set to 0 and asserts etc, although still present in the GAZL code, will be skipped and not take any CPU. This is possible because the lowest level of GAZL is relatively "high-level" assembler and not a low-level byte-code format or machine code.

    Still a C preprocessor would be great for including files and expanding macros (instead of using slower function calls), since Impala and GAZL lacks such features.

    Note though that Impala is extremely primitive. It doesn't do any type checking at all, and therefore doesn't require prototypes or header-files. If you declare a function as "extern" it will just accept that a function with this name can be called with any number and type of parameters. You can then just append the different files you need to include after each other. The order which they appear doesn't matter.

  • Users avatarMagnus Lidström

    @Random Chance: I would like to move this topic to the non-support area. This means you will need to register a forum account to comment, but it is easy and you don't need to own our products to do so.

  • Users avatarJohn Braner

    The geekiest part is that the actual GAZL code is saved with the project and .p8bank files. Easy to share and will never break. If you use a hack in a song, you will be able to load it years later and it will use the same hack.

    I was wondering how this was handled, and I thought maybe I'd have to save different versions of the permut8 dll. So if we load a "hack", or a "firmware" - that just gets saved by the host (SONAR for me) as a "setting" of permut8?

    Then if I load permut8 in a new SONAR project - it will load as "default" without the "hack" or "firmware" (sorry, I haven't played much with it yet) that was loaded before?

  • Users avatarMagnus Lidström

    - jbraner wrote:
    I was wondering how this was handled, and I thought maybe I'd have to save different versions of the permut8 dll. So if we load a "hack", or a "firmware" - that just gets saved by the host (SONAR for me) as a "setting" of permut8?
    Then if I load permut8 in a new SONAR project - it will load as "default" without the "hack" or "firmware" (sorry, I haven't played much with it yet) that was loaded before?

    No you don't need different dll's. The firmware patches are saved with your project yes, and they are also saved in .p8bank files. A new Permut8 always starts up without any custom firmware.

  • Users avatarJohn Braner

    Thanks Magnus - I think I've got it worked out ;-)

You need to be to post a reply

Sign In / Sign Up


First time here? Just enter your current email and sign up.
×