Jump to content
IGNORED

Visual Studio Code


Recommended Posts

I decided to install VS Code and give it a try, was a little surprised when I dropped a .ASM file into the editor it set

the system to MADS :) , bit of a bonus over the previous version I tried to use.

 

However, what I can't fathom out is how to create a build system, I did create a .BAT file with all the requirements

to run MADS Assembler and it did work running from the command window.

But that only works for that program, what I'm looking for is some way of compiling code using system/global variables

on the current project files (just like MADS in Eclipse does)

 

Is this possible, I've looked at some documentation/videos, but they all just use Java/Python/html examples and setting them up is easy.

Just wondered if anyone has cracked this nut ???

Link to comment
Share on other sites

2 hours ago, TGB1718 said:

I decided to install VS Code and give it a try, was a little surprised when I dropped a .ASM file into the editor it set

the system to MADS :) , bit of a bonus over the previous version I tried to use.

 

However, what I can't fathom out is how to create a build system, I did create a .BAT file with all the requirements

to run MADS Assembler and it did work running from the command window.

But that only works for that program, what I'm looking for is some way of compiling code using system/global variables

on the current project files (just like MADS in Eclipse does)

 

Is this possible, I've looked at some documentation/videos, but they all just use Java/Python/html examples and setting them up is easy.

Just wondered if anyone has cracked this nut ???

https://www-atariware-cl.translate.goog/wiki/Guías/Configuraciondemadsconvscode?_x_tr_sl=es&_x_tr_tl=en&_x_tr_hl=es-419 👍

Link to comment
Share on other sites

56 minutes ago, Wrathchild said:

Might help

WUDSN is amazing plugin but the reason I stopped using it is the fact it is tied to the awful Java Eclipse editor, requires Java to be installed on the system.  I'm using VSCode, it has wonderful GIT integration, easily tracks changes while typing in the editor.  I use ATASM Altirra bridge, Hex Editor with Tags, and the MADS syntax highlighter.  It's been great so far.  Single click and I can assemble a file and launch the emulator.

Link to comment
Share on other sites

Just now, Stephen said:

WUDSN is amazing plugin but the reason I stopped using it is the fact it is tied to the awful Java Eclipse editor, requires Java to be installed on the system.  I'm using VSCode, it has wonderful GIT integration, easily tracks changes while typing in the editor.  I use ATASM Altirra bridge, Hex Editor with Tags, and the MADS syntax highlighter.  It's been great so far.  Single click and I can assemble a file and launch the emulator.

The only thing that could be better, is if there was a VSCode version of WUDSN :)  I'd pay for that.

Link to comment
Share on other sites

47 minutes ago, Stephen said:

The only thing that could be better, is if there was a VSCode version of WUDSN

Absolutely. I even had a go at implementing some of the WUDSN features in the VSCode MADS plugin, but I ran out of talent. I cannot function without WUDSN's outlining facility, which provides a hierarchical list of all the segments, procedures and variables in the project.

Link to comment
Share on other sites

Put this as a tasks.json file in the same folder as your code and it will give you build tasks for MADS and also Atasm. Just SHIFT-Ctrl-B and choose which assembler you want. 
 

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    // tasks and problem matcher to compile Atari sources in the Mac/65 format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Build - ATASM",
            "type": "shell",
            "command": "atasm",
            "args": [
                "${relativeFile}",
                "-mae",
                "-Iincludes",
                "-IUtility",
                "-o${fileBasenameNoExtension}.com"
            ],
            "group": "build",
            "presentation": {
                // Reveal the output only if unrecognized errors occur.
                "reveal": "always"
            },
            "problemMatcher": {
                "owner": "atasm",
                "fileLocation": [
                    "relative",
                    "${workspaceFolder}"
                ],
                "pattern": [
                    {
                        "regexp": "^In (.*),\\sline\\s(\\d+)--$",
                        "file": 1,
                        "line": 2,
                    },
                    {
                        "regexp": "^\\s(Error|Warning):\\s(.*)$",
                        "severity": 1,
                        "message": 2
                    }
                ]
            }
        },
        {
            "label": "Build - MADS",
            "type": "shell",
            "command": "mads",
            "args": [
                "${fileBasename}",
                "-l",
                "-o:${fileBasenameNoExtension}.com"
            ],
            "group": "build",
            "presentation": {
                // Reveal the output only if unrecognized errors occur.
                "reveal": "always"
            },
            "problemMatcher": {
                "owner": "MADS",
                "fileLocation": [
                    "relative",
                    "${workspaceFolder}"
                ],
                "pattern": [
                    {
                        "regexp": "^(.*)\\s\\((\\d*)\\)\\s(ERROR|WARNING):\\s(.*)$",
                        "file": 1,
                        "line": 2,
                        "severity": 3,
                        "message": 4,
                    }
                ]
            }
        }
    ]
}

 

