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


Forums > CSDb Entries > Release id #191551 : Kick Assembler V5.15
2021-01-05 12:57
Jammer

Registered: Nov 2002
Posts: 1018
Release id #191551 : Kick Assembler V5.15

Any chances for passing string variable to program counter/memory block label? Would come really handy when I compile separate memory blocks with parametrized names, e.g. in some loop, reading names from the list for batch conversion. General goal is to use one script asm file to produce multiple output binaries that I plan to exomize each individually. If that's technically impossible, is there any reasonable workaround? I'm, sadly, not on friendly terms with makefiles ;)
 
... 3 posts hidden. Click here to view all posts....
 
2021-01-05 17:11
Krill

Registered: Apr 2002
Posts: 1733
Quoting Jammer
My project is not that much depack-time critical ;) It's depacking game data actually which is cut into small chunks beforehand ;) Ranting on very packer doesn't add much to this particular thread, does it? :D
Yes, sorry for off-topicness. I was ranting about lack of "-D" (if there really is one) to pass in macro (or equivalent semantics) from command line elsewhere. =D

Anyhow, using a faster packer can significantly improve (minimise) type-compile-test cycle turn-over times during development.
Then you can still switch to tightest compression (if needed) for release. :)
2021-01-05 18:22
Jammer

Registered: Nov 2002
Posts: 1018
Quoting Krill
-D (if there really is one) to pass in macro (or equivalent semantics) from command line elsewhere. =D

Kick Assembler includes variable parametrization from commandline but that most probably won't solve my particular problem :/ Which is dynamic output filename.
2021-01-05 18:44
Krill

Registered: Apr 2002
Posts: 1733
Quoting Jammer
Quoting Krill
-D (if there really is one) to pass in macro (or equivalent semantics) from command line elsewhere. =D

Kick Assembler includes variable parametrization from commandline but that most probably won't solve my particular problem :/ Which is dynamic output filename.
You mean there is no "-o" CLI parameter... but the output filename is fixed in the source file or something?
2021-01-05 18:58
Jammer

Registered: Nov 2002
Posts: 1018
Kick Assembler has one commandline directive which is particulary interesting for me:

-mbfiles

Instead of compiling one big binary, it compiles every memory block with its program counter set up as separate binary. I could actually make a loop in script that takes different input data files for conversion/compilation but it's practically useless when I cannot change output filename accordingly. Dunno, maybe I missed some functionality that Slammer has already provided :)
2021-01-05 19:03
Groepaz

Registered: Dec 2001
Posts: 9710
Quote:
You mean there is no "-o" CLI parameter... but the output filename is fixed in the source file or something?

to me it sounds like he wants kickassembler to do what the makefile does normally.
2021-01-05 19:12
Jammer

Registered: Nov 2002
Posts: 1018
Quoting Groepaz
to me it sounds like he wants kickassembler to do what the makefile does normally.

You bet I do ;) I'm actually thinking of one, probably easy workaround. Wish me luck :D

edit:

Right, I figured how to parametrize input file for one asm but it's still not as automatized as I wished ;)

java -jar kickass.jar ItsUpToYou_Data_CharacterBitmaps.asm :filename="CharacterBackground01.tga" -binfile -fillbyte 0 -o ItsUpToYou_Data_CharacterBackground01.bin -log ItsUpToYou_Data_CharacterBackground01.txt -showmem
exomizer.exe mem -P0 ItsUpToYou_Data_CharacterBackground01.bin@0x7700 -o ItsUpToYou_Data_CharacterBackground01.exo

java -jar kickass.jar ItsUpToYou_Data_CharacterBitmaps.asm :filename="CharacterBodyBase01.tga" -binfile -fillbyte 0 -o ItsUpToYou_Data_CharacterBodyBase01.bin -log ItsUpToYou_Data_CharacterBodyBase01.txt -showmem
exomizer.exe mem -P0 ItsUpToYou_Data_CharacterBodyBase01.bin@0x7700 -o ItsUpToYou_Data_CharacterBodyBase01.exo

java -jar kickass.jar ItsUpToYou_Data_CharacterBitmaps.asm :filename="CharacterBody01.tga" -binfile -fillbyte 0 -o ItsUpToYou_Data_CharacterBody01.bin -log ItsUpToYou_Data_CharacterBody01.txt -showmem
exomizer.exe mem -P0 ItsUpToYou_Data_CharacterBody01.bin@0x7700 -o ItsUpToYou_Data_CharacterBody01.exo

java -jar kickass.jar ItsUpToYou_Data_CharacterBitmaps.asm :filename="CharacterBody02.tga" -binfile -fillbyte 0 -o ItsUpToYou_Data_CharacterBody02.bin -log ItsUpToYou_Data_CharacterBody02.txt -showmem
exomizer.exe mem -P0 ItsUpToYou_Data_CharacterBody02.bin@0x7700 -o ItsUpToYou_Data_CharacterBody02.exo

java -jar kickass.jar ItsUpToYou_Data_CharacterBitmaps.asm :filename="CharacterFaceBase01.tga" -binfile -fillbyte 0 -o ItsUpToYou_Data_CharacterFaceBase01.bin -log ItsUpToYou_Data_CharacterFaceBase01.txt -showmem
exomizer.exe mem -P0 ItsUpToYou_Data_CharacterFaceBase01.bin@0x7700 -o ItsUpToYou_Data_CharacterFaceBase01.exo

