Jump to content
mksmith

Atari Dev Studio for Homebrew Development [Release]

Which language do you develop with using Atari Dev Studio?  

48 members have voted

  1. 1. Which language do you develop with using Atari Dev Studio?

    • batari Basic
      25
    • 7800basic
      14
    • dasm (assembly)
      17


Recommended Posts

OK - I'll see how I can get VS Code to use the terminal to launch make instead of a spawn process.  Leave it with me 👍 

 

Share this post


Link to post
Share on other sites

Just a quick observation - when I manually type 'make' in the terminal, it runs stella without complaining about the stellarc file read/write problem.

 

Share this post


Link to post
Share on other sites
1 minute ago, Andrew Davie said:

Just a quick observation - when I manually type 'make' in the terminal, it runs stella without complaining about the stellarc file read/write problem.

 

I believe the environment setup by the spawn is limited to what you configure it for - the terminal on the other hand should be system wide.

Share this post


Link to post
Share on other sites

Just a heads-up that if you're testing for makefile existence, with gnu make (and probably others) a default makefile might be named "makefile" or "Makefile", and I'm guessing that on Windows "MAKEFILE" is a possibility.

  • Like 1

Share this post


Link to post
Share on other sites
1 minute ago, RevEng said:

Just a heads-up that if you're testing for makefile existence, with gnu make (and probably others) a default makefile might be named "makefile" or "Makefile", and I'm guessing that on Windows "MAKEFILE" is a possibility.

Thanks Mike -  will try and capture for each.  Windows probably doesn't care but Linux and macOS most definately.

 

Accessing the terminal looks easy enough - just giving it a test on Windows.  Moving back to macOS...

 

What I might do is either add an option to the Default Compiler settings for dasm to allow you to choose Make (thus overriding the default [built-in] or Custom [user provided] compilier) or just add a checkbox option to utilise a makefile if it exists... 

  • Like 1

Share this post


Link to post
Share on other sites

What is the advantage of supporting make directly instead of letting the user specify their own build command? I use a build script that I could convert to a makefile, but wouldn't it be simpler to let the user just choose the appropriate custom build command? 

Share this post


Link to post
Share on other sites
4 minutes ago, Karl G said:

What is the advantage of supporting make directly instead of letting the user specify their own build command? I use a build script that I could convert to a makefile, but wouldn't it be simpler to let the user just choose the appropriate custom build command? 

Depends I guess as too how far we want to take it - I've really just done this to support the way Andrew compiles and launches his games using Make.  We could take it further again but lets see how this one pans out.

  • Like 1

Share this post


Link to post
Share on other sites
25 minutes ago, Karl G said:

What is the advantage of supporting make directly instead of letting the user specify their own build command? I use a build script that I could convert to a makefile, but wouldn't it be simpler to let the user just choose the appropriate custom build command? 

 

I have multiple subdirectories - one for PF graphics, one for sprite graphics. I have a bunch of tools. 
My makefile branches to each of these subdirectories and calls make in those, which in turn builds appropriate source code data from graphics files that have changed. Allowing "make" makes it simple to support what's been a fairly standard way to run a build system.

Share this post


Link to post
Share on other sites

Nearly finished - had to pop away for a bit. Just need to do some quick testing.

Share this post


Link to post
Share on other sites
6 hours ago, mksmith said:

Depends I guess as too how far we want to take it - I've really just done this to support the way Andrew compiles and launches his games using Make.  We could take it further again but lets see how this one pans out.

To be clear, I wasn't requesting that you add yet more complexity to your project - I just didn't understand how it worked well enough to know that supporting using make would be substantially different than supporting a user-supplied build command. I may well try it out myself now with my WIP after converting my build script to a makefile. 

Share this post


Link to post
Share on other sites
11 minutes ago, Karl G said:

To be clear, I wasn't requesting that you add yet more complexity to your project - I just didn't understand how it worked well enough to know that supporting using make would be substantially different than supporting a user-supplied build command. I may well try it out myself now with my WIP after converting my build script to a makefile. 

All good mate - I may have misunderstood your question!

 

With ADS, I am able to create 'compilers' and 'emulators' to use in the system.  Once you call the compile function it does a check based on the active file language and then executes the required compiler.  If you compile and run it also finds the suggested emulator (for that compiler) and then executes that.  The compilers really just build up a command line call. 

 

So with the Makefile I created another compiler which pretty much just calls the make command in this case. I'm just about to upload another build - this one allows you to either compile the Makefile directly (current situation) or now choose the Makefile option for dasm (in the settings) and it will automatically scan to see if there is a Makefile (in the root workspace folder) and use that. I thought having the option like that would be best and fits into the current process nicely.

 

[Update] I guess to add to that I could add more compilers for other scripting processes if they arise.

 

Share this post


Link to post
Share on other sites

A new release (v0.4.0) is now available with the following changes:

  • Added option to dasm compiler to allow you to select 'Make' to compile your source code (Andrew Davie). This option will automatically scan the root workspace folder for a Makefile to use without having to open it first (make sure your base source code file is open and active as per the current compilation process). Note: you can still open a Makefile and compile from that if required.

ads-dasm-make.thumb.png.da3ad335e18fed9212e7ac8f85e8b36a.png

  • Like 1

Share this post


Link to post
Share on other sites

Thank you for the latest update, and speed implementing.

I have tested, and it's looking pretty good. Good work.

There is just one issue I see - and that is, since I run stella in my makefile, I cannot do another build until I close stella.

Would it be possible at the start of a build process to kill/terminate the previous make 'instance'?

Finally I'd love a keyboard shortcut to do the build - COMMAND-OPTION-B would be great :P