Link to comment
Share on other sites

9 hours ago, Stephen said:

WUDSN is amazing plugin but the reason I stopped using it is the fact it is tied to the awful Java Eclipse editor, requires Java to be installed on the system. 

While I understand preference for the editor (and recent Eclipse editors of course reintegrate VS features), the fact that is runs on Java is simply irrelevant today.

 

All Microsoft products require you to have .Net the same way. If you install WUDSN, the JRE is included just like any other code and you simple don't care about it.
With the installer I'm now providing it's all one click on Windows, macOS and soon Linux.
And of course Eclipse works as well with git as VS does. The WUDSN samples are exactly there.


And from the provider side I have to say: Why should I throw away decades of development just to switch to a terrible mix of Typescript and Javascript that cannot even be reasonable checked or debugged.

 

Apart from that everybody should of course use what makes him most productive - I'm using MADS to create C64 code after all 🙂 

  • Like 1
Link to comment
Share on other sites

OK, that makes sense, but I've just started up a new project in Eclipse after a few months of being busy with other stuff, and I can't store it in a new GitHub repo, I get:

 

Transport Error: Cannot get remote repository refs.
git@github.com:e474/thisIsntARealProject.git: git@github.com: Permission denied (publickey).

 

I'm not sure if github is blocking my IP because I've made too many attempts, Eclipse is messing something up, if github has put in place a new policy, there's some weird configuration issue, or it's Wednesday.

I know I can spend a good day trying to track this down (at least), and it was working fine previously. I think what's annoying is the unpredictability of service - I can assemble a project in 2 - 3 seconds, but it might take me a couple of days to figure out what I now have to do to get code into GitHub, or wherever I can save it. /rant

 

 

Link to comment
Share on other sites

1 hour ago, JAC! said:

While I understand preference for the editor (and recent Eclipse editors of course reintegrate VS features), the fact that is runs on Java is simply irrelevant today.

 

All Microsoft products require you to have .Net the same way. If you install WUDSN, the JRE is included just like any other code and you simple don't care about it.
With the installer I'm now providing it's all one click on Windows, macOS and soon Linux.
And of course Eclipse works as well with git as VS does. The WUDSN samples are exactly there.


And from the provider side I have to say: Why should I throw away decades of development just to switch to a terrible mix of Typescript and Javascript that cannot even be reasonable checked or debugged.

 

Apart from that everybody should of course use what makes him most productive - I'm using MADS to create C64 code after all 🙂 

I mean no offense, I am nothing but impressed with the work you have put into WUDSN and I am grateful for your programming series on Youtube.  I'm actually watching two new later episodes I missed.  I also do not want to turn this into any X vs Y discussion (Ford vs Chevy, Windows vs Linux, etc.)  I was just stating my dislike about many of the features (or lack thereof) in the Eclipse editor compared to what I am accustomed to in Visual Studio.  I've been using the VS IDE for over 20 years, 15 years professionally and prefer it.  Absolutely none of this reflects on your work or features of WUDSN.

 

My comment about being willing to pay for a WUDSN plugin for VS Code (or better yet the full Visual Studio) was meant as a compliment for your work, not as a serious request for you to implement it.

 

Also, this thread was strictly about using VSCode for development.  That is the only reason I chose to answer, was because I thought I could help the OP with what I am currently using.  I didn't bring up Eclipse and I wouldn't have mentioned it if it had not already been discussed.

  • Like 1
