Q: Viability of using IntelliJ with emulator

GFA, ASM, STOS, ...

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

marcelschoen
Atari nerd
Atari nerd
Posts: 46
Joined: Sat Apr 26, 2008 7:17 am

Q: Viability of using IntelliJ with emulator

Postby marcelschoen » Fri Mar 29, 2019 12:31 pm

Hi guys,

I'm a Java dev and am currently contemplating writing a plugin for IntelliJ which would allow to write ST code in the IDE, and then compile and run in in an emulator that is shrink-wrapped into the plugin (for Windows, that would be Steem). This approach (building in the emulator) has various pros and cons. Basically, what it would do for building and running an ST program is

    Prepare the source files in a special directory structure that is configured as a drive in the emulator
    Run the emulator with a special autorun program which executes the assembler, linker etc. (that autorun program would be a precompiled GFA basic tool)
    The autorun tool would then create a special "signal" file once the building processes are complete, so that the IntelliJ IDE knows the job is done
    Then another instance of the emulator would be started with the freshly created binary

This is, in short, the basic principle. The advantage is that original build tools like Devpac could probably be used, so the build process itself would have maximal compatibility (compared to, for example, cross-compiling approaches). The obvious downside is that interactive debugging is not really possible with this approach. Still, working in a modern IDE could potentially allow to implement things like refactoring support, online help, organizing the resources of a project and defining / building MSA disk images etc. So I think there could still be a lot of benefit, but since that would also be a bigger project, it would be good to hear opinions of people who have maybe already done, or want to do some ST development.

What do you think? Does that make any sense?

mikro
Hardware Guru
Hardware Guru
Posts: 1996
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: Q: Viability of using IntelliJ with emulator

Postby mikro » Fri Mar 29, 2019 1:09 pm

In my opinion, it's not worth spending time with Devpac, vasm compatibility is very good. When it comes to GFA or some obscure compilers, perhaps it still makes sense.

Btw you can make your life much easier if you allow yourself to run some CLI on Atari side - like mupfel. That way you need to run only that prg (with its default bat file - no need for additional parameters) and the bat file would take care of everything else, incl. running the binary after successful compilation.

What would be really helpful is something else you have mentioned - a fully m68k aware editor/plugin which knows local labels, can rename it within their scope, can rename registers, again within a defined scope (function, loop, file etc) and so on.

marcelschoen
Atari nerd
Atari nerd
Posts: 46
Joined: Sat Apr 26, 2008 7:17 am

Re: Q: Viability of using IntelliJ with emulator

Postby marcelschoen » Fri Mar 29, 2019 1:36 pm

So vasm is a cross-assembler, right? One advantage of that would of course be the superior build speed. So I'll probably give that a try. Running builds in the emulator brings all sorts of complexity with it...

Back in the day, I did only some very simple assembler development, and mostly GFA basic stuff on my ST. I have zero experience with any kind of batch shell processing, so I wasn't even aware of "mupfel". I'm thankful for all hints in that direction. The biggest challenge is definitely to launch the emulator from the Java process, and then make it run a number of build steps with various tools. I have succeeded with a prototype where I jused said GFA basic program which executes the Devpac assembler on a given source file, but if there are already better existing tools, I'll have a look at them.

ThorstenOtto
Atari Super Hero
Atari Super Hero
Posts: 654
Joined: Sun Aug 03, 2014 5:54 pm

Re: Q: Viability of using IntelliJ with emulator

Postby ThorstenOtto » Fri Mar 29, 2019 5:43 pm

marcelschoen wrote: Running builds in the emulator brings all sorts of complexity with it...


Its not reallly that difficult. In the automated build scripts for MagicMac i use a similar approach. Basically, i use mcopy on the host to copy the source files to a preconfigured image (where the tools are already installed; in my case that is PureC, but can be basically anything that can be run from the command line). I then use Aranym to execute a mupfel script there. Aranym is much better suited for this approach, because it is way faster than Steem, and you can cleanly shut it down at the end of your script, without risking to suddenly booting into the desktop, waiting forever. You might want to take a look at https://github.com/th-otto/MagicMac/blo ... s/build.sh

marcelschoen
Atari nerd
Atari nerd
Posts: 46
Joined: Sat Apr 26, 2008 7:17 am

Re: Q: Viability of using IntelliJ with emulator

Postby marcelschoen » Fri Mar 29, 2019 8:32 pm

Oh, wow, great, thanks! I actually haven't ever used Aranym myself, but I've read quite a bit about it, and now that you mention it it makes sense that it would be better suited for building purposes. I'll gladly check out your script!


Social Media

     

Return to “Coding”

Who is online

Users browsing this forum: No registered users and 2 guests