Sunday, December 04, 2011

A kickass plugin for Kate

Kate (http://www.kate-editor.org) is the default KDE editor, which is quite nice if I might add.  Also, it supports plugins.

Kick Assembler (http://theweb.dk/KickAssembler/Main.php) is a nice cross-assembler for C64.

So...introducing the kickass plugin :-)
As you can see it adds a "C64" top menu, where you can find 3 items.

  • Assemble, it assembles the file you are working on Kate (it saves the file before doing that)
  • Assemble and run, assembles the file and if there were no errors it runs output with vice
  • Display Error again, the kick assembler stops on the first error it finds.  When that happens a small passive popup windows displays the error for a few seconds and also the cursor on the editor goes to the line with the error.  Now, if you missed the displayed error, you can use this to redisplay the error. (Yeah, I am not happy with it either :P)

How to get (source code), compile & install 
svn checkout http://kickass.googlecode.com/svn/trunk/ kickass

cd kickass
mkdir build
cd build
(if you have both qt4 and qt5 installed you have to do this here: export QT_SELECT=4)
cmake ..
make
sudo make install
kbuildsycoca4

What packages do I need for the above to work?
Well, just to give a reference point, the following line for (k)ubuntu will probably suffice
sudo apt-get install subversion cmake kdesdk kdelibs5-dev

How to activate on Kate and configure the plugin
Go to Settings/Configure Kate/Extensions

You press the little config icon on the plugin's row and you finally get the following:

Well, you can see the path to where I have the kick assembler here.  When you first arrive here it will be empty and you need to find the KickAss,jar (Use the button "Find kickass...")

Oh, the assembler options and emulator options fields in the configuration dialog are not working for the moment.

Scratch that.
Now the cool thing is to have
Assembler options: -vicesymbols
Emulator options: -moncommand %b.vs
This will make the assembler export the symbols and start vice with the command to use them, so if you hit the alt-h on vice, you'll have your symbols in the dissasembly. Cool, eh?