English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 22 November 2019, 13:43   #21
S0ulA55a551n
Registered User
S0ulA55a551n's Avatar
 
Join Date: Nov 2010
Location: Rhondda, Wales
Age: 43
Posts: 571
How much work to port this over to VisualCode ? Which I think is based on Atom, or are the significantly different ?
S0ulA55a551n is offline  
Old 22 November 2019, 15:44   #22
MickGyver
Registered User

MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 556
Quote:
Originally Posted by S0ulA55a551n View Post
How much work to port this over to VisualCode ? Which I think is based on Atom, or are the significantly different ?
I don't know, I haven't really researched how to define languages for VS Code. The tools I have made to make the auto-complete and help lookup could easily be modified for other tools. I will have a look how to create language definitions for VS code, maybe it's similar.
MickGyver is offline  
Old 22 November 2019, 20:23   #23
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 619
Quote:
Originally Posted by MickGyver View Post
There are a few things I came to think of:
  1. If you already have any of the tools BringToFront.exe, ConvertEOL.exe and WinUAEREXX.exe, replace them, because at least BringToFront.exe has been updated.
  2. You need to ensure that your firewall/antivirus allows network traffic for WinUAE and WinUAEArexx.exe.
  3. Ensure that you have all the needed packages installed for Atom (atom-shell-commands, symbols-list etc.)
  4. You can toggle the symbols-list from the menu Packages / symbols-list / Toggle.
  5. The indentation in the config files is important. Below is my config file.
    Code:
    "*":
      "atom-shell-commands":
        commands: [
          {
            name: "Execute run.bat"
            command: "cmd"
            arguments: [
              "/C"
              "start"
              "{FileDir}\\run.bat"
            ]
            options:
              cwd: "{FileDir}"
              keymap: "f5"
          }
          {
            name: "Show BB2 Help"
            command: "C:\\Users\\Mick\\.atom\\packages\\language-blitzbasic2\\tools\\BB2Doc.exe"
            arguments: [
              "{CurWord}"
            ]
            options:
              keymap: "f1"
          }
        ]
      "autocomplete-plus":
        confirmCompletion: "tab always, enter when suggestion explicitly selected"
      core:
        disabledPackages: [
          "symbols-view"
        ]
        telemetryConsent: "no"
        themes: [
          "one-light-ui"
          "one-light-syntax"
        ]
      editor:
        fontFamily: "Iosevka, Menlo, Consolas, DejaVu Sans Mono, monospace"
        fontSize: 21
        tabType: "soft"
      "exception-reporting":
        userId: "860f73e9-7355-43ae-a0fc-d099c77724a1"
      "highlight-selected":
        highlightBackground: true
        lightTheme: true
      minimap:
        useHardwareAcceleration: false
      "symbols-list":
        basic: {}
      welcome:
        showOnStartup: false
Code:
"*":
  core:
    autoHideMenuBar: true
  editor:
    fontSize: 16
  "exception-reporting":
    userId: "d35e05d2-d8c6-4660-aadc-217fe2b9c794"
	"atom-shell-commands":
		commands: [
			{
				name: "Show BB2 Help"
				command: "C:\\Users\\Havie\\.atom\\packages\\language-blitzbasic2\\tools\\BB2Doc.exe"
				arguments: [
					"{CurWord}"
				]
				options:
					keymap: "f1"
			}
			{
				name: "Build BB2"
				command: "cmd"
				arguments: [
					"/C"
					"start"
					"{FileDir}\\run.bat"
				]
				options:
					cwd: "{FileDir}"
					keymap: "f5"
			}
		]
Havie is offline  
Old 22 November 2019, 20:30   #24
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 619
My config was totally different so I copied yours and now:

- help works
- F5 starts opens a CMD window in the correct folder but nothing happens.

Some good progress.
Havie is offline  
Old 22 November 2019, 20:39   #25
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 619
Realised that some of my paths were wrong so now F5 brings up command window, saves project and runs opens WinUAE but doesn't run it (yet)!
Havie is offline  
Old 22 November 2019, 20:44   #26
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 619
This is what my run.bat file looks like - hopefully you can sort me out (nearly there).

Code:
:: --- Blitz Basic 2.1 build batch script ---
:: ---   by MickGyver (Mikael Norrgard)   ---

:: You need to edit three things:
:: 1. WinUAE executable name and location, and the WinUAE config to use.
:: 2. Add ConvertEOL commands for every .bb2 file in the project.
:: 3. Edit the WinUAERexx command according to your project.

@echo off

:main

:: WinUAE 64-bit: winuae64.exe, WinUAE 32-bit: winuae.exe
tasklist /FI "IMAGENAME eq winuae.exe" 2>NUL | find /I /N "winuae.exe">NUL

:: If WinUAE is not running, then run it!
if %ERRORLEVEL%==1 goto winuaenotrunning

