Jump to content

Photo

batari Basic Extension for Visual Studio Code

batari Basic Compiler Syntax Highlighting

59 replies to this topic

#26 orange808 OFFLINE  

orange808

    Star Raider

  • 57 posts

Posted Sun Feb 17, 2019 9:47 PM

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



#27 mksmith OFFLINE  

mksmith

    Chopper Commander

  • Topic Starter
  • 110 posts
  • Location:Melbourne, Australia

Posted Sun Feb 17, 2019 9:52 PM

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.

#28 mksmith OFFLINE  

mksmith

    Chopper Commander

  • Topic Starter
  • 110 posts
  • Location:Melbourne, Australia

Posted Sun Feb 17, 2019 9:54 PM

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!

#29 mksmith OFFLINE  

mksmith

    Chopper Commander

  • Topic Starter
  • 110 posts
  • Location:Melbourne, Australia

Posted Sun Feb 17, 2019 9:56 PM

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.

#30 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • 28,982 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Tue Feb 19, 2019 6:15 AM

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



#31 mksmith OFFLINE  

mksmith

    Chopper Commander

  • Topic Starter
  • 110 posts
  • Location:Melbourne, Australia

Posted Tue Feb 19, 2019 11:29 PM

@Random,

Pretty impressive editor! I've been using the AlienBill one (https://alienbill.co...yerpalnext.html) which I adjusted to include a few more frames but this one is very feature rich! I need to investigate just what is possible to show in these tabs.

#32 mksmith OFFLINE  

mksmith

    Chopper Commander

  • Topic Starter
  • 110 posts
  • Location:Melbourne, Australia

Posted Sun Mar 10, 2019 11:30 PM

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.

#33 TwentySixHundred ONLINE  

TwentySixHundred

    Moonsweeper

  • 453 posts
  • 1.19 MHz
  • Location:Adelaide, Australia

Posted Mon Mar 11, 2019 12:56 AM

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:



#34 mksmith OFFLINE  

mksmith

    Chopper Commander

  • Topic Starter
  • 110 posts
  • Location:Melbourne, Australia

Posted Mon Mar 11, 2019 2:51 AM

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!

#35 Lillapojkenpćön OFFLINE  

Lillapojkenpćön

    Chopper Commander

  • 195 posts

Posted Tue Mar 26, 2019 4:04 PM

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?



#36 mksmith OFFLINE  

mksmith

    Chopper Commander

  • Topic Starter
  • 110 posts
  • Location:Melbourne, Australia

Posted Wed Mar 27, 2019 3:44 AM

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.

vscode-log.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, Wed Mar 27, 2019 3:19 PM.


#37 Lillapojkenpćön OFFLINE  

Lillapojkenpćön

    Chopper Commander

  • 195 posts

Posted Thu Mar 28, 2019 2:44 PM

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, Thu Mar 28, 2019 2:53 PM.


#38 mksmith OFFLINE  

mksmith

    Chopper Commander

  • Topic Starter
  • 110 posts
  • Location:Melbourne, Australia

Posted Fri Mar 29, 2019 7:45 PM

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, Fri Mar 29, 2019 9:05 PM.


#39 mksmith OFFLINE  

mksmith

    Chopper Commander

  • Topic Starter
  • 110 posts
  • Location:Melbourne, Australia

Posted Sat Mar 30, 2019 11:04 PM

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

vscode-debugger.png

 

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



#40 mksmith OFFLINE  

mksmith

    Chopper Commander

  • Topic Starter
  • 110 posts
  • Location:Melbourne, Australia

Posted Mon Apr 1, 2019 4:04 PM

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, Mon Apr 1, 2019 4:07 PM.


#41 stephena OFFLINE  

stephena

    River Patroller

  • 3,380 posts
  • Stella maintainer
  • Location:Newfoundland, Canada

Posted Mon Apr 1, 2019 5:24 PM

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.



#42 mksmith OFFLINE  

mksmith

    Chopper Commander

  • Topic Starter
  • 110 posts
  • Location:Melbourne, Australia

Posted Mon Apr 1, 2019 10:33 PM

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

#43 TwentySixHundred ONLINE  

TwentySixHundred

    Moonsweeper

  • 453 posts
  • 1.19 MHz
  • Location:Adelaide, Australia

Posted Tue Apr 2, 2019 8:02 AM

Coming along nicely :thumbsup:



#44 mksmith OFFLINE  

mksmith

    Chopper Commander

  • Topic Starter
  • 110 posts
  • Location:Melbourne, Australia

Posted Fri Apr 5, 2019 5:46 PM

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, Sat Apr 6, 2019 6:07 AM.


#45 mksmith OFFLINE  

mksmith

    Chopper Commander

  • Topic Starter
  • 110 posts
  • Location:Melbourne, Australia

Posted Sat Apr 6, 2019 5:54 AM

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)
vscode-welcome.png
Make sure you restart VS Code after installing.

#46 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 9,331 posts

Posted Wed Apr 10, 2019 12:30 PM

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:

 

vsbatari.jpg



#47 mksmith OFFLINE  

mksmith

    Chopper Commander

  • Topic Starter
  • 110 posts
  • Location:Melbourne, Australia

Posted Thu Apr 11, 2019 2:44 AM

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, Thu Apr 11, 2019 2:54 AM.


#48 mksmith OFFLINE  

mksmith

    Chopper Commander

  • Topic Starter
  • 110 posts
  • Location:Melbourne, Australia

Posted Fri Apr 12, 2019 4:43 AM

I've started working on Linux and macOS support - currently on Ubuntu 18.04.1:
Screenshot from 2019-04-12 20-34-27.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, Fri Apr 12, 2019 5:36 AM.


#49 RevEng OFFLINE  

RevEng

    Bit Player

  • 5,192 posts
  • Location:bottom of the stack

Posted Fri Apr 12, 2019 8:23 AM

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.

#50 mksmith OFFLINE  

mksmith

    Chopper Commander

  • Topic Starter
  • 110 posts
  • Location:Melbourne, Australia

Posted Fri Apr 12, 2019 4:43 PM

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   :)

Screenshot from 2019-04-13 08-59-10.png

 

Now to launch Stella! Success!

Screenshot from 2019-04-13 09-01-40.png


Edited by mksmith, Fri Apr 12, 2019 5:03 PM.






Also tagged with one or more of these keywords: batari Basic, Compiler, Syntax Highlighting

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users