java -jar kickass.jar ItsUpToYou_Data_CharacterBitmaps.asm :filename="CharacterFace01.tga" -binfile -fillbyte 0 -o ItsUpToYou_Data_CharacterFace01.bin -log ItsUpToYou_Data_CharacterFace01.txt -showmem
exomizer.exe mem -P0 ItsUpToYou_Data_CharacterFace01.bin@0x7700 -o ItsUpToYou_Data_CharacterFace01.exo

java -jar kickass.jar ItsUpToYou_Data_CharacterBitmaps.asm :filename="CharacterFace02.tga" -binfile -fillbyte 0 -o ItsUpToYou_Data_CharacterFace02.bin -log ItsUpToYou_Data_CharacterFace02.txt -showmem
exomizer.exe mem -P0 ItsUpToYou_Data_CharacterFace02.bin@0x7700 -o ItsUpToYou_Data_CharacterFace02.exo

java -jar kickass.jar ItsUpToYou_Data_CharacterBitmaps.asm :filename="CharacterFace03.tga" -binfile -fillbyte 0 -o ItsUpToYou_Data_CharacterFace03.bin -log ItsUpToYou_Data_CharacterFace03.txt -showmem
exomizer.exe mem -P0 ItsUpToYou_Data_CharacterFace03.bin@0x7700 -o ItsUpToYou_Data_CharacterFace03.exo
2021-01-05 20:07
Slammer

Registered: Feb 2004
Posts: 409
Quote: Kick Assembler has one commandline directive which is particulary interesting for me:

-mbfiles

Instead of compiling one big binary, it compiles every memory block with its program counter set up as separate binary. I could actually make a loop in script that takes different input data files for conversion/compilation but it's practically useless when I cannot change output filename accordingly. Dunno, maybe I missed some functionality that Slammer has already provided :)


Another way of directing output to different files is by using segmnets. If you don't want to read all the details about setting them up, there is a one-liner you can use (It set it up, direct the content to a file and switches output to that segment.)

.segment File1 [outPrg="MyFile1.prg"]
    *=$1000
    .byte 1,2,3,4



.segment File2 [outPrg="MyFile2.prg"]
    *=$1000
    .byte 4,5,6,7

.segment Default  // Restoring output to the standard file


I'm not sure it does what you wan't cos the segment names have to be unique so you can't put it in a macro, have it take an output filename and call it several times, etc.
2021-01-05 20:24
Jammer

Registered: Nov 2002
Posts: 1018
Segments look really cool! However, not that close to comfy automatization I guess ;) What would suit problem the best is imho sth like:

.var filenamelist = List(all filename entries)
...
conversion loop with another filenames from the list:
.var filename = filenamelist.get(loop index)
.var importbitmap = LoadBinary(filename + ".tga")
...
some code to convert data and fill array with it
...
.pc = picturedata filename(index) 
.fill 8 * rows * columns, bitmaparray.get(i)
.fill rows * columns, screenmaparray.get(i)


I miss a lot from actual code but you get the idea :) And then I compile binary with -mbfiles
2021-01-07 14:52
Digger

Registered: Mar 2005
Posts: 372
@Jammer:

You can do it apart from the memory block name, it's not dynamic. Example (edited) from Norah:

.const twisterColors = List().add(peptoBright.get($8), peptoBright.get($7))
.const numFrames = 7

.var twisterFramesFiles = List()
.for (var i = 1; i <= numFrames + 1; i++) {
    .const fileName = "assets/twister/sprites frame " + i + ".png"
    .const file = LoadPicture(fileName, twisterColors)
    .eval twisterFramesFiles.add(file)
}

.macro cutTwisterFrame(frame) {
    .const file = twisterFramesFiles.get(frame - 1)
    .for (var y = 0; y < layout.size(); y++) {
        .for (var x = 0; x < layout.get(y).size(); x++) {
            .eval twisterPointersList.add(toSpritePtr(*))
            cutHiresSprite(file, x * 24, y * 21 + 6 - x)
        }
    }
}

.pc = *
cutTwisterFrame(1)
.pc = *
cutTwisterFrame(2)
...
2021-01-07 16:24
Jammer

Registered: Nov 2002
Posts: 1018
Another cool way but I guess my current approach seems more flexible and like less sweat to me ;)
Previous - 1 | 2 - Next
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
Chris-Do
St0rmfr0nt/ExCeSs
Sentinel/Excess
Guests online: 69
Top Demos
1 Christmas Megademo  (9.7)
2 Uncensored  (9.6)
3 Edge of Disgrace  (9.6)
4 Coma Light 13  (9.6)
5 Memento Mori  (9.6)
6 Unboxed  (9.6)
7 Comaland 100%  (9.6)
8 Lunatico  (9.6)
9 Protogeo 100%  (9.5)
10 The Shores of Reflec..  (9.5)
Top onefile Demos
1 Copper Booze  (9.8)
2 To Norah  (9.8)
3 Lovecats  (9.7)
4 For Your Sprites Only  (9.6)
5 Elite Code Mechanics  (9.6)
6 Square Booze  (9.6)
7 Quadrants  (9.5)
8 Daah, Those Acid Pil..  (9.5)
9 Dawnfall V1.1  (9.5)
10 New 30 Years Low Res..  (9.5)
Top Groups
1 Booze Design  (9.4)
2 Censor Design  (9.4)
3 Fossil  (9.4)
4 Oxyron  (9.3)
5 PriorArt  (9.3)
Top Cover Designers
1 Duce  (9.8)
2 Electric  (9.8)
3 Junkie  (9.7)
4 The Elegance  (9.4)
5 Mermaid  (9.3)

Home - Disclaimer
Copyright © No Name 2001-2021
Page generated in: 0.309 sec.