I appreciate very much your work on this - TY

Share this post


Link to post
Share on other sites

Just one comment/clarification - you don't need "your base source file" open, but in fact any source file in the root directory - which is as I want it to work, so all is good.

Share this post


Link to post
Share on other sites
Just now, Andrew Davie said:

Thank you for the latest update, and speed implementing.

I have tested, and it's looking pretty good. Good work.

There is just one issue I see - and that is, since I run stella in my makefile, I cannot do another build until I close stella.

Would it be possible at the start of a build process to kill/terminate the previous make 'instance'?

Finally I'd love a keyboard shortcut to do the build - COMMAND-OPTION-B would be great :P

I appreciate very much your work on this - TY

No probs - glad its working! That might be a tough one - if I can get the current process from the terminal window then all good. In fact that's that possible I might add an option (checked by default) to kill any prior created process.

 

There are some shortcuts in the Command Palette to compile etc if you open it type 'ads' to list them.  I need to see about the kill option as noted if I can get an id.  Will check that out probably tomorrow.

 

1 minute ago, Andrew Davie said:

Just one comment/clarification - you don't need "your base source file" open, but in fact any source file in the root directory - which is as I want it to work, so all is good.

Ah yes - as long as VS Code identifies the active file as 'dasm' you will be all good!

Share this post


Link to post
Share on other sites
2 hours ago, Lillapojkenpåön said:

I don't know if this is any help, but I followed this once to be able to compile with a makefile and open in emulator

https://www.ohsat.com/tutorial/megapong/megapong-2/

I think it became the "run build task" Ctrl+Shift+B

Hey @Lillapojkenpåön thanks for the info. I did actually consider using the 'vs code' scripting compilation but wasn't sure if that would make things a little more complex or how it might hook in with the bB and 7800basic compiler so in the end I rolled my own.

Share this post


Link to post
Share on other sites

I have my desired CMD+OPT+B for the build working.

It's a simple "custom keyboard shortcut" configuration on VS Code.

 

Share this post


Link to post
Share on other sites
Just now, Andrew Davie said:

I have my desired CMD+OPT+B for the build working.

It's a simple "custom keyboard shortcut" configuration on VS Code.

 

Nice! Very flexible is VS Code! 

Having a quick look at killing the process - the terminal window has an Id I should be able to use.

Share this post


Link to post
Share on other sites

Righty-o.  Next request... !

It would be extremely nice to get DASM and ADS working together with regard to errors.

If DASM output errors in the correct (standard?) format, then VSC would be able to recognise them - you'd look at the output, click on the error line, and it would take you to the appropriate source file and line number. Can't be too much to ask...?   I'll handle the DASM side of things, if this seems like a good thing to do....

Share this post


Link to post
Share on other sites
3 minutes ago, Andrew Davie said:

Righty-o.  Next request... !

It would be extremely nice to get DASM and ADS working together with regard to errors.

If DASM output errors in the correct (standard?) format, then VSC would be able to recognise them - you'd look at the output, click on the error line, and it would take you to the appropriate source file and line number. Can't be too much to ask...?   I'll handle the DASM side of things, if this seems like a good thing to do....

That would be my certainly be my ultimate goal! As noted earlier I first need to create a language server to do all the backend stuff such as that - definitely on my list!!

Share this post


Link to post
Share on other sites

At the start of my build, in the terminal window, I have a directory change... I'm not sure where it is coming from, so I'm guessing ADS make/build does this at the start. The problem is, it's failing because of spaces in my path names...

 

[email protected] Chess % cd /Users/boo/Documents/software/Atari 2600/Chess
cd: no such file or directory: 2600/Chess 2600/Chess

It seems superflous anyway... but in any case it's currently borked if I have spaces in directory/file names.

Share this post


Link to post
Share on other sites

I've switched my asm WIP over to using a makefile for the build, and set ADS to use make as my "compiler", and it builds fine that way. It doesn't seem like it even tries to launch Stella when I hit the button to compile and run in emulator, though. When I do the same with a batari Basic source file, it does launch Stella as expected, though.

Share this post


Link to post
Share on other sites
6 hours ago, Andrew Davie said:

At the start of my build, in the terminal window, I have a directory change... I'm not sure where it is coming from, so I'm guessing ADS make/build does this at the start. The problem is, it's failing because of spaces in my path names...

 

[email protected] Chess % cd /Users/boo/Documents/software/Atari 2600/Chess
cd: no such file or directory: 2600/Chess 2600/Chess

It seems superflous anyway... but in any case it's currently borked if I have spaces in directory/file names.

Ah that's me - wanted to ensure the correct folder is active though not sure it's required. I'll either fix or remove for the next release 👍

30 minutes ago, Karl G said:

I've switched my asm WIP over to using a makefile for the build, and set ADS to use make as my "compiler", and it builds fine that way. It doesn't seem like it even tries to launch Stella when I hit the button to compile and run in emulator, though. When I do the same with a batari Basic source file, it does launch Stella as expected, though.

At the moment you need to do all the work within your script as I don't (won't at this stage) scan the file for that information. If you go back to one of Andrew's earlier posts I believe he has an example of launching Stella from the makefile. I just removed the ability to start Stella rather than not having the compile and run button working 👍

Share this post


Link to post
Share on other sites
19 minutes ago, mksmith said:

At the moment you need to do all the work within your script as I don't (won't at this stage) scan the file for that information. If you go back to one of Andrew's earlier posts I believe he has an example of launching Stella from the makefile. I just removed the ability to start Stella rather than not having the compile and run button working 👍

Oh, no problem at all, then so long as I understand how it works.  Launching from the makefile is easy enough.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...