Jump to content
mksmith

batari Basic Extension for Visual Studio Code

Recommended Posts

I am unfamiliar with Visual Studio. I will definitely have to check this out. I really like vbB and I don't think I would ever have been able to make anything even resembling a game without it.

This extension will be a lightend version compared to vbB as a number of the good external tools probably just can't be included due to the focus on VS Code being a specific coding environment and also being cross-platform it just doesn't offer the ability do UI stuff. I may be able to throw open a document with an html document but that's about it. I certainly share you concern about accessing these tools but you can run each as required.

Share this post


Link to post
Share on other sites

I apologise for gushing, but this looks absolutely amazing! I can hardly wait to try it out. :)

Thanks! Coding in a good environment is a really important requirement to enjoying your dev time. Hopefully soon I'll make it available!

Share this post


Link to post
Share on other sites

This is a really exciting project. I am a full time software developer that uses Visual Studio all day. This would be a great move for the community.

I use VS nearly every day also so it's something that's familiar and enjoyable to use.
  • Like 1

Share this post


Link to post
Share on other sites

I may be able to throw open a document with an html document but that's about it.

Speaking of HTML related things, I bet one of us could adapt this JavaScript sprite editor for the Commodore 64 so it will be able to make the three types of batari Basic Atari 2600 sprites:

 

vintageisthenewold.com/new-online-sprite-editor-for-the-commodore-64/

 

(Double-height single color sprites, double-height multicolor sprites, and DPC+ single-height multicolor sprites.)

  • Like 2

Share this post


Link to post
Share on other sites

Hi everyone,

 

The first release of the extension is now available and can be installed directly from within VS Code (via the marketplace) - see the first post for more details.

 

Special thanks to Stephen Anthony for allowing Stella to be included along with the extension.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for the extension, really nice addition to bB. Obviously some tools like the playfield and sprite editor built into VbB are handy for graphics/sound ect. However a really refreshing and cozy experience on the coding side of things in VS. :thumbsup:

  • Like 1

Share this post


Link to post
Share on other sites

Thanks Tony, hopefully we might be able to add a few things down the track to help out but will see how it goes.

 

Let me know if you have any suggestions/feedback!

Share this post


Link to post
Share on other sites

I just tried this out, is stella suppose to pop-up when you choose compile and run in emulator?

It doesn't for me, the only two settings I changed was the path to the bB compiler folder and the path to stella.exe, do I need to setup something more?

Share this post


Link to post
Share on other sites

Hi Lillapojkenpaon,

 

If you clear both those can you compile and run Stella? Also does the output window appear for batari Basic? It logs the compile and execution of the program and Stella.

post-66583-0-60428000-1553721564_thumb.png

I do have another user who cannot do this currently but I have yet to determine why - trying to work out whether there is some sort of log file that might show what is happening.

I have a very clean Windows 10 machine (and 2 others I have tried) with a straight download of VS Code and then an install of the extension. Thinking their might be something missing with typescript but until I can work out how to confirm the issue I just not sure where to turn...

Edited by mksmith

Share this post


Link to post
Share on other sites

Well the first thing was that I had a space in a folder name in the path, it didn't support that and ended the path where the space was, but after fixing that I get this

 

Building file 'RAILSLIDER PAL60.bas'...
batari Basic v1.01dreveng41 ©2005-2017
2600 Basic compilation complete.
User-defined score_graphics.asm found in current directory
free ram: 0
DPC free RAM= 603
0 bytes of ROM space left in bank 1
Music player size: $b0
Track size: $582
632 bytes of ROM space left in bank 2
606 bytes of ROM space left in bank 3
293 bytes of ROM space left in bank 4
360 bytes of ROM space left in bank 5
73 bytes of ROM space left in bank 6
384 bytes of ROM space left in graphics bank

Complete.
Process exit code: 1

 

Sometimes stella doesn't open for me in visual bB either, I think it's when i use åäö in the filename or somewhere in the bas, but I've tried other peoples code to.

I got the same message with exit code: 1 when clearing both fields.

Edited by Lillapojkenpåön

Share this post


Link to post
Share on other sites

Ah thanks - perhaps that might be it! I'll do some checking around spaces and hopefully that will fix these issues. Stella launching might also be affected by the same sort of issues.

 

Update: Spacing is working for me during debugging. Looking at the code the error 1 is stopping any further continuation of the process. I'll PM you.

Edited by mksmith

Share this post


Link to post
Share on other sites

A new release is now available (v0.1.1) which adds the following:

  • Added debugging information to all processes. To view this output, open the Developer Tools using either CTRL+SHIFT+I or Help -> Toggle Developer Tools from the menu.
  • Added options to Stop/Kill the batari Basic and Dasm compilation process

