Skip to content

Latest commit

 

History

History
176 lines (122 loc) · 6.64 KB

README.md

File metadata and controls

176 lines (122 loc) · 6.64 KB

Retro Rules Retro Rules

Kick Assembler - ACBG Kick Assembler (... and chew bubble gum)

A Kick Assembler language plugin for IntelliJ IDEA.

editor

Table of contents

Disclaimer

This plugin is still at an early stage of development. Not all features are fully implemented or work as expected at this point. Feedback, help or any other contributions are very welcome.

Features

In addition to the IntelliJ's wide range of built-in functionality (like version control, the excellent editor, etc.), this plugin provides the following Kick Assembler specific features:

  • Syntax Highlighting 🔧
  • Run Configurations ✔️
  • SDK Management ✔️
  • Project Generation ✔️
  • "New File" Template ✔️
  • Refactoring Functionality 🚧

Prerequisites

Installation

Use the IDE's built-in plugin system:

  • File --> Settings... --> Plugins --> Marketplace
  • search for "Kick Assembler"
  • click the Install-button

Or go to the plugin page on the JetBrains-website, download the archive-file and install manually.

Setup

Here's how to use/setup the plugin ...

Project

Simply create a new Kick Assembler project and complete all following steps to finish the project initialization.

new_project

JRE and SDK

JRE

The Java Runtime Environment (JRE) - used to run Kick Assembler - must be configured via File --> Settings... --> Languages & Frameworks --> Kick Assembler.

setup_jre

This step is mandatory, since the following SDK-setup relies on an existing/configured JRE.

SDK

In the project's setup-page create a new Kick Assembler Software Development Kit (SDK):

setup_project_sdk

(Navigate to your Kick Assembler installation directory and click OK.)

New File Template

New Kick Assembler files can be created via File --> New --> Kick Assembler file.

new_file

(Which provides a BasicUpstart2 stub.)

Run Configuration

Run Configurations can be used to invoke Kick Assembler with a selected source-file:

run_configuration

IntelliJ's built-in macros can be combined with for your individual Program parameters:

e.g.

  • $ProjectName$
  • $Projectpath$
  • $ProjectFileDir$
  • $FileDir$
  • $FileDirName$
  • $FileDirPathFromParent$
  • $FileExt$
  • $FileName$
  • $FileNameWithoutAllExtensions$
  • $FileNameWithoutExtension$
  • $FileParentDir$
  • $FilePath$
  • etc.

NOTE: It is also possible to automatically create and run a Run Configuration by right-clicking on a *.asm-file.

FAQs

How can I integrate VICE?

IntelliJ has a neat feature called External Tools. It can be used to run third-party tools on (selected) files.

external_tools_vice

NOTE: The Arguments:-field not only contains the $FileName$-macro, but can also include any additional VICE arguments as needed.

VICE then easily can be run via the context-menu by right-clicking on a *.prg file.

You even can assign a keyboard shortcut for VICE!

Just go to File --> Settings... --> Keymap; search for External Tools; and set a shortcut of your liking. (This will allow you to simply mark a *.prg-file and press Alt+V to run VICE.)

keymap_vice

Is it possible to compile/build the prg-file and run VICE with just one click?

The short answer: Yes.

Here's the detailed guide (for *nix-like systems at least 😉) ...

To achieve this we need two Run Configurations.

  • the Kick Assembler Run Configuration (that compiles the code and generates the prg-file)
  • a separate Run Configuration which invokes the emulator (VICE)

You can chain multiple Run Configurations together and have them executed in sequence.

However, IntelliJ only lets you choose other configs to be run before launch (not after) the actual Run Configuration. So the second Run Configuration will have to be the main config we're working with.

Step-by-step example:

  1. Create your Kick Assembler Run Configuration as desired.

  2. Then create a tiny helper shell-script which will ...

    • find and kill any currently running x64-emulator instances
    • determine the latest prg-file in your working directory
    • and run it with x64.

    e.g.

    #!/bin/bash
    killall x64 &> /dev/null; x64 +confirmonexit $(ls -1t *.prg | head -n1)
    

    (You can save this script wherever you like; for reuse in other projects.)

  3. Now create another Run Configuration. This time a Shell Script Run Configuration.

    Here you'll run the above script and add the Kick Assembler Run Configuration to the "before launch"-section.

    shell_script_run_config

    (Make sure your working-directory is identical to to prg-file's location!)

That's about it; a one-click "build n' run".

Credits

Author

📧 Achim Seufert

License

Please read the license file.

Code 6502 Code 6502