:: Run ConvertEOL for every *_asc.bb2 file in your project
ConvertEOL unix test_asc.bb2 project.bb2
:: ConvertEOL unix include1_asc.bb2 include1.bb2
:: ...

:: Run the ARexx script
:: First .bb2 file is main source file, the following are included files.
:: BLITZPROJECTS: in this example is a virtual harddrive (Windows folder) set up in WinUAE where I store my BB2 projects.
WinUAEArexx blitzbasic2 1000 "M:\Work\EMULATORS\Amiga\WinUAE3000\Hard Disk\Programming Hard Disk\Programming Files\test.bb2"
:: Below is a template for multiple source files, the first one has to be the main project file
:: WinUAEArexx blitzbasic2 1000 "BLITZPROJECTS:/project/project.bb2" "BLITZPROJECTS:/project/include1.bb2" "BLITZPROJECTS:/project/include2.bb2"

:: Bring WinUAE to front
BringToFront "WinUAE"

:: Go to end of script
goto end

:winuaenotrunning

echo -------------------------------------------------------
echo Starting WinUAE and SuperTED (Close the nag screen!)
echo -------------------------------------------------------
:: Change the path to the WinUAE exectuable and the configuration according to your environment
start "" "M:\Work\EMULATORS\Amiga\WinUAE3000\winuae.exe" -f "M:\Work\EMULATORS\Amiga\WinUAE3000\configurations\atom"
timeout 7
goto main


:end
timeout 5
exit
Havie is offline  
Old 22 November 2019, 20:57   #27
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 619
Now I get these messages when pressing F5:

https://ibb.co/S3SmQfQ
Havie is offline  
Old 23 November 2019, 19:30   #28
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 619
Damn - now Atom won't run (although it's in task manager).
Havie is offline  
Old 27 November 2019, 13:56   #29
MickGyver
Registered User

MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 556
Quote:
Originally Posted by Havie View Post
Damn - now Atom won't run (although it's in task manager).
Did you sort it out eventually, or did you give up?
MickGyver is offline  
Old 27 November 2019, 23:23   #30
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 619
Haven't had anytime this week. Not giving up, just need some time...
Havie is offline  
Old 28 November 2019, 14:55   #31
MickGyver
Registered User

MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 556
Version 0.3

I uploaded a new version with these improvements:
  • Showing help for string$ functions now works.
  • Added the MTPlayFX statement to help system and as snippet.
  • Added a few NEWTYPES as snippets (mostly BB2 object types).
  • Added an SFXInit statement as snippet (use with PTPlayer).
Use same download link:
http://gamephase.net/files/linked/AtomBB2.zip
MickGyver is offline  
Old 30 November 2019, 21:22   #32
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 619
Righto - got it to run again (must have messed up config file). I think Atom is now working fine but need to get compiling in Winuae working. My .bat files is obviously not right. The location of Winuae is:

M:\Work\EMULATORS\Amiga\WinUAE3000

And here is my .bat file - I'm probably being a but thick on the editing of this file! F5 opens a command window and does seem to run the .bat file.

Code:
:: --- Blitz Basic 2.1 build batch script ---
:: ---   by MickGyver (Mikael Norrgard)   ---

:: You need to edit three things:
:: 1. WinUAE executable name and location, and the WinUAE config to use.
:: 2. Add ConvertEOL commands for every .bb2 file in the project.
:: 3. Edit the WinUAERexx command according to your project.

@echo off

:main

:: WinUAE 64-bit: winuae64.exe, WinUAE 32-bit: winuae.exe
tasklist /FI "IMAGENAME eq winuae.exe" 2>NUL | find /I /N "winuae.exe">NUL

:: If WinUAE is not running, then run it!
if %ERRORLEVEL%==1 goto winuaenotrunning

:: Run ConvertEOL for every *_asc.bb2 file in your project
ConvertEOL unix "c:users/havie/desktop/atombb2/BB Filestest_asc.bb2" project.bb2
:: ConvertEOL unix include1_asc.bb2 include1.bb2
:: ...

:: Run the ARexx script
:: First .bb2 file is main source file, the following are included files.
:: BLITZPROJECTS: in this example is a virtual harddrive (Windows folder) set up in WinUAE where I store my BB2 projects.
WinUAEArexx blitzbasic2 1000 "M:\Work\EMULATORS\Amiga\WinUAE3000\Hard Disk\Programming Hard Disk\Programming Files\test.bb2"
:: Below is a template for multiple source files, the first one has to be the main project file
:: WinUAEArexx blitzbasic2 1000 "BLITZPROJECTS:/project/project.bb2" "BLITZPROJECTS:/project/include1.bb2" "BLITZPROJECTS:/project/include2.bb2"

:: Bring WinUAE to front
c:users/havie/desktop/atombb2/BringToFront "WinUAE"

:: Go to end of script
goto end

:winuaenotrunning