Link to comment
Share on other sites

@JAC! I love WUDSN 😍, but I cannot install it into Eclipse, I can install Eclipse (although I'm never quite sure what environment to select).

Then when I try to install WUDSN, it fails every time, it looks like it can't find/download the files it needs.

 

I first had problems with an update that displayed the same issues and after the failed update WUDSN no longer worked hence a re-install

but it still failed in the same way, I think I posted here in another thread, but there didn't seem to be a resolution.

 

Currently I'm using the no-install version that you provide, but I'm not sure it can be updated.

 

That's why I started this thread, just in case WUDSN could be integrated into VS Code.

Link to comment
Share on other sites

@tsom thanks for the script you use, had to tweak it a bit to make it work, but did get it to build a small test program.

 

I do think it's hilarious though that if you put Windows "\" characters in a command for example to point at include directory

i.e. "-i:D:\WUDSN-IDE\Projects\include\" the build fails as I think it see's the \<character> as an escape sequence, you have

to put in the Unix "/" instead which fortunately it accepts.

Link to comment
Share on other sites

Fixed my problem after adding an entry for github.com in my ~/.ssh/config file - so not sure what subsystem had been changed to cause this addition to be required, but Eclipse (+WUDSN+GitHub) is working now!

 

I was more posting about the problem with large multi-language, multi-platform IDE's being that when they fail, they can be far trickier to trouble shoot than smaller, simpler development apps. Also, I don't think restarting with a fresh install is an option at the moment, though hopefully everything will be back to normal soon!

Link to comment
Share on other sites

10 hours ago, flashjazzcat said:

All Eclipse needs is a dark theme for Windows that doesn't make my eyes bleed and I'll never complain about it again. :)

It's been on my list for a while, I know for which parts of WUDSN I see the need to adapt and wrote it down here: https://github.com/peterdell/wudsn-ide/issues/6
In case you have more, please add you wishes there.

12 hours ago, TGB1718 said:

