| | Sabbi
Registered: Jan 2002 Posts: 10 |
Cruncher Plugins + Exomizer + Krill's Loader
Hi Guys,
Currently pulling my hair with Kick Assembler Cruncher Plugins & Exomizer....
My goal is easy(?) - crunching "a.prg" ($9d00-$cfff) with Exomizer & loadcmp it with Krill's Loader.
If I compress with Exomizer manually (exomizer.exe mem -f -o compressed.prg a.prg), everything works fine, loads and decompresses without any issues.
Now I just try to do the same inside Kick Assembler with the Cruncher Plugins:
---------------------------------------
.plugin "se.booze.kickass.CruncherPlugins"
.disk [filename="lazy.d64", name="A", id="1"]
{
[name="TEST", type="prg", segments="Main", modify="B2exe", _jmpAdress=start],
[name="CP", type="prg", segments="CompressTest"],
}
.var a = LoadBinary("a.prg", BF_C64FILE)
.segment CompressTest [start = $9d00] // ???
.modify MemExomizer(true,false)
{
.pc = $9d00 // ??
.fill a.getSize(), a.get(i)
// .import c64 "a.prg"
}
---------------------------------------
A compressed file gets generated and stored to the d64, but it's not loadable/decompressable.
I've tried all possible combinations (MemExomizer, BackwardMemExomizer, ForwardMemExomizer, true/false, direct in .disk ([name="CP", type="prg", prgFiles= "a.prg", modify="ForwardMemExomizer"]).
Can't seem to find the right settings for start or PC, the generated file has a loading address of $9d00, instead of somewhere around $c600 which has the file created with Exomizer directly.
What am I missing? If it's even possible, there has to be a simple fix for this :) Any help is much appreciated!
Thanks! |
|
| | Krill
Registered: Apr 2002 Posts: 3010 |
As no further processing is required on the crunched Exomizer output file, can't you just invoke Exomizer "directly" from your KickAss script and be done with it?
And the usual framing challenge: Why must it be Exomizer in the first place?
Its decruncher is among the slower ones, and with things like Dali/ZX0 you can expect a lot higher combined loading+decrunching speeds at a very similar compression ratio on average, plus full in-place decrunching. |
| | tonysavon
Registered: Apr 2014 Posts: 27 |
The plugin only supports exomizer and B2.
I don't know java and never made it to change the plugin to support other crunchers, but you can force it to use an external executable for exomizer. Since I want to use my own tscrunch with this awesome plugin, the trick I used was to compile a special version of TScrunch with same "interface" as exomizer. So the plugin thinks it's using exomizer when it's really using TSCrunch. |
| | Krill
Registered: Apr 2002 Posts: 3010 |
Quoting tonysavonThe plugin only supports exomizer and B2. Ah well, the loader supports B2 as well. =)
What's the purpose of this plugin?
And why would one need it to generate packed files on a disk image? |
| | tonysavon
Registered: Apr 2014 Posts: 27 |
For assets it doesn't offer much advantages over a well designed build script, but for code it's invaluable. I've used this plug in all my games. Take for instance L'abbaye does mortes: each room has its specific custom code. That code is crunched, and it's decrunched at runtime upon entering a room. The room code references main code and viceversa, so you can't (easily) build , say, room32.prg, crunch it and import the crunched file into your main as you would do with an asset.
With the plugin you can code all of the room specific code as if it was uncompressed. |
| | Jetboy
Registered: Jul 2006 Posts: 346 |
Quoting tonysavonThe room code references main code and viceversa, so you can't (easily) build , say, room32.prg, crunch it and import the crunched file into your main as you would do with an asset.
Why not? I’m trying to come up with some worthy reasons and i cannot find any.
Quote: With the plugin you can code all of the room specific code as if it was uncompressed.
How would you even write code as it was compressed? That would be something few grades above average demo coder. |
| | Krill
Registered: Apr 2002 Posts: 3010 |
Quoting JetboyQuoting tonysavonThe room code references main code and viceversa, so you can't (easily) build , say, room32.prg, crunch it and import the crunched file into your main as you would do with an asset.
Why not? I’m trying to come up with some worthy reasons and i cannot find any. Me neither. :)
I'd go for ca65 + ld65 with overlays, should be no problem to have all code portions reference each other.
But back to the OP:
Sabbi, what is it that you _actually_ want to achieve? =) |
| | Sabbi
Registered: Jan 2002 Posts: 10 |
Quote:Sabbi, what is it that you _actually_ want to achieve? =)
Thanks :) Just for my own personal (flawed) workflow it would be nice to use those cruncher plugins, simple as that.
So I could just place an prg somewhere, and it exomizes inside Kick Assembler (so to speak) and gets put on a .d64 without any additional scripting other than the one in the .asm-File itself.
If it's possible with those plugins nice, if not, I know there are other solutions. |
| | Martin Piper
Registered: Nov 2007 Posts: 736 |
It would be better to use a known working external tool to compress the data, then another known working tool to construct the D64 with the files you need. Trying to do it all in the assembler isn't a good workflow, as you've found out. |
|