echo -------------------------------------------------------
echo Starting WinUAE and SuperTED (Close the nag screen!)
echo -------------------------------------------------------
:: Change the path to the WinUAE exectuable and the configuration according to your environment
start "" "M:\Work\EMULATORS\Amiga\WinUAE3000\winuae.exe" -f "M:\Work\EMULATORS\Amiga\WinUAE3000\configurations\atom"
timeout 7
goto main


:end
timeout 5
exit
Havie is offline  
Old 05 December 2019, 13:44   #33
MickGyver
Registered User

MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 556
Quote:
Originally Posted by Havie View Post
And here is my .bat file - I'm probably being a but thick on the editing of this file! F5 opens a command window and does seem to run the .bat file.
There are several issues in your batch file.

1. The ConvertEOL does not need the full path, you shouldn't have spaces in the filenames and the output filename is wrong (should be same name minus the _asc suffix).
Code:
ConvertEOL unix "c:users/havie/desktop/atombb2/BB Filestest_asc.bb2" project.bb2

->

ConvertEOL unix BB_Filestest_asc.bb2 BB_Filestest.bb2
2. The filepath arguments for the WinUAEArexx command should be as seen from the emulated Amiga side (folder as virtual hdd). The path separator is a normal slash and not a backslash.
Code:
WinUAEArexx blitzbasic2 1000 "M:\Work\EMULATORS\Amiga\WinUAE3000\Hard Disk\Programming Hard Disk\Programming Files\test.bb2"

->

WinUAEArexx blitzbasic2 1000 "NAMEOFHDD:/Programming Files/BB_Filestest.bb2"


3. Is your configuration file just named "atom" without the ".uae" file extension?
Code:
start "" "M:\Work\EMULATORS\Amiga\WinUAE3000\winuae.exe" -f "M:\Work\EMULATORS\Amiga\WinUAE3000\configurations\atom"
MickGyver is offline  
Old 16 January 2020, 22:35   #34
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 619
Hi I' back!

Been a bit of delay as the Windows install went belly up and loads of programs stopped working. In the end I had to reinstall Windows 10 and all is now well. Then Christmas happened...

Anyway, determined to get this working. I currently have the editor working fine including help, highlighting and view of source code. Pressing F5 brings up WinUAEand highlights the atom config but doesn't actually run WinuUAE.

I get the following errors in the run window:

No connection could be made as the target machine actively refused it and WINUAEArexx can't find the path (which seems right):

WinUAEArexx blitzbasic2 1000 "Programming Hard Disk:Programming Files/test.bb2"

I have allowed WinUAE in Windows Defender but connection still comes up as refused.

Any more suggestions?
Havie is offline  
Old 18 January 2020, 09:08   #35
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 619
Right - WinUAE runs and loads up workbench now and the connection error has gone.

Just need to workout why BB2 isn't running...
Havie is offline  
Old 19 January 2020, 00:28   #36
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 619
The problem is in this line:

WinUAEArexx blitzbasic2 1000 "HD1:/Programming Files/project.bb2"

and the error says - can't find path - so I am obviously missing something with file path.

in an earlier post you said that the path should be the hard disk as seen from the Amiga. So in this case the disk is HD1 and a folder in the root directory is Programming Files.

Help!!!
Havie is offline  
Old 19 January 2020, 10:43   #37
MickGyver
Registered User

MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 556
Version 0.4

I uploaded a new version with these improvements:
  • run.bat is now less confusing to configure.
Use same download link:
http://gamephase.net/files/linked/AtomBB2.zip
MickGyver is offline  
Old 19 January 2020, 10:47   #38
MickGyver
Registered User

MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 556
Quote:
Originally Posted by Havie View Post
The problem is in this line:

WinUAEArexx blitzbasic2 1000 "HD1:/Programming Files/project.bb2"

and the error says - can't find path - so I am obviously missing something with file path.

in an earlier post you said that the path should be the hard disk as seen from the Amiga. So in this case the disk is HD1 and a folder in the root directory is Programming Files.

Help!!!
Oh man, you really are having problems with this!

I can't help much since I don't have access to your computer, but is the error on the Windows side? In that case, WinUAEArexx can't be found.

I just uploaded a new version with a hopefully easier to configure run.bat. Try that one!
MickGyver is offline  
Old 19 January 2020, 21:42   #39
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 619
I'm not giving up!!!
Havie is offline  
Old 19 January 2020, 21:43   #40
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 619
Error is on Windows side and I thought that it was not finding the Amiga path...
Havie is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
BB2 User Defined Language for Notepad++ MickGyver Coders. Blitz Basic 105 21 February 2020 21:13
Looking for FizEd text editor apsteinmetz request.Apps 2 12 April 2019 22:12
Text/coding Editor Torqual support.Apps 18 23 December 2018 23:18
new text editor flipper Coders. Tutorials 8 17 December 2007 10:57
Text editor for A500 oldpx request.Apps 12 19 December 2002 02:02

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 20:36.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Page generated in 0.09639 seconds with 13 queries