kdrgbtags, a ctags-style tool for RGBDS
Title | kdrgbtags |
Category | Tools |
Language | C99 |
Platform | Windows/Linux/etc |
Started | May 2023 |
Win32 | Prebuilt binary |
Source code | Github Gist |
While writing my Game Boy Assembly test game, I noticed I was missing some source code navigation help.
When coding in C I make heavy use of Universal ctags together with TagLEET plugin for Notepad++ to navigate source code.
That offers the ability to select an identifier and look up or quickly jump to its definition with the press of Alt+Space or other such simple shortcuts.
In some text editors this doesn't even require a plugin, I think in vi and emacs it is available right out of the box.
It is probably possible to extend Universal ctags to support RGBDS-style GBZ80 assembly, but looking at RGBDS object file specification[archive],
I noticed object files are simple to parse and offer an easy-to-use symbol-identifier to file-line mapping.
So I wrote this tool, which takes object files as input and outputs tags files.
It is written in classic single source file C99 command-line tool style.
Other than the RGBDS specification also this StackOverflow answer was very useful.
Someone at the gbdev Discord channel suggested the static memory limits were too small, so I increased them - it is a couple lines of macro definition changes only.