Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Cruncher Plugins + Exomizer + Krill's Loader
2025-03-20 13:57
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!
2025-03-21 09:10
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.
2025-03-21 13:06
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.
2025-03-21 13:27
Krill

Registered: Apr 2002
Posts: 3010
Quoting tonysavon
The 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?
2025-03-21 14:02
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.
2025-03-21 15:52
Jetboy

Registered: Jul 2006
Posts: 346
Quoting tonysavon
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.


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.
2025-03-21 16:21
Krill

Registered: Apr 2002
Posts: 3010
Quoting Jetboy
Quoting tonysavon
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.


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? =)
2025-03-21 16:55
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.
2025-03-22 05:36
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.
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Sychamis
bugjam
dyme
radius75
E$G/HF ⭐ 7
lotus_skylight
Brittle/Dentifrice^(?)
Yogibear/Protovision
Exile/Anubis
Airwolf/F4CG
TheRyk/MYD!
VanessaE/Digital Aud..
slimeysmine
Soya/Fairlight
Guests online: 137
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Codeboys & Endians  (9.7)
4 Coma Light 13  (9.6)
5 Mojo  (9.6)
6 Edge of Disgrace  (9.6)
7 Uncensored  (9.6)
8 Comaland 100%  (9.6)
9 What Is The Matrix 2  (9.5)
10 Wonderland XIV  (9.5)
Top onefile Demos
1 Nine  (9.8)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Rainbow Connection  (9.5)
7 Dawnfall V1.1  (9.5)
8 Onscreen 5k  (9.5)
9 Ten  (9.5)
10 50 Coins  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Booze Design  (9.3)
3 Performers  (9.3)
4 Censor Design  (9.2)
5 Triad  (9.2)
Top Diskmag Editors
1 Magic  (10)
2 Jazzcat  (9.5)
3 Newscopy  (9.2)
4 hedning  (9.2)
5 Elwix  (9.1)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.046 sec.