post-66583-0-19841600-1554008514_thumb.png

 

This output displays each step called by the code and may assist in debugging any issues that arise.

  • Like 1

Share this post


Link to post
Share on other sites

A new release is now available (v0.1.3) which adds the following:

  • Fixed issue (hopefully!) where the VS Code Workspace folder was not properly determined (thanks TwentySixHundred!)
  • Fixed issue launching Stella with a space in the compiled game filename
  • Fixed issue validating potential errors from the compiler and is now less strict (thanks Lillapojkenpåön!)
  • Updated the debugger output to include information from stdout and stderr pipes to help identify future potential validating issues

Thanks to TwentySixHundred and Lillapojkenpåön for helping with a couple of compiler/launcher problems. I should be able to now move forward and start looking at cross-platform and additional features.

Edited by mksmith
  • Like 2

Share this post


Link to post
Share on other sites

A new release is now available (v0.1.3) which adds the following:

  • Fixed issue launching Stella with a space in the compiled game filename

 

Spaces in filenames are evil! Seriously though, this is a problem that continuously pops up over the years, since what's a nice naming for people often causes problems for the computer. Good to hear that you fixed it.

  • Like 1

Share this post


Link to post
Share on other sites

Ended up putting qoutes around the filename much like you do for a path. Didn't always appear to be an issue though...

  • Like 1

Share this post


Link to post
Share on other sites

Made a start on a batari Basic Welcome page that you can open to help do some of the base stuff you need. It's a bit convoluted to get scripts, styling etc due security requirements (bit of head scratching!!) but managed to finally get the basics done here to capture clicks and respond back to VS Code to do stuff like open files, folder, website etc.

 

Now to add some styling and additional stuff. Hoping I can set this to auto-open (optional) when starting VS Code but not sure if it's possible as you need to do something (ie. compile) before this side of the extension activates. Anyway will see!

Edited by mksmith
  • Like 1

Share this post


Link to post
Share on other sites

A new release is now available (v0.1.4) which adds the following:

  • Added new Welcome page (CTRL+ALT+W) to provide quick access to key functionality (in progress)
post-66583-0-20861900-1554551661_thumb.png

Make sure you restart VS Code after installing.

  • Like 1

Share this post


Link to post
Share on other sites

Installing the extension

The extension can be installed directly within Visual Studio Code. Complete the following:

  • Install VS Code onto your Windows machine
  • From the menu select View -> Extensions
  • From the Extensions tab, click on the Search Extensions in Marketplace entry box and type batariBasic. Select the extension from the results list and click the Install button.

 

 

This should be pretty clear from the original post. Visual Studio Code has a "new age" interface, though. I made a visual cheat sheet for myself:

 

post-13304-0-39258600-1554921031.jpg

  • Like 1

Share this post


Link to post
Share on other sites

Gemintronic,

 

Thanks for adding the pic (I've addeded to the main post!). I need to work out how to include images in the read me page so I can incorporate something more visual like this.

Edited by mksmith
  • Like 1

Share this post


Link to post
Share on other sites

I've started working on Linux and macOS support - currently on Ubuntu 18.04.1:
post-66583-0-90911400-1555065429_thumb.png

It looks like I've managed to work through most of command line issue such as PATH and bB configuration - and I've also had to manually override the permissions on 2600basic.sh with chmod 777 (not sure how that will work rolled out via an update).

Next step will be to solve the missing binaries:

### ERROR: couldn't find bB binaries for Linux(x86_64). Exiting.

Haven't looked this as yet - compilation of specific binaries (x64 by the looks) might be required not sure...

Any help on how this might work would be appreciated!!!

Anyway progress!

Edited by mksmith

Share this post


Link to post
Share on other sites

Haven't looked this as yet - compilation of specific binaries (x64 by the looks) might be required not sure...

 

Any help on how this might work would be appreciated!!!

The 2600basic.sh script will try to use x86_64 binaries if the plain X86 binaries aren't found or aren't able to successfully run.

 

I'm thinking the 32-bit compatibility libraries aren't present on your system. Try the following: "sudo apt-get install ia32-libs" and see if it gets you further.

Share this post


Link to post
Share on other sites

RevEng,

 

Thanks for the info - in my version of Ubuntu (18.04.1) I was prompted to install lib32ncurses5 and lib32z1 instead after attempting to install ia32-libs (no longer supported). After reading further I also appeared to need to install the i386 architecture as follows:

sudo dpkg --add-architecture i386

sudo apt-get update

 

So that didn't work initially :-o Now after chmod 777 each of the executables it appears to now do stuff :)

post-66583-0-39867400-1555110009_thumb.png

 

Now to launch Stella! Success!

post-66583-0-36132500-1555110178_thumb.png

Edited by mksmith
  • Like 2

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