@JAC! I love WUDSN 😍, but I cannot install it into Eclipse, I can install Eclipse (although I'm never quite sure what environment to select).

...

but it still failed in the same way, I think I posted here in another thread, but there didn't seem to be a resolution.

Currently I'm using the no-install version that you provide, but I'm not sure it can be updated.

That's why I started this thread, just in case WUDSN could be integrated into VS Code.

Let's keep this thread clean, and sort that via PM, we'll find what missing. Short version: All versions should support updates via the update side. Main point is that the update side URL has changed recently, maybe it's just that.

20 hours ago, Stephen said:

I mean no offense, ...

I didn't take it as offence at all, I know you are always a constructive guy. As said, there are personal preferences and whatever environment makes you most productive - use it!  And thanks for the compliment 🙂

 

And sorry to all, if I derailed the thread here. That was not my intention. 

  • Like 2
Link to comment
Share on other sites

Since we're mixing subjects, then:

1. I have a deep personal hatred of Eclipse from the dim past, it's probably time to revisit with modern versions. I used to get the dreaded green bar for doing ANYTHING and it always seemed to take forever. Plus, there was no Brief key emulation, and no Vi key emulation.

2. I like how lightweight VS Code is, but I can see that the 'Lets add stuff!' weevils are busy at work weighing it down as fast as they possibly can. And, there is a good Brief emulation, so.

3. I actually like Slickedit over anything, but its a licensed product, and not cheap either.

 

There you have my much needed opinions. You're welcome.

Link to comment
Share on other sites

On 1/10/2023 at 1:54 PM, TGB1718 said:

 

However, what I can't fathom out is how to create a build system, I did create a .BAT file with all the requirements

to run MADS Assembler and it did work running from the command window.

 

You can also use the Atasm-Altirra-Bridge extension.  It lets you code in VSCode, set breakpoints and then launch your code for running or debugging in Altirra.

Atasm support is closely integrated, Mads support is ok-ish.

https://marketplace.visualstudio.com/items?itemName=cerebus.atasm-altirra-bridge

  • Like 1
Link to comment
Share on other sites

I am just so used to VS Code now, and I really really don't like the normal Visual Studio nor Eclipse.

 

All I want is a light weight editor, and that's it. And before VS-Code there was only very weird stuff on Mac OS around to use.

Edited by Steril707
  • Like 1
Link to comment
Share on other sites

On 1/10/2023 at 6:54 AM, TGB1718 said:

However, what I can't fathom out is how to create a build system, I did create a .BAT file with all the requirements

to run MADS Assembler and it did work running from the command window.

Using the above mentioned Atasm-Altirra-Bridge extension, each project you are working on will have a json file.  Here is one of mine:

 

{
    "comment": "Altirra configuration file.",
    "_1": "Which asm file is to be compiled?",
    "input": "sprites.asm",  
    "_2": "Array of folders that will be searched when files are .include(d)",
    "includes": [
        "C:\\Users\\Stephen\\source\\repos\\My Atari 8-bit code\\Libraries"
    ],  
    "_3": "Which folder will all the output files be written to. 'out' by default. Always in the workspace!",
    "outputFolder": "out",  
    "_4": "Additional atasm parameters:-v -s -u -r -fvalue",
    "params": "",  
    "_5": "List of symbols to be set via the parameter list",
    "symbols": [],  
    "_6": "If debug is enabled then symbol table and listings are generated for Altirra debugging",
    "withDebug": true
}

 

One button click, and the file is assembled and the emulator is launched.

  • Like 1
Link to comment
Share on other sites

@Stephen, oddly a straight cut and paste is not as distorted, I am experimenting.
 
{
    "comment": "Altirra configuration file.",

 

    "_1": "Which asm file is to be compiled?",
    "input": "sprites.asm",

 

    "_2": "Array of folders that will be searched when files are .include(d)",
    "includes": [
        "C:\\Users\\Stephen\\source\\repos\\My Atari 8-bit code\\Libraries"
    ],

 

    "_3": "Which folder will all the output files be written to. 'out' by default. Always in the workspace!",
    "outputFolder": "out",

 

    "_4": "Additional atasm parameters:-v -s -u -r -fvalue",
    "params": "",

 

    "_5": "List of symbols to be set via the parameter list",
    "symbols": [],

 

    "_6": "If debug is enabled then symbol table and listings are generated for Altirra debugging",
    "withDebug": true
}
Spoiler
{
    "comment": "Altirra configuration file.",

 

    "_1": "Which asm file is to be compiled?",
    "input": "sprites.asm",

 

    "_2": "Array of folders that will be searched when files are .include(d)",
    "includes": [
        "C:\\Users\\Stephen\\source\\repos\\My Atari 8-bit code\\Libraries"
    ],

 

    "_3": "Which folder will all the output files be written to. 'out' by default. Always in the workspace!",
    "outputFolder": "out",

 

    "_4": "Additional atasm parameters:-v -s -u -r -fvalue",
    "params": "",

 

    "_5": "List of symbols to be set via the parameter list",
    "symbols": [],

 

    "_6": "If debug is enabled then symbol table and listings are generated for Altirra debugging",
    "withDebug": true
}

 

code box makes a mess !!!

@Albert we have another one for you. With the number of pages posting code it would be a great one for the top of the list.


		{
	


	

		    "comment": "Altirra configuration file.",
	

	 

	

		    "_1": "Which asm file is to be compiled?",
	


	

		    "input": "sprites.asm",
	

	 

	

		    "_2": "Array of folders that will be searched when files are .include(d)",
	


	

		    "includes": [
	


	

		        "C:\\Users\\Stephen\\source\\repos\\My Atari 8-bit code\\Libraries"
	


	

		    ],
	

	 

	

		    "_3": "Which folder will all the output files be written to. 'out' by default. Always in the workspace!",
	


	

		    "outputFolder": "out",
	

	 

	

		    "_4": "Additional atasm parameters:-v -s -u -r -fvalue",
	


	

		    "params": "",
	

	 

	

		    "_5": "List of symbols to be set via the parameter list",
	


	

		    "symbols": [],
	

	 

	

		    "_6": "If debug is enabled then symbol table and listings are generated for Altirra debugging",
	


	

		    "withDebug": true
	


	

		}
	

 

Edited by _The Doctor